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uBACA,CACAjyQ,UACA,EACA,CACA,mDC7Be,kBACf,cACA9jK,2BACAS,QACAJ,cACAC,gBACAw+K,cAGAlwH,OAEAA,CACA","names":["type","features","geometry","coordinates","properties","name","id","map","BaseObject","this","_disposed","_disposers","className","prototype","debug","Object","defineProperty","get","_uid","registry","enumerable","configurable","_id","set","value","_map","Dictionary","_delayedMap","addDelayedMap","property","delayedMap","hasKey","setKey","getKey","push","target","processDelayedMap","_this","each","list","target_1","$array","item","removeKey","applyTheme","themes","getCurrentThemes","theme","index","_themes","isDisposed","dispose","a","length","shift","clearCache","clonedFrom","clones","removeValue","uid","addDisposer","removeDispose","splice","clone","cloneId","newObject","constructor","copyFrom","_clones","List","object","_className","setCache","key","ttl","cache","getCache","undefined","setTimeout","fn","delay","disposer","Disposer","clearTimeout","setInterval","config","processConfig","e","raiseCriticalError","$object","configKey","item_1","configValue","call","hasProperty","$type","forceCreate","asIs","createClassInstance","Adapter","processAdapters","EventDispatcher","processEvents","window","parent_1","asFunction","Error","ListTemplate","OrderedListTemplate","SortedListTemplate","processListTemplate","processOrderedTemplate","template","templateValue","entryKey","entryValue","listItem","DictionaryTemplate","processDictionaryTemplate","processList","maybeColorOrPercent","values","processDictionary","Color","Percent","isReserved","configOrder","processingErrors","errors","join","_processingErrors","match","percent","color","entry","add","callback","priority","has","on","create","getConfigEntryType","hasIndex","getIndex","setIndex","indexOf","pop","insert","parent","itemCount","extraCount","createEntryInstance","b","field","res","prop","BaseObjectEvents","_super","__extends","_eventDispatcher","dispatch","eventType","data","events","isEnabled","dispatchImmediately","source","Component","dataFields","_dataSources","_parseDataFrom","_dataDisposers","_currentDataSetId","_start","_end","skipRangeEvent","rangeChangeDuration","rangeChangeEasing","$ease","parsingStepDuration","dataInvalid","rawDataInvalid","dataRangeInvalid","dataItemsInvalid","interpolationDuration","interpolationEasing","sequencedInterpolation","sequencedInterpolationDelay","dataValidationProgress","_addAllDataItems","_usesData","minZoomCount","maxZoomCount","_dataItems","createDataItem","handleDataItemAdded","handleDataItemRemoved","ListDisposer","invalidateData","dataUsers","handleDataUserAdded","MultiDisposer","maxZoomDeclination","DataItem","event","newValue","dataProvider","handleDataItemValueChange","dataItem","invalidateDataItems","handleDataItemWorkingValueChange","handleDataItemWorkingLocationChange","handleDataItemCalculatedValueChange","handleDataItemPropertyChange","processDataItem","dataContext","hasSomeValues_1","fieldValue","fieldName","_adapterO","apply","hasChildren","mainDataSet","children","count","i","rawDataItem","childDataItem","propertyFields","f","setProperty","remove","updateDataItem","dataContext_1","child","validateDataElements","endIndex","startIndex","dataItems","validateDataElement","validate","addData","removeCount","skipRaw","inited","Array","removeData","dataUser","dataItem_1","disabled","isTemplate","system","$iter","iterator","x","invalidateDataUsers","invalidate","invalidateDataRange","validateDataRange","_prevStartIndex","_prevEndIndex","rangeChangeUpdate","appendDataItems","sliceData","_workingStartIndex","_workingEndIndex","__disabled","invalidateRawData","validateRawData","clear","disposeData","_startIndex","_endIndex","_dataSets","getDataItem","validateData","_data","preloader","counter","startTime","Date","now","n","_loop_1","this_1","dataUserDataItem","visible","progress","state_1","hidden","appeared","stacked","hide","_internalDefaultsApplied","applyInternalDefaults","validateDataItems","setData","getDataSource","DataSource","component","setDataSourceEvents","adapter","val","dataSourceDateFields","dataSourceNumberFields","loadData","load","populateDataSourceFields","targetList","ds","ev","openModal","message","incremental","keepCount","updateCurrentData","_responsive","Responsive","zoom","range","instantly","declination","start","end","maxZoomFactor","_finalStart","_finalEnd","minZoomFactor","rangeChangeAnimation","options","animationOptions","to","stop","kill","animate","isFinished","zoomToIndexes","$math","getPropertyValue","setPropertyValue","Math","round","indexToPosition","max","floor","min","ceil","removeFromInvalids","dataSets","setDataSet","_updateDataItemIndexes","_index","bindDataField","invalidateProcessedData","resetProcessedRange","_dataUsers","$utils","reinit","_inited","deepInvalidate","getExporting","_export","_exportData","handleDataUpdated","arg","setDisabled","changed","setShowOnInit","_showOnInitDisposer2","once","hideInitially","setBaseId","_baseId","_systemCheckIfValidate","Container","_childrenByLayout","_childrenDisposers","hasFocused","setStateOnSprites","layoutInvalid","_absoluteWidth","_absoluteHeight","_shouldBeReady","_tapToActivate","tapTimeout","_element","paper","addGroup","group","element","_positionPrecision","DictionaryDisposer","handleChildAdded","handleChildRemoved","processChild","insertKey","handleChildTransform","sortAndAdd","sortChildren","addChildren","oldValue","removeElement","isMeasured","invalidateLayout","layout","_children","fixed_1","relative_1","percentWidth","percentHeight","concat","calculateRelativeSize","totalRelativeWidth","totalRelativeHeight","relativeWidth","relativeHeight","zindexed","sortArray","idx","sort","ai","zIndex","bi","group_1","isCorrect","node","childNodes","len","_background","addToBack","createChild","classType","sprite","removeChildren","disposeChildren","createBackground","processBackground","background","handleGlobalScale","Rectangle","fill","InterfaceColorSet","getFor","validateLayout","_availableWidth","innerWidth","_availableHeight","innerHeight","measuredWidth","measuredHeight","allValid","maxWidth","maxHeight","pixelMarginRight","pixelMarginLeft","invalid","pixelMarginTop","pixelMarginBottom","childMeasuredWidth","childMeasuredHeight","align","valign","arrange","left","right","top","bottom","maxCellWidth","minCellWidth","columnCount","contentLeft","contentRight","contentTop","contentBottom","paddingLeft","pixelPaddingLeft","paddingRight","pixelPaddingRight","paddingTop","pixelPaddingTop","paddingBottom","pixelPaddingBottom","nextX","nextY","row","column","columnWidth","rowHeight","minWidth","minHeight","childrenCopy","reverseOrder","reverse","fixedWidthGrid","maxColumns","getColumnWidth","validatePosition","y","childMarginLeft","childMarginRight","childMarginTop","childMarginBottom","childWidth","childHeight","childLeft","childRight","childTop","childBottom","maxLeft","maxRight","pixelX","maxTop","maxBottom","pixelY","nextColumnWidth","moveTo","noneBBox","bbox","width","height","_pixelWidth","_pixelHeight","measuredContentWidth","measuredContentHeight","contentAlign","contentValign","dx_1","dy_1","mwa","mha","ddx","ddy","oldBBox","contentWidth","contentHeight","_bbox","prevLeft","prevTop","prevBotttom","prevRight","measure","event_1","dummyData","updateCenter","updateBackground","fitsToBounds","point","deviation","pixelWidth","pixelHeight","setStateOnChildren","shouldClone","_preloader","tooltipContainer","setPaper","topParent","setDataItem","_dataItem","measureElement","setSVGAttribute","invalidateLabels","hardInvalidate","handleValidate","setState","transitionDuration","easing","stateName","SpriteState","isActive","setActive","dispatchReady","isReady","allReady_1","_systemUpdate","skippedSprites","_systemValidatePositions","positionInvalid","_systemValidateLayouts","setTapToActivate","interactions","isTouchProtected","setEventDisposer","handleTapToActivate","initTapTimeout","getInteraction","body","isLocalElement","pointer","svg","handleTapToActivateDeactivation","_tapToActivateTimeout","tapToActivate","moveHtmlContainer","htmlElement","newContainer","$dom","htmlContainer","svgDiv","svgContainer","appendChild","SVGContainer","initSensor","hasLicense","Sprite","_disabled","hasProperties","categories","dates","locations","workingLocations","sprites","_visible","_hidden","_ignoreMinMax","isHiding","_valueAnimations","_locationAnimations","_animations","AnimationDisposer","setVisibility","noChangeValues","defaultState","hiddenState","show","duration","fields","animation_1","_hideDisposer","setWorkingValue","animation","toValue","animation_2","anim","getDuration","getValue","calculated","getWorkingValue","realName","workingValue","getActualWorkingValue","setValue","currentValue","newDuration","setCalculatedValue","childObject","from","handleInterpolationProgress","valueAnimation","setLocation","setWorkingLocation","workingLocation","locationAnimation","setDate","date","dateFormatter","parse","getTime","getDate","setCategory","opacity","Animation","hasValue","depth","_dataContext","addSprite","verbose","commercialLicense","classNamePrefix","autoSetClassName","minPolylineStep","onlyShowOnViewport","queue","autoDispose","licenses","suppressErrors","suppressWarnings","animationsEnabled","nonce","deferredDelay","disableHoverOnTransform","pixelPerfectPrecision","Registry","loadedThemes","_uidCount","registeredClasses","_placeholders","invalidSprites","invalidDatas","invalidRawDatas","invalidDataItems","invalidDataRange","invalidPositions","invalidLayouts","baseSprites","baseSpritesByUid","deferred","getUniqueId","noBase","addEventListener","setAttribute","clientWidth","clientHeight","removeAttribute","getPlaceholder","$string","addToInvalidComponents","baseId","removeFromInvalidComponents","addToInvalidSprites","removeFromInvalidSprites","addToInvalidPositions","removeFromInvalidPositions","addToInvalidLayouts","removeFromInvalidLayouts","is","visualProperties","SpriteEventDispatcher","_bindings","_isTemplate","_isPath","_ready","_isHidden","isShowing","isStandaloneInstance","_isActive","_mask","MutableValueDisposer","_language","_exporting","_exportable","applyOnClones","_measuredWidthSelf","_measuredHeightSelf","maxLeftSelf","maxRightSelf","maxTopSelf","maxBottomSelf","_isDragged","_isResized","_internalDisabled","_updateDisabled","rollOutDelay","isBaseSprite","ex","ey","dragWhileResize","measureFailed","preventShow","cloneTooltip","_prevMeasuredWidth","_prevMeasuredHeight","_measuredWidth","_measuredHeight","_isMeasured","setClassName","_parent","beforeDraw","draw","afterDraw","invalidatePosition","dx","dy","attr","display","removeSVGAttribute","sizeChanged","prevGroupTransform","transformString","rotation","scale","nonScaling","globalScale","showTooltipOn","updateTooltipPosition","maskRectangle","_maskRectangle","_clipElement","e_1","_a","horizontalCenter","verticalCenter","_b","__values","keys","_c","next","done","e_1_1","error","return","applyFilters","interactionsEnabled","showOnInit","applyMask","hideTooltip","showTooltip","nonScalingStroke","strokeWidth","updateFilterScale","filters","filter","states","_interaction","_plugins","plugins","configField","virtualParent","exportable","_tooltip","tooltip","_showSystemTooltip","showSystemTooltip","fillModifier","strokeModifier","focusFilter","removeChild","firstChild","_svgContainer","_interactionDisposer","_urlDisposer","_numberFormatter","_focusFilter","stroke","_filters","_alwaysShowDisposers","applyAccessibility","_topParent","oldParent","_tooltipContainer","handleAlwaysShowTooltip","handleAlwaysShow","oldDisposers","oldDisposer","_virtualParent","appendDefs","filterElement","appendDef","fill_1","modify","stroke_1","_clipPath","_paper","parent_2","getGhostPaper","_htmlContainer","parent_3","_titleElement","_descriptionElement","onAll","setSVGAttributes","fillOpacity","strokeOpacity","shapeRendering","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","focusable","tabindex","role","attribute","removeAttr","addClass","userClassName","uidAttr","updateClipPath","mask","createClipPath","width_1","height_1","removeChildNodes","filterUnits","appendPrimitives","removeClipPath","setElement","SVGPathElement","definedBBox","svgBBox","getBBox","prevElementTransform","elementX","elementY","elementWidth","elementHeigth","top_1","pixelPerfect","positionPrecision","matrix","createSVGMatrix","c","d","p1","createSVGPoint","p2","p3","p4","pt1","matrixTransform","pt2","pt3","pt4","isHover","tooltipText","tooltipHTML","insertBefore","moveValue","insertAfter","getRelativeX","getRelativeY","getPixelX","pixel","getPixelY","isDragged","reset","rect","hitTest","ax1","ay1","bx1","by1","_states","state","processState","hoverable","clickable","length_1","getSvgPoint","getBoundingClientRect","isHidden","transitionEasing","transitTo","applyCurrentState","isDown","downPointers","isFocused","transition","allValues","propertyName","finalValue","newFilters_1","stateFilter","newFilter","currentFilter","pushAll","isInTransition","animations","isInteractive","handleOver","isRealHover","handleOut","handleDown","handleUp","handleFocus","handleBlur","current","hasChild","numberFormatter","NumberFormatter","language","_dateFormatter","DateFormatter","_durationFormatter","durationFormatter","DurationFormatter","Language","exporting","populateString","string","tags","getTextFormatter","escape","tag","replace","getTagValue","split","unescape","tagName","format","matches","parts","reg","exec","params","reg2","matches2","method","getTagValueFromObject","populateStringFrom","formatApplied","part","numberValue","dateValue","durationValue","encodeURIComponent","formatParts","formatterType","$strings","dataContext_2","dataContext2_1","propValue","globalAdapter","setColorProperty","toString","setPercentProperty","transform","precision","length_2","bind","bindToProperty","modifier","observe","listener","context","title","readerTitle","description","readerDescription","readerHidden","checked","readerChecked","controls","readerControls","live","readerLive","orientation","readerOrientation","valueNow","readerValueNow","valueText","readerValueText","labelledByIds","describedByIds","labelledBy","readerLabelledBy","describedBy","readerDescribedBy","titleElement","titleId","textContent","descriptionElement","descriptionId","keyboardOptions","mouseOptions","interaction","dom","trackable","draggable","swipeable","resizable","wheelable","contextMenuDisabled","inert","_tabindex","focusedElement","hoverOnFocus","inertiaOptions","applyCursorStyle","handleDragStart","handleDragMove","handleDragStop","touch","originalPosition","dragStart","dragStop","cancelled","cssScale","hoverOptions","_outTimeout","targetSprite","keepTargetHover","handleOutReal","hitOptions","originalAngle","originalScale","handleToggle","urlHandler","cursorOverStyle","MouseCursorStyle","baseSprite","url","urlTarget","location","href","open","swipeOptions","handleResize","svgPoint1","point1","svgPoint2","point2","svgMidPoint","parentPoint1","startPoint1","parentPoint2","startPoint2","spriteMidPoint","parentPoint","cursorOptions","style","overStyle","defaultStyle","applyCursorOverStyle","downStyle","pointerEvents","exp","Export","nonExportableSprites","modalPrefix","modal","text","closeModal","popups","openPopup","closeAllPopups","minX","maxX","minY","maxY","parentWidth","setMaxWidth","prevWidth","prevHeight","previousWidth","previousHeight","parentHeight","setMaxHeight","Number","_relativeHeight","_relativeWidth","margin","marginTop","marginRight","marginBottom","marginLeft","padding","setPath","setFill","toColor","realFill","Pattern","LinearGradient","RadialGradient","setStroke","realStroke","hex","_rtl","rtl","showReal","_hideAnimation","_showHideDisposer","hideReal","currentSprite","hiddenState_1","getVisibility","visibility","toFront","toBack","removeClass","_tooltipDataItem","_tooltipColorSource","tooltipPosition","lastPointer","tooltipDataItem","colorSource_1","tooltipColorSource_1","tooltipColorSource","getStrokeFromObject","getFillFromObject","animationDuration","label","rgb","autoTextColor","alternative","html","currentText","globalPoint","getTooltipX","getTooltipY","pointTooltipTo","showInViewport","pointTo","closable","content","console","log","getCursorStyle","cursorDowntyle","_showOnInitDisposer","appear","init","arguments","_interactionEvents","_dispatchSpriteEvent","imev","_dispatchSpritePointEvent","spritePoint","svgPoint","_addInteractionObjectEvent","insertKeyIfEmpty","CounterDisposer","increment","_on","info","disposers","togglable","TargetedEventDispatcher","spriteValue","_x","System","_isPaused","dummyCounter","_frameRequested","updateStepDuration","time","reportTime","msg","update","invalidData","validateLayouts","validatePositions","hasSkipped","checkIfValidate2","triggerIdle","requestFrame","all0_1","raf","softInvalidate","container","$log","VERSION","separators","CSVParser","contentType","delimiter","skipRows","skipEmpty","useColumnNames","isCSV","getDelimiterFromData","separator","lines","sep","columns","lineColums","csv","col","CSVToArray","empty","emptyAs","numbers","parsableNumbers","parsableDates","cols","dataPoint","maybeToEmpty","maybeToNumber","maybeToDate","objPattern","RegExp","arrData","arrMatches","strMatchedDelimiter","strMatchedValue","DataParser","dataLoader","DataLoader","sources","isArray","promises","$net","requestOptions","Promise","all","then","result","code","xhr","status","translate","processData","response","catch","getParserByType","parser","JSONParser","getParserByData","numberFields","dateFields","dateFormat","inputDateFormat","_requestOptions","_incremental","_incrementalParams","_keepCount","_updateCurrentData","showPreloader","event_2","lastLoad","disableCache","timestampUrl","_url","addUrlParams","incrementalParams","_parser","_reloadFrequency","_reloadDisposer","_reloadTimeout","reloadFrequency","isJSON","JSON","SVGDefaults","Button","tooltipY","iconPosition","interfaceColors","cornerRadius","Label","hoverState","downState","_icon","icon","currentIcon","position","_label","RoundedRectangle","Circle","r","pixelRadius","radius","isOversized","wrap","truncate","fullWords","ellipsis","textAlign","textValign","baseLineRatio","handleMaxSize","availableWidth","availableHeight","updateCurrentText","output","supportsForeignObject","_currentFormat","_prevStatus","getLineBBox","lineInfo","parentNode","oldW","oldH","getAttr","textPathElement","resetBBox","currentHeight","currentFormat","line","chunks","chunk","ignoreFormatting","currentLineHeight","firstChunk","skipTextChunks","getLineInfo","getSVGLineElement","complex","translateStyleShortcuts","getSvgElement","lineText","avgCharWidth","excessChars","addEllipsis","node_1","node_2","elementText","maxChars","lastNode","lastChild","splitLines","lineText_1","cleanUp","restOfLine","addLineInfo","tempElement","offset","lineInfo_1","maybeHideOversized","alignSVGText","hideUnused","fo","foreignObject","lineElement","getHTMLLineElement","overflow","setStyles","pathElement","hideOversized","direction","getAttribute","div","document","createElement","innerHTML","wordWrap","whiteSpace","selectable","addStyle","webkitUserSelect","msUserSelect","removeStyle","initLineCache","attrNS","path","startOffset","removeChildrenByTag","divs","getElementsByTagName","_sourceDataItemEvents","classid","btoa","defs","createElementNS","defaultRules","relevant","ResponsiveBreakpoints","stateId","Line","x1","y1","x2","y2","delta","positionToPoint","angle","Modal","showCurtain","Popup","PointedRectangle","cr","w","h","stemX","stemY","pointerX","pointerY","bwh","pointerBaseWidth","maxcr","crtl","crtr","crbr","crbl","lineT","lineR","lineB","lineL","d1","d2","Infinity","PointedShape","pointerLength","Polyarc","controlPointDistance","controlPointPosition","makePath","_distance","segments","_realSegments","points","realPoints","$path","p","pointA","pointB","distanceAB","cpDistance","controlPoint1","controlPoint2","stepCount","prevPoint","i_1","Polyline","Polygon","_currentPoints","slice","s","segment","areaHole","areaArr","holeArr","pointsArr","area","areaAndHole","coords","pointsArr_1","hole","surface","hlen","_morpher","Morpher","deltaAngle","abs","totalDistance","distance","currentDistance","positionA","positionB","midPoint","Polyspline","tensionX","tensionY","allPoints","first","last","closed_1","p0","controlPointA","controlPointB","k","getClosestPointIndex","closest","extend","f0","f1","point_1","rules","_elements","_IOs","_content","_title","_classPrefix","_defaultStyles","_showCurtain","_draggable","_align","_dynamicResize","_verticalAlign","_shift","_tempShift","_readerTitle","_closable","_cssLoaded","_fitTo","_sized","wrapper","curtain","positionElement","close","parentElement","releasePointers","forceResize","dynamicResize","images","image","complete","toStyle","verticalAlign","setupDragging","header","unprepElement","off","createContentElement","getClassNames","wrapperClass","classPrefix","headerClass","titleClass","contentClass","insideClass","curtainClass","closeClass","classNames","disablePointers","defaultStyles","loadDefaultCSS","createCurtainElement","applyEvents","applyReaderSettings","_left","_right","_top","_bottom","PopupCSS","prefix","cs","fg","bg","alpha","abg","StyleRule","rgba","cursor","popupCSS","getShadowRoot","el","keyboard","_spriteInteractionsEnabled","elements","classPrefixRaw","ResizeButton","minSide","cornerRadiusTopLeft","cornerRadiusTopRight","cornerRadiusBottomRight","cornerRadiusBottomLeft","tl","tr","bl","br","Scrollbar","_previousStart","_previousEnd","_prevStart","_prevEnd","_isBusy","_skipRangeEvents","updateWhileMoving","animationEasing","startGrip","endGrip","updateThumb","thumb","dispatchRangeChange","hideGrips","updateSize","updateExtremes","handleBgHit","makeBusy","thumbX","_thumbAnimation","thumbY","makeUnbusy","_thumb","_unbusyTimeout","stopAnimations","_zoomAnimation","makeUnbusyReal","_usingGrip","dispatchEvents","innerWidth_1","innerHeight_1","getPosition","__start","__end","skipRangeEvents","fixRange","updateByOrientation","_startGrip","button","processGrip","_endGrip","handleGripDrag","cursorDownStyle","handleThumbPosition","handleDoubleClick","preventDefault","newStart","newEnd","zoomAnimation","innerWidth_2","innerHeight_2","_hideGrips","_overDisposer","_outDisposer","Tooltip","_boundingRect","_pointTo","fitPointerToBounds","_verticalOrientation","fixDoc","dropShadow","DropShadowFilter","drawBackground","pointerOrientation","handleVisibility","textX","textY","boundingRect","textW","textH","ignoreBounds","documentWidth","offsetWidth","offsetHeight","textWidth","bgWidth","bgHeight","bgY","boundX1","boundX2","boundY1","boundY2","delayedPointTo","_pointToDisposer","_animation","setBounds","rectangle","oldRect","_boundingContainer","updateBounds","boundingContainer","Triangle","WavedLine","waveLength","waveHeight","tension","wavedLine","WavedRectangle","waveLengthH","waveHeightH","waveLengthV","waveHeightV","td","rd","bd","ld","wavedTop","wavedRight","wavedBottom","wavedLeft","setWavedSides","pdfmakePromise","fontFamilySrcRegexp","blobToDataUri","blob","resolve","reject","FileReader","onload","onerror","readAsDataURL","getCssRules","__awaiter","sheet","__generator","trys","cssRules","sent","success","loadStylesheet","doc","e_2","head","eachStylesheet","topUrl","rule","CSSRule","IMPORT_RULE","eachStylesheets","iframe","doc_1","src","contentDocument","styleSheets","_formatOptions","_extraSprites","_validateSprites","dataFieldsOrder","_dynamicDataFields","_removedObjects","_hiddenObjects","_objectsAlreadyHidden","_filePrefix","useWebFonts","useRetina","useSimplifiedExport","timeoutDelay","_exportRunning","_prevHasData","_container","quality","fontSize","imageFormat","addURL","addColumnNames","indent","useLocale","addBOM","printMethod","formatOptions","_menu","menu","branch","unsupported","typeSupported","export","_disablePointers","_releasePointers","obj","supported","getFormatOptions","_hasData","print","_getFunction","getImage","getSVG","getPDF","getExcel","getCSV","getJSON","getHTML","getPrint","func","handleCustom","hideTimeout","_timeoutTimeout","showTimeout","hideNonExportableSprites","restoreNonExportableSprites","hidePreloader","download","filePrefix","callbackTarget","getFontFamilies","DOMURL","blobs","getDOMURL","FONT_FACE_RULE","cssText_1","cssText","urls","after","fullUrl","url_1","e_3","webFontFilter","responseType","supportsBlobUri","navigator","msSaveOrOpenBlob","createObjectURL","includeExtras","prehidden","canvas","newCanvas","uri","e_4","awaitValidSprites","simplifiedImageExport","getCanvas","addExtras","disposeCanvas","toDataURL","getContentType","stack","getImageAdvanced","advanced","middleLeft_1","middleTop_1","middleWidth_1","middleHeight_1","extraRight_1","extraBottom_1","extras","ctx_1","left_1","right_1","bottom_1","extraSprites","extraSprite","extra","extraCanvas","extraWidth","extraHeight","getCanvasAdvanced","crop","getDisposableCanvas","getContext","backgroundColor","findBackgroundColor","fillStyle","fillRect","drawImage","font","pixelRatio","ctx","img","getPixelRatio","getAdjustedScale","fonts","imagesToDataURI","prepForeignObjects","normalizeSVG","serializeElement","Blob","loadNewImage","revokeObjectURL","restoreRemovedObjects","canvg","useCORS","ignoreDimensions","scaleWidth","scaleHeight","fromString","render","contains","widthScale","heightScale","adjWidth","adjHeight","querySelectorAll","getAttributeNS","XLINK","svgToDataURI","imageToDataURI","objects","temporarilyRemoveObject","keepTainted","e_5","charset","setAttributeNS","e_6","placeholder","e_7","e_8","crossOrigin","currentHref","Image","onabort","self","URL","webkitURL","encodeURI","dimParams","styleParams","fos","ms","$browser","XMLSerializer","serializeToString","addFont","paths","normal","vfs","bytes","bold","italics","bolditalics","pdfmake","defaultMargins","extraMargin","_d","pageSize","pageOrientation","pageMargins","alignment","fit","getPageSizeFit","getPDFData","table","extraFonts","createPdf","getDataUrl","dataFieldsOrder_1","pivot","dataRow","convertToSpecialFormat","getPDFDataRow","headerRows","items","convertEmptyValue","margins","newMargins","fitSize","A0","A1","A2","A3","A4","A5","A6","A7","A8","A9","A10","B0","B1","B2","B3","B4","B5","B6","B7","B8","B9","B10","C0","C1","C2","C3","C4","C5","C6","C7","C8","C9","C10","RA0","RA1","RA2","RA3","RA4","SRA0","SRA1","SRA2","SRA3","SRA4","EXECUTIVE","FOLIO","LEGAL","LETTER","TABLOID","XLSX","wbOptions","sheetName","wb","dataFieldsOrder_2","xlsx","bookType","bookSST","normalizeExcelSheetName","SheetNames","Sheets","getExcelRow","utils","aoa_to_sheet","workbook","write","dataFieldsOrder_3","getCSVRow","forceQuotes","search","dataFieldsOrder_4","tableClass","getHTMLRow","headerRow","rowClass","charCodeAt","useTag","cellClass","sourceData","json","newValue_1","stringify","keepOriginal","isDateField","isDurationField","durationFormat","isNumberField","numberFormat","useTimestamps","toLocaleString","fileName","blob_1","link_1","decoded","blob_2","url_2","chars","charCode","url_3","link","idoc","msBlobDownloadSupport","decodeURIComponent","msSaveBlob","atob","Uint8Array","blobDownloadSupport","click","linkDownloadSupport","legacyIE","showModal","execCommand","downloadSupport","printViaCSS","printViaIframe","scroll","originalTitle","documentElement","scrollTop","clipPath","test","userAgent","MSStream","contentWindow","currentColor","getComputedStyle","_sprite","validateSprites","_dataFields","generateDataFields","hasData","_dateFormat","_dateFields","_numberFormat","_numberFields","_durationFormat","_durationFields","durationFields","_backgroundColor","hideModal","_modal","_canvg","__webpack_require__","default","_pdfmake","vfs_fonts","global","pdfMake","_xlsx","setFormatOptions","ExportMenu","Validatable","closeDelay","closeOnClick","_menuTag","_itemTag","_labelTag","_iconTag","_ignoreNextClose","_items","getMenuItemClass","createMenuElement","drawBranch","menuElement","_currentSelection","moveSelection","level","ascendants","createItemElement","createIconElement","createSvgElement","createLabelElement","readerLabel","getReaderLabel","typeClickable","submenu_1","getSubMenu","selectBranch","setFocus","delayUnselectBranch","local_level","submenu","submenuElement","hideBranch","menuTag","itemTag","labelTag","iconTag","DOMParser","parseFromString","hasSubMenu","ExportCSS","newPrefix","colorSet","exportCSS","setBlur","getElementsByClassName","closeTimeout","ascendant","unselectBranch","simple","newSelection","getPrevSibling","getNextSibling","getParentItem","getSiblings","siblings","prev","focus","blur","showBranch","_inputDateFormat","_utc","timezoneMinutes","_firstDayOfWeek","months","monthsShort","weekdays","weekdaysShort","_outputFormat","capitalize","applyTimezone","formatted","intlLocales","Intl","DateTimeFormat","parseFormat","timezoneOffset","setMinutes","getMinutes","getTimezoneOffset","timezone","$time","applyFormat","substr","toUpperCase","cached","fullYear","month","weekday","day","hours","minutes","seconds","milliseconds","timestamp","utc","getUTCFullYear","getUTCMonth","getUTCDay","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","getUTCMilliseconds","getFullYear","getMonth","getDay","getHours","getSeconds","getMilliseconds","year","translateFunc","firstDayOfWeek","pow","tz","tzh","tzm","toISOString","toUTCString","parsedIndexes","year3","year2","year1","monthShort","monthLong","weekdayShort","weekdayLong","yearDay","week","hourBase0","hour12Base0","hourBase1","hour12Base1","minute","second","millisecond","millisecondDigits","am","zone","iso","resValues","hour","indexAdjust","getStringList","regex","parseInt","resolveMonth","resolveShortMonth","isAm","ts","resolveTimezoneOffset","UTC","dir","isDefault","translateAll","invalidateSprite","_intlLocales","_timezoneOffset","_timezone","toLowerCase","_negativeBase","_baseUnit","_unitValues","_unitAliases","Y","D","H","K","base","baseUnit","getFormat","details","positive","negative","zero","parsed","absolute","dirs","partFormat","tstamp","toTimeStamp","unit","toTimeUnit","digits","ints","outputFormat","maxValue","maxUnit","getValueUnit","durationFormats","currentUnit","_durationFormats","_smallNumberThreshold","_forceLTR","NumberFormat","mod","decimals","active","forceLTR","thousands","passive","interval","translateEmpty","mods","modSpacing","suffix","a_1","applyPrefix","bytePrefixes","a_2","smallNumberThreshold","smallNumberPrefixes","bigNumberPrefixes","ol","parseFloat","toPrecision","toExponential","ip","intsr","unshift","decs","prefixes","force","newvalue","applied","number","_bigNumberPrefixes","_smallNumberPrefixes","_bytePrefixes","formatter","TextFormatter","styles","texts","t","wrapHtml","wrapSvg","AMElement","styleSvgToHtml","getHtmlElement","q","quotedBlocks","noFormatting","chunks2","i2","chunk2","isImage","Inertia","startPoint","handleMove","inertias","processDragStop","Interaction","_globalEventsAdded","_pointerEvents","pointerdown","pointerup","pointermove","pointercancel","pointerover","pointerout","wheel","_usePointerEventsOnly","_useTouchEventsOnly","_addHoverEvents","_passiveSupported","_delayedEvents","out","overObjects","downObjects","trackedObjects","transformedObjects","pointers","doubleHitTime","hitTolerance","noFocus","touchOutBehavior","touchOutDelay","verticalThreshold","horizontalThreshold","speed","accelleration","accellerationDelay","sensitivity","hasOwnProperty","matchMedia","fullFF","onmousewheel","factor","passiveSupported","addGlobalEvents","handleGlobalPointerDown","handleGlobalPointerMove","handleGlobalPointerUp","relatedTarget","buttons","which","handleDocumentLeave","handleGlobalTouchStart","handleGlobalTouchMove","handleGlobalTouchEnd","handleGlobalKeyDown","handleGlobalKeyUp","processClickable","io","processTouchable","processContextMenu","eventDisposers","processHoverable","handlePointerOut","handlePointerOver","processMovable","isGlobalElement","prepElement","processTrackable","processDraggable","processSwipeable","processResizable","processWheelable","handleMouseWheel","unlockWheel","lockWheel","processFocusable","handleFocusBlur","handleTouchDown","handlePointerDown","getHitOption","disableType","enableType","focusedObject","disposerKey","ko","InteractionKeyboardObject","directionY","directionX","getPointer","getPointerPoint","addBreadCrumb","handleGlobalMove","processDelayed","preventTouchAction","defaultPrevented","handleGlobalUp","changedTouches","resetPointer","deltaX","deltaY","deltaMode","getMouseOption","WheelEvent","wheelDeltaX","wheelDeltaY","handleWheel","maybePreventDefault","handleHit","lastHit","lastHitPointer","soft","hoversPaused","shouldCancelHovers","areTransformed","moved","cancelAllHovers","overPointers","handleTrack","hasDelayedOut","old","behavior","getHoverOption","keepUntil","timeout","delayedEvent","stopInertia","applyCursorDownStyle","processDragStart","processResizeStart","sorted","pos","compareDocumentPosition","Node","DOCUMENT_POSITION_CONTAINED_BY","DOCUMENT_POSITION_CONTAINS","backwards","restoreCursorDownStyle","swiped","handleSwipe","handleInertia","processResizeStop","cancelable","lastEvent","swiping","handleTransform","skipCheck","handleMoveInertia","handleResizeInertia","inertia","ref","getTrailPoint","getInertiaOption","lastUpEvent","pointer2","pointer1","singlePoint","nextPointer","pointer1Moved","dragStartEvents","handleTransformMove","pointer2Moved","handleTransformResize","ctrlKey","pointerMoved","dragTarget","getDragPointer","lastDownEvent","getPointerId","identifier","pointerId","clientX","clientY","isPointerTouch","track","swipeCanceled","Touch","PointerEvent","pointerType","MouseEvent","lockDocument","unlockDocument","restoreAllStyles","lockElement","unlockElement","wheelLockEvent","removeEventListener","elementFromPoint","local","props","setTemporaryStyle","restoreStyle","option","getSwipeOption","getKeyboardOption","setGlobalStyle","restoreGlobalStyle","tolerance","minTime","getShift","pointerExists","exists","InteractionObject","replacedStyles","logTouch","TouchEvent","except","options_1","keyboardEvent","_startedOn","shiftKey","accelleratedMs","accellerationFactor","InteractionObjectEventDispatcher","_clickable","_contextMenuDisabled","_hoverable","_trackable","_swipeable","_resizable","_wheelable","_inert","_isHover","_isHoverByTouch","_isDown","_isFocused","_isTouchProtected","_inertiaOptions","_hitOptions","_hoverOptions","_swipeOptions","_keyboardOptions","_mouseOptions","_cursorOptions","isHoverByTouch","_overPointers","_downPointers","_focusable","_originalPosition","_originalScale","_originalAngle","_domEvents","_addDOMEvent","callback_1","_dispatchKeyboardEvent","grab","grabbing","horizontalResize","verticalResize","notAllowed","_isDisposed","_y","_rotationY","_rotationX","_rotation","_scale","removeNode","_transformString","transfromString","rotateString","svgbbox","attributes","attributeName","attributeValue","ns","getAttrNS","getStyle","setClass","Group","elementName","childNode","Paper","groupName","append","implementation","hasFeature","ghostPaper","ghostDiv","ghostSvgContainer","polyline","lineTo","minStep","cubicCurveTo","closePath","arcTo","startAngle","arc","radiusY","l","pax","pay","cx","cy","ax","endAngle","ay","innerRadius","innerCornerRadius","temp","crSin","innerRadiusY","cornerRadiusY","innerCornerRadiusY","crAngle","asin","crAngleY","crInnerAngle","crInnerAngleY","middleAngle","mPoint","a0","b0","c0","d0","b1","arcToPoint","sweepFlag","largeArcFlag","xAxisRotation","Boolean","rectToPath","ccw","L","Native","_targets","_observer","ResizeObserver","entries","addTarget","box","removeTarget","unobserve","Raf","lastTime_1","loop_1","currentTime","newSize","size","_timer","requestAnimationFrame","cancelAnimationFrame","observer","ResizeSensor","_sensor","makeSensor","svgContainers","ghost","autoResize","_printing","resizeSensor","checkTransform","_popups","popupTemplate","popup","_readerAlertElement","readerAlert","readerAlertElement","sqrt","isNaN","HTMLElement","Tension","_tensionX","_tensionY","smooth","closed","adjustWaveLength","atan2","cos","sin","waveLengthX","waveLengthY","halfWaveCount","sign_1","Monotone","reversed","_reversed","_closed","_curve","x0","y0","t0","t1","NaN","slope2","slope3","sign","h0","h1","s0","s1","MonotoneX","MonotoneY","_stops","PI","gradientElement","gradientStop","addColor","stops","gradientUnits","patternUnits","backgroundFill","backgroundOpacity","patternElement","rotationX","rotationY","addElement","strokeDashArray","typeProperty","fx","fy","_cx","_cy","_fx","_fy","feGaussianBlur","in","filterPrimitives","feOffset","feFlood","feComposite","in2","operator","feMerge","stdDeviation","updateScale","Filter","_nonScaling","filterPrimitive","setSprite","or","GlobalAdapter","_callbackId","_callbacks","SortedList","$order","$number","addAll","scope","applyAll","callbacks","enableKey","disableKey","amount","_hasListenersByType","_shouldDispatch","getProgressNumber","getProgressPercent","getProgressColor","$colors","getHybridProperty","charAt","array","_disposer","_loop","_pause","_delayTimeout","_time","_isFinished","pause","id_1","stopSameAnimations","_startTime","staticOptions","updateMethod","convertedFrom","applyStaticOptions","loop","resume","setProgress","skipEvent","timeProgress","delayed","killed_1","newOptions","oldOptions","any","eachReverse","eachContinue","shiftLeft","input","found","move","toIndex","removeIndex","insertIndex","ind","toArray","copy","getSortedIndex","ordering","order","findIndex","find","keepIf","keep","pendingFrame","nextQueue","readQueue","writeQueue","idleQueue","frameLoop","pendFrame","readFrame","writeFrame","whenIdle","isSafari","vendor","isInternetExplorer","Cache","_storage","owner","ownerStorage","touched","cacheItem","expired","_value","_lightColor","g","_darkColor","lighten","brighten","saturate","saturation","darkColor","lightColor","cacheId","isColor","castColor","ColorSet","_list","_currentStep","_currentPass","baseColor","stepOptions","passOptions","step","minColors","minLightness","maxLightness","shuffle","reuse","generate","getReusableColor","tmpstep","hsl","hueStep","hue","lightness","hues","random","applyStepOptions","pass","namedColors","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","darkgrey","darkgreen","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","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgrey","lightgreen","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","hexToRgb","m","hexToRgbWithAlpha","rgbaToRgb","rgbToHex","pad2","rgbToRGBA","interpolate","rgb1","rgb2","getLightnessStep","rgbToHsl","hslToRgb","hue2rgb","isLight","rootStylesheet","SVGNS","XMLNS","getElement","getElementById","classList","classes","currentClassName","setStyle","currentStyle","defaultView","activeElement","host","getRoot","ownerDocument","eventTarget","composedPath","fixPixelPerfect","selector","root","getStylesheet","_rule","deleteRule","appendStylesheet","insertRule","selectorText","_setVendorPrefixName","styleId","ready","readyState","listener_1","findFont","findFontSize","isElementInViewport","viewportTarget","targets","viewportRect","StyleClass","dict","_dictionary","updateKey","ifEmpty","Symbol","_i","__read","sortedIterator","_template","v","_dispose","_counter","linear","polyIn","polyOut","polyInOut","polyOut3","cubicIn","cubicOut","quadIn","quadOut","quadInOut","polyIn3","polyInOut3","expIn","expOut","expInOut","sinIn","sinOut","sinInOut","cubicInOut","circleIn","circleOut","circleInOut","bounceOut","bounceIn","bounceInOut","period","elasticIn","elasticOut","elasticInOut","_listeners","_killed","_iterating","_enabled","hasListeners","hasListenersByType","killed","enable","disable","_removeListener","_removeExistingListener","_eachListener","$async","_purposes","primaryButton","primaryButtonHover","primaryButtonDown","primaryButtonActive","primaryButtonText","primaryButtonStroke","secondaryButton","secondaryButtonHover","secondaryButtonDown","secondaryButtonActive","secondaryButtonText","secondaryButtonStroke","grid","alternativeBackground","alternativeText","disabledBackground","purpose","setFor","fromArray","iter","args","go","push2","flatten","indexed","ListIterator","createNewItems","_create","_listCopy","getFirst","returnItem","getLast","removeItem","Keyboard","getEventKey","keyCode","isKey","eventKey","altKey","metaKey","_decimalSeparator","_thousandSeparator","_percentPrefix","_percentSuffix","_big_number_suffix_3","_big_number_suffix_6","_big_number_suffix_9","_big_number_suffix_12","_big_number_suffix_15","_big_number_suffix_18","_big_number_suffix_21","_big_number_suffix_24","_small_number_suffix_3","_small_number_suffix_6","_small_number_suffix_9","_small_number_suffix_12","_small_number_suffix_15","_small_number_suffix_18","_small_number_suffix_21","_small_number_suffix_24","_byte_suffix_B","_byte_suffix_KB","_byte_suffix_MB","_byte_suffix_GB","_byte_suffix_TB","_byte_suffix_PB","_date","_date_millisecond","_date_second","_date_minute","_date_hour","_date_day","_date_week","_date_month","_date_year","_duration_millisecond","_duration_millisecond_second","_duration_millisecond_minute","_duration_millisecond_hour","_duration_millisecond_day","_duration_millisecond_week","_duration_millisecond_month","_duration_millisecond_year","_duration_second","_duration_second_minute","_duration_second_hour","_duration_second_day","_duration_second_week","_duration_second_month","_duration_second_year","_duration_minute","_duration_minute_hour","_duration_minute_day","_duration_minute_week","_duration_minute_month","_duration_minute_year","_duration_hour","_duration_hour_day","_duration_hour_week","_duration_hour_month","_duration_hour_year","_duration_day","_duration_day_week","_duration_day_month","_duration_day_year","_duration_week","_duration_week_month","_duration_week_year","_duration_month","_duration_month_year","_duration_year","_era_ad","_era_bc","A","P","AM","PM","January","February","March","April","May","June","July","August","September","October","November","December","Jan","Feb","Mar","Apr","Jun","Jul","Aug","Sep","Oct","Nov","Dec","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sun","Mon","Tue","Wed","Thu","Fri","Sat","_dateOrd","Play","Stop","Legend","Loading","Home","Chart","Series","Map","Data","Print","PNG","JPG","GIF","SVG","PDF","CSV","Close","Minimize","_locale","en","_defaultLocale","locale","getLocale","prompt","rest","translation","translations","getTranslations","__spread","translateAny","setTranslationAny","IndexedIterable","_array","diff","ListGrouper","_getKey","_insert","_remove","_keys","_groups","_sort","index_1","disposeOnRemove","disposer_1","checkBounds","initial","_values","_sortQuicksort","low","high","_sortPartition","j","swap","value_a","value_b","setAll","newArray","oldArray","make","messages","warn","HALFPI","RADIANS","DEGREES","toNumberRange","fitToRange","rounded","minValue","intersect","range1","range2","start1","start2","end1","end2","intersection","startMax","endMin","getDistance","getCubicCurveDistance","getPointOnCubicCurve","getScale","initialDistance","getMidPoint","getAngle","normalizeAngle","getCommonRectangle","rectangles","mt1","mt2","mt3","getCubicControlPointA","adjustTension","getCubicControlPointB","getArcRect","MAX_VALUE","bpoints","getArcPoint","fromAngle","toAngle","pt","isInRectangle","morphable","_bboxes","morphDuration","morphEasing","morphToSingle","scaleRatio","morphToPolygon","toPoints","currentPoints","sortPoints","_morphFromPointsReal","_morphToPointsReal","normalizePoints","pointsA","pointsB","surfaceA","holeA","bboxA","middleX","middleY","addPoints","splitAt","newDistance","partA","partB","bbox1","bbox2","bboxes","morphToCircle","commonBBox","fromPoints","realRadius","realAngle","pointOnCircle","mustHaveCount","addToSegmentCount","newPoints","point0","lastPoint","morphToRectangle","realWidth","realHeight","i_2","i_3","_morphProgress","currentArea","surfaceFrom","holeFrom","surfaceTo","holeTo","currentSurface","i_4","slen","currentHole","i_5","morphBack","isBlob","XMLHttpRequest","readBlob","reader","readAsText","getResponseHeader","responseText","withCredentials","requestHeaders","setRequestHeader","send","eachOrdered","ord","keysOrdered","merge","object1","object2","assign","copyProperties","copyAllProperties","isPercent","_rules","_appliedRules","_appliedTargets","_useDefault","_responsiveDisposers","_noStates","checkRules","_component","disposeResponsiveHandlers","enabled","applyRules","useDefault","isApplied","ruleId","allRules","rulesChanged","_applyRules","_timeout","newTarget","defaultStateApplied","isApplied_1","getState","getDefaultState","setTargetState","tmpId","widthXXS","XXS","widthXS","XS","widthS","S","widthM","M","widthL","widthXL","XL","widthXXL","XXL","heightXXS","heightXS","heightS","heightM","heightL","heightXL","heightXXL","isXXS","isXS","isS","isM","isL","isXL","isXXL","maybeXXS","maybeXS","maybeS","maybeM","maybeL","maybeXL","maybeXXL","OrderedList","findClosestIndex","closestValue","closestDifference","closestIndex","difference","_ordering","repeat","choice","STRING","NUMBER","DATE","DURATION","PLACEHOLDER","PLACEHOLDER2","setTimezone","timeZone","getTimezoneMinutes","setHours","getType","castString","toBoolean","toNumber","isNumber","converted","isString","toText","isObject","toNumberOrPercent","getValueDefault","defaultValue","isDate","used","stripHash","getBaseURI","baseURI","loc","softCopyProperties","isNotEmpty","relativeToValue","full","devicePixelRatio","escapeForRgex","splitTextByCharCount","fullWordFallback","currentIndex","words","word","wordLength","reverseString","truncateWithEllipsis","trim","str","rtrim","ltrim","padString","char","hints","cleanFormat","stripTags","plainText","numberToString","zeros","exponent","anyToDate","setMilliseconds","num","anyToNumber","getYearDay","getWeek","setUTCDate","firstDay","getMonthWeek","firstWeek","currentWeek","getDayFromWeek","setUTCFullYear","get12Hours","getTimeZone","long","savings","wotz","wtz","timeZoneName","fitNumber","fitNumberRelative","gap","svgPointToSprite","sprite_1","relativeX","relativeY","spritePointToSvg","spritePointToSprite","toSprite","spriteRectToSvg","documentPointToSvg","documentPointToSprite","spritePointToDocument","svgPointToDocument","paddingX","borderX","borderLeftWidth","borderRightWidth","paddingY","borderY","borderTopWidth","borderBottomWidth","decimalPlaces","urlRegexp","parseUrl","protocol","authority","domain","port","query","hash","serializeUrl","isRelativeUrl","joinUrl","parsedLeft","parsedRight","leftPath","rightPath","isIE","MSInputMethodContext","documentMode","_validateDisposer","Ellipse","rx","ry","widthRatio","heightRatio","Slice","pixelInnerRadius","shiftRadius","updateGradient","gradient","innerRect","outerRect","ix","iy","Preloader","sliceContainer","backgroundSlice","progressSlice","_started","CloseButton","bgc","downColor","bhs","bds","SwitchButton","leftLabel","circle","p100","as","switchButton","rightLabel","rlas","_leftLabel","_rightLabel","_switchButton","Slider","TextLink","Trapezoid","topSide","bottomSide","leftSide","rightSide","bs","ls","rs","x3","y3","mt","mr","mb","ml","horizontalNeck","hn","verticalNeck","vn","WavedCircle","getPoints","$smoothing","circleLength","halfWaveHeight","halfWaveLength","angle1","angle2","ZoomOutButton","PlayButton","playIcon","stopIcon","activeState","ColorModifier","GradientModifier","lightnesses","brightnesses","opacities","offsets","_lightnesses","_brightnesses","_opacities","_offsets","brightness","LinearGradientModifier","Cone","topRadius","bodyFillModifier","radiusBase","LightenFilter","feColorMatrix","Rectangle3D","sideBack","sideBottom","sideLeft","sideRight","sideTop","sideFront","ah","bh","ch","dh","colorStr","filter2","filter3","filter4","filter5","Slice3D","edge","sideA","sideB","edgeFill","edgePath","mangle","pp","RadialGradientModifier","LinePattern","_line","CirclePattern","_circle","RectPattern","rectHeight","rectWidth","_rect","ColorizeFilter","intensity","applyFilter","ii","DesaturateFilter","BlurFilter","FocusFilter","feMorphology","feBlend","mode","outline","PatternSet","getLinePattern","getRectPattern","getCirclePattern","thickness","pattern","currentStep","generatePatterns","Plugin","AmChartsLogo","aColor","aGradient","aStroke","desaturateFilter","desaturateFilterHover","addToQueue","queueHandler","removeFromQueue","nextSprite","viewPortHandler","vpDisposer","classError","chart","tmpContainer","svgDiv_1","container_1","loopTimer_1","tooltipContainer_1","preloader_1","logo_1","logo","LegendDataItem","childrenCreated","label_1","labels","itemContainer","_valueLabel","valueLabel_1","valueLabels","_itemContainer","component_1","itemContainer_1","itemContainers","toggleDataItem","focusedItem","visibilitychanged","_marker","marker_1","markers","LegendSettings","createMarker","marker","disabledColor","valueLabel","handleScrollbar","scrollbar","legendDataItem","tempMaxWidth","legendSettings","createLegendMarker","useDefaultMarker","updateLegendValue","itemValueText","maxLabelWidth","maxValueLabelWidth","maxMarkerWidth","maxAdjustedLabelWidth","trueMaxWidth","scrollable","updateMasks","_mouseWheelDisposer","colorOrig","AxisBreak","_axis","breakSize","fillShape","_fillShape","startLine","_startLine","endLine","_endLine","addBreakSprite","axis","renderer","gridContainer","createBreakSprites","breakTemplate","axisBreaks","invalidateSeries","startPosition","endPosition","updateBreakElement","AxisDataItem","_grid","grid_1","isRange","axisRanges","_tick","component_2","tick_1","tick","ticks","component_3","_axisFill","component_4","axisFill_1","axisFill","axisFills","_text","_contents","contents","createFill","_axisBreak","axisBreak","appendChildren","appendDataItem","bullet","minPosition","maxPosition","_bullet","Axis","_gridCount","_series","_axisItemCount","hideTooltipWhileZooming","toggleZoomOutButton","zoomable","_dataItemsIterator","series","fillRule","ghostLabel","updateLabelElement","updateGridCount","gridCount","axisLength","minGridDistance","axisFullLength","updateAxisLine","updateTooltip","updateBaseGridElement","_prevLength","initRenderer","above","bulletsContainer","updateGridContainer","validateAxisRanges","axisRange","validateBreaks","_axisBreaks","processBreak","breakContainer","registerSeries","createMask","_renderer","ghostLabel_1","positionToAngle","pointToPosition","positionToCoordinate","getAnyRangePath","getPositionRangePath","anyToPosition","anyToPoint","_tooltipPosition","showTooltipAtPosition","toAxisPosition","tooltipLocation","getCellStartPosition","getCellEndPosition","tooltipLocation2","endPoint","currentItemStartPoint","currentItemEndPoint","fullWidthTooltip","getTooltipText","cursorTooltipEnabled","inversed","toGlobalPosition","boundingRectangle","roundPosition","axisLocation","_axisRanges","processAxisRange","createAxisBreak","adjustedStartValue","processSeriesDataItems","processSeriesDataItem","axisLetter","postProcessSeriesDataItems","postProcessSeriesDataItem","updateAxisBySeries","hideUnusedDataItems","dataItemsIterator","getSeriesDataItem","findNearest","stackKey","getX","getPositionX","getY","getPositionY","dataChangeUpdate","seriesDataChangeUpdate","adjustDifference","startValue","endValue","adjustedEndValue","isInBreak","fixAxisBreaks","firstAxisBreak","previousEndValue_1","getPositionLabel","_chart","createSeriesRange","resetIterators","AxisLine","AxisFill","fillPath","Grid","AxisLabel","Tick","AxisTick","AxisRenderer","inside","cellStartLocation","cellEndLocation","minLabelPosition","maxLabelPosition","invalidateAxisItems","baseGrid","setAxis","processRenderer","positionItem","position2","getHeight","getWidth","coordinateToPosition","coordinate","coordinate2","updateGridElement","updateTickElement","updateBullet","updateFillElement","toggleVisibility","_axisFills","createGrid","_ticks","createTick","_labels","createLabel","AxisBullet","AxisRendererY","opposite","inversedPosition","relativePositionSprite","bigNum","bbx","bbw","tickLength","basePoint","wavedRectangle","ValueAxisBreak","valueToPosition","ValueAxisDataItem","ValueAxis","_stepDecimalPlaces","_prevStepDecimalPlaces","_adjustLabelPrecision","_baseValue","_adjustedStart","_adjustedEnd","_extremesChanged","_deltaMinMax","_dsc","calculateTotals","axisFieldName","keepSelection","includeRangesInMinMax","_maxZoomed","_maxDefined","_minZoomed","_minDefined","_maxAdjusted","_minAdjusted","total","sum","excludeFromTotal","dataItem_2","getMinMax","calculateZoom","validateAxisElements","positionToValue","differece","minMaxStep","adjustMinMax","stepDecimalPlaces","syncWithAxis","_step","fixSmallStep","value_1","minZoomed","logarithmic","LOG10E","maxZoomed","dataItemsIterator_1","precisionChanged","formatLabel","stepPower","decCount","renderer_1","breakValue_1","adjustedMin","adjustedMax","adjustedStep","itemIndex","fillEndPosition","adjustLabelPrecision","baseValue","valueToPoint","min_1","max_1","_difference","treatZeroAs","difference_1","value_2","breakStartPosition","breakEndPosition","breakStartValue","breakEndValue","E","xToValue","yToValue","animateMinMax","POSITIVE_INFINITY","NEGATIVE_INFINITY","ignoreMinMax","seriesMin","seriesMax","_minReal","_maxReal","dif","fixMin","fixMax","power","extraMin","extraMax","strict","strictMinMax","_minMaxAnimation","_finalMax","_finalMin","handleSelectionExtremesChange","_saveMinMax","strictMode","initialMin","initialMax","stepDivisor","maxPrecision","minCount","maxCount","handleExtremesChange","selectionMin","selectionMax","allHidden","outOfRange","seriesSelectionMin","seriesSelectionMax","minMaxStep2","syncAxes","extraTooltipPrecision","valueStr","zoomToValues","axisBreakDif","axisBreakGridCount","breakMinMaxStep","showTooltipAt","currentCount","synced","omin","omax","ostep","checkSync","xAxis","_min","_max","AxisRendererX","bby","bbh","HeatLegend","markerContainer","markerCount","getMinFromRules","minValue_1","heatRules","heatRule","getMaxFromRules","maxValue_1","valueAxis","minColor","maxColor","seriesFill","minOpacity","maxOpacity","minStrokeOpacity","maxStrokeOpacity","minStroke","maxStroke","strokeGradient","color_1","_valueAxis","dataField","dataFieldDefined","updateMinMax","seriesId_1","Grip","autoHideDelay","_autoHideTimeout","ChartDataItem","_legend","titles","chartAndLegendContainer","chartContainer","processTitle","updateReaderTitleReferences","fixLayout","legend","feedLegend","titleIds_1","setLegend","_dragGrip","grip_1","Bullet","tooltipX","copyToLegendMarker","SeriesDataItem","_bullets","bullets","_showBullets","_tmin","_tmax","_smin","_smax","dataItemsByAxis","skipFocusThreshold","_itemReaderTextChanged","calculatePercent","usePercentHack","simplifiedProcessing","minBulletDistance","mainContainer","positionBullet","processBullet","itemsFocusable","removeBullet","eachBullet","processValues","getFirstValue","getAbsoluteFirstValue","working","count_1","sum_1","absoluteSum_1","low_1","high_1","open_1","close_1","previous_1","first_1","absoluteFirst_1","startIndex_1","prevValue","_loop_2","dataItem_3","ksum","zeroItem_1","dataItem_4","updateTooltipBounds","shouldCreateBullet","bulletTemplate","disabledField","currentDataItem","readerText_1","itemReaderText","xField","yField","isDynamic","itemWidth","itemHeight","rangesContainer","getAxisField","xPosition","yPosition","readerText","_itemReaderText","_legendDataItem","notRange","itemLabelText","labelText","_heatRules","dataField_1","seriesDataItem_1","property_1","foundSprite","foundSprite_1","ruleTarget","propertyField","listitem","maybeIndex","SerialChartDataItem","SerialChart","colors","seriesContainer","patterns","createSeries","handleSeriesAdded","handleSeriesRemoved","di","handleSeriesAdded2","handleLegendSeriesAdded","hiddenInLegend","legendData_1","Adder","_partials","Float64Array","_n","hi","lo","valueOf","epsilon","pi","halfPi","quarterPi","tau","degrees","radians","atan","haversin","noop","streamGeometry","stream","streamGeometryType","streamObjectType","Feature","FeatureCollection","Sphere","sphere","Point","MultiPoint","LineString","streamLine","MultiLineString","streamPolygon","MultiPolygon","GeometryCollection","geometries","lineStart","lineEnd","polygonStart","polygonEnd","lambda00","phi00","lambda0","cosPhi0","sinPhi0","areaRingSum","areaSum","areaStream","areaRingStart","areaRingEnd","areaRing","areaPointFirst","areaPoint","lambda","phi","dLambda","sdLambda","adLambda","cosPhi","sinPhi","u","spherical","cartesian","cartesianDot","cartesianCross","cartesianAddInPlace","cartesianScale","vector","cartesianNormalizeInPlace","phi0","lambda1","phi1","lambda2","deltaSum","ranges","boundsStream","boundsPoint","boundsLineStart","boundsLineEnd","boundsRingPoint","boundsRingStart","boundsRingEnd","linePoint","inflection","phii","lambdai","antimeridian","rangeCompare","rangeContains","feature","merged","deltaMax","MapSeriesDataItem","zoomLevel","zoomGeoPoint","_east","_west","_south","_north","getFeature","bounds","d3geo","west","south","north","east","MapSeries","checkInclude","includes","excludes","processIncExc","handleObjectAdded","mapObject","_geodata","geodata","reverseGeodata","processReverseGeodata","madeFromGeoData","getFeatures","_mapObjects","_northDefined","_southDefined","_westDefined","_eastDefined","name_1","MapObject","handleTooltipMove","MapImage","latitude","geoPoint","longitude","projection","d3Projection","d3Path","multiLineToGeo","multiLine","multiPointToGeo","pointToGeo","multiGeoToPoint","geoPoints","geoToPoint","multiGeoLineToMultiLine","multiGeoLine","multiGeoPolygonToMultipolygon","multiGeoPolygon","geoPolygon","multiPolygon","MapPolygon","polygon","$mapUtils","pathGenerator","calculateVisualCenter","biggestArea","biggestPolygon","center","$polylabel","_visualLongitude","_visualLatitude","convert","visualLongitude","visualLatitude","MapPolygonSeriesDataItem","_mapPolygon","mapPolygon_1","mapPolygons","_polygon","_multiPolygon","_geoPolygon","_multiGeoPolygon","MapPolygonSeries","useGeodata","geoJSON","geodataNames","include","exclude","dataObject","mapPolygon","sortPolygonsBy","sortBy_1","reversed_1","sortPolygonsReversed","valA","valB","dirA","dirB","boxArea","_mapPolygons","polygonTemplate","getPolygonById","rejoin","Intersection","other","z","o","compareIntersection","startInside","subject","clip","forEach","pointEqual","isSubject","arrays","pointVisible","clipLine","sink","ring","ringBuffer","clipBuffer","ringSink","polygonStarted","pointRing","ringStart","ringEnd","winding","sinPhi1","cosPhi1","absDelta","phiArc","polygonContains","clipRejoin","pointLine","clean","ringSegments","validSegment","clipAntimeridianLine","sign0","sign1","clipAntimeridianIntersect","sinLambda0Lambda1","clipAntimeridianInterpolate","circleRadius","cosRadius","acos","smallRadius","notHemisphere","two","n1","n2","n2n2","n1n2","determinant","c1","c2","n1xn2","uu","t2","polar","q1","v0","v00","circleStream","sinRadius","clipMax","clipMin","clipRectangle","a1","corner","comparePoint","ca","cb","x__","y__","v__","x_","y_","v_","activeStream","bufferStream","clipStream","polygonInside","cleanInside","compose","invert","rotationIdentity","rotateRadians","deltaLambda","deltaPhi","deltaGamma","rotationLambda","rotationPhiGamma","forwardRotationLambda","cosDeltaPhi","sinDeltaPhi","cosDeltaGamma","sinDeltaGamma","transformer","methods","TransformStream","fitBounds","clipExtent","geoStream","fitExtent","extent","fitWidth","fitHeight","cosMinDistance","project","delta2","resample","resampleLineTo","phi2","dx2","dy2","dz","x00","y00","a00","b00","c00","resampleStream","ringPoint","resampleNone","transformRadians","scaleTranslateRotate","sx","sy","scaleTranslate","cosAlpha","sinAlpha","ci","fi","projectionMutator","projectAt","rotate","projectResample","projectTransform","projectRotateTransform","cacheStream","theta","preclip","clipAntimeridian","postclip","identity","recenter","transformRotate","_","clipAngle","clipCircle","reflectX","reflectY","equirectangularRaw","X0","Y0","Z0","X1","Y1","Z1","X2","Y2","Z2","centroidStream","centroidPoint","centroidLineStart","centroidLineEnd","centroidRingStart","centroidRingEnd","centroid","centroidPointFirstLine","centroidPointLine","centroidPointFirstRing","centroidPointRing","PathContext","_context","_radius","pointRadius","_point","lengthRing","lengthSum","lengthStream","lengthPointFirst","lengthPoint","cacheDigits","cacheAppend","cacheRadius","cacheCircle","PathString","_append","appendRound","RangeError","strings","lengthLineStart","lengthLineEnd","cosDelta","Projection","_d3Projection","_d3Path","projectionStream","contextStream","pathArea","pathMeasure","pathBounds","pathCentroid","invalidateProjection","unproject","deltaLongitude","deltaLatitude","unrotate","intermediatePoint","cy0","sy0","cy1","sy1","kx0","ky0","kx1","ky1","B","multiDistance","positionToGeoPoint","intermediatePointA","intermediatePointB","pa","pb","SmallMap","moveToPosition","updateMapSize","newSeries","rectPoint","seriesPointToGeo","zoomToGeoPoint","updateRectangle","wrapAngleTo180","MapLineObject","adjustRotation","mapLine","shortestDistance","MapImageSeriesDataItem","_mapImage","mapImage_1","mapImages","_geoPoint","multiPoint","MapImageSeries","multiGeoPoint","mapImage","_mapImages","getImageById","MapLine","_imageListeners","createLine","normalizeMultiline","multiline","normalizePoint","latitude180","$geo","handleImagesToConnect","imagesToConnect","convertedPoints","convertedSegmentPoints","_arrow","lineObjects","_lineObjects","handleLineObjectAdded","mapLineObject","arrow","triangle","MapLineSeriesDataItem","_mapLine","mapLine_1","mapLines","_multiLine","_multiGeoLine","_geoLine","geoLine","MapLineSeries","_mapLines","lineTemplate","getLineById","Graticule","graticuleX","graticuleY","GraticuleSeriesDataItem","GraticuleSeries","longitudeStep","latitudeStep","singleSprite","graticule","X","DX","DY","extentMajor","extentMinor","stepMajor","stepMinor","lineStrings","lineString","MapChartDataItem","MapChart","zoomDuration","zoomEasing","minZoomLevel","maxZoomLevel","_prevZoomGeoPoint","maxPanOut","homeZoomLevel","zoomStep","centerMapOnZoomOut","backgroundSeries","handleAllInited","handleMapTransform","handleDoubleHit","handleDrag","updateCenterGeoPoint","_mapAnimation","allInited_1","updateScaleRatio","_zoomGeoPointReal","chartContainerBg","handleMapDown","_zoomControl","pan","mouseWheelBehavior","handlePanDown","handlePanUp","panSprite","handlePanMove","panBehavior","_downPointOrig","_downDeltaLongitude","_downDeltaLatitude","isResized","dln","dlt","dlg","downGeoLocal","geoLocal","goHome","updateZoomGeoPoint","seriesPoint","seriesMaxLeft","seriesMaxRight","seriesMaxTop","seriesMaxBottom","seriesWidth","seriesHeight","_centerGeoPoint","hh","svgPointToGeo","zoomIn","zoomOut","_backgroundSeries","foundGraticule","deltaLat","initialScale","getBackground","stepLong","stepLat","ln","ll","lt","_fitWidth","_fitHeight","geoPointToSVG","geoPointToSeries","hasData_1","mapPoint","zoomToMapObject","zoomToRectangle","splitLongitude","newLong","_prevZoomLevel","_smallMap","smallMap","zoomControl","plusButton","minusButton","rotateMap","homeGeoPoint","centerGeoPoint","hideOverflow","MapSpline","MapArc","MapSplineSeriesDataItem","MapSplineSeries","MapArcSeriesDataItem","MapArcSeries","ZoomControl","slider","handleBackgroundClick","updateThumbSize","handleThumbDrag","maxPower","LN2","minPower","mercatorRaw","Mercator","mercatorProjection","reclip","forward","millerRaw","Miller","d3geoprojection","eckert6Raw","Eckert6","azimuthalInvert","sc","cc","orthographicRaw","Orthographic","stereographicRaw","Stereographic","conicEqualAreaRaw","cylindricalEqualAreaRaw","r0","r0y","conicProjection","parallels","conicEqualArea","Albers","AlbersUsa","lower48Point","alaskaPoint","hawaiiPoint","lower48","albers","alaska","hawaii","pointStream","albersUsa","multiplex","streams","naturalEarth1Raw","phi4","NaturalEarth1","azimuthalEqualAreaRaw","azimuthalRaw","cxcy","AzimuthalEqualArea","equalEarthRaw","l2","l6","EqualEarth","screen","deviceXDPI","logicalXDPI","ilen","measureText","lineHeight","orient","origin","region","compute$1","anchor","clamp","clipped","r1","aligned","vx","vy","positioners","outerRadius","bar","horizontal","fallback","rasterize","getScaleOrigin","getDatasetMeta","datasetIndex","vScale","xCenter","yCenter","getBasePixel","getPositioner","ArcElement","PointElement","BarElement","drawTextLine","cfg","shadow","shadowBlur","stroked","strokeText","filled","fillText","me","_config","_model","_rects","_ctx","_el","_modelize","toFont","defaults$1","chartArea","borderColor","borderRadius","borderWidth","toPadding","positioner","textShadowBlur","textShadowColor","textStrokeColor","textStrokeWidth","model","rects","valueOrDefault","dataset","isNullOrUndef","inputs","boundingRects","th","tw","tx","ty","frame","save","beginPath","globalAlpha","drawFrame","bgColor","drawRoundedRect","HALF_PI","strokeStyle","lineWidth","lineJoin","drawText","strokeColor","textGeometry","textBaseline","shadowColor","restore","MIN_INTEGER","MIN_SAFE_INTEGER","MAX_INTEGER","MAX_SAFE_INTEGER","rotated","projected","dp","toAxis","HitBox","vs","intersects","pr0","pr1","_points","axes","prepare","datasets","jlen","$layout","_box","_hidable","_set","_idx","sa","sb","dirty","compute","proxy","Proxy","getProps","collide","collider","lookup","EXPANDO_KEY","DEFAULT_KEY","dispatchEvent","listeners","callback$1","$context","groups","$groups","_key","_dirty","plugin","defaults","family","weight","klen","beforeInit","_actives","beforeUpdate","expando","_listened","_datasets","afterDatasetUpdate","isDatasetVisible","configure","override","datalabels","configs","reduce","meta","getDataVisibility","skip","dataIndex","merger","afterUpdate","afterDatasetsDraw","beforeEvent","handleMoveEvents","previous","enter","leave","_hovered","dispatchMoveEvents","handleClickEvents","handlers","afterEvent","updates","getActiveElements","exports","d3Selection","tip","d3Tip","functor","d3_tip_direction","d3_tip_offset","d3_tip_html","initNode","rootElement","vis","getSVGNode","ownerSVGElement","Event","SVGElement","poffset","nodel","getNodeEl","directions","scrollLeft","classed","direction_callbacks","selection","destroy","direction_n","getScreenBBox","direction_s","direction_e","direction_w","nw","direction_nw","ne","direction_ne","sw","direction_sw","se","direction_se","tipNode","select","targetel","d3","getScreenCTM","tbbox","factory","require","xhtml","xlink","xml","xmlns","namespaces","space","creatorInherit","namespaceURI","creatorFixed","fullname","namespace","none","querySelector","childMatcher","childFirst","firstElementChild","EnterNode","datum","_next","__data__","bindIndex","exit","groupLength","dataLength","bindKey","keyValue","nodeByKeyValue","keyValues","delete","ascending","attrRemove","attrRemoveNS","removeAttributeNS","attrConstant","attrConstantNS","attrFunction","attrFunctionNS","styleRemove","removeProperty","styleConstant","styleFunction","styleValue","propertyRemove","propertyConstant","propertyFunction","classArray","ClassList","_node","_names","classedAdd","names","classedRemove","classedTrue","classedFalse","classedFunction","textRemove","textConstant","textFunction","htmlRemove","htmlConstant","htmlFunction","raise","nextSibling","lower","previousSibling","constantNull","selection_cloneShallow","cloneNode","selection_cloneDeep","parseTypenames","typenames","onRemove","typename","__on","onAdd","contextListener","CustomEvent","createEvent","initEvent","bubbles","detail","dispatchConstant","dispatchFunction","Selection","parents","_parents","subgroups","subnode","subgroup","selectAll","arrayAll","selectorAll","selectChild","childFind","selectChildren","childrenFilter","matcher","constant","enterGroup","updateGroup","exitGroup","i0","i1","_enter","_exit","sparse","onenter","onupdate","onexit","groups0","groups1","m0","merges","group0","group1","selection_selection","compare","compareNode","sortgroups","sortgroup","nodes","creator","before","deep","nextId","Local","sourceEvent","currentTarget","inverse","clientLeft","clientTop","pageX","pageY","touches","initMouseEvent","saveAs","HTMLAnchorElement","rel","autoBom","innerText","safari","onloadend","module","FUNC_ERROR_TEXT","HASH_UNDEFINED","WRAP_PARTIAL_FLAG","INFINITY","MAX_ARRAY_LENGTH","wrapFlags","argsTag","arrayTag","boolTag","dateTag","errorTag","funcTag","genTag","mapTag","numberTag","objectTag","promiseTag","regexpTag","setTag","stringTag","symbolTag","weakMapTag","arrayBufferTag","dataViewTag","float32Tag","float64Tag","int8Tag","int16Tag","int32Tag","uint8Tag","uint8ClampedTag","uint16Tag","uint32Tag","reEmptyStringLeading","reEmptyStringMiddle","reEmptyStringTrailing","reEscapedHtml","reUnescapedHtml","reHasEscapedHtml","reHasUnescapedHtml","reEscape","reEvaluate","reInterpolate","reIsDeepProp","reIsPlainProp","rePropName","reRegExpChar","reHasRegExpChar","reTrimStart","reWhitespace","reWrapComment","reWrapDetails","reSplitDetails","reAsciiWord","reForbiddenIdentifierChars","reEscapeChar","reEsTemplate","reFlags","reIsBadHex","reIsBinary","reIsHostCtor","reIsOctal","reIsUint","reLatin","reNoMatch","reUnescapedString","rsAstralRange","rsComboRange","rsComboMarksRange","rsDingbatRange","rsLowerRange","rsUpperRange","rsVarRange","rsBreakRange","rsMathOpRange","rsAstral","rsBreak","rsCombo","rsDigits","rsDingbat","rsLower","rsMisc","rsFitz","rsNonAstral","rsRegional","rsSurrPair","rsUpper","rsMiscLower","rsMiscUpper","rsOptContrLower","rsOptContrUpper","reOptMod","rsModifier","rsOptVar","rsSeq","rsEmoji","rsSymbol","reApos","reComboMark","reUnicode","reUnicodeWord","reHasUnicode","reHasUnicodeWord","contextProps","templateCounter","typedArrayTags","cloneableTags","stringEscapes","freeParseFloat","freeParseInt","freeGlobal","freeSelf","Function","freeExports","nodeType","freeModule","moduleExports","freeProcess","process","nodeUtil","types","binding","nodeIsArrayBuffer","isArrayBuffer","nodeIsDate","nodeIsMap","isMap","nodeIsRegExp","isRegExp","nodeIsSet","isSet","nodeIsTypedArray","isTypedArray","thisArg","arrayAggregator","setter","iteratee","accumulator","arrayEach","arrayEachRight","arrayEvery","predicate","arrayFilter","resIndex","arrayIncludes","baseIndexOf","arrayIncludesWith","comparator","arrayMap","arrayPush","arrayReduce","initAccum","arrayReduceRight","arraySome","asciiSize","baseProperty","baseFindKey","collection","eachFunc","baseFindIndex","fromIndex","fromRight","strictIndexOf","baseIsNaN","baseIndexOfWith","baseMean","baseSum","basePropertyOf","baseReduce","baseTimes","baseTrim","trimmedEndIndex","baseUnary","baseValues","cacheHas","charsStartIndex","strSymbols","chrSymbols","charsEndIndex","countHolders","deburrLetter","escapeHtmlChar","escapeStringChar","chr","hasUnicode","mapToArray","overArg","replaceHolders","setToArray","stringSize","unicodeSize","lastIndex","stringToArray","unicodeToArray","asciiToArray","unescapeHtmlChar","runInContext","pick","String","TypeError","arrayProto","objectProto","coreJsData","funcToString","idCounter","maskSrcKey","IE_PROTO","nativeObjectToString","objectCtorString","oldDash","reIsNative","Buffer","allocUnsafe","getPrototype","getPrototypeOf","objectCreate","propertyIsEnumerable","spreadableSymbol","isConcatSpreadable","symIterator","symToStringTag","toStringTag","getNative","ctxClearTimeout","ctxNow","ctxSetTimeout","nativeCeil","nativeFloor","nativeGetSymbols","getOwnPropertySymbols","nativeIsBuffer","isBuffer","nativeIsFinite","isFinite","nativeJoin","nativeKeys","nativeMax","nativeMin","nativeNow","nativeParseInt","nativeRandom","nativeReverse","DataView","Set","WeakMap","nativeCreate","metaMap","realNames","dataViewCtorString","toSource","mapCtorString","promiseCtorString","setCtorString","weakMapCtorString","symbolProto","symbolValueOf","symbolToString","lodash","isObjectLike","LazyWrapper","LodashWrapper","wrapperClone","baseCreate","proto","baseLodash","chainAll","__wrapped__","__actions__","__chain__","__index__","__values__","__dir__","__filtered__","__iteratees__","__takeCount__","__views__","Hash","ListCache","MapCache","SetCache","Stack","arrayLikeKeys","inherited","isArr","isArg","isArguments","isBuff","isType","skipIndexes","isIndex","arraySample","baseRandom","arraySampleSize","shuffleSelf","copyArray","baseClamp","arrayShuffle","assignMergeValue","eq","baseAssignValue","assignValue","objValue","assocIndexOf","baseAggregator","baseEach","baseAssign","copyObject","writable","baseAt","upper","baseClone","bitmask","customizer","isDeep","isFlat","isFull","initCloneArray","getTag","isFunc","cloneBuffer","initCloneObject","copySymbolsIn","getSymbolsIn","baseAssignIn","keysIn","copySymbols","getSymbols","initCloneByTag","Ctor","cloneArrayBuffer","cloneDataView","dataView","buffer","byteOffset","byteLength","cloneTypedArray","cloneRegExp","regexp","cloneSymbol","symbol","subValue","getAllKeysIn","getAllKeys","baseConformsTo","baseDelay","wait","baseDifference","isCommon","valuesLength","outer","computed","valuesIndex","templateSettings","evaluate","variable","imports","hashClear","hashDelete","hashGet","hashHas","hashSet","listCacheClear","listCacheDelete","listCacheGet","listCacheHas","listCacheSet","mapCacheClear","mapCacheDelete","getMapData","mapCacheGet","mapCacheHas","mapCacheSet","setCacheAdd","setCacheHas","stackClear","stackDelete","stackGet","stackHas","stackSet","pairs","LARGE_ARRAY_SIZE","createBaseEach","baseForOwn","baseEachRight","baseForOwnRight","baseEvery","baseExtremum","isSymbol","baseFilter","baseFlatten","isStrict","isFlattenable","baseFor","createBaseFor","baseForRight","baseFunctions","isFunction","baseGet","castPath","toKey","baseGetAllKeys","keysFunc","symbolsFunc","baseGetTag","getRawTag","isOwn","unmasked","objectToString","baseGt","baseHas","baseHasIn","baseIntersection","othLength","othIndex","caches","maxLength","seen","baseInvoke","baseIsArguments","baseIsEqual","baseIsEqualDeep","equalFunc","objIsArr","othIsArr","objTag","othTag","objIsObj","othIsObj","isSameTag","equalArrays","equalByTag","objIsWrapped","othIsWrapped","objUnwrapped","othUnwrapped","equalObjects","isPartial","objProps","objLength","objStacked","othStacked","skipCtor","othValue","compared","objCtor","othCtor","baseIsMatch","matchData","noCustomizer","srcValue","COMPARE_PARTIAL_FLAG","baseIsNative","isMasked","baseIteratee","baseMatchesProperty","baseMatches","baseKeys","isPrototype","baseLt","baseMap","isArrayLike","getMatchData","matchesStrictComparable","isStrictComparable","hasIn","baseMerge","srcIndex","baseMergeDeep","mergeFunc","safeGet","isTyped","isArrayLikeObject","isPlainObject","toPlainObject","baseNth","baseOrderBy","iteratees","orders","getIteratee","baseSortBy","comparer","criteria","compareMultiple","objCriteria","othCriteria","ordersLength","compareAscending","basePickBy","baseSet","basePullAll","basePullAt","indexes","baseUnset","baseRepeat","baseRest","setToString","overRest","baseSample","baseSampleSize","nested","baseSetData","baseSetToString","baseShuffle","baseSlice","baseSome","baseSortedIndex","retHighest","mid","baseSortedIndexBy","valIsNaN","valIsNull","valIsSymbol","valIsUndefined","othIsDefined","othIsNull","othIsReflexive","othIsSymbol","setLow","baseSortedUniq","baseToNumber","baseToString","baseUniq","createSet","seenIndex","baseUpdate","updater","baseWhile","isDrop","baseWrapperValue","actions","action","baseXor","baseZipObject","assignFunc","valsLength","castArrayLikeObject","castFunction","stringToPath","castRest","castSlice","arrayBuffer","typedArray","valIsDefined","valIsReflexive","composeArgs","partials","holders","isCurried","argsIndex","argsLength","holdersLength","leftIndex","leftLength","rangeLength","isUncurried","composeArgsRight","holdersIndex","rightIndex","rightLength","isNew","createAggregator","initializer","createAssigner","assigner","guard","isIterateeCall","iterable","createCaseFirst","methodName","trailing","createCompounder","deburr","createCtor","thisBinding","createFind","findIndexFunc","createFlow","flatRest","funcs","prereq","thru","getFuncName","funcName","getData","isLaziable","plant","createHybrid","partialsRight","holdersRight","argPos","ary","arity","isAry","isBind","isBindKey","isFlip","getHolder","holdersCount","newHolders","createRecurry","reorder","createInverter","toIteratee","baseInverter","createMathOperation","createOver","arrayFunc","createPadding","charsLength","createRange","toFinite","baseRange","createRelationalOperation","wrapFunc","isCurry","newData","setWrapToString","createRound","toInteger","pair","createToPairs","setToPairs","baseToPairs","createWrap","mergeData","srcBitmask","newBitmask","createCurry","createPartial","createBind","customDefaultsAssignIn","customDefaultsMerge","customOmitClone","arrLength","arrStacked","arrValue","otherFunc","isKeyable","stubArray","hasPath","hasFunc","isLength","ArrayBuffer","ctorString","isMaskable","stubFalse","otherArgs","shortOut","reference","insertWrapDetails","updateWrapDetails","getWrapDetails","lastCalled","stamp","remaining","rand","memoizeCapped","memoize","quote","subString","differenceBy","differenceWith","findLastIndex","mapped","intersectionBy","intersectionWith","pull","pullAll","pullAt","union","unionBy","unionWith","unzip","unzipWith","without","xor","xorBy","xorWith","zip","zipWith","chain","interceptor","wrapperAt","countBy","findLast","forEachRight","groupBy","invokeMap","keyBy","partition","sortBy","WRAP_BIND_FLAG","debounce","lastArgs","lastThis","maxWait","timerId","lastCallTime","lastInvokeTime","leading","maxing","invokeFunc","leadingEdge","timerExpired","shouldInvoke","timeSinceLastCall","trailingEdge","remainingWait","timeWaiting","debounced","isInvoking","cancel","flush","defer","resolver","memoized","negate","overArgs","transforms","funcsLength","partial","partialRight","rearg","gt","gte","baseIsArrayBuffer","baseIsDate","isError","isInteger","baseIsMap","baseIsRegExp","baseIsSet","baseIsTypedArray","lte","iteratorToArray","remainder","toLength","isBinary","assignIn","assignInWith","assignWith","at","propsIndex","propsLength","defaultsDeep","mergeWith","invertBy","invoke","baseKeysIn","nativeKeysIn","isProto","omit","CLONE_DEEP_FLAG","basePick","pickBy","toPairs","toPairsIn","camelCase","upperFirst","kebabCase","lowerCase","lowerFirst","snakeCase","startCase","upperCase","hasUnicodeWord","unicodeWords","asciiWords","attempt","bindAll","methodNames","flow","flowRight","methodOf","mixin","over","overEvery","overSome","basePropertyDeep","rangeRight","augend","addend","divide","dividend","divisor","multiply","multiplier","multiplicand","subtract","minuend","subtrahend","castArray","compact","cond","conforms","baseConforms","curry","curryRight","drop","dropRight","dropRightWhile","dropWhile","baseFill","flatMap","flatMapDeep","flatMapDepth","flattenDeep","flattenDepth","flip","fromPairs","functions","functionsIn","mapKeys","mapValues","matchesProperty","nthArg","omitBy","orderBy","propertyOf","pullAllBy","pullAllWith","sampleSize","setWith","sortedUniq","sortedUniqBy","limit","spread","tail","take","takeRight","takeRightWhile","takeWhile","tap","throttle","toPath","isArrLike","unary","uniq","uniqBy","uniqWith","unset","updateWith","valuesIn","zipObject","zipObjectDeep","entriesIn","extendWith","cloneDeep","cloneDeepWith","cloneWith","conformsTo","defaultTo","endsWith","escapeRegExp","every","findKey","findLastKey","forIn","forInRight","forOwn","forOwnRight","inRange","baseInRange","isBoolean","isElement","isEmpty","isEqual","isEqualWith","isMatch","isMatchWith","isNative","isNil","isNull","isSafeInteger","isUndefined","isWeakMap","isWeakSet","lastIndexOf","strictLastIndexOf","maxBy","mean","meanBy","minBy","stubObject","stubString","stubTrue","nth","noConflict","pad","strLength","padEnd","padStart","radix","floating","reduceRight","sample","some","sortedIndex","sortedIndexBy","sortedIndexOf","sortedLastIndex","sortedLastIndexBy","sortedLastIndexOf","startsWith","sumBy","settings","isEscaping","isEvaluating","importsKeys","importsValues","reDelimiters","sourceURL","escapeValue","interpolateValue","esTemplateValue","evaluateValue","times","toLower","toSafeInteger","toUpper","trimEnd","trimStart","omission","substring","uniqueId","eachRight","isFilter","takeName","dropName","checkIteratee","isTaker","lodashFunc","retUnwrapped","isLazy","useLazy","isHybrid","isUnwrapped","onlyLazy","chainName","lazyClone","lazyReverse","lazyValue","isRight","view","getView","iterLength","takeCount","iterIndex","wrapperChain","commit","wrapperCommit","wrapperNext","wrapperPlant","wrapperReverse","wrapped","toJSON","wrapperValue","wrapperToIterator","define","moment","defineLocale","weekdaysMin","meridiemParse","isPM","meridiem","isLower","longDateFormat","LT","LTS","LL","LLL","LLLL","calendar","sameDay","nextDay","nextWeek","lastDay","lastWeek","sameElse","relativeTime","future","past","ss","mm","dd","MM","yy","dayOfMonthOrdinalParse","ordinal","dow","doy","pluralForm","plurals","pluralize","withoutSuffix","isFuture","weekdaysParseExact","postformat","symbolMap","preparse","numberMap","suffixes","relativeTimeWithPlural","plural","forms","standalone","isFormat","ww","lastDigit","last2Digits","meridiemHour","monthsShortRegex","monthsParseExact","relativeTimeWithMutation","mutation","softMutation","mutationTable","lastNumber","monthsParse","monthsRegex","minWeekdaysParse","weekdaysParse","fullWeekdaysParse","shortWeekdaysParse","monthsStrictRegex","monthsShortStrictRegex","longMonthsParse","shortMonthsParse","specialMutationForYears","token","lll","llll","processRelativeTime","monthsNominativeEl","monthsGenitiveEl","momentToFormat","_monthsGenitiveEl","_monthsNominativeEl","calendarEl","mom","_calendarEl","monthsShortDot","invalidDate","numbersPast","numbersFuture","verbalNumber","monthsShortWithDots","monthsShortWithoutDots","weekEndings","eras","since","narrow","abbr","until","eraYearOrdinalRegex","eraYearOrdinalParse","$0","$1","$2","isUpper","eifelerRegelAppliesToNumber","processFutureTime","processPastTime","units","translateSingular","special","translateSeconds","relativeTimeWithSingular","relativeSeconds","translator","correctGrammaticalCase","wordKey","relativeTimeMr","monthsNominative","monthsSubjective","days","numbersNouns","numberNoun","numberAsNoun","hundred","ten","one","translateFuture","translatePast","hm","processHoursFunction","weekdaysCaseReplace","nominative","accusative","genitive","hookCallback","hooks","hasOwnProp","isObjectEmpty","getOwnPropertyNames","arr","arrLen","createUTC","createLocalOrUTC","getParsingFlags","_pf","unusedTokens","unusedInput","charsLeftOver","nullInput","invalidEra","invalidMonth","invalidFormat","userInvalidated","parsedDateParts","era","rfc2822","weekdayMismatch","isValid","_isValid","flags","parsedParts","isNowValid","invalidWeekday","_strict","bigHour","isFrozen","createInvalid","fun","momentProperties","updateInProgress","copyConfig","momentPropertiesLen","_isAMomentObject","_f","_l","_tzm","_isUTC","_offset","Moment","updateOffset","isMoment","suppressDeprecationWarnings","deprecate","firstTime","deprecationHandler","argLen","deprecations","deprecateSimple","mergeConfigs","parentConfig","childConfig","Locale","zeroFill","targetLength","forceSign","absNumber","formattingTokens","localFormattingTokens","formatFunctions","formatTokenFunctions","addFormatToken","padded","localeData","removeFormattingTokens","formatMoment","expandFormat","makeFormatFunction","replaceLongDateFormatTokens","aliases","addUnitAlias","shorthand","normalizeUnits","normalizeObjectUnits","inputObject","normalizedProp","normalizedInput","priorities","addUnitPriority","isLeapYear","absFloor","toInt","argumentForCoercion","coercedNumber","makeGetSet","keepTime","set$1","daysInMonth","regexes","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchOffset","matchShortOffset","matchWord","addRegexToken","strictRegex","getParseRegexForToken","unescapeFormat","regexEscape","matched","tokens","addParseToken","tokenLen","addWeekParseToken","_w","addTimeToArrayFromToken","modMonth","defaultLocaleMonths","defaultLocaleMonthsShort","MONTHS_IN_FORMAT","defaultMonthsShortRegex","defaultMonthsRegex","handleStrictParse","monthName","llc","toLocaleLowerCase","_monthsParse","_longMonthsParse","_shortMonthsParse","setMonth","dayOfMonth","getSetMonth","computeMonthsParse","cmpLenRev","shortPieces","longPieces","mixedPieces","_monthsRegex","_monthsShortRegex","_monthsStrictRegex","_monthsShortStrictRegex","daysInYear","parseTwoDigitYear","getSetYear","createDate","setFullYear","createUTCDate","firstWeekOffset","fwd","dayOfYearFromWeeks","resYear","resDayOfYear","dayOfYear","weekOfYear","resWeek","weekOffset","weeksInYear","weekOffsetNext","shiftWeekdays","ws","weekdaysMinRegex","weekdaysShortRegex","weekdaysRegex","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","defaultWeekdaysRegex","defaultWeekdaysShortRegex","defaultWeekdaysMinRegex","handleStrictParse$1","weekdayName","_weekdaysParse","_shortWeekdaysParse","_minWeekdaysParse","computeWeekdaysParse","minp","shortp","longp","minPieces","_weekdaysRegex","_weekdaysShortRegex","_weekdaysMinRegex","_weekdaysStrictRegex","_weekdaysShortStrictRegex","_weekdaysMinStrictRegex","hFormat","lowercase","matchMeridiem","_meridiemParse","kFormat","kInput","_isPm","_meridiem","pos1","pos2","getSetHour","globalLocale","baseConfig","locales","localeFamilies","commonPrefix","arr1","arr2","minl","normalizeLocale","loadLocale","oldLocale","isLocaleNameSane","_abbr","aliasedRequire","getSetGlobalLocale","parentLocale","chooseLocale","checkOverflow","_overflowDayOfYear","_overflowWeeks","_overflowWeekday","extendedIsoRegex","basicIsoRegex","tzRegex","isoDates","isoTimes","aspNetJsonRegex","obsOffsets","UT","GMT","EDT","EST","CDT","CST","MDT","MST","PDT","PST","configFromISO","allowTime","timeFormat","tzFormat","isoDatesLen","isoTimesLen","configFromStringAndFormat","untruncateYear","yearStr","configFromRFC2822","parsedArray","preprocessRFC2822","extractFromRFC2822Strings","monthStr","dayStr","hourStr","minuteStr","secondStr","checkWeekday","weekdayStr","parsedInput","calculateOffset","obsOffset","militaryOffset","numOffset","setUTCMinutes","configFromArray","currentDate","expectedWeekday","yearToUse","currentDateArray","nowValue","_useUTC","dayOfYearFromWeekInfo","weekYear","weekdayOverflow","curWeek","GG","W","createLocal","_week","gg","_dayOfYear","_nextDay","ISO_8601","RFC_2822","skipped","stringLength","totalParsedInputLength","meridiemFixWrap","isPm","erasConvertYear","prepareConfig","configFromStringAndArray","tempConfig","bestMoment","scoreToBeat","currentScore","validFormatFound","bestFormatIsValid","configfLen","score","configFromInput","configFromString","createFromInputFallback","configFromObject","isUTC","createFromConfig","prototypeMin","prototypeMax","moments","Duration","years","quarters","quarter","weeks","isoWeek","isDurationValid","unitHasDecimal","orderLen","_milliseconds","_days","_months","_bubble","isDuration","absRound","utcOffset","offsetFromString","chunkOffset","cloneWithOffset","setTime","getDateOffset","isUtc","aspNetRegex","isoRegex","createDuration","ret","diffRes","parseIso","momentsDifference","isBefore","positiveMomentsDifference","inp","isAfter","createAdder","tmp","addSubtract","isAdding","createInvalid$1","isMomentInput","isNumberOrStringArray","arrayTest","dataTypeTest","isMomentInputObject","objectTest","propertyTest","propertyLen","isCalendarSpec","monthDiff","wholeMonthDiff","newLocaleData","defaultFormat","defaultFormatUtc","lang","MS_PER_MINUTE","MS_PER_HOUR","MS_PER_400_YEARS","mod$1","localStartOfDate","utcStartOfDate","matchEraAbbr","erasAbbrRegex","computeErasParse","abbrPieces","namePieces","narrowPieces","_erasRegex","_erasNameRegex","_erasAbbrRegex","_erasNarrowRegex","addWeekYearFormatToken","getter","getSetWeekYearHelper","weeksTarget","setWeekAll","dayOfYearData","matchEraName","erasNameRegex","matchEraNarrow","erasNarrowRegex","erasParse","matchEraYearOrdinal","_eraYearOrdinalRegex","isoWeekYear","_dayOfMonthOrdinalParse","_ordinalParse","_dayOfMonthOrdinalParseLenient","getSetDayOfMonth","getSetMinute","getSetMillisecond","getSetSecond","parseMs","preParsePostFormat","calendar$1","formats","sod","startOf","calendarFormat","asFloat","that","zoneDelta","endOf","startOfDate","isoWeekday","inputString","humanize","fromNow","toNow","stringGet","invalidAt","localInput","isBetween","inclusivity","localFrom","localTo","isSame","inputMs","isSameOrAfter","isSameOrBefore","isValid$2","parsingFlags","stringSet","prioritized","getPrioritizedUnits","unitsObj","prioritizedLen","toObject","toDate","keepOffset","inspect","isLocal","for","unix","creationData","eraName","getEraName","eraNarrow","getEraNarrow","eraAbbr","getEraAbbr","eraYear","getEraYear","getIsLeapYear","getSetWeekYear","getSetISOWeekYear","getSetQuarter","getDaysInMonth","getSetWeek","isoWeeks","getSetISOWeek","getWeeksInYear","weekInfo","weeksInWeekYear","getWeeksInWeekYear","isoWeeksInYear","getISOWeeksInYear","isoWeeksInISOWeekYear","getISOWeeksInISOWeekYear","getSetDayOfWeek","parseWeekday","getSetLocaleDayOfWeek","getSetISODayOfWeek","parseIsoWeekday","getSetDayOfYear","getSetOffset","keepLocalTime","keepMinutes","localAdjust","_changeInProgress","setOffsetToUTC","setOffsetToLocal","parseZone","setOffsetToParsedOffset","tZone","hasAlignedHourOffset","isDST","isDaylightSavingTime","isUtcOffset","zoneAbbr","getZoneAbbr","zoneName","getZoneName","getSetZone","isDSTShifted","isDaylightSavingTimeShifted","_isDSTShifted","compareArrays","array1","array2","dontConvert","lengthDiff","diffs","proto$1","get$1","listMonthsImpl","listWeekdaysImpl","localeSorted","_calendar","_longDateFormat","formatUpper","tok","_invalidDate","_ordinal","_relativeTime","pastFuture","localeEras","_eras","localeErasParse","localeErasConvertYear","localeMonths","localeMonthsShort","_monthsShort","localeMonthsParse","_monthsParseExact","localeWeek","firstDayOfYear","localeFirstDayOfYear","localeFirstDayOfWeek","localeWeekdays","_weekdays","localeWeekdaysMin","_weekdaysMin","localeWeekdaysShort","_weekdaysShort","localeWeekdaysParse","_weekdaysParseExact","_fullWeekdaysParse","localeIsPM","localeMeridiem","langData","mathAbs","addSubtract$1","absCeil","daysToMonths","monthsToDays","makeAs","alias","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asQuarters","asYears","makeGetter","thresholds","substituteTimeAgo","abs$1","toISOString$1","totalSign","ymSign","daysSign","hmsSign","toFixed","proto$2","isValid$1","add$1","subtract$1","valueOf$1","bubble","monthsFromDays","clone$1","get$2","argWithSuffix","argThresholds","withSuffix","relativeTime$1","posNegDuration","toIsoString","version","setHookCallback","createUnix","listMonths","listWeekdays","createInZone","listMonthsShort","listWeekdaysMin","updateLocale","tmpLocale","listLocales","listWeekdaysShort","relativeTimeRounding","getSetRelativeTimeRounding","roundingFunction","relativeTimeThreshold","getSetRelativeTimeThreshold","threshold","getCalendarFormat","myMoment","HTML5_FMT","DATETIME_LOCAL","DATETIME_LOCAL_SECONDS","DATETIME_LOCAL_MS","TIME","TIME_SECONDS","TIME_MS","WEEK","MONTH","Queue","polylabel","cellSize","degeneratePoleOfInaccessibility","cellQueue","compareMax","Cell","bestCell","getCentroidCell","bboxCell","numProbes","cell","poleOfInaccessibility","pointToPolygonDist","minDistSq","getSegDistSq","SQRT2","px","py","BehaviorSubject","Subject","super","_subscribe","subscriber","subscription","hasError","thrownError","_throwIfClosed","Observable","subscribe","lift","observable","observerOrNext","isSubscriber","Subscriber","isObserver","isSubscription","SafeSubscriber","errorContext","_trySubscribe","err","promiseCtor","getPromiseCtor","unsubscribe","Symbol_observable","pipe","operations","pipeFromArray","toPromise","ObjectUnsubscribedError","createErrorClass","observers","isStopped","AnonymousSubject","observed","_checkFinalizedStatuses","_innerSubscribe","EMPTY_SUBSCRIPTION","Subscription","arrRemove","asObservable","destination","COMPLETE_NOTIFICATION","createNotification","kind","EMPTY_OBSERVER","static","handleStoppedNotification","nextNotification","errorNotification","_error","_complete","wrapForErrorHandling","defaultErrorHandler","handler","instance","captureError","reportUnhandledError","notification","onStoppedNotification","timeoutProvider","UnsubscriptionError","initialTeardown","_parentage","_teardowns","teardown","execTeardown","_hasParent","_addParent","_removeParent","EMPTY","onUnhandledError","useDeprecatedSynchronousErrorHandling","useDeprecatedNextContext","firstValueFrom","hasConfig","EmptyError","forkJoin","resultSelector","popResultSelector","argsArgArrayOrObject","remainingCompletions","remainingEmissions","sourceIndex","innerFrom","OperatorSubscriber","createObject","mapOneOrManyArgs","observeOn","scheduler","operate","executeSchedule","subscribeOn","schedule","scheduleAsyncIterable","asyncIterator","scheduled","isInteropObservable","scheduleObservable","scheduleArray","isPromise","schedulePromise","isAsyncIterable","isIterable","scheduleIterable","Symbol_iterator","isReadableStreamLike","scheduleReadableStreamLike","readableStreamLikeToAsyncGenerator","createInvalidObservableTypeError","fromInteropObservable","obs","fromArrayLike","fromPromise","promise","fromAsyncIterable","fromIterable","fromReadableStreamLike","readableStream","asyncIterable","asyncIterable_1","asyncIterable_1_1","__asyncValues","of","popScheduler","onNext","onComplete","onError","onFinalize","concatMap","mergeMap","mergeAll","concurrent","mergeInternals","onBeforeNext","expand","innerSubScheduler","additionalTeardown","isComplete","checkComplete","outerNext","doInnerSub","innerComplete","innerValue","bufferedValue","share","connector","resetOnError","resetOnComplete","resetOnRefCountZero","wrapperSource","connection","resetConnection","refCount","hasCompleted","hasErrored","cancelReset","resetAndUnsubscribe","conn","dest","handleReset","ReplaySubject","_bufferSize","_windowTime","_timestampProvider","dateTimestampProvider","_buffer","_infiniteTimeWindow","_trimBuffer","adjustedBufferSize","shareReplay","configOrBufferSize","windowTime","bufferSize","delegate","handle","getSymbolIterator","isScheduler","popNumber","getKeys","isPOJO","createImpl","ctorFunc","isRoot","errorThrown","parentSubscription","work","scheduleSubscription","__asyncGenerator","getReader","__await","read","releaseLock","hasLift","liftedSource","callOrApply","fns","TinyQueue","defaultCompare","_down","_up","peek","halfLength","best","adopt","verb","settle","__proto__","extendStatics","op","ar","AnimationBuilder","AnimationFactory","AUTO_STYLE","trigger","definitions","timings","sequence","steps","stateChangeExpr","expr","scheduleMicroTask","NoopAnimationPlayer","_onDoneFns","_onStartFns","_onDestroyFns","_originalOnDoneFns","_originalOnStartFns","_destroyed","_finished","_position","parentPlayer","totalTime","_onFinish","onStart","onDone","onDestroy","hasStarted","play","_onStart","triggerMicrotask","restart","finish","setPosition","triggerCallback","phaseName","AnimationGroupPlayer","_players","players","doneCount","destroyCount","startCount","player","_onDestroy","timeAtPosition","longestPlayer","longestSoFar","beforeDestroy","ɵPRE_STYLE","_DOM","getDOM","setRootDomAdapter","DomAdapter","DOCUMENT","InjectionToken","PlatformLocation","historyGo","relativePosition","ɵfac","ɵprov","useBrowserPlatformLocation","ɵɵinject","BrowserPlatformLocation","LOCATION_INITIALIZED","_doc","_location","_history","history","getBaseHrefFromDOM","getBaseHref","onPopState","getGlobalEventTarget","onHashChange","hostname","pathname","newPath","pushState","supportsState","replaceState","back","createBrowserPlatformLocation","joinWithSlash","slashes","stripTrailingSlash","pathEndIdx","normalizeQueryParams","LocationStrategy","inject","PathLocationStrategy","APP_BASE_HREF","_platformLocation","_removeListenerFns","_baseHref","ngOnDestroy","prepareExternalUrl","internal","includeHash","queryParams","externalUrl","HashLocationStrategy","Location","locationStrategy","_subject","EventEmitter","_urlChangeListeners","_urlChangeSubscription","_locationStrategy","baseHref","_basePath","_stripOrigin","_stripIndexHtml","emit","normalize","isCurrentPathEqualTo","_stripBasePath","basePath","_notifyUrlChangeListeners","onUrlChange","fnIndex","onThrow","onReturn","createLocation","Plural","Zero","One","Two","Few","Many","Other","getLocalePluralCase","ɵgetLocalePluralCase","NgLocalization","LOCALE_ID","NgLocaleLocalization","getPluralCategory","parseCookieValue","cookieStr","cookie","eqIndex","cookieName","cookieValue","NgClass","_iterableDiffers","_keyValueDiffers","_ngEl","_iterableDiffer","_keyValueDiffer","_initialClasses","_rawClass","klass","_removeClasses","_applyClasses","ngClass","ɵisListLikeIterable","ngDoCheck","iterableChanges","_applyIterableChanges","keyValueChanges","_applyKeyValueChanges","changes","forEachAddedItem","record","_toggleClass","forEachChangedItem","forEachRemovedItem","previousValue","ɵstringify","rawClassVal","nativeElement","ɵdir","selectors","NgForOfContext","$implicit","ngForOf","even","odd","NgForOf","_ngForOf","_ngForOfDirty","ngForTrackBy","_trackByFn","_viewContainer","_differs","_differ","ngForTemplate","_applyChanges","viewContainer","forEachOperation","adjustedPreviousIndex","previousIndex","createEmbeddedView","applyViewChange","forEachIdentityChange","NgIf","templateRef","NgIfContext","_thenTemplateRef","_elseTemplateRef","_thenViewRef","_elseViewRef","ngIf","condition","_updateView","ngIfThen","assertTemplate","ngIfElse","SwitchView","_viewContainerRef","_templateRef","_created","enforceState","created","NgPlural","_localization","_caseViews","ngPlural","addCase","switchView","switchValue","_clearViews","cases","ngLocalization","_activateView","_activeView","NgPluralCase","isANumber","NgTemplateOutlet","_viewRef","ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector","ngOnChanges","viewContainerRef","injector","CommonModule","ɵmod","ɵinj","PLATFORM_BROWSER_ID","isPlatformBrowser","platformId","ViewportScroller","ɵɵdefineInjectable","providedIn","BrowserViewportScroller","setOffset","getScrollPosition","supportsScrolling","pageXOffset","pageYOffset","scrollToPosition","scrollTo","scrollToAnchor","elSelected","findAnchorFromDocument","documentResult","getElementsByName","createTreeWalker","createShadowRoot","attachShadow","treeWalker","NodeFilter","SHOW_ELEMENT","currentNode","shadowRoot","nextNode","scrollToElement","setHistoryScrollRestoration","scrollRestoration","supportScrollRestoration","scrollRestorationDescriptor","getScrollRestorationProperty","getOwnPropertyDescriptor","XhrFactory","HttpHandler","HttpBackend","HttpHeaders","headers","normalizedNames","lazyUpdate","lazyInit","maybeSetNormalizedName","getAll","lcName","applyUpdate","toDelete","existing","HttpUrlEncodingCodec","encodeKey","standardEncoding","encodeValue","decodeKey","decodeValue","STANDARD_ENCODING_REGEX","STANDARD_ENCODING_REPLACEMENTS","valueToString","HttpParams","cloneFrom","encoder","fromObject","paramParser","rawParams","codec","param","eqIdx","appendAll","eKey","HttpContext","isFormData","FormData","HttpRequest","third","fourth","reportProgress","mightHaveBody","urlWithParams","qIdx","serializeBody","isUrlSearchParams","URLSearchParams","detectContentTypeHeader","setHeaders","setParams","HttpEventType","Sent","UploadProgress","ResponseHeader","DownloadProgress","Response","User","HttpResponseBase","defaultStatus","defaultStatusText","statusText","ok","HttpHeaderResponse","HttpResponse","HttpErrorResponse","addBody","HttpClient","request","req","events$","res$","jsonp","callbackParam","patch","post","put","interceptorChainEndFn","finalHandlerFn","adaptLegacyInterceptorToChain","chainTailFn","initialRequest","intercept","downstreamRequest","HTTP_INTERCEPTORS","HTTP_INTERCEPTOR_FNS","legacyInterceptorFnFactory","optional","HttpInterceptorHandler","backend","dedupedInterceptorFns","nextSequencedFn","interceptorFn","chainedInterceptorFn","XSSI_PREFIX","HttpXhrBackend","xhrFactory","build","detectedType","reqBody","headerResponse","partialFromXhr","getAllResponseHeaders","getResponseUrl","responseURL","onLoad","originalBody","sentHeaders","onDownProgress","progressEvent","loaded","lengthComputable","partialText","onUpProgress","upload","DONE","abort","XSRF_ENABLED","XSRF_DEFAULT_COOKIE_NAME","XSRF_COOKIE_NAME","XSRF_DEFAULT_HEADER_NAME","XSRF_HEADER_NAME","HttpXsrfTokenExtractor","HttpXsrfCookieExtractor","platform","lastCookieString","lastToken","parseCount","getToken","cookieString","ɵparseCookieValue","PLATFORM_ID","xsrfInterceptorFn","lcUrl","headerName","HttpFeatureKind","Interceptors","LegacyInterceptors","CustomXsrfConfiguration","NoXsrfProtection","JsonpSupport","RequestsMadeViaParent","makeHttpFeature","providers","ɵkind","ɵproviders","provideHttpClient","provide","useExisting","useValue","multi","useClass","makeEnvironmentProviders","LEGACY_INTERCEPTOR_FN","withXsrfConfiguration","HttpClientModule","useFactory","XhrFactory$1","getClosureSafeProperty","objWithPropertyToExtract","fillProperties","overriddenName","newLineIndex","concatStringsWithSpace","__forward_ref__","forwardRef","forwardRefFn","resolveForwardRef","isForwardRef","isEnvironmentProviders","XSS_SECURITY_URL","RuntimeError","formatRuntimeError","renderStringify","throwProviderNotFoundError","injectorName","ngDevMode","assertDefined","actual","throwError","expected","comparison","opts","ɵɵdefineInjector","getInjectableDef","getOwnDefinition","NG_PROV_DEF","NG_INJECTABLE_DEF","isInjectable","getInjectorDef","NG_INJ_DEF","NG_INJECTOR_DEF","ngInjectableDef","ngInjectorDef","InjectFlags","Default","Host","Self","SkipSelf","Optional","_injectImplementation","setInjectImplementation","impl","injectRootLimpMode","notFoundValue","injectableDef","_global","globalThis","WorkerGlobalScope","THROW_IF_NOT_FOUND","DI_DECORATOR_FLAG","NG_TEMP_TOKEN_PATH","NEW_LINE","SOURCE","_currentInjector","setCurrentInjector","former","injectInjectorOnly","getInjectImplementation","convertToBitFlags","skipSelf","injectArgs","flag","getInjectFlag","attachInjectFlag","decorator","noSideEffects","ChangeDetectionStrategy","OnPush","ViewEncapsulation$1","ViewEncapsulation","Emulated","None","ShadowDom","EMPTY_OBJ","EMPTY_ARRAY","NG_COMP_DEF","ɵcmp","NG_DIR_DEF","NG_PIPE_DEF","ɵpipe","NG_MOD_DEF","NG_FACTORY_DEF","NG_ELEMENT_ID","__NG_ELEMENT_ID__","componentDefCount","ɵɵdefineComponent","componentDefinition","declaredInputs","def","providersResolver","decls","vars","consts","ngContentSelectors","hostBindings","hostVars","hostAttrs","contentQueries","outputs","exportAs","onPush","changeDetection","directiveDefs","pipeDefs","dependencies","getStandaloneInjector","viewQuery","encapsulation","setInput","schemas","tView","findHostDirectiveDefs","hostDirectives","invertObject","extractDirectiveDef","nonNull","getPipeDef$1","getComponentDef","getDirectiveDef","ɵɵdefineNgModule","bootstrap","declarations","transitiveCompileScopes","secondary","newLookup","minifiedKey","publicName","declaredName","ɵɵdefineDirective","ɵɵdefinePipe","pipeDef","pure","isStandalone","getNgModuleDef","throwNotFound","ngModuleDef","isLView","isLContainer","isContentQueryHost","tNode","isComponentHost","componentOffset","isDirectiveHost","isComponentDef","isRootView","getFactoryDef","SimpleChange","firstChange","isFirstChange","ɵɵNgOnChangesFeature","NgOnChangesFeatureImpl","definition","ngOnChangesSetInput","rememberChangeHistoryAndInvokeOnChangesHook","simpleChangesStore","getSimpleChangesStore","privateName","setSimpleChangesStore","store","SIMPLE_CHANGES_STORE","previousChange","ngInherit","unwrapRNode","getNativeByIndex","lView","getNativeByTNode","getTNode","getComponentLViewByIndex","nodeIndex","hostView","slotValue","viewAttachedToChangeDetector","getConstant","resetPreOrderHookFlags","updateTransplantedViewCount","lContainer","viewOrContainer","instructionState","lFrame","createLFrame","bindingsEnabled","getBindingsEnabled","getLView","getTView","ɵɵrestoreView","viewToRestore","contextLView","ɵɵresetView","getCurrentTNode","currentTNode","getCurrentTNodePlaceholderOk","setCurrentTNode","isParent","isCurrentTNodeParent","setCurrentTNodeAsNotParent","getBindingRoot","bindingRootIndex","bindingStartIndex","nextBindingIndex","bindingIndex","incrementBindingIndex","setBindingRootForHostBindings","currentDirectiveIndex","setCurrentDirectiveIndex","getCurrentQueryIndex","currentQueryIndex","setCurrentQueryIndex","getDeclarationTNode","declTNode","enterDI","parentTNode","parentLView","allocLFrame","enterView","newView","newLFrame","inI18n","currentLFrame","childLFrame","selectedIndex","elementDepthCount","currentNamespace","leaveViewLight","oldLFrame","leaveDI","leaveView","getSelectedIndex","setSelectedIndex","getSelectedTNode","registerPostOrderHooks","directiveStart","directiveEnd","lifecycleHooks","ngAfterContentInit","ngAfterContentChecked","ngAfterViewInit","ngAfterViewChecked","contentHooks","contentCheckHooks","viewHooks","viewCheckHooks","destroyHooks","executeCheckHooks","callHooks","executeInitAndCheckHooks","initPhase","incrementInitPhaseFlags","currentView","currentNodeIndex","nodeIndexLimit","lastNodeIndexFound","callHook","isInitHook","hook","directive","NodeInjectorFactory","isViewProvider","injectImplementation","resolving","canSeeViewProviders","injectImpl","setUpAttributes","native","attrs","attrName","attrVal","isAnimationProp","isNameOnlyAttributeMarker","mergeHostAttrs","dst","srcMarker","mergeHostAttribute","key1","key2","markerInsertPosition","dstValue","hasParentInjector","parentLocation","getParentInjectorIndex","getParentInjectorView","startView","viewOffset","getParentInjectorViewOffset","parentView","includeViewProviders","setIncludeViewProviders","nextNgElementId","NOT_FOUND","getOrCreateNodeInjectorForNode","existingInjectorIndex","getInjectorIndex","firstCreatePass","injectorIndex","insertBloom","blueprint","parentLoc","getParentInjectorLocation","parentIndex","parentData","footer","declarationViewOffset","lViewCursor","getTNodeFromLView","diPublicInInjector","bloomAdd","bloomHash","notFoundValueOrThrow","lookupTokenUsingModuleInjector","moduleInjector","previousInjectImplementation","getOrCreateInjectable","embeddedInjectorValue","lookupTokenUsingEmbeddedInjector","currentLView","nodeInjectorValue","lookupTokenUsingNodeInjector","embeddedViewInjector","embeddedViewInjectorValue","bloomHashBitOrFactory","tokenId","createNodeInjector","previousTView","hostTElementNode","shouldSearchParent","bloomHasToken","searchTokensOnInjector","currentTView","injectableIdx","locateDirectiveOrProvider","getNodeInjectable","canAccessViewProviders","isHostSpecialCase","nodeProviderIndexes","providerIndexes","tInjectables","injectablesStart","directivesStart","cptViewProvidersCount","providerTokenOrDef","dirDef","tData","isFactory","throwCyclicDependencyError","depPath","stringifyForError","previousIncludeViewProviders","registerPreOrderHooks","directiveIndex","directiveDef","ngOnInit","wrappedOnChanges","preOrderHooks","preOrderCheckHooks","injectorView","isFirstHostTNode","NodeInjector","_tNode","_lView","ɵɵgetInheritedFactory","ownConstructor","ownFactory","getFactoryOf","objectPrototype","tViewType","ɵɵinjectAttribute","attrNameToInject","injectAttributeImpl","attrsLength","PARAMETERS","makeParamDecorator","parentClass","metaCtor","makeMetadataCtor","propName","ParamDecoratorFactory","annotationInstance","ParamDecorator","annotation","cls","unusedKey","parameters","ngMetadataName","annotationCls","_desc","deepForEach","addToArray","removeFromArray","keyValueArraySet","keyValueArray","keyValueArrayIndexOf","arrayInsert2","value1","value2","keyValueArrayGet","_arrayIndexOfSorted","middle","RendererStyleFlags2","Important","DashCase","TRACKED_LVIEWS","uniqueIdCounter","MONKEY_PATCH_KEY_NAME","attachPatchData","registerLView","icuContainerIterate","tIcuContainerNode","_icuContainerIterate","getLViewParent","getFirstLContainer","getNearestLContainer","getNextLContainer","applyToElementOrContainer","lNodeToHandle","beforeNode","isComponent","rNode","nativeAppendChild","nativeInsertBefore","nativeRemoveNode","isHostElement","nativeParent","nativeParentNode","nativeRemoveChild","destroyNode","applyContainer","parentRElement","applyView","createElementNode","detachMovedView","declarationContainer","movedViews","declarationViewIndex","insertionLContainer","detachView","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","isMove","nativeAppendOrInsertBefore","policy$1","policy","_getInsertInFrontOfRNodeWithI18n","getInsertInFrontOfRNodeWithNoI18n","childRNode","childTNode","parentRNode","anchorNode","getInsertInFrontOfRNode","getFirstNativeNode","tNodeType","getBeforeNodeForView","elIcuContainerChild","rNodeOrLContainer","projectionNodes","getProjectionNodes","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","changingThisBreaksApplicationSecurity","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","createHTMLDocument","inertHtml","inertBodyElement","templateEl","inertBody","stripCustomNsAttrs","elAttrs","ELEMENT_NODE","SAFE_URL_PATTERN","_sanitizeUrl","tagSet","sets","VOID_ELEMENTS","OPTIONAL_END_TAG_BLOCK_ELEMENTS","OPTIONAL_END_TAG_INLINE_ELEMENTS","VALID_ELEMENTS","URI_ATTRS","VALID_ATTRS","SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS","SanitizingHtmlSerializer","sanitizedSomething","buf","sanitizeChildren","traverseContent","startElement","TEXT_NODE","nodeValue","endElement","checkClobberedElement","nodeName","elAttr","encodeEntities","outerHTML","SURROGATE_PAIR_REGEXP","NON_ALPHANUMERIC_REGEXP","inertBodyHelper","_sanitizeHtml","unsafeHtmlInput","getInertBodyHelper","isDOMParserAvailable","unsafeHtml","mXSSAttempts","parsedHtml","getTemplateContent","isTemplateElement","SecurityContext","NONE","HTML","STYLE","SCRIPT","RESOURCE_URL","ɵɵsanitizeHtml","sanitizer","getSanitizer","sanitize","getDocument","ɵɵsanitizeUrl","unsafeUrl","ɵɵsanitizeResourceUrl","unsafeResourceUrl","ɵɵsanitizeUrlOrResourceUrl","getUrlSanitizer","ENVIRONMENT_INITIALIZER","INJECTOR","INJECTOR_DEF_TYPES","NullInjector","importProvidersFrom","internalImportProvidersFrom","ɵfromNgModule","checkForStandaloneCmp","providersOut","dedup","injectorTypesWithProviders","internalSource","walkProviderTree","processInjectorTypesWithProviders","typesWithProviders","deepForEachProvider","provider","defType","injDef","cmpDef","ngModule","isDuplicate","deps","dep","importTypesWithProviders","imported","defProviders","USE_VALUE$1","isValueProvider","isTypeProvider","INJECTOR_SCOPE","NOT_YET","CIRCULAR","NULL_INJECTOR$1","getNullInjector","EnvironmentInjector","R3Injector","destroyed","scopes","records","_ngOnDestroyHooks","_onDestroyHooks","forEachSingleProvider","processProvider","makeRecord","injectorDefTypes","assertNotDestroyed","service","previousInjector","couldBeInjectableType","injectableDefInScope","injectableDefOrInjectorDefFactory","hydrate","catchInjectorError","injectorErrorName","tokenPath","formatError","NG_TOKEN_PATH","resolveInjectorInitializers","initializers","providerToRecord","providerToFactory","multiRecord","hasOnDestroy","getUndecoratedInjectableFactory","paramLength","inheritedInjectableDef","getInheritedInjectableDef","typeName","ngModuleType","unwrappedProvider","isFactoryProvider","isExistingProvider","classRef","hasDeps","ComponentRef$1","ComponentFactory$1","_NullComponentFactoryResolver","resolveComponentFactory","noComponentFactoryError","ERROR_COMPONENT","ComponentFactoryResolver$1","NULL","injectElementRef","createElementRef","ElementRef","unwrapElementRef","RendererFactory2","Renderer2","injectRenderer2","nodeAtIndex","Sanitizer","Version","major","minor","NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR","getOriginalError","ERROR_ORIGINAL_ERROR","ErrorHandler","_console","handleError","originalError","_findOriginalError","ɵɵresolveWindow","ɵɵresolveDocument","maybeUnwrapFn","classIndexOf","classToSearch","startingIndex","foundIndex","NG_TEMPLATE_SELECTOR","isCssClassMatching","cssClassToMatch","isProjectionMode","isInlineTemplate","hasTagAndTypeMatch","currentSelector","isNodeMatchingSelector","nodeAttrs","nameOnlyMarkerIdx","getNameOnlyMarkerIndex","skipToNextSelector","isPositive","selectorAttrValue","attrIndexInNode","findAttrIndexInNode","nodeAttrValue","compareAgainstClassName","bindingsMode","maybeAttrName","matchTemplateAttribute","isNodeMatchingSelectorList","maybeWrapInNotSelector","isNegativeMode","stringifyCSSSelector","currentChunk","valueOrMarker","attrValue","NO_CHANGE","ɵɵadvance","selectIndexInternal","checkNoChangesMode","createInjector","additionalProviders","createInjectorWithoutInjectorInstances","Injector","ɵɵdirectiveInject","ɵɵinvalidFactory","refreshContentQueries","queryStartIdx","directiveDefIdx","createLView","tHostNode","rendererFactory","getUniqueLViewId","getOrCreateTNode","createTNodeAtIndex","createTNode","tParent","insertBeforeIndex","directiveStylingLast","propertyBindings","localNames","initialInputs","tViews","stylesWithoutHost","residualStyles","classesWithoutHost","residualClasses","classBindings","styleBindings","isInI18nBlock","getCurrentParentTNode","allocExpando","numSlotsToAlloc","initialValue","allocIdx","renderView","executeViewQueryFn","templateFn","executeTemplate","staticContentQueries","staticViewQueries","components","renderChildComponents","hostLView","renderComponent","incompleteFirstPass","refreshView","setBindingIndex","hooksInitPhaseCompleted","markTransplantedViewsForRefresh","movedLView","refreshEmbeddedViews","embeddedLView","embeddedTView","processHostBindingOpCodes","hostBindingOpCodes","opCode","directiveIdx","bindingRootIndx","hostBindingFn","refreshChildComponents","refreshComponent","firstUpdatePass","rf","prevSelectedIndex","isUpdatePhase","executeContentQueries","createDirectivesInstances","instantiateAllDirectives","addComponentLogic","hostTNode","getOrCreateComponentTView","componentView","addToViewTree","createRenderer","setInputsFromAttrs","invokeDirectivesHostBindings","saveResolvedLocalsInData","viewData","localRefExtractor","localIndex","createTView","directives","pipes","constsOrFactory","initialViewLength","createViewBlueprint","queries","expandoStartIndex","directiveRegistry","pipeRegistry","storeCleanupWithContext","cleanupFn","getOrCreateLViewCleanup","getOrCreateTViewCleanup","generatePropertyAliases","aliasMap","propertyAliases","hostDirectiveAliasMap","internalName","addPropertyAlias","elementPropertyInternal","nativeOnly","dataValue","inputData","setInputsForProperty","markDirtyIfOnPush","mapPropName","viewIndex","childComponentLView","resolveDirectives","localRefs","hasDirectives","exportsMap","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","dirIndex","invokeHostBindingsInCreationMode","directiveFactory","nodeInjectorFactory","registerHostBindingOpCodes","directiveVarsIdx","elementIndx","lastSelectedElementIdx","elementAttributeInternal","setElementAttribute","strValue","initialInputData","inputsToStore","inputConfig","createLContainer","hostNative","componentHostIdx","refreshContainsDirtyView","componentTView","syncViewWithBlueprint","markViewDirty","detectChangesInternal","notifyErrorHandler","begin","viewQueryFn","errorHandler","textBindingInternal","updateTextNode","computeStaticStyling","writeToHost","collectNativeNodes","lNode","lViewInAContainer","lViewFirstChildTNode","nodesInSlot","ViewRef$1","rootNodes","_cdRefInjectingView","_appRef","_attachedToViewContainer","viewRefs","markForCheck","detach","reattach","detectChanges","checkNoChanges","attachToViewContainerRef","detachFromAppRef","renderDetachView","attachToAppRef","appRef","RootViewRef","_view","ComponentFactoryResolver","componentDef","ComponentFactory","toRefArray","nonMinified","templateName","ChainedInjector","parentInjector","componentType","stringifyCSSSelectorList","selectorList","isBoundToModule","projectableNodes","rootSelectorOrNode","environmentInjector","realEnvironmentInjector","rootViewInjector","hostRenderer","hostRNode","locateHostElement","elementOrSelector","selectRootElement","getNamespace","rootFlags","rootTView","rootLView","tElementNode","rootComponentDef","rootDirectives","createRootComponentTNode","createRootComponentView","applyRootComponentStyling","viewRenderer","setRootNodeAttributes","extractAttrsAndClassesFromSelector","projectNodes","nodesforSlot","createRootComponent","hostFeatures","rootTNode","LifecycleHooksFeature","ComponentRef","_rootLView","changeDetectorRef","ɵɵInheritDefinitionFeature","superType","getSuperType","shouldInheritFields","inheritanceChain","superDef","writeableDef","maybeUnwrapEmpty","superHostBindings","inheritHostBindings","superViewQuery","superContentQueries","inheritViewQuery","inheritContentQueries","defData","mergeHostAttrsAcrossInheritance","prevViewQuery","prevContentQueries","prevHostBindings","_symbolIterator","isListLikeIterable","isJsObject","updateBinding","bindingUpdated","bindingUpdated2","exp1","exp2","different","ɵɵattribute","interpolation1","interpolation2","v1","getBindingIndex","ɵɵtemplate","attrsIndex","localRefsIndex","adjustedIndex","templateFirstCreatePass","tViewConsts","comment","createComment","ɵɵreference","getContextLView","ɵɵproperty","setDirectiveInputsWhichShadowsStyling","isClassBased","ɵɵelementStart","getNamespace$1","elementStartFirstCreatePass","elementStart","getElementDepthCount","increaseElementDepthCount","ɵɵelementEnd","decreaseElementDepthCount","elementEnd","hasClassInput","hasStyleInput","ɵɵelement","ɵɵelementContainerStart","elementContainerStartFirstCreatePass","ɵɵelementContainerEnd","ɵɵelementContainer","ɵɵgetCurrentView","isSubscribable","isObservable","ɵɵlistener","eventName","listenerFn","useCapture","eventTargetResolver","listenerInternal","isTNodeDirectiveHost","processOutputs","lCleanupIndex","idxOrTargetGetter","existingListener","findExistingListener","tNodeIdx","cleanupEventName","listenerIdxInLCleanup","__ngLastListenerFn__","__ngNextListenerFn__","wrapListener","listen","executeListenerWithErrorHandling","profiler","wrapWithPreventDefault","wrapListenerIn_markDirtyAndPreventDefault","nextListenerFn","returnValue","ɵɵnextContext","nextContextImpl","walkUpViews","nestingLevel","ɵɵpropertyInterpolate1","interpolatedValue","toTStylingRange","getTStylingRangePrev","tStylingRange","setTStylingRangePrevDuplicate","getTStylingRangeNext","setTStylingRangeNext","setTStylingRangeNextDuplicate","markDuplicates","tStylingKey","isPrevDir","isClassBinding","tStylingAtIndex","foundDuplicate","tStyleRangeAtCursor","isStylingMatch","tStylingKeyCursor","parserState","textEnd","keyEnd","valueEnd","getLastParsedKey","getLastParsedValue","parseClassNameNext","consumeClassToken","consumeWhitespace","parseStyleNext","consumeStyleKey","consumeSeparator","consumeStyleValue","ch1","ch2","ch3","lastChIndex","consumeQuotedText","resetParserState","quoteCharCode","ɵɵstyleProp","checkStylingProperty","ɵɵclassProp","styleStringParser","parseStyle","styleKeyValueArraySet","classStringParser","parseClassName","stylingFirstUpdatePass","updateStyling","normalizeSuffix","checkStylingMap","stringParser","hasStylingInputShadow","isInHostBindings","staticPrefix","updateStylingMap","oldKeyValueArray","newKeyValueArray","oldIndex","newIndex","oldKey","newKey","toStylingKeyValueArray","styleKeyValueArray","unwrappedValue","isHostBindings","wrapInStaticStylingKey","stylingKey","hostDirectiveDef","getCurrentDirectiveDef","residual","collectStylingFromTAttrs","collectStylingFromDirectives","templateStylingKey","getTemplateHeadTStylingKey","bindings","setTemplateHeadTStylingKey","collectResidual","insertTStylingBinding","tStylingKeyWithStatic","isHostBinding","tBindings","tmplHead","tmplTail","isKeyDuplicateOfStatic","staticKeyValueArray","previousNode","setTStylingRangePrev","markDuplicateOfResidualStyling","currentDirective","desiredMarker","currentMarker","tRange","higherPriorityValue","getTStylingRangeNextDuplicate","findStylingValue","isStylingValuePresent","getTStylingRangePrevDuplicate","applyStyling","isPrevDirection","rawKey","containsStatics","isStylingMap","valueAtLViewIndex","ɵɵtext","textNative","createTextNode","createText","ɵɵtextInterpolate","ɵɵtextInterpolate1","interpolated","ɵɵtextInterpolate2","ɵɵclassMapInterpolate1","ɵɵstyleMapInterpolate1","ɵɵstyleMap","localeEn","LOCALE_DATA","findLocaleData","normalizedLocale","getLocaleData","LocaleDataIndex","PluralCase","ng","common","LocaleId","DayPeriodsFormat","DayPeriodsStandalone","DaysFormat","DaysStandalone","MonthsFormat","MonthsStandalone","Eras","FirstDayOfWeek","WeekendRange","DateFormat","TimeFormat","NumberSymbols","NumberFormats","CurrencyCode","CurrencySymbol","CurrencyName","Currencies","Directionality","ExtraData","DEFAULT_LOCALE_ID","LOCALE_ID$1","resolveProvider","lInjectablesBlueprint","providerFactory","beginIndex","existingFactoryIndex","registerDestroyHooksIfSupported","existingProvidersFactoryIndex","existingViewProvidersFactoryIndex","doesProvidersFactoryExist","doesViewProvidersFactoryExist","multiFactory","factoryFn","componentProviders","multiFactoryAdd","multiViewProvidersFactoryResolver","multiProvidersFactoryResolver","contextIndex","indexInFactory","providerIsTypeProvider","providerIsClassProvider","isClassProvider","existingCallbacksIndex","isComponentProvider","lData","multiResolve","factories","componentCount","multiProviders","ɵɵProvidersFeature","viewProviders","processProvidersFn","NgModuleRef$1","NgModuleFactory$1","createNgModule","NgModuleRef","_bootstrapComponents","destroyCbs","componentFactoryResolver","_r3Injector","NgModuleFactory","moduleType","EnvironmentNgModuleRefAdapter","createEnvironmentInjector","debugName","StandaloneService","_injector","cachedInjectors","getOrCreateStandaloneInjector","standaloneInjector","ɵɵStandaloneFeature","ɵɵpureFunction0","slotOffset","pureFn","getBinding","ɵɵpureFunction1","pureFunction1Internal","bindingRoot","getPureFunctionReturnValue","ɵɵpureFunction2","pureFunction2Internal","ɵɵpureFunction3","exp3","pureFunction3Internal","bindingUpdated3","returnValueIndex","lastReturnValue","ɵɵpipe","pipeName","getPipeDef","pipeFactory","pipeInstance","ɵɵpipeBind2","v2","isPure","_wrapInTimeout","EventEmitter_","isAsync","__isAsync","nextFn","errorFn","completeFn","symbolIterator","_results","QueryList","_changes","_emitDistinctChangesOnly","_changesDetected","resultsTree","identityAccessor","newResultFlat","flat","arrayEquals","valueA","valueB","notifyOnChanges","setDirty","TemplateRef","injectTemplateRef","ViewEngineTemplateRef","R3TemplateRef","_declarationLView","_declarationTContainer","elementRef","declarationViewLQueries","createTemplateRef","ViewContainerRef","injectViewContainerRef","createContainerRef","VE_ViewContainerRef","R3ViewContainerRef","_lContainer","_hostTNode","_hostLView","getViewRefs","indexOrOptions","viewRef","createComponent","componentFactoryOrType","isComponentFactory","ngModuleRef","componentFactory","contextInjector","componentRef","viewAttachedToContainer","prevIdx","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","tquery","TQuery_","metadata","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","APP_INITIALIZER","ApplicationInitStatus","appInits","initialized","donePromise","rej","runInitializers","asyncInitPromises","initResult","observableAsPromise","APP_ID","_appIdRandomProviderFactory","_randomChar","fromCharCode","PLATFORM_INITIALIZER","APP_BOOTSTRAP_LISTENER","ANIMATION_MODULE_TYPE","Console","getGlobalLocale","$localize","DEFAULT_CURRENCY_CODE","ModuleWithComponentFactories","ngModuleFactory","componentFactories","Compiler","compileModuleSync","compileModuleAsync","compileModuleAndAllComponentsSync","declaration","compileModuleAndAllComponentsAsync","clearCacheFor","getModuleId","Zone","NgZone","enableLongStackTrace","shouldCoalesceEventChangeDetection","shouldCoalesceRunChangeDetection","hasPendingMacrotasks","hasPendingMicrotasks","isStable","onUnstable","onMicrotaskEmpty","onStable","assertZonePatched","_nesting","_outer","_inner","TaskTrackingZoneSpec","fork","longStackTraceZoneSpec","lastRequestAnimationFrameId","nativeRequestAnimationFrame","getNativeRequestAnimationFrame","nativeCancelAnimationFrame","unpatchedRequestAnimationFrame","__symbol__","unpatchedCancelAnimationFrame","forkInnerZoneWithAngularBehavior","delayChangeDetectionForEventsDelegate","delayChangeDetectionForEvents","isCheckStableRunning","fakeTopEventTask","scheduleEventTask","updateMicroTaskStatus","checkStable","isAngularZone","onInvokeTask","task","applyThis","applyArgs","onEnter","invokeTask","onLeave","onInvoke","onHasTask","hasTaskState","hasTask","change","_hasPendingMicrotasks","microTask","macroTask","onHandleError","runOutsideAngular","isInAngularZone","run","runTask","EMPTY_PAYLOAD","cancelTask","runGuarded","NoopNgZone","TESTABILITY","TESTABILITY_GETTER","_testabilityGetter","Testability","_ngZone","testabilityGetter","_pendingCount","_isZoneStable","_didWork","taskTrackingZone","setTestabilityGetter","addToWindow","_watchAngularEvents","assertNotInAngularZone","_runCallbacksIfReady","increasePendingRequestCount","decreasePendingRequestCount","timeoutId","doneCb","pending","getPendingTasks","updateCb","macroTasks","creationLocation","addCallback","whenStable","getPendingRequestCount","registerApplication","unregisterApplication","findProviders","using","exactMatch","TestabilityRegistry","_applications","testability","unregisterAllApplications","getTestability","elem","getAllTestabilities","getAllRootElements","findTestabilityInTree","findInAncestors","_platformInjector","ALLOW_MULTIPLE_PLATFORMS","PLATFORM_DESTROY_LISTENERS","NgProbeToken","createPlatformFactory","parentPlatformFactory","desc","extraProviders","getPlatform","platformProviders","createPlatform","PlatformRef","runPlatformInitializers","inits","createPlatformInjector","assertPlatform","requiredToken","_modules","_destroyListeners","bootstrapModuleFactory","moduleFactory","ngZone","getNgZone","ngZoneToUse","getNgZoneOptions","ngZoneEventCoalescing","ngZoneRunCoalescing","ngZoneInjector","moduleRef","exceptionHandler","_callAndReportToErrorHandler","initStatus","setLocaleId","localeId","_moduleDoBootstrap","bootstrapModule","compilerOptions","optionsReducer","compileNgModuleFactory","ApplicationRef","ngDoBootstrap","destroyListeners","objs","_zone","_exceptionHandler","_bootstrapListeners","_views","_runningTick","_stable","componentTypes","_onMicrotaskEmptySubscription","isCurrentlyStable","stableSub","unstableSub","assertInAngularZone","merge$1","componentOrFactory","cf","compRef","_loadComponent","attachView","NG_DEV_MODE","viewCount","warnIfDestroyed","enableProdMode","ChangeDetectorRef","injectChangeDetectorRef","createViewRef","isPipe","DefaultIterableDifferFactory","supports","trackByFn","DefaultIterableDiffer","trackByIdentity","_linkedRecords","_unlinkedRecords","_previousItHead","_itHead","_itTail","_additionsHead","_additionsTail","_movesHead","_movesTail","_removalsHead","_removalsTail","_identityChangesHead","_identityChangesTail","forEachItem","nextIt","nextRemove","addRemoveOffset","moveOffsets","getPreviousIndex","adjPreviousIndex","_nextRemoved","localMovePreviousIndex","localCurrentIndex","forEachPreviousItem","_nextPrevious","_nextAdded","forEachMovedItem","_nextMoved","_nextIdentityChange","check","_reset","itemTrackBy","mayBeDirty","trackById","_verifyReinsertion","_addIdentityChange","_mismatch","iterateListLike","_truncate","isDirty","previousRecord","_prev","_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","_nextChanged","_forEach","_maybeAddToChanges","_getOrCreateRecordForKey","_insertBeforeOrAppend","KeyValueChangeRecord_","_addToAdditions","_addToChanges","defaultIterableDiffersFactory","IterableDiffers","copied","defaultKeyValueDiffersFactory","KeyValueDiffers","kv","platformCore","ApplicationModule","coerceToBoolean","BaseControlValueAccessor","_elementRef","onChange","onTouched","registerOnTouched","registerOnChange","setDisabledState","isDisabled","BuiltInControlValueAccessor","NG_VALUE_ACCESSOR","DEFAULT_VALUE_ACCESSOR","DefaultValueAccessor","COMPOSITION_BUFFER_MODE","_compositionMode","_composing","_isAndroid","ɵgetDOM","getUserAgent","writeValue","_handleInput","_compositionStart","_compositionEnd","NG_VALIDATORS","NG_ASYNC_VALIDATORS","isPresent","toObservable","ɵisPromise","mergeErrors","arrayOfErrors","executeValidators","control","validators","validator","normalizeValidators","isValidatorFn","composeValidators","presentValidators","composeAsyncValidators","composeAsync","observables","mergeValidators","controlValidators","dirValidator","getControlValidators","_rawValidators","getControlAsyncValidators","_rawAsyncValidators","makeValidatorsArray","hasValidator","addValidators","currentValidators","validatorsToAdd","removeValidators","AbstractControlDirective","_onDestroyCallbacks","valid","pristine","untouched","statusChanges","valueChanges","_setValidators","_composedValidatorFn","_setAsyncValidators","_composedAsyncValidatorFn","asyncValidator","_registerOnDestroy","_invokeOnDestroyCallbacks","errorCode","getError","ControlContainer","formDirective","NgControl","valueAccessor","AbstractControlStatus","cd","_cd","isTouched","isUntouched","isPristine","isInvalid","isPending","isSubmitted","submitted","NgControlStatus","NgControlStatusGroup","VALID","INVALID","PENDING","DISABLED","pickValidators","validatorOrOpts","isOptionsObj","pickAsyncValidators","asyncValidators","assertControlPresent","isGroup","ɵRuntimeError","assertAllValuesPresent","_forEachChild","AbstractControl","_pendingDirty","_hasOwnPendingAsyncValidator","_pendingTouched","_onCollectionChange","_onDisabledChange","_assignValidators","_assignAsyncValidators","validatorFn","asyncValidatorFn","updateOn","_updateOn","setValidators","setAsyncValidators","addAsyncValidators","removeAsyncValidators","hasAsyncValidator","clearValidators","clearAsyncValidators","markAsTouched","onlySelf","markAllAsTouched","markAsUntouched","_updateTouched","markAsDirty","markAsPristine","_updatePristine","markAsPending","emitEvent","skipPristineCheck","_parentMarkedDirty","_updateValue","_updateAncestors","changeFn","updateValueAndValidity","setParent","getRawValue","_setInitialStatus","_cancelExistingSubscription","_runValidator","_calculateStatus","_runAsyncValidator","_updateTreeValidity","ctrl","_allControlsDisabled","_asyncValidationSubscription","setErrors","_updateControlsErrors","currPath","_find","_initObservables","_anyControlsHaveStatus","_anyControls","_anyControlsDirty","_anyControlsTouched","_registerOnCollectionChange","_setUpdateStrategy","coerceToValidator","coerceToAsyncValidator","FormGroup","_setUpControls","registerControl","addControl","removeControl","setControl","controlName","patchValue","_reduceChildren","acc","_syncPendingControls","subtreeUpdated","updated","_reduceValue","initValue","FormRecord","CALL_SET_DISABLED_STATE","setDisabledStateDefault","setUpControl","callSetDisabledState","setUpValidators","setUpViewChangePipeline","_pendingValue","_pendingChange","updateControl","setUpModelChangePipeline","emitModelEvent","viewToModelUpdate","_unregisterOnChange","setUpBlurPipeline","setUpDisabledChangeHandler","onDisabledChange","registerOnDisabledChange","_unregisterOnDisabledChange","cleanUpControl","validateControlPresenceOnChange","cleanUpValidators","registerOnValidatorChange","onValidatorChange","isControlUpdated","updatedValidators","updatedAsyncValidators","emitModelToViewChange","removeListItem","isFormControlState","formState","FormControl","_onChange","_applyFormState","nonNullable","initialValueIsDefault","emitViewToModelChange","UntypedFormControl","ɵNgNoValidate","RadioControlRegistryModule","NG_MODEL_WITH_FORM_CONTROL_WARNING","formDirectiveProvider","FormGroupDirective","_updateDomValue","form","ngSubmit","_checkFormPresent","_updateValidators","_updateRegistrations","_oldForm","getControl","removeListItem$1","addFormGroup","_setUpFormContainer","removeFormGroup","_cleanUpFormContainer","getFormGroup","addFormArray","removeFormArray","getFormArray","updateModel","onSubmit","$event","syncPendingControls","onReset","resetForm","oldCtrl","newCtrl","isFormControl","setUpFormContainer","cleanUpFormContainer","controlNameBinding","FormControlName","valueAccessors","_ngModelWarningConfig","_added","_ngModelWarningSent","selectValueAccessor","defaultAccessor","builtinAccessor","customAccessor","isBuiltInAccessor","_setUpControl","isPropertyUpdated","viewModel","controlPath","_checkParentType","_ngModelWarningSentOnce","SELECT_VALUE_ACCESSOR","SelectControlValueAccessor","_buildValueString$1","_optionMap","_idCounter","_compareWith","compareWith","valueString","_getOptionId","_getOptionValue","_registerOption","_extractId$1","NgSelectOption","_select","ngValue","_setElementValue","SELECT_MULTIPLE_VALUE_ACCESSOR","SelectMultipleControlValueAccessor","_buildValueString","optionSelectedStateSetter","ids","opt","_setSelected","selected","selectedOptions","_extractId","ɵNgSelectMultipleOption","ɵInternalFormsSharedModule","FormArray","_registerControl","removeAt","isAbstractControlOptions","FormBuilder","useNonNullable","nnfb","reducedControls","_reduceControls","createdControls","_createControl","UntypedFormBuilder","controlsConfig","ReactiveFormsModule","warnOnNgModelWithFormControl","invalidTimingValue","isBrowser","isNode","optimizeGroupPlayer","ɵAnimationGroupPlayer","normalizeKeyframes$1","driver","normalizer","keyframes","preStyles","postStyles","normalizedKeyframes","previousOffset","previousKeyframe","kf","isSameOffset","normalizedKeyframe","normalizedValue","normalizePropertyName","normalizeStyleValue","animationFailed","listenOnPlayer","copyAnimationEvent","makeAnimationEvent","triggerName","fromState","toState","getOrSetDefaultValue","parseTimelineCommand","command","separatorPos","_contains","elm1","elm2","_query","_documentElement","getParentElement","Element","_CACHED_BODY","_IS_WEBKIT","containsElement","invokeQuery","NoopAnimationDriver","validateStyleProperty","getBodyNode","containsVendorPrefix","matchesElement","_selector","computeStyle","previousPlayers","scrubberAccessRequested","AnimationDriver","NOOP","ENTER_CLASSNAME","LEAVE_CLASSNAME","NG_TRIGGER_CLASSNAME","NG_TRIGGER_SELECTOR","NG_ANIMATING_CLASSNAME","NG_ANIMATING_SELECTOR","resolveTimingValue","_convertTimeValueToMS","resolveTiming","allowNegativeValues","parseTimeExpression","delayMatch","easingVal","containsErrors","negativeStepValue","negativeDelayValue","copyObj","convertToMap","styleMap","copyStyles","backfill","getStyleAttributeString","writeStyleAttribute","styleAttrValue","camelCaseToDashCase","formerStyles","camelProp","dashCaseToCamelCase","eraseStyles","normalizeAnimationEntry","PARAM_REGEX","extractStyleParams","interpolateParams","original","varName","localVal","invalidParamValue","DASH_CASE_REGEXP","visitDslNode","visitor","visitTrigger","visitState","visitTransition","visitSequence","visitGroup","visitAnimate","visitKeyframes","visitStyle","visitReference","visitAnimateChild","visitAnimateRef","visitQuery","visitStagger","invalidNodeType","parseTransitionExpr","transitionValue","expressions","parseInnerTransitionStr","eventStr","parseAnimationAlias","invalidTransitionAlias","invalidExpression","makeLambdaFromStates","TRUE_BOOLEAN_VALUES","FALSE_BOOLEAN_VALUES","lhs","rhs","LHS_MATCH_BOOLEAN","RHS_MATCH_BOOLEAN","lhsMatch","rhsMatch","SELF_TOKEN_REGEX","buildAnimationAst","warnings","AnimationAstBuilderVisitor","_driver","AnimationAstBuilderContext","_resetContextStyleTimingState","currentQuerySelector","collectedStyles","queryCount","depCount","transitions","invalidTrigger","stateDef","invalidDefinition","styleAst","astParams","containsDynamicStyles","missingSubs","sub","invalidState","metadataName","matchers","normalizeAnimationOptions","furthestTime","innerAst","timingAst","constructTimingAst","makeTimingAst","ast","dynamic","currentAnimateTimings","styleMetadata","newStyleData","_styleAst","isEmptyStep","_makeStyleAst","_validateStyleAst","metadataStyles","styleTuple","collectedEasing","styleData","endTime","tuple","collectedEntry","updateCollectedStyle","invalidParallelAnimation","firstStart","firstEnd","secondStart","secondEnd","validateStyleParams","invalidStyleParams","invalidKeyframes","totalKeyframesWithOffsets","offsetsOutOfOrder","keyframesOutOfRange","offsetVal","consumeOffset","invalidOffset","keyframeOffsetsOutOfOrder","generatedOffset","keyframesMissingOffsets","animateDuration","durationUpToThisFrame","parentSelector","currentQuery","includeSelf","normalizeSelector","hasAmpersand","originalSelector","invalidStagger","currentTransition","unsupportedCSSPropertiesFound","normalizeParams","createTimelineInstruction","preStyleProps","postStyleProps","subTimeline","ElementInstructionMap","instructions","existingInstructions","ENTER_TOKEN_REGEX","LEAVE_TOKEN_REGEX","buildAnimationTimelines","enterClassName","leaveClassName","startingStyles","finalStyles","subInstructions","AnimationTimelineBuilderVisitor","buildKeyframes","AnimationTimelineContext","currentTimeline","delayNextStep","timelines","timeline","containsAnimation","lastRootTimeline","allowOnlyTimelineStyles","elementInstructions","innerContext","createSubContext","_visitSubInstructions","transformIntoNewTimeline","_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","parentContext","maxTime","currentStaggerTime","startingTime","_enterClassName","_leaveClassName","initialTimeline","TimelineBuilder","skipIfExists","optionsToUpdate","newParams","paramsToUpdate","_copyOptions","oldParams","newTime","updatedTimings","builder","SubTimelineBuilder","stretchStartingKeyframe","results","invalidQuery","_elementTimelineStylesLookup","_previousKeyframe","_currentKeyframe","_keyframes","_styleSummary","_localTimelineStyles","_pendingStyles","_backFill","_currentEmptyStepKeyframe","_globalTimelineStyles","_loadKeyframe","hasPreStyleStep","_updateStyle","flattenStyles","allStyles","allProperties","getFinalKeyframe","details1","details0","finalKeyframes","keyframe","finalKeyframe","preProps","postProps","kf0","kf1","_stretchStartingKeyframe","newKeyframes","startingGap","newFirstKeyframe","oldFirstKeyframe","roundOffset","oldOffset","decimalPoints","mult","AnimationStyleNormalizer","DIMENSIONAL_PROP_SET","WebAnimationsStyleNormalizer","userProvidedProperty","normalizedProperty","strVal","valAndSuffixMatch","invalidCssUnitValue","createTransitionInstruction","isRemovalTransition","fromStyles","toStyles","queriedElements","EMPTY_OBJECT","AnimationTransitionFactory","_triggerName","_stateStyles","currentState","nextState","oneOrMoreTransitionsMatch","matchFns","buildStyles","styler","currentOptions","nextOptions","skipAstBuild","transitionAnimationParams","currentStateStyles","nextAnimationParams","nextStateStyles","preStyleMap","postStyleMap","isRemoval","applyParamDefaults","elm","queriedElementsList","userParams","AnimationStateStyles","defaultParams","combinedParams","AnimationTrigger","_normalizer","transitionFactories","balanceProperties","fallbackTransition","createFallbackTransition","containsQueries","matchTransition","matchStyles","stateMap","EMPTY_INSTRUCTION_MAP","TimelineAnimationEngine","bodyNode","_playersById","register","registerFailed","_buildPlayer","autoStylesMap","inst","missingOrDestroyedAnimation","createAnimationFailed","_getPlayer","missingPlayer","baseEvent","QUEUED_CLASSNAME","DISABLED_CLASSNAME","EMPTY_PLAYER_ARRAY","NULL_REMOVAL_STATE","namespaceId","setForRemoval","setForMove","hasAnimation","removedBeforeQueried","NULL_REMOVED_QUERIED_STATE","REMOVAL_FLAG","StateValue","isObj","normalizeTriggerValue","absorbOptions","VOID_VALUE","DEFAULT_STATE_VALUE","AnimationTransitionNamespace","hostElement","_engine","_triggers","_queue","_elementListeners","_hostClassName","phase","missingTrigger","missingEvent","isTriggerEventValid","unsupportedTriggerEvent","triggersWithStates","statesByElement","afterFlush","_getTrigger","unregisteredTrigger","defaultToFallback","TransitionAnimationPlayer","objEquals","k1","k2","reportError","playersOnElement","playersByElement","queued","isFallbackTransition","totalQueuedPlayers","deregister","clearElementCache","elementPlayers","_signalRemovalForInnerTriggers","fetchNamespacesByElement","triggerLeaveAnimation","afterFlushAnimationsDone","destroyAfterComplete","triggerStates","previousTriggersValues","markElementAsRemoved","processLeaveNode","prepareLeaveAnimationListeners","elementStates","visitedTriggers","engine","childElementCount","containsPotentialParentTransition","totalAnimations","currentPlayers","playersByQueriedElement","removalFlag","destroyInnerAnimations","_onRemovalComplete","insertNode","drainQueuedTransitions","microtaskId","markedForDestroy","elementContainsData","containsData","TransitionAnimationEngine","onRemovalComplete","newHostElements","disabledNodes","_namespaceLookup","_namespaceList","_flushFns","_whenQuietFns","namespacesByHostElement","collectedEnterElements","collectedLeaveElements","queuedPlayers","createNamespace","_balanceNamespaceList","collectEnterElement","namespaceList","ancestor","ancestorNs","registerTrigger","_fetchNamespace","stateValue","isElementNode","markElementAsDisabled","hostNS","_buildInstruction","subTimelines","skipBuildAst","containerElement","destroyActiveAnimationsForElement","finishActiveQueriedAnimationOnElement","whenRenderingDone","cleanupFns","_flushAnimations","quietFns","triggerTransitionsFailed","skippedPlayers","skippedPlayersMap","queuedInstructions","allPreStyleElements","allPostStyleElements","disabledElementsSet","nodesThatAreDisabled","allTriggerElements","enterNodeMap","buildRootMap","enterNodeMapIds","allLeaveNodes","mergedLeaveNodes","leaveNodesWithoutAnimations","leaveNodeMapIds","leaveNodeMap","allPlayers","erroneousTransitions","nodeIsOrphaned","stringMap","setVal","transitionFailed","allPreviousPlayersMap","animationElementMap","_beforeAnimationBuild","_getPreviousPlayers","prevPlayer","replaceNodes","replacePostStylesAsPre","postStylesMap","cloakAndComputeStyles","preStylesMap","pre","rootPlayers","subPlayers","NO_PARENT_ANIMATION_ELEMENT_DETECTED","overrideTotalTime","parentWithAnimation","parentsToAdd","detectedParent","innerPlayer","_buildAnimation","setRealPlayer","parentPlayers","playersForElement","syncPlayerEvents","queriedPlayerResults","queriedInnerElements","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","_queueEvent","cloakElement","valuesMap","elementPropsMap","cloakVals","failedElements","roots","rootMap","nodeSet","localRootMap","postEntry","preEntry","AnimationEngine","_triggerCache","_transitionEngine","_timelineEngine","componentId","cacheKey","triggerBuildFailed","buildTrigger","onInsert","disableAnimations","eventPhase","SpecialCasedStyles","_startStyles","_endStyles","_state","initialStyles","initialStylesByElement","_initialStyles","filterNonAnimatableStyles","isNonAnimatableStyle","WebAnimationsPlayer","_specialStyles","_initialized","currentSnapshot","_duration","_delay","_preparePlayerBeforeStart","domPlayer","_triggerWebAnimation","_finalKeyframe","_resetDomPlayerState","_convertKeyframesToObject","kfs","fromEntries","WebAnimationsDriver","validateAnimatableStyleProperty","playerOptions","previousStyles","previousWebAnimationPlayers","allowPreviousPlayerStylesMerge","normalizeKeyframes","balancePreviousStylesIntoKeyframes","startingKeyframe","missingStyleProps","specialStyles","packageNonAnimatableStyles","startStyles","endStyles","BrowserAnimationBuilder","rootRenderer","_nextAnimationId","issueAnimationCommand","BrowserAnimationFactory","RendererAnimationPlayer","_command","_listen","DISABLE_ANIMATIONS_FLAG","AnimationRendererFactory","_currentId","_microtaskId","_animationCallbacksBuffer","_rendererCache","_cdRecurDepth","BaseAnimationRenderer","animationTriggers","AnimationRenderer","_scheduleCountTask","scheduleListenerCallback","newChild","refChild","oldChild","selectorOrNode","preserveContent","resolveElementFromTarget","parseTriggerCallbackName","dotIndex","SHARED_ANIMATION_PROVIDERS","ɵAnimationStyleNormalizer","instantiateDefaultStyleNormalizer","ɵWebAnimationsStyleNormalizer","ɵAnimationEngine","InjectableAnimationEngine","instantiateRendererFactory","ɵDomRendererFactory2","BROWSER_ANIMATIONS_PROVIDERS","ɵWebAnimationsDriver","BROWSER_NOOP_ANIMATIONS_PROVIDERS","ɵNoopAnimationDriver","BrowserAnimationsModule","BrowserModule","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","BrowserXhr","EVENT_MANAGER_PLUGINS","EventManager","_eventNameToPlugin","manager","_findPluginFor","addGlobalEventListener","getZone","EventManagerPlugin","SharedStylesHost","_stylesSet","addStyles","additions","onStylesAdded","getAllStyles","DomSharedStylesHost","_hostNodes","_addStylesToHost","styleNodes","styleEl","addHost","hostNode","removeHost","styleNode","NAMESPACE_URIS","math","COMPONENT_REGEX","compId","decoratePreventDefault","eventHandler","DomRendererFactory2","eventManager","sharedStylesHost","appId","rendererByCompId","defaultRenderer","DefaultDomRenderer2","EmulatedEncapsulationDomRenderer2","applyToHost","ShadowDomRenderer","isTemplateNode","namespaceUri","contentAttr","shimContentAttribute","componentShortId","hostAttr","shimHostAttribute","hostEl","nodeOrShadowRoot","DomEventsPlugin","MODIFIER_KEYS","_keyMap","Del","Esc","Left","Right","Up","Down","Menu","Scroll","Win","MODIFIER_KEY_GETTERS","alt","KeyEventsPlugin","parseEventName","parsedEvent","outsideHandler","eventCallback","fullKey","domEventName","_normalizeKey","codeIX","modifierName","fullKeyCode","keycode","modifierGetter","matchEventFullKeyCode","keyName","platformBrowser","ɵPLATFORM_BROWSER_ID","initDomAdapter","makeCurrent","_document","ɵsetDocument","BROWSER_MODULE_PROVIDERS_MARKER","TESTABILITY_PROVIDERS","ɵTESTABILITY_GETTER","BrowserGetTestability","ɵglobal","testabilities","didWork","decrement","didWork_","ɵTESTABILITY","BROWSER_MODULE_PROVIDERS","ɵINJECTOR_SCOPE","providersAlreadyPresent","Meta","_dom","addTag","forceCreation","_getOrCreateElement","addTags","attrSelector","getTags","updateTag","_parseSelector","_setMetaElementAttributes","removeTag","removeTagElement","_containsAttributes","_getMetaKeyMap","META_KEYS_MAP","createMeta","httpEquiv","Title","getTitle","setTitle","newTitle","createTitle","DomSanitizer","DomSanitizerImpl","ɵallowSanitizationBypassAndThrow","ɵunwrapSafeValue","ɵ_sanitizeHtml","ɵ_sanitizeUrl","ɵXSS_SECURITY_URL","bypassSecurityTrustHtml","ɵbypassSanitizationTrustHtml","bypassSecurityTrustStyle","ɵbypassSanitizationTrustStyle","bypassSecurityTrustScript","ɵbypassSanitizationTrustScript","bypassSecurityTrustUrl","ɵbypassSanitizationTrustUrl","bypassSecurityTrustResourceUrl","ɵbypassSanitizationTrustResourceUrl","domSanitizerImplFactory","combineLatest","combineLatestInit","valueTransform","maybeSchedule","remainingFirstValues","hasFirstValue","execute","concatAll","observableFactory","errorOrErrorFactory","errorFactory","_refCount","refCounter","sharedConnection","_connection","connect","ConnectableObservable","subjectFactory","getSubject","_teardown","higherOrderRefCount","switchMap","innerSubscriber","innerIndex","outerIndex","defaultIfEmpty","throwIfEmpty","defaultErrorFactory","hasDefaultValue","tapObserver","isUnsub","finalize","catchError","handledResult","innerSub","syncUnsub","scanInternals","seed","hasSeed","emitOnNext","emitBeforeComplete","hasState","scan","takeLast","PRIMARY_OUTLET","RouteTitleKey","ParamsAsMap","convertToParamMap","defaultUrlMatcher","segmentGroup","route","pathMatch","posParams","consumed","shallowEqual","equalArraysOrString","aSorted","bSorted","wrapIntoObservable","ɵisObservable","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","serialize","serializePaths","UrlSegment","parameterMap","_parameterMap","serializePath","UrlSerializer","DefaultUrlSerializer","UrlParser","parseRootSegment","parseQueryParams","parseFragment","tree","serializeSegment","serializeQueryParams","strParams","encodeUriQuery","encodeUriFragment","primary","mapChildrenIntoArray","childOutlet","encodeUriString","encodeUriSegment","decode","decodeQuery","serializeMatrixParams","SEGMENT_RE","matchSegments","QUERY_PARAM_RE","QUERY_PARAM_VALUE_RE","consumeOptional","peekStartsWith","parseChildren","parseQueryParam","parseSegment","capture","parseParens","parseMatrixParams","parseParam","valueMatch","matchQueryParams","matchUrlQueryParamValue","decodedKey","decodedVal","currentVal","allowPrimary","outletName","createRoot","rootCandidate","Zt","squashSegmentGroup","newChildren","childCandidate","mergeTrivialChildren","isUrlTree","createUrlTree","urlTree","commands","nav","computeNavigation","Navigation","numberOfDoubleDots","isAbsolute","cmd","cmdIdx","outlets","segmentPath","urlPart","partIndex","toRoot","createTreeUsingPathIndex","lastPathIndex","startingPosition","findStartingPosition","Position","createPositionApplyingDoubleDots","isMatrixParams","snapshot","_urlSegment","processChildren","updateSegmentGroupChildren","updateSegmentGroup","_lastPathIndex","isCommandWithOutlets","oldRoot","oldSegmentGroup","newSegmentGroup","qp","replaceSegment","newRoot","oldSegment","newSegment","cmdWithOutlet","prefixedWith","currentCommandIndex","currentPathIndex","noMatch","pathIndex","commandIndex","curr","slicedCommands","createNewSegmentGroup","getOutlets","outlet","createNewSegmentChildren","IMPERATIVE_NAVIGATION","RouterEvent","NavigationStart","navigationTrigger","restoredState","NavigationEnd","urlAfterRedirects","NavigationCancel","reason","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","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","createNode","routeReuseStrategy","prevState","shouldReuseRoute","createOrReuseChildren","shouldAttach","detachedRouteHandle","retrieve","createActivatedRoute","NAVIGATION_CANCELING_ERROR","redirectingNavigationError","urlSerializer","redirect","redirectTo","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","deactivate","initializeOutletWithName","attach","activateWith","isActivated","activatedRoute","activatedRouteData","cmp","resolverOrInjector","childContexts","OutletInjector","isComponentFactoryResolver","ɵEmptyOutletComponent","getOrCreateRouteInjectorIfNeeded","currentInjector","standardizeConfig","loadComponent","loadChildren","getOutlet","sortByMatchingOutlets","routes","sortedConfig","getClosestRouteInjector","_loadedInjector","ActivateRoutes","futureState","currState","forwardEvent","activate","futureRoot","currRoot","deactivateChildRoutes","activateChildRoutes","futureNode","currNode","futureChild","childOutletName","deactivateRoutes","deactivateRouteAndItsChildren","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","startWith","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","getChildConfig","routerConfig","childInjector","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","freeze","rootNode","routeState","inheritParamsAndData","routeNode","processSegment","outletChildren","inclusive","mergedChildren","mergeEmptyPathMatches","sortActivatedRouteSnapshots","localeCompare","processSegmentAgainstRoute","pathIndexShift","getPathIndexShift","_loadedComponent","getSourceSegmentGroup","getResolve","hasEmptyPathConfig","mergedNodes","duplicateEmptyPathNode","resultNode","mergedNode","hasStaticTitle","switchTap","nextResult","ROUTES","RouterConfigLoader","compiler","componentLoaders","childrenLoaders","onLoadStartListener","loadRunner","maybeUnwrapDefaultExport","onLoadEndListener","loader","loadModuleFactoryOrRoutes","factoryOrRoutes","rawRoutes","requireStandaloneComponents","NG_DEV_MODE$5","isWrappedDefaultExport","NavigationTransitions","hasRequestedNavigation","navigationId","currentNavigation","lastSuccessfulNavigation","rootContexts","afterPreactivation","handleNavigationRequest","setupNavigations","router","targetPageId","currentRawUrl","extractedUrl","urlHandlingStrategy","extract","rawUrl","routerState","targetSnapshot","currentRouterState","targetRouterState","guards","guardsResult","overallTransitionState","completed","errored","initialUrl","previousNavigation","browserUrlTree","urlTransition","navigated","onSameUrlNavigation","rawUrlTree","shouldProcessUrl","isBrowserTriggeredNavigation","applyRedirects","applyRedirects$1","finalUrl","serializer","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","canActivate","canActivateObservables","isCanActivate","guardsEnd","restoreHistory","cancelNavigationTransition","resolveStart","dataResolved","resolveData","canActivateChecksResolved","runResolve","resolveNode","getDataKeys","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","defaultMalformedUriErrorHandler","exactMatchOptions","subsetMatchOptions","Router","navigationTransitions","browserPageId","ɵrouterPageId","disposed","currentPageId","ɵConsole","isNgZoneEnabled","malformedUriErrorHandler","lastSuccessfulId","urlCreationStrategy","canceledNavigationResolution","resetConfig","resetRootComponentType","initialNavigation","setUpLocationChangeListener","navigateToSyncWithBrowser","locationSubscription","stateCopy","getCurrentNavigation","navigationExtras","queryParamsHandling","preserveFragment","removeEmptyProps","navigateByUrl","navigate","validateCommands","matchOptions","priorPromise","generateNgRouterState","restoringFromCaughtError","targetPagePosition","resetState","resetUrlToCurrentUrlTree","routerPageId","RouterLink","tabIndexAttribute","_preserveFragment","_skipLocationChange","_replaceUrl","onChanges","isAnchorElement","updateHref","setTabIndexIfNotOnNativeEl","ɵcoerceToBoolean","newTabIndex","applyAttributeValue","routerLink","onClick","sanitizedValue","i3","PreloadingStrategy","RouterPreloader","preloadingStrategy","setUpPreloading","preload","processRoutes","injectorForCurrentRoute","injectorForChildren","preloadConfig","loadedChildren$","recursiveLoadChildren$","loadComponent$","ROUTER_SCROLLER","RouterScroller","viewportScroller","lastId","lastSource","restoredId","scrollPositionRestoration","anchorScrolling","routerEventsSubscription","createScrollEvents","scrollEventsSubscription","consumeScrollEvents","scheduleScrollEvent","routerFeature","getBootstrapListener","bootstrappedComponentRef","bootstrapDone","BOOTSTRAP_DONE","INITIAL_NAVIGATION","ROUTER_PRELOADER","withPreloading","ROUTER_FORROOT_GUARD","ROUTER_PROVIDERS","rootRoute","routerNgProbeToken","RouterModule","provideForRootGuard","useHash","scrollOffset","provideInitialNavigation","ROUTER_INITIALIZER","locationInitialized","afterNextNavigation","Animator","_request","_charts","_running","_lastDate","_notify","anims","numSteps","_refresh","requestAnimFrame","_update","running","_active","_total","_getAnims","charts","cur","animator","transparent","interpolators","boolean","mix","hexString","_fn","_easing","effects","_target","_prop","_from","_to","_promises","elapsed","remain","resolved","Animations","_properties","animatedProps","_animateOptions","resolveTargetOptions","$shared","$animations","_createAnimations","awaitAll","scaleClip","allowedOverflow","getSortedDatasetIndices","filterVisible","metasets","_getSortedDatasetMetas","applyStack","dsIndex","singleMode","otherValue","isNumberFinite","isStacked","getOrCreateStack","stacks","indexValue","subStack","getLastIndexInStack","getMatchingVisibleMetas","updateStacks","controller","_cachedMeta","_stacks","iScale","iAxis","vAxis","getStackKey","indexScale","valueScale","Me","_visualValues","getFirstScaleId","scales","clearStacks","_parsed","isDirectUpdateMode","cloneIfNotShared","shared","DatasetController","_cachedDataOpts","getMeta","_type","_parsing","_objectData","_sharedOptions","_drawStart","_drawCount","enableOptionSharing","supportsDecimation","_syncList","datasetElementType","dataElementType","initialize","linkScales","_stacked","addElements","isPluginEnabled","updateIndex","getDataset","chooseId","xid","xAxisID","yid","yAxisID","rid","rAxisID","indexAxis","iid","iAxisID","vid","vAxisID","xScale","getScaleForId","yScale","rScale","scaleID","_getOtherScale","_destroy","unlistenArrayEvents","_dataCheck","convertObjectDataToArray","adata","isExtensible","listenArrayEvents","buildOrUpdateElements","resetNewElements","stackChanged","oldStacked","_resyncElements","scopeKeys","datasetScopeKeys","getOptionScopes","createResolver","parsing","_sorted","parseArrayData","parseObjectData","parsePrimitiveData","isNotInOrderComparedToPrev","getLabels","singleScale","oe","xAxisKey","yAxisKey","resolveObjectKey","getParsed","getDataElement","updateRangeFromParsed","parsedValue","canStack","otherScale","createStack","otherMin","otherMax","getUserBounds","minDefined","maxDefined","_skip","getAllParsedValues","getMaxOverflow","getLabelAndValue","getLabelForValue","_clip","toClip","defaultClip","drawActiveElementsOnTop","resolveDatasetElementOptions","resolveDataElementOptions","createDataContext","createContext","raw","createDatasetContext","_resolveElementOptions","elementType","sharing","defined","datasetElementScopeKeys","resolveNamedOptions","_resolveAnimations","datasetAnimationScopeKeys","_cacheable","getSharedOptions","includeOptions","sharedOptions","_animationsDisabled","_getSharedOptions","firstOpts","previouslySharedOptions","updateSharedOptions","updateElement","_setStyle","removeHoverStyle","setHoverStyle","_removeDatasetHoverStyle","_setDatasetHoverStyle","arg1","arg2","numMeta","numData","_insertElements","_removeElements","updateElements","removed","_sync","_dataChanges","_onDataPush","_onDataPop","_onDataShift","_onDataSplice","newCount","_onDataUnshift","computeMinSampleSize","getAllScaleValues","_cache","$bar","visibleMetas","_arrayUnique","_length","updateMinAndPrev","getPixelForValue","getPixelForTick","parseValue","parseFloatBar","barStart","barEnd","_custom","parseArrayOrPrimitive","isFloatBar","custom","setBorderSkipped","borderSkipped","borderProps","enableBorderRadius","parseEdge","orig","startEnd","setInflateAmount","inflateAmount","ratio","BarController","iAxisKey","vAxisKey","bars","isHorizontal","ruler","_getRuler","vpixels","_calculateBarValuePixels","ipixels","_calculateBarIndexPixels","_getStacks","grouped","skipNull","_getStackCount","_getStackIndex","pixels","barThickness","_startPixel","_endPixel","stackCount","categoryPercentage","barPercentage","minBarLength","actualBase","barSign","startPixel","getPixelForDecimal","endPixel","getValueForPixel","halfGrid","getLineWidthForValue","maxBarThickness","computeFlexCategoryTraits","computeFitCategoryTraits","stackIndex","_index_","_value_","beginAtZero","BubbleController","iPixel","vPixel","DoughnutController","offsetX","offsetY","_getRotation","toRadians","_getCircumference","circumference","_getRotationExtents","TAU","arcs","spacing","getMaxBorderWidth","getMaxOffset","maxSize","cutout","toPercentage","chartWeight","_getRingWeight","ratioX","ratioY","getRatioAndOffset","startX","startY","endX","endY","calcMax","_angleBetween","calcMin","maxRadius","toDimension","radiusLength","_getVisibleDatasetWeightTotal","calculateTotal","_getRingWeightOffset","_circumference","animateRotate","calculateCircumference","centerX","centerY","animateScale","metaData","formatNumber","borderAlign","hoverBorderWidth","hoverOffset","ringWeightOffset","_scriptable","_indexable","aspectRatio","generateLabels","pointStyle","fontColor","legendItem","toggleDataVisibility","LineController","_dataset","animationsDisabled","_getStartAndCountOfVisiblePoints","_scaleRangesChanged","_datasetIndex","_decimated","showLine","animated","spanGaps","maxGapLength","directUpdate","pointsCount","prevParsed","nullData","border","firstPoint","updateControlPoints","PolarAreaController","_parseObjectDataRadialScale","_updateRadius","minSize","cutoutPercentage","getVisibleDatasetCount","animationOpts","datasetStartAngle","getIndexAngle","defaultAngle","countVisibleElements","_computeAngle","getDistanceFromCenterForValue","angleLines","circular","pointLabels","PieController","RadarController","_fullLoop","pointPosition","getPointPositionForValue","ScatterController","controllers","abstract","DateAdapterBase","members","adapters","binarySearch","metaset","lookupMethod","_reversePixels","_rlookupByKey","_lookupByKey","getRange","evaluateInteractionItems","getSortedVisibleDatasetMetas","getIntersectItems","useFinalPosition","includeInvisible","isPointInArea","_isPointInArea","getNearestItems","getNearestCartesianItems","distanceMetric","getDistanceMetricForAxis","useX","useY","minDistance","evaluationFunc","getCenterPoint","getNearestRadialItems","getAngleFromPoint","getAxisItems","rangeMethod","intersectsItem","modes","getRelativePosition","nearest","STATIC_POSITIONS","filterByPosition","filterDynamicPositionByAxis","sortByWeight","getCombinedMax","maxPadding","updateMaxPadding","boxPadding","updateDims","getPadding","newWidth","outerWidth","newHeight","outerHeight","widthChanged","heightChanged","same","getMargins","marginForPositions","positions","fitBoxes","boxes","refitBoxes","refit","fullSize","setBoxDims","placeBoxes","userPadding","placed","stackWeight","height1","width1","layouts","addBox","_layers","removeBox","layoutItem","minPadding","buildLayoutBoxes","layoutBoxes","wrapBoxes","centerHorizontal","centerVertical","leftAndTop","rightAndBottom","vertical","verticalBoxes","horizontalBoxes","beforeLayout","visibleVerticalBoxCount","vBoxMaxWidth","hBoxMaxHeight","setLayoutDims","buildStacks","_stack","handleMaxPadding","updatePos","BasePlatform","acquireContext","releaseContext","getDevicePixelRatio","getMaximumSize","isAttached","updateConfig","BasicPlatform","EVENT_TYPES","touchstart","touchmove","touchend","pointerenter","pointerleave","isNullOrEmpty","eventListenerOptions","supportsEventListenerOptions","removeListener","nodeListContains","nodeList","createAttachObserver","MutationObserver","addedNodes","removedNodes","childList","subtree","createDetachObserver","drpListeningCharts","oldDevicePixelRatio","onWindowResize","dpr","resize","currentDevicePixelRatio","createResizeObserver","_getParentNode","throttled","contentRect","listenDevicePixelRatioChanges","releaseObserver","disconnect","unlistenDevicePixelRatioChanges","createProxyAndListen","fromNativeEvent","addListener","DomPlatform","initCanvas","renderHeight","renderWidth","boxSizing","displayWidth","readUsedSize","displayHeight","$proxies","proxies","isConnected","final","newTicks","majorStart","majorEnd","offsetFromEdge","numItems","getPixelForGridLine","offsetGridLines","validIndex","lineValue","getTickMarkLength","drawTicks","getTitleHeight","titleAlign","_toLeftRightCenter","reverseAlign","Scale","_margins","labelRotation","_range","_gridLineItems","_labelItems","_labelSizes","_maxLength","_longestTextCache","_userMax","_userMin","_suggestedMax","_suggestedMin","_ticksLength","_borderValue","_dataLimitsCached","setContext","suggestedMin","suggestedMax","finiteOrDefault","metas","getTicks","xLabels","yLabels","getLabelItems","_computeLabelItems","grace","tickOpts","beforeSetDimensions","setDimensions","afterSetDimensions","beforeDataLimits","determineDataLimits","afterDataLimits","_addGrace","beforeBuildTicks","buildTicks","afterBuildTicks","samplingEnabled","_convertTicksToLabels","beforeCalculateLabelRotation","calculateLabelRotation","afterCalculateLabelRotation","autoSkip","determinedMaxTicks","determineMaxTicks","_tickSize","ticksLimit","maxTicksLimit","majorIndices","getMajorIndices","numMajorIndices","skipMajors","calculateSpacing","evenMajorSpacing","getEvenSpacing","factors","_factorize","avgMajorSpacing","afterAutoSkip","beforeFit","afterFit","reversePixels","_alignToPixels","alignToPixels","_callHooks","notifyPlugins","beforeTickToLabelConversion","generateTickLabels","afterTickToLabelConversion","numTicks","minRotation","maxRotation","tickWidth","maxLabelDiagonal","_isVisible","labelSizes","_getLabelSizes","widest","maxLabelHeight","highest","_limitValue","toDegrees","titleOpts","gridOpts","titleHeight","tickPadding","angleRadians","mirror","_calculatePadding","_handleMargins","isRotated","labelsBelowTicks","offsetLeft","offsetRight","isFullSize","_computeLabelSizes","widths","heights","tickFont","fontString","nestedLabel","widestLabelSize","highestLabelSize","_resolveTickFontOptions","gc","_measureText","garbageCollect","gcLen","valueAt","decimal","_int16Range","_alignPixel","getDecimalForPixel","getBaseValue","createTickContext","createScaleContext","optionTicks","rot","autoSkipPadding","_computeGridLineItems","ticksLength","borderOpts","axisWidth","axisHalfWidth","alignBorderValue","borderValue","alignedLineValue","tx1","ty1","tx2","ty2","positionAxisID","positionAxisID1","optsAtIndex","optsAtIndexBorder","lineColor","borderDash","dash","borderDashOffset","dashOffset","tickColor","tickBorderDash","tickBorderDashOffset","crossAlign","tickAndPadding","hTickAndPadding","lineCount","textOffset","_getXAxisLabelAlignment","_getYAxisLabelAlignment","ret1","labelOffset","halfCount","backdrop","tickTextAlign","showLabelBackdrop","labelPadding","backdropPadding","backdropColor","_computeLabelArea","drawGrid","drawLine","setLineDash","lineDashOffset","drawOnChartArea","drawBorder","lastLineWidth","drawLabels","clipArea","renderText","unclipArea","drawTitle","titleX","titleY","titleArgs","_alignStartEnd","gz","bz","axisID","_maxDigits","TypedRegistry","isForType","isPrototypeOf","parentScope","isIChartComponent","registerDefaults","itemDefaults","defaultRoutes","routeDefaults","propertyParts","sourceScope","targetName","targetScope","descriptors","overrides","unregister","_typedRegistries","_each","addControllers","addPlugins","addScales","getController","_get","getPlugin","removeControllers","removeElements","removePlugins","removeScales","typedRegistry","_getRegistryForType","_exec","itemReg","camelMethod","_capitalize","PluginService","_init","notify","_createDescriptors","_descriptors","descriptor","_oldCache","_notifyStateChanges","allPlugins","localIds","createDescriptors","getOpts","pluginOpts","previousDescriptors","pluginScopeKeys","scriptable","indexable","allKeys","getIndexAxis","determineAxis","scaleOptions","axisFromPosition","initOptions","mergeScaleConfig","chartDefaults","configScales","chartIndexAxis","scaleConf","_proxy","defaultId","getDefaultScaleIDFromAxis","defaultScaleOptions","mergeIf","defaultID","getAxisFromDefaultScaleID","initData","keyCache","keysCached","cachedKeys","addIfFound","Config","initConfig","_scopeCache","_resolverCache","datasetType","additionalOptionScopes","_cachedScopes","mainScope","resetCache","keyLists","chartOptionScopes","subPrefixes","needContext","isScriptable","isIndexable","hasFunction","subResolver","_attachContext","descriptorDefaults","resolverCache","_createResolver","KNOWN_POSITIONS","positionIsHorizontal","compare2Level","l1","onAnimationsComplete","onAnimationProgress","onProgress","_isDomSupported","instances","getChart","moveNumericKeys","intKey","invalidatePlugins","userConfig","initialCanvas","existingChart","_detectPlatform","OffscreenCanvas","_options","_aspectRatio","_metasets","_lastEvent","_responsiveListeners","_sortedMetasets","_hiddenIndices","attached","_doResize","resizeDelay","_initialize","maintainAspectRatio","responsive","retinaScale","bindEvents","clearCanvas","_resizeBeforeDraw","_resize","newRatio","onResize","ensureScalesHaveIDs","axisOptions","buildOrUpdateScales","scaleOpts","isRadial","dposition","dtype","scaleType","hasUpdated","_updateMetasets","_destroyDatasetMeta","_removeUnreferencedMetasets","buildOrUpdateControllers","newControllers","ControllerClass","_resetElements","animsDisabled","_updateScales","_checkEventBindings","_updateHiddenIndices","_minPadding","autoPadding","_updateLayout","_updateDatasets","_eventHandler","_updateHoverStyles","existingEvents","newEvents","setsEqual","unbindEvents","_getUniformDataChanges","datasetCount","makeSet","changeSet","noArea","ilen1","_updateDataset","layers","_drawDatasets","_drawDataset","useClip","getDatasetArea","getElementsAtEventForMode","setDatasetVisibility","_updateVisibility","_stop","toBase64Image","bindUserEvents","bindResponsiveEvents","_add","detached","updateHoverStyle","setActiveElements","activeElements","lastActive","_elementsEqual","pluginId","replay","hover","deactivated","inChartArea","eventFilter","_handleEvent","_getActiveElements","isClick","_isClickEvent","determineLastEvent","onHover","rThetaToXY","pathArc","pixelMargin","innerR","spacingOffset","avNogSpacingRadius","angleOffset","outerStart","outerEnd","innerStart","innerEnd","parseBorderRadius$1","angleDelta","toRadiusCorners","_readValueToProps","halfThickness","innerLimit","computeOuterLimit","outerArcLimit","outerStartAdjustedRadius","outerEndAdjustedRadius","outerStartAdjustedAngle","outerEndAdjustedAngle","innerStartAdjustedRadius","innerEndAdjustedRadius","innerStartAdjustedAngle","innerEndAdjustedAngle","outerMidAdjustedAngle","pCenter","pCenter1","innerMidAdjustedAngle","pCenter2","p8","pCenter3","outerStartX","outerStartY","outerEndX","outerEndY","fullCircles","chartX","chartY","rAdjust","betweenAngles","withinRadius","_isBetween","halfAngle","halfRadius","radiusOffset","drawArc","borderJoinStyle","inner","clipArc","angleMargin","lineCap","borderCapStyle","pathVars","paramsStart","paramsEnd","segmentStart","segmentEnd","pathSegment","lineMethod","getLineMethod","stepped","_steppedLineTo","cubicInterpolationMode","_bezierCurveTo","fastPathSegment","prevX","lastY","avgX","countX","pointIndex","drawX","truncX","_getSegmentMethod","usePath2D","Path2D","LineElement","_path","_segments","_pointsUpdated","_updateBezierControlPoints","_computeSegments","_boundSegments","_interpolate","_getInterpolationMethod","_steppedInterpolation","_bezierInterpolation","_pointInLine","segmentMethod","strokePathWithCache","strokePathDirect","inRange$1","hitRadius","capBezierPoints","mouseX","mouseY","inXRange","inYRange","hoverRadius","drawPoint","getBarBounds","half","skipOrLimit","skipX","skipY","addNormalRectPath","inflateRect","refRect","parseBorderWidth","maxW","maxH","toTRBL","parseBorderRadius","toTRBLCorners","maxR","enableBorder","topLeft","topRight","bottomLeft","bottomRight","addRectPath","hasRadius","addRoundedRectPath","BORDER_COLORS","BACKGROUND_COLORS","getBorderColor","getBackgroundColor","containsColorsDefinitions","plugin_colors","forceOverride","_args","colorizer","getColorizer","colorizeDoughnutDataset","colorizePolarAreaDataset","colorizeDefaultDataset","cleanDecimatedDataset","cleanDecimatedData","plugin_decimation","algorithm","beforeElementsUpdate","decimated","getStartAndCountOfVisiblePointsSimplified","pointCount","lttbDecimation","samples","bucketWidth","sampledIndex","maxAreaPoint","maxArea","nextA","avgY","avgRangeStart","avgRangeEnd","avgRangeLength","rangeOffs","rangeTo","pointAx","pointAy","minMaxDecimation","minIndex","maxIndex","xMin","intermediateIndex1","intermediateIndex2","_getBounds","_normalizeAngle","_findSegmentEnd","_getEdge","_createBoundaryLine","boundary","_pointsFromSegments","linePoints","_shouldApplyFill","_resolveTarget","propagate","visited","_decodeFill","parseFillOption","fillOption","decodeTargetIndex","firstCh","addPointsBelow","sourcePoint","linesBelow","postponed","findPoint","pointValue","firstValue","lastValue","simpleArc","_drawfill","_getTarget","getLineByIndex","_buildStackLine","sourcePoints","getLinesBelow","below","computeBoundary","computeCircularBoundary","_getTargetValue","computeLinearBoundary","_getTargetPixel","lineOpts","doFill","clipVertical","clipY","lineLoop","tpoints","targetSegments","tgt","subBounds","fillSources","_boundSegment","fillSource","notShape","clipBounds","interpolatedLineTo","targetLoop","interpolatedPoint","afterDatasetsUpdate","$filler","drawTime","beforeDatasetsDraw","beforeDatasetDraw","getBoxSize","labelOpts","boxHeight","boxWidth","usePointStyle","pointStyleWidth","legendHitBoxes","_hoveredItem","doughnutMode","legendItems","columnSizes","lineWidths","buildLabels","labelFont","_computeTitleHeight","_fitRows","_fitCols","hitboxes","totalHeight","_itemHeight","heightLimit","totalWidth","currentColWidth","currentColHeight","calculateItemSize","calculateItemWidth","legendItemText","calculateItemHeight","fontLineHeight","calculateLegendItemHeight","adjustHitBoxes","rtlHelper","getRtlAdapter","hitbox","leftForLtr","hitbox1","_draw","defaultColor","halfFontSize","overrideTextDirection","textDirection","setWidth","lineDash","drawOptions","xPlus","drawPointLegend","yBoxTop","xBoxLeft","drawLegendBox","_textX","strikethrough","restoreTextDirection","titleFont","titlePadding","topPaddingPlusHalfFontSize","_getLegendItemAt","hitBox","lh","handleEvent","isListened","hoveredItem","sameItem","itemsEqual","plugin_legend","useBorderRadius","_padding","textSize","_drawArgs","fontOpts","plugin_title","titleBlock","plugin_subtitle","average","eventPosition","nearestElement","distanceBetweenPoints","tp","pushOrConcat","toPush","splitNewlines","createTooltipItem","formattedValue","getTooltipSize","bodyFont","footerFont","titleLineCount","footerLineCount","bodyLineItemCount","combinedBodyLength","bodyItem","beforeBody","afterBody","titleSpacing","titleMarginBottom","displayColors","bodySpacing","footerMarginTop","footerSpacing","widthPadding","maxLineWidth","determineXAlign","yAlign","chartWidth","xAlign","doesNotFitWithAlign","caret","caretSize","caretPadding","determineAlignment","determineYAlign","getBackgroundPoint","paddingAndSize","alignX","alignY","getAlignedX","getBeforeAfterBodyLines","overrideCallbacks","defaultCallbacks","beforeTitle","tooltipItems","labelCount","afterTitle","beforeLabel","tooltipItem","labelColor","labelTextColor","bodyColor","labelPointStyle","afterLabel","beforeFooter","afterFooter","invokeCallbackWithFallback","_eventPosition","_size","_cachedAnimations","_tooltipItems","dataPoints","caretX","caretY","labelColors","labelPointStyles","labelTextColors","createTooltipContext","getBeforeBody","getBody","bodyItems","scoped","getAfterBody","getFooter","_createItems","itemSort","positionAndSize","backgroundPoint","external","drawCaret","tooltipPoint","caretPosition","getCaretPosition","ptX","ptY","titleColor","_drawColorBox","colorX","rtlColorX","colorY","multiKeyBackground","outerX","innerX","strokeRect","drawBody","bodyAlign","bodyLineHeight","xLinePadding","fillLineOfText","bodyAlignForCalculation","textColor","drawFooter","footerAlign","footerColor","tooltipSize","quadraticCurveTo","_updateAnimationTarget","animX","animY","_willRender","positionChanged","_positionChanged","_ignoreReplayEvents","Colors","Decimation","Filler","SubTitle","afterInit","_fallback","_getLabelForValue","CategoryScale","_startValue","_valueRange","_addedLabels","added","findOrAddLabel","addedLabels","addIfString","relativeLabelSize","minSpacing","rad","LinearScaleBase","_endValue","handleTickRangeOptions","setMin","setMax","minSign","maxSign","getTickLimit","maxTicks","stepSize","computeTickLimit","generateTicks$1","generationOptions","dataRange","maxDigits","includeBounds","maxSpaces","rmin","rmax","countDefined","niceMin","niceMax","numSpaces","niceNum","MIN_SPACING","almostWhole","almostEquals","_decimalPlaces","_setMinAndMaxByKey","LinearScale","Ticks","log10Floor","log10","changeExponent","isMajor","tickVal","rangeExp","rangeStep","LogarithmicScale","_zero","generateTicks","minExp","startExp","significand","lastTick","getTickBackdropHeight","measureLabelSize","_longestText","determineLimits","updateLimits","limits","hLimits","vLimits","getTextAlignForAngle","leftForTextAlign","yForAngle","pathRadiusLine","getPointPosition","RadialLinearScale","drawingArea","_pointLabels","_pointLabelItems","fitWithPointLabels","valueCount","pointLabelOpts","additionalAngle","centerPointLabels","getPointLabelContext","plFont","setCenterPoint","buildPointLabelItems","outerDistance","pointLabelPosition","leftMovement","rightMovement","topMovement","bottomMovement","angleMultiplier","scalingFactor","getValueForDistanceFromCenter","scaledDistance","pointLabel","createPointLabelContext","distanceFromCenter","getBasePosition","getPointLabelPosition","drawPointLabels","backdropLeft","backdropTop","backdropWidth","backdropHeight","drawRadiusLine","gridLineOpts","INTERVALS","UNITS","sorter","_adapter","_parseOpts","determineUnitForAutoTicks","minUnit","capacity","addTick","timestamps","_lookup","ticksFromTimestamps","majorUnit","setMajorTicks","TimeScale","_unit","_majorUnit","_normalized","displayFormats","normalized","_applyBounds","_getLabelBounds","getLabelTimestamps","timeOpts","_generate","_filterBetween","_getLabelCapacity","determineUnitForFormatting","determineMajorUnit","initOffsets","offsetAfterAutoskip","getDecimalForValue","hasWeekday","getDataTimestamps","tooltipFormat","datetime","_tickFormatFunction","majorFormat","_getLabelSize","ticksOpts","tickLabelWidth","cosRotation","sinRotation","tickFontSize","exampleTime","exampleLabel","prevSource","nextSource","prevTarget","nextTarget","span","TimeSeriesScale","_table","_minPos","_tableRange","_getTimestampsForTable","buildLookupTable","registerables","lim","p2b","n2b","b2n","n2p","map$1","C","F","h2","HUE_RE","hsl2rgbn","hsv2rgbn","hwb2rgbn","rgb2hsl","hueValue","calln","hsl2rgb","Z","V","U","T","R","Q","O","N","G","I","J","names$1","OiceXe","antiquewEte","aquamarRe","azuY","blanKedOmond","Xe","XeviTet","bPwn","caMtXe","KartYuse","KocTate","cSO","cSnflowerXe","cSnsilk","xXe","xcyan","xgTMnPd","xWay","xgYF","xgYy","xkhaki","xmagFta","xTivegYF","xSange","xScEd","xYd","xsOmon","xsHgYF","xUXe","xUWay","xUgYy","xQe","xviTet","dAppRk","dApskyXe","dimWay","dimgYy","dodgerXe","fiYbrick","flSOwEte","foYstWAn","fuKsia","gaRsbSo","ghostwEte","gTd","gTMnPd","Way","gYF","gYFLw","gYy","honeyMw","hotpRk","RdianYd","Rdigo","ivSy","lavFMr","lavFMrXsh","lawngYF","NmoncEffon","ZXe","ZcSO","Zcyan","ZgTMnPdLw","ZWay","ZgYF","ZgYy","ZpRk","ZsOmon","ZsHgYF","ZskyXe","ZUWay","ZUgYy","ZstAlXe","ZLw","limegYF","lRF","magFta","maPon","VaquamarRe","VXe","VScEd","VpurpN","VsHgYF","VUXe","VsprRggYF","VQe","VviTetYd","midnightXe","mRtcYam","mistyPse","moccasR","navajowEte","Tdlace","Tive","TivedBb","Sange","SangeYd","ScEd","pOegTMnPd","pOegYF","pOeQe","pOeviTetYd","papayawEp","pHKpuff","pRk","powMrXe","purpN","YbeccapurpN","Yd","Psybrown","PyOXe","saddNbPwn","sOmon","sandybPwn","sHgYF","sHshell","siFna","skyXe","UXe","UWay","UgYy","sprRggYF","stAlXe","teO","tEstN","Qe","viTet","JHt","wEte","wEtesmoke","Lw","LwgYF","RGB_RE","modHSL","functionParse","rgbParse","hueParse","hwb2rgb","hsv2rgb","hexParse","nameParse","unpack","unpacked","tkeys","nk","_rgb","_valid","rgbString","isShort","hslString","w2","w1","clearer","greyscale","opaquer","darken","desaturate","deg","dimension","loopable","isValidKey","_merger","tval","sval","_mergerIf","keyResolvers","_getKeyResolver","_splitKey","PITAU","RAD_PER_DEG","QUARTER_PI","TWO_THIRDS_PI","roundedRange","niceRange","fraction","centrePoint","anglePoint","distanceFromXCenter","distanceFromYCenter","radialDistanceFromCenter","_angleDiff","sameAngleIsFullCircle","angleToStart","angleToEnd","startToAngle","endToAngle","ti","arrayEvents","_chartjs","stub","argsToUse","ticking","_scaleRanges","newRanges","xmin","xmax","ymin","ymax","atEdge","easeInQuad","easeOutQuad","easeInOutQuad","easeInCubic","easeOutCubic","easeInOutCubic","easeInQuart","easeOutQuart","easeInOutQuart","easeInQuint","easeOutQuint","easeInOutQuint","easeInSine","easeOutSine","easeInOutSine","easeInExpo","easeOutExpo","easeInOutExpo","easeInCirc","easeOutCirc","easeInOutCirc","easeInElastic","easeOutElastic","easeInOutElastic","easeInBack","easeOutBack","easeInOutBack","easeInBounce","easeOutBounce","easeInOutBounce","isPatternOrGradient","getHoverColor","intlCache","getNumberFormat","formatters","numeric","tickValue","notation","maxTick","calculateDelta","logDelta","numDecimal","minimumFractionDigits","maximumFractionDigits","getScope$1","Defaults","_appliers","hoverBackgroundColor","hoverBorderColor","hoverColor","describe","scopeObject","targetScopeObject","defineProperties","Ce","appliers","applyAnimationsDefaults","applyLayoutsDefaults","applyScaleDefaults","longest","arrayOfThings","thing","nestedThing","halfWidth","resetTransform","clearRect","xOffset","yOffset","xOffsetW","yOffsetW","ellipse","SQRT1_2","midpoint","bezierCurveTo","cp1x","cp2x","cp1y","cp2y","setRenderOpts","drawBackdrop","decorateText","underline","metrics","actualBoundingBoxLeft","actualBoundingBoxRight","actualBoundingBoxAscent","actualBoundingBoxDescent","yDecoration","decorationWidth","oldColor","LINE_HEIGHT","FONT_STYLE","toLineHeight","numberOrZero","toFontString","cacheable","minmax","keepZero","rootScopes","getTarget","_scopes","_rootScopes","deleteProperty","_cached","_resolveWithPrefixes","readKey","needsSubResolver","createSubResolver","Reflect","getKeysFromAllScopes","ownKeys","storage","subProxy","_subProxy","receiver","_resolveWithContext","_resolveScriptable","_resolveArray","_allKeys","resolveFallback","getScope","addScopes","parentScopes","parentFallback","allScopes","addScopesFromKey","subGetTarget","resolveKeysFromAllScopes","EPSILON","getPoint","getValueAxis","splineCurve","middlePoint","afterPoint","d01","d12","s01","s12","fa","fb","capControlPoint","controlPoints","splineCurveMonotone","pointsLen","deltaK","mK","pointBefore","pointCurrent","pointAfter","slopeDelta","monotoneAdjust","alphaK","betaK","tauK","squaredMagnitude","monotoneCompute","inArea","inAreaPrev","inAreaNext","domNode","parseMaxStyle","parentProperty","valueInPixels","getPositionedStyle","borderBox","paddings","borders","getCanvasPosition","useOffsetPos","round1","bbWidth","bbHeight","containerSize","getContainerSize","containerStyle","containerBorder","containerPadding","forceRatio","forceStyle","deviceHeight","deviceWidth","setTransform","cp1","cp2","rectX","getRightToLeftAdapter","_itemWidth","getPropertyPriority","prevTextDirection","propertyFn","between","normalizeSegment","startBound","endBound","getSegment","subStart","segmentOptions","findStartAndEnd","splitByStyles","solidSegments","doSplitByStyles","chartContext","baseStyle","readStyle","prevStyle","st","p0DataIndex","p1DataIndex","styleChanged","arraylike","Dispatch","taskHead","taskTail","clockLast","clockNow","clockSkew","clock","performance","setFrame","clearNow","Timer","_call","timer","wake","timerFlush","nap","sleep","poke","clearInterval","emptyOn","emptyTween","timing","schedules","__transition","tween","ease","svgNode","translateX","translateY","skewX","scaleX","scaleY","interpolateTransform","pxComma","pxParen","degParen","xa","ya","xb","yb","interpolateTransformCss","parseCss","DOMMatrix","WebKitCSSMatrix","isIdentity","decompose","interpolateTransformSvg","parseSvg","baseVal","consolidate","tweenRemove","tween0","tween1","tweenFunction","tweenValue","brighter","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","clampa","clampi","Hsl","hslConvert","clamph","clampt","m1","m2","basis","v3","t3","channels","displayable","formatHex8","color_formatHex8","formatHsl","color_formatHsl","darker","rgb_formatHex8","nogamma","rgbGamma","gamma","exponential","colorRgb","rgbSpline","spline","reA","reB","bm","interpolateNumber","interpolateRgb","interpolateString","string00","interpolate0","string1","string0","string10","attrInterpolate","attrInterpolateNS","attrTweenNS","attrTween","delayFunction","delayConstant","durationFunction","durationConstant","easeConstant","onFunction","on0","on1","sit","styleInterpolate","styleTween","textInterpolate","textTween","Transition","_name","newId","selection_prototype","inherit","id0","id1","styleNull","styleMaybeRemove","listener0","removeFunction","easeVarying","interrupt","defaultTiming","tauEpsilon","Path","_x0","_y0","_x1","_y1","x21","y21","x01","y01","l01_2","x20","y20","l21_2","l20_2","l21","l01","t01","t21","cw","da","arcInnerRadius","arcOuterRadius","arcStartAngle","arcEndAngle","arcPadAngle","padAngle","x10","y10","x32","y32","cornerTangents","rc","ox","oy","x11","y11","cx0","cx1","dx0","dy0","dx1","dy1","padRadius","withPath","shape","a01","a11","a10","da0","da1","ap","rp","rc0","rc1","oc","bx","by","kc","lc","Transform","applyX","applyY","invertX","invertY","rescaleX","rescaleY","_assocIndexOf","_freeGlobal","lodash_es_isObject","lodash_es_isFunction","_getNative","_Map","_nativeCreate","_getMapData","_baseAssignValue","_assignMergeValue","_Uint8Array","_cloneTypedArray","lodash_es_isObjectLike","_baseIsArguments","lodash_es_isArray","lodash_es_isLength","lodash_es_isArrayLike","_safeGet","lodash_es_keysIn","lodash_es_toPlainObject","_baseMergeDeep","_baseMerge","lodash_es_identity","_apply","lodash_es_constant","_baseRest","ThemeService","colorschemesOptions","setColorschemesOptions","pColorschemesOptions","getColorschemesOptions","BaseChartDirective","themeService","chartClick","chartHover","subs","themeOverrides","distinctUntilChanged","keySelector","previousKey","currentKey","themeChanged","requireRender","propertyNames","getChartConfiguration","hideDataset","isDatasetHidden","getChartOptions","getChartData","baseColors","builtInDefaults","generateColor","pointBackgroundColor","pointBorderColor","radar","doughnut","pie","polarArea","scatter","colour","getRandomInt","getRandomColor","NgChartsConfiguration","generateColors","NgChartsModule","ngChartsDefaults","DROP_EFFECTS","CUSTOM_MIME_TYPE","JSON_MIME_TYPE","MSIE_MIME_TYPE","mimeTypeIsCustom","mimeType","getWellKnownMimeType","dataTransfer","filterEffects","allowed","effect","calculateDragImageOffset","dragImage","dragImageComputedStyle","borderTop","borderLeft","_dndState","isDragging","dropEffect","effectAllowed","endDrag","setDropEffect","getDropEffect","getDndType","isExternalDrag","dndState","DndDraggableDirective","dndEffectAllowed","dndDraggingClass","dndDraggingSourceClass","dndDraggableDisabledClass","dndDragImageOffsetFunction","dndStart","dndDrag","dndEnd","dndMoved","dndCopied","dndLinked","dndCanceled","isDragStarted","dragEventHandler","onDrag","dndDisableIf","dndDisableDragIf","onDragStart","dndHandle","_dndUsingHandle","startDrag","dndType","setDragData","dataString","effectsAllowed","dndDraggable","determineDragImage","dndDragImageElementRef","setDragImage","offsetFunction","stopPropagation","onDragEnd","dropEffectEmitter","registerDragHandle","registerDragImage","DndPlaceholderRefDirective","DndDropzoneDirective","dndDropzone","dndAllowExternal","dndHorizontal","dndDragoverClass","dndDropzoneDisabledClass","dndDragover","dndDrop","dragEnterEventHandler","onDragEnter","dragOverEventHandler","onDragOver","dragLeaveEventHandler","onDragLeave","dndDisableDropIf","tryGetPlaceholder","removePlaceholderFromDOM","_dndDropzoneActive","cleanupDragoverState","isDropAllowed","checkAndUpdatePlaceholderPosition","onDrop","getDropData","dragIsExternal","dropIndex","getPlaceholderIndex","isExternal","dndPlaceholderRef","directChild","getDirectChildElement","childElement","shouldPositionPlaceholderBeforeElement","_t","DndModule","Action","intervalProvider","Scheduler","schedulerActionCtor","asyncScheduler","AsyncScheduler","SchedulerAction","_scheduled","AsyncAction","recycleAsyncId","requestAsyncId","_scheduler","_execute","errorValue","nodeEventEmitterMethods","eventTargetMethods","jqueryMethods","fromEvent","isEventTarget","isNodeStyleEventEmitter","toCommonHandlerRegistry","isJQueryStyleEventEmitter","subTarget","_r8","ctx_r7","_r10","ctx_r9","_r24","ctx_r23","_r28","ctx_r27","_r30","ctx_r29","_r32","ctx_r31","_r34","ctx_r33","_r5","Orientation","Bottom","BottomLeft","BottomRight","Center","Top","TopLeft","TopRight","ProgressIndicatorLocation","InsideNextButton","TopOfTourBlock","WindowRefService","nativeWindow","getWindow","scrollY","scrollX","GuidedTourService","windowRef","_guidedTourCurrentStepSubject","_guidedTourOrbShowingSubject","_currentTourStepIndex","_currentTour","_onFirstStep","_onLastStep","_onResizeMessage","guidedTourCurrentStepStream","guidedTourOrbShowingStream","debounceTime","dueTime","activeTask","lastTime","emitWhenIdle","targetTime","minimumScreenSize","resizeDialog","getPreparedTourStep","nextStep","closeAction","_setFirstAndLast","_checkSelectorValidity","completeCallback","resetTour","backStep","skipTour","skipCallback","startTour","tour","skipStep","useOrb","activateOrb","tourId","onLastStep","onFirstStep","onResizeMessage","currentTourStepDisplay","currentTourStepCount","preventBackdropFromAdvancing","setTourOrientation","convertedStep","maximumSize","currentOrientation","orientationConfig","orientationDirection","GuidedTourComponent","guidedTourService","topOfPageAdjustment","tourStepWidth","minimalTourStepWidth","skipText","nextText","doneText","closeText","backText","progressIndicatorLocation","progressIndicator","highlightPadding","currentTourStep","selectedElementRect","isOrbShowing","progressIndicatorLocations","maxWidthAdjustmentForTourStep","widthAdjustmentForScreenBound","tourStep","adjustment","calculatedLeftPosition","calculatedTourStepWidth","scrollToAndSetElement","resizeSubscription","updateStepLocation","scrollSubscription","isTourOnScreen","isBottom","topPos","scrollAdjustment","getStepScreenAdjustment","handleOrb","elementInViewport","offsetTop","offsetParent","backdropClick","selectedElement","topPosition","paddingAdjustment","getHighlightPadding","orbTopPosition","leftPosition","maxAdjustment","orbLeftPosition","orbTransform","overlayTop","overlayLeft","overlayHeight","overlayWidth","useHighlightPadding","tourStepHeight","elementHeight","_c0","GuidedTourModule","asyncGeneratorStep"],"sourceRoot":"webpack:///","sources":["./node_modules/@amcharts/amcharts4-geodata/worldLow.js","./node_modules/@amcharts/amcharts4/.internal/core/Base.js","./node_modules/@amcharts/amcharts4/.internal/core/Component.js","./node_modules/@amcharts/amcharts4/.internal/core/Container.js","./node_modules/@amcharts/amcharts4/.internal/core/DataItem.js","./node_modules/@amcharts/amcharts4/.internal/core/Options.js","./node_modules/@amcharts/amcharts4/.internal/core/Registry.js","./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js","./node_modules/@amcharts/amcharts4/.internal/core/SpriteEvents.js","./node_modules/@amcharts/amcharts4/.internal/core/SpriteState.js","./node_modules/@amcharts/amcharts4/.internal/core/System.js","./node_modules/@amcharts/amcharts4/.internal/core/data/CSVParser.js","./node_modules/@amcharts/amcharts4/.internal/core/data/DataLoader.js","./node_modules/@amcharts/amcharts4/.internal/core/data/DataParser.js","./node_modules/@amcharts/amcharts4/.internal/core/data/DataSource.js","./node_modules/@amcharts/amcharts4/.internal/core/data/JSONParser.js","./node_modules/@amcharts/amcharts4/.internal/core/defs/SVGDefaults.js","./node_modules/@amcharts/amcharts4/.internal/core/elements/Button.js","./node_modules/@amcharts/amcharts4/.internal/core/elements/Circle.js","./node_modules/@amcharts/amcharts4/.internal/core/elements/Label.js","./node_modules/@amcharts/amcharts4/.internal/core/elements/Line.js","./node_modules/@amcharts/amcharts4/.internal/core/elements/Modal.js","./node_modules/@amcharts/amcharts4/.internal/core/elements/PointedRectangle.js","./node_modules/@amcharts/amcharts4/.internal/core/elements/PointedShape.js","./node_modules/@amcharts/amcharts4/.internal/core/elements/Polyarc.js","./node_modules/@amcharts/amcharts4/.internal/core/elements/Polygon.js","./node_modules/@amcharts/amcharts4/.internal/core/elements/Polyline.js","./node_modules/@amcharts/amcharts4/.internal/core/elements/Polyspline.js","./node_modules/@amcharts/amcharts4/.internal/core/elements/PopupCSS.js","./node_modules/@amcharts/amcharts4/.internal/core/elements/Popup.js","./node_modules/@amcharts/amcharts4/.internal/core/elements/Rectangle.js","./node_modules/@amcharts/amcharts4/.internal/core/elements/ResizeButton.js","./node_modules/@amcharts/amcharts4/.internal/core/elements/RoundedRectangle.js","./node_modules/@amcharts/amcharts4/.internal/core/elements/Scrollbar.js","./node_modules/@amcharts/amcharts4/.internal/core/elements/Tooltip.js","./node_modules/@amcharts/amcharts4/.internal/core/elements/Triangle.js","./node_modules/@amcharts/amcharts4/.internal/core/elements/WavedLine.js","./node_modules/@amcharts/amcharts4/.internal/core/elements/WavedRectangle.js","./node_modules/@amcharts/amcharts4/.internal/core/export/Export.js","./node_modules/@amcharts/amcharts4/.internal/core/export/ExportCSS.js","./node_modules/@amcharts/amcharts4/.internal/core/export/ExportMenu.js","./node_modules/@amcharts/amcharts4/.internal/core/formatters/DateFormatter.js","./node_modules/@amcharts/amcharts4/.internal/core/formatters/DurationFormatter.js","./node_modules/@amcharts/amcharts4/.internal/core/formatters/NumberFormatter.js","./node_modules/@amcharts/amcharts4/.internal/core/formatters/TextFormatter.js","./node_modules/@amcharts/amcharts4/.internal/core/interaction/Inertia.js","./node_modules/@amcharts/amcharts4/.internal/core/interaction/Interaction.js","./node_modules/@amcharts/amcharts4/.internal/core/interaction/InteractionKeyboardObject.js","./node_modules/@amcharts/amcharts4/.internal/core/interaction/InteractionObject.js","./node_modules/@amcharts/amcharts4/.internal/core/interaction/InteractionObjectEvents.js","./node_modules/@amcharts/amcharts4/.internal/core/interaction/Mouse.js","./node_modules/@amcharts/amcharts4/.internal/core/rendering/AMElement.js","./node_modules/@amcharts/amcharts4/.internal/core/rendering/Group.js","./node_modules/@amcharts/amcharts4/.internal/core/rendering/Paper.js","./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js","./node_modules/@amcharts/amcharts4/.internal/core/utils/ResizeSensor.js","./node_modules/@amcharts/amcharts4/.internal/core/rendering/SVGContainer.js","./node_modules/@amcharts/amcharts4/.internal/core/rendering/Smoothing.js","./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/LinearGradient.js","./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/Pattern.js","./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/RadialGradient.js","./node_modules/@amcharts/amcharts4/.internal/core/rendering/filters/DropShadowFilter.js","./node_modules/@amcharts/amcharts4/.internal/core/rendering/filters/Filter.js","./node_modules/@amcharts/amcharts4/.internal/core/utils/Order.js","./node_modules/@amcharts/amcharts4/.internal/core/utils/Adapter.js","./node_modules/@amcharts/amcharts4/.internal/core/utils/Animation.js","./node_modules/@amcharts/amcharts4/.internal/core/utils/Array.js","./node_modules/@amcharts/amcharts4/.internal/core/utils/AsyncPending.js","./node_modules/@amcharts/amcharts4/.internal/core/utils/Browser.js","./node_modules/@amcharts/amcharts4/.internal/core/utils/Cache.js","./node_modules/@amcharts/amcharts4/.internal/core/utils/Color.js","./node_modules/@amcharts/amcharts4/.internal/core/utils/ColorSet.js","./node_modules/@amcharts/amcharts4/.internal/core/utils/Colors.js","./node_modules/@amcharts/amcharts4/.internal/core/utils/DOM.js","./node_modules/@amcharts/amcharts4/.internal/core/utils/Dictionary.js","./node_modules/@amcharts/amcharts4/.internal/core/utils/Disposer.js","./node_modules/@amcharts/amcharts4/.internal/core/utils/Ease.js","./node_modules/@amcharts/amcharts4/.internal/core/utils/EventDispatcher.js","./node_modules/@amcharts/amcharts4/.internal/core/utils/InterfaceColorSet.js","./node_modules/@amcharts/amcharts4/.internal/core/utils/Iterator.js","./node_modules/@amcharts/amcharts4/.internal/core/utils/Keyboard.js","./node_modules/@amcharts/amcharts4/lang/en.js","./node_modules/@amcharts/amcharts4/.internal/core/utils/Language.js","./node_modules/@amcharts/amcharts4/.internal/core/utils/List.js","./node_modules/@amcharts/amcharts4/.internal/core/utils/Log.js","./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js","./node_modules/@amcharts/amcharts4/.internal/core/utils/Morpher.js","./node_modules/@amcharts/amcharts4/.internal/core/utils/Net.js","./node_modules/@amcharts/amcharts4/.internal/core/utils/Number.js","./node_modules/@amcharts/amcharts4/.internal/core/utils/Object.js","./node_modules/@amcharts/amcharts4/.internal/core/utils/Percent.js","./node_modules/@amcharts/amcharts4/.internal/core/utils/Responsive.js","./node_modules/@amcharts/amcharts4/.internal/core/utils/SortedList.js","./node_modules/@amcharts/amcharts4/.internal/core/utils/String.js","./node_modules/@amcharts/amcharts4/.internal/core/utils/Strings.js","./node_modules/@amcharts/amcharts4/.internal/core/utils/Time.js","./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js","./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js","./node_modules/@amcharts/amcharts4/.internal/core/utils/Validatable.js","./node_modules/@amcharts/amcharts4/.internal/core/elements/Ellipse.js","./node_modules/@amcharts/amcharts4/.internal/core/elements/Image.js","./node_modules/@amcharts/amcharts4/.internal/core/elements/Slice.js","./node_modules/@amcharts/amcharts4/.internal/core/elements/Preloader.js","./node_modules/@amcharts/amcharts4/.internal/core/elements/CloseButton.js","./node_modules/@amcharts/amcharts4/.internal/core/elements/SwitchButton.js","./node_modules/@amcharts/amcharts4/.internal/core/elements/Slider.js","./node_modules/@amcharts/amcharts4/.internal/core/elements/TextLink.js","./node_modules/@amcharts/amcharts4/.internal/core/elements/Trapezoid.js","./node_modules/@amcharts/amcharts4/.internal/core/elements/WavedCircle.js","./node_modules/@amcharts/amcharts4/.internal/core/elements/ZoomOutButton.js","./node_modules/@amcharts/amcharts4/.internal/core/elements/PlayButton.js","./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/ColorModifier.js","./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/GradientModifier.js","./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/LinearGradientModifier.js","./node_modules/@amcharts/amcharts4/.internal/core/elements/3d/Cone.js","./node_modules/@amcharts/amcharts4/.internal/core/rendering/filters/LightenFilter.js","./node_modules/@amcharts/amcharts4/.internal/core/elements/3d/Rectangle3D.js","./node_modules/@amcharts/amcharts4/.internal/core/elements/3d/Slice3D.js","./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/RadialGradientModifier.js","./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/LinePattern.js","./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/CirclePattern.js","./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/RectPattern.js","./node_modules/@amcharts/amcharts4/.internal/core/rendering/filters/ColorizeFilter.js","./node_modules/@amcharts/amcharts4/.internal/core/rendering/filters/DesaturateFilter.js","./node_modules/@amcharts/amcharts4/.internal/core/rendering/filters/BlurFilter.js","./node_modules/@amcharts/amcharts4/.internal/core/rendering/filters/FocusFilter.js","./node_modules/@amcharts/amcharts4/.internal/core/utils/PatternSet.js","./node_modules/@amcharts/amcharts4/.internal/core/utils/Plugin.js","./node_modules/@amcharts/amcharts4/.internal/core/elements/AmChartsLogo.js","./node_modules/@amcharts/amcharts4/.internal/core/utils/Instance.js","./node_modules/@amcharts/amcharts4/.internal/charts/Legend.js","./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisBreak.js","./node_modules/@amcharts/amcharts4/.internal/charts/axes/Axis.js","./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisLine.js","./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisFill.js","./node_modules/@amcharts/amcharts4/.internal/charts/axes/Grid.js","./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisLabel.js","./node_modules/@amcharts/amcharts4/.internal/charts/elements/Tick.js","./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisTick.js","./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisRenderer.js","./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisBullet.js","./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisRendererY.js","./node_modules/@amcharts/amcharts4/.internal/charts/axes/ValueAxisBreak.js","./node_modules/@amcharts/amcharts4/.internal/charts/axes/ValueAxis.js","./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisRendererX.js","./node_modules/@amcharts/amcharts4/.internal/charts/elements/HeatLegend.js","./node_modules/@amcharts/amcharts4/.internal/core/elements/Grip.js","./node_modules/@amcharts/amcharts4/.internal/charts/Chart.js","./node_modules/@amcharts/amcharts4/.internal/charts/elements/Bullet.js","./node_modules/@amcharts/amcharts4/.internal/charts/series/Series.js","./node_modules/@amcharts/amcharts4/.internal/charts/types/SerialChart.js","./node_modules/d3-array/src/fsum.js","./node_modules/d3-geo/src/math.js","./node_modules/d3-geo/src/noop.js","./node_modules/d3-geo/src/stream.js","./node_modules/d3-geo/src/area.js","./node_modules/d3-geo/src/cartesian.js","./node_modules/d3-geo/src/bounds.js","./node_modules/@amcharts/amcharts4/.internal/charts/map/MapSeries.js","./node_modules/@amcharts/amcharts4/.internal/charts/map/MapObject.js","./node_modules/@amcharts/amcharts4/.internal/charts/map/MapImage.js","./node_modules/@amcharts/amcharts4/.internal/charts/map/MapUtils.js","./node_modules/@amcharts/amcharts4/.internal/charts/map/MapPolygon.js","./node_modules/@amcharts/amcharts4/.internal/charts/map/MapPolygonSeries.js","./node_modules/d3-geo/src/clip/buffer.js","./node_modules/d3-geo/src/pointEqual.js","./node_modules/d3-geo/src/clip/rejoin.js","./node_modules/d3-geo/src/polygonContains.js","./node_modules/d3-array/src/merge.js","./node_modules/d3-geo/src/clip/index.js","./node_modules/d3-geo/src/clip/antimeridian.js","./node_modules/d3-geo/src/circle.js","./node_modules/d3-geo/src/clip/circle.js","./node_modules/d3-geo/src/clip/rectangle.js","./node_modules/d3-geo/src/clip/line.js","./node_modules/d3-geo/src/compose.js","./node_modules/d3-geo/src/identity.js","./node_modules/d3-geo/src/rotation.js","./node_modules/d3-geo/src/transform.js","./node_modules/d3-geo/src/path/bounds.js","./node_modules/d3-geo/src/projection/fit.js","./node_modules/d3-geo/src/projection/resample.js","./node_modules/d3-geo/src/projection/index.js","./node_modules/d3-geo/src/projection/equirectangular.js","./node_modules/d3-geo/src/path/area.js","./node_modules/d3-geo/src/path/centroid.js","./node_modules/d3-geo/src/path/context.js","./node_modules/d3-geo/src/path/measure.js","./node_modules/d3-geo/src/path/string.js","./node_modules/d3-geo/src/length.js","./node_modules/d3-geo/src/distance.js","./node_modules/@amcharts/amcharts4/.internal/charts/map/projections/Projection.js","./node_modules/d3-geo/src/path/index.js","./node_modules/d3-geo/src/interpolate.js","./node_modules/@amcharts/amcharts4/.internal/charts/map/SmallMap.js","./node_modules/@amcharts/amcharts4/.internal/charts/map/Geo.js","./node_modules/@amcharts/amcharts4/.internal/charts/map/MapLineObject.js","./node_modules/@amcharts/amcharts4/.internal/charts/map/MapImageSeries.js","./node_modules/@amcharts/amcharts4/.internal/charts/map/MapLine.js","./node_modules/@amcharts/amcharts4/.internal/charts/map/MapLineSeries.js","./node_modules/@amcharts/amcharts4/.internal/charts/map/Graticule.js","./node_modules/d3-array/src/range.js","./node_modules/d3-geo/src/graticule.js","./node_modules/@amcharts/amcharts4/.internal/charts/map/GraticuleSeries.js","./node_modules/@amcharts/amcharts4/.internal/charts/types/MapChart.js","./node_modules/@amcharts/amcharts4/.internal/charts/map/MapSpline.js","./node_modules/@amcharts/amcharts4/.internal/charts/map/MapArc.js","./node_modules/@amcharts/amcharts4/.internal/charts/map/MapSplineSeries.js","./node_modules/@amcharts/amcharts4/.internal/charts/map/MapArcSeries.js","./node_modules/@amcharts/amcharts4/.internal/charts/map/ZoomControl.js","./node_modules/d3-geo/src/projection/mercator.js","./node_modules/@amcharts/amcharts4/.internal/charts/map/projections/Mercator.js","./node_modules/d3-geo-projection/src/math.js","./node_modules/d3-geo-projection/src/miller.js","./node_modules/@amcharts/amcharts4/.internal/charts/map/projections/Miller.js","./node_modules/d3-geo-projection/src/eckert6.js","./node_modules/@amcharts/amcharts4/.internal/charts/map/projections/Eckert6.js","./node_modules/d3-geo/src/projection/azimuthal.js","./node_modules/d3-geo/src/projection/orthographic.js","./node_modules/@amcharts/amcharts4/.internal/charts/map/projections/Orthographic.js","./node_modules/d3-geo/src/projection/stereographic.js","./node_modules/@amcharts/amcharts4/.internal/charts/map/projections/Stereographic.js","./node_modules/d3-geo/src/projection/conicEqualArea.js","./node_modules/d3-geo/src/projection/cylindricalEqualArea.js","./node_modules/d3-geo/src/projection/conic.js","./node_modules/d3-geo/src/projection/albers.js","./node_modules/@amcharts/amcharts4/.internal/charts/map/projections/Albers.js","./node_modules/@amcharts/amcharts4/.internal/charts/map/projections/AlbersUSA.js","./node_modules/d3-geo/src/projection/albersUsa.js","./node_modules/d3-geo/src/projection/naturalEarth1.js","./node_modules/@amcharts/amcharts4/.internal/charts/map/projections/NaturalEarth1.js","./node_modules/d3-geo/src/projection/azimuthalEqualArea.js","./node_modules/@amcharts/amcharts4/.internal/charts/map/projections/AzimuthalEqualArea.js","./node_modules/d3-geo/src/projection/equalEarth.js","./node_modules/@amcharts/amcharts4/.internal/charts/map/projections/EqualEarth.js","./node_modules/chartjs-plugin-datalabels/dist/chartjs-plugin-datalabels.esm.js","./node_modules/d3-v6-tip/build/d3-v6-tip.js","./node_modules/d3-v6-tip/node_modules/d3-selection/src/namespaces.js","./node_modules/d3-v6-tip/node_modules/d3-selection/src/namespace.js","./node_modules/d3-v6-tip/node_modules/d3-selection/src/creator.js","./node_modules/d3-v6-tip/node_modules/d3-selection/src/selector.js","./node_modules/d3-v6-tip/node_modules/d3-selection/src/array.js","./node_modules/d3-v6-tip/node_modules/d3-selection/src/selectorAll.js","./node_modules/d3-v6-tip/node_modules/d3-selection/src/matcher.js","./node_modules/d3-v6-tip/node_modules/d3-selection/src/selection/selectChild.js","./node_modules/d3-v6-tip/node_modules/d3-selection/src/selection/selectChildren.js","./node_modules/d3-v6-tip/node_modules/d3-selection/src/selection/sparse.js","./node_modules/d3-v6-tip/node_modules/d3-selection/src/selection/enter.js","./node_modules/d3-v6-tip/node_modules/d3-selection/src/constant.js","./node_modules/d3-v6-tip/node_modules/d3-selection/src/selection/data.js","./node_modules/d3-v6-tip/node_modules/d3-selection/src/selection/sort.js","./node_modules/d3-v6-tip/node_modules/d3-selection/src/selection/attr.js","./node_modules/d3-v6-tip/node_modules/d3-selection/src/window.js","./node_modules/d3-v6-tip/node_modules/d3-selection/src/selection/style.js","./node_modules/d3-v6-tip/node_modules/d3-selection/src/selection/property.js","./node_modules/d3-v6-tip/node_modules/d3-selection/src/selection/classed.js","./node_modules/d3-v6-tip/node_modules/d3-selection/src/selection/text.js","./node_modules/d3-v6-tip/node_modules/d3-selection/src/selection/html.js","./node_modules/d3-v6-tip/node_modules/d3-selection/src/selection/raise.js","./node_modules/d3-v6-tip/node_modules/d3-selection/src/selection/lower.js","./node_modules/d3-v6-tip/node_modules/d3-selection/src/selection/insert.js","./node_modules/d3-v6-tip/node_modules/d3-selection/src/selection/remove.js","./node_modules/d3-v6-tip/node_modules/d3-selection/src/selection/clone.js","./node_modules/d3-v6-tip/node_modules/d3-selection/src/selection/on.js","./node_modules/d3-v6-tip/node_modules/d3-selection/src/selection/dispatch.js","./node_modules/d3-v6-tip/node_modules/d3-selection/src/selection/index.js","./node_modules/d3-v6-tip/node_modules/d3-selection/src/selection/select.js","./node_modules/d3-v6-tip/node_modules/d3-selection/src/selection/selectAll.js","./node_modules/d3-v6-tip/node_modules/d3-selection/src/selection/filter.js","./node_modules/d3-v6-tip/node_modules/d3-selection/src/selection/exit.js","./node_modules/d3-v6-tip/node_modules/d3-selection/src/selection/join.js","./node_modules/d3-v6-tip/node_modules/d3-selection/src/selection/merge.js","./node_modules/d3-v6-tip/node_modules/d3-selection/src/selection/order.js","./node_modules/d3-v6-tip/node_modules/d3-selection/src/selection/call.js","./node_modules/d3-v6-tip/node_modules/d3-selection/src/selection/nodes.js","./node_modules/d3-v6-tip/node_modules/d3-selection/src/selection/node.js","./node_modules/d3-v6-tip/node_modules/d3-selection/src/selection/size.js","./node_modules/d3-v6-tip/node_modules/d3-selection/src/selection/empty.js","./node_modules/d3-v6-tip/node_modules/d3-selection/src/selection/each.js","./node_modules/d3-v6-tip/node_modules/d3-selection/src/selection/append.js","./node_modules/d3-v6-tip/node_modules/d3-selection/src/selection/datum.js","./node_modules/d3-v6-tip/node_modules/d3-selection/src/selection/iterator.js","./node_modules/d3-v6-tip/node_modules/d3-selection/src/select.js","./node_modules/d3-v6-tip/node_modules/d3-selection/src/create.js","./node_modules/d3-v6-tip/node_modules/d3-selection/src/local.js","./node_modules/d3-v6-tip/node_modules/d3-selection/src/sourceEvent.js","./node_modules/d3-v6-tip/node_modules/d3-selection/src/pointer.js","./node_modules/d3-v6-tip/node_modules/d3-selection/src/pointers.js","./node_modules/d3-v6-tip/node_modules/d3-selection/src/selectAll.js","./node_modules/file-saver/dist/FileSaver.min.js","./node_modules/lodash/lodash.js","./node_modules/moment/locale/af.js","./node_modules/moment/locale/ar-dz.js","./node_modules/moment/locale/ar-kw.js","./node_modules/moment/locale/ar-ly.js","./node_modules/moment/locale/ar-ma.js","./node_modules/moment/locale/ar-sa.js","./node_modules/moment/locale/ar-tn.js","./node_modules/moment/locale/ar.js","./node_modules/moment/locale/az.js","./node_modules/moment/locale/be.js","./node_modules/moment/locale/bg.js","./node_modules/moment/locale/bm.js","./node_modules/moment/locale/bn-bd.js","./node_modules/moment/locale/bn.js","./node_modules/moment/locale/bo.js","./node_modules/moment/locale/br.js","./node_modules/moment/locale/bs.js","./node_modules/moment/locale/ca.js","./node_modules/moment/locale/cs.js","./node_modules/moment/locale/cv.js","./node_modules/moment/locale/cy.js","./node_modules/moment/locale/da.js","./node_modules/moment/locale/de-at.js","./node_modules/moment/locale/de-ch.js","./node_modules/moment/locale/de.js","./node_modules/moment/locale/dv.js","./node_modules/moment/locale/el.js","./node_modules/moment/locale/en-au.js","./node_modules/moment/locale/en-ca.js","./node_modules/moment/locale/en-gb.js","./node_modules/moment/locale/en-ie.js","./node_modules/moment/locale/en-il.js","./node_modules/moment/locale/en-in.js","./node_modules/moment/locale/en-nz.js","./node_modules/moment/locale/en-sg.js","./node_modules/moment/locale/eo.js","./node_modules/moment/locale/es-do.js","./node_modules/moment/locale/es-mx.js","./node_modules/moment/locale/es-us.js","./node_modules/moment/locale/es.js","./node_modules/moment/locale/et.js","./node_modules/moment/locale/eu.js","./node_modules/moment/locale/fa.js","./node_modules/moment/locale/fi.js","./node_modules/moment/locale/fil.js","./node_modules/moment/locale/fo.js","./node_modules/moment/locale/fr-ca.js","./node_modules/moment/locale/fr-ch.js","./node_modules/moment/locale/fr.js","./node_modules/moment/locale/fy.js","./node_modules/moment/locale/ga.js","./node_modules/moment/locale/gd.js","./node_modules/moment/locale/gl.js","./node_modules/moment/locale/gom-deva.js","./node_modules/moment/locale/gom-latn.js","./node_modules/moment/locale/gu.js","./node_modules/moment/locale/he.js","./node_modules/moment/locale/hi.js","./node_modules/moment/locale/hr.js","./node_modules/moment/locale/hu.js","./node_modules/moment/locale/hy-am.js","./node_modules/moment/locale/id.js","./node_modules/moment/locale/is.js","./node_modules/moment/locale/it-ch.js","./node_modules/moment/locale/it.js","./node_modules/moment/locale/ja.js","./node_modules/moment/locale/jv.js","./node_modules/moment/locale/ka.js","./node_modules/moment/locale/kk.js","./node_modules/moment/locale/km.js","./node_modules/moment/locale/kn.js","./node_modules/moment/locale/ko.js","./node_modules/moment/locale/ku.js","./node_modules/moment/locale/ky.js","./node_modules/moment/locale/lb.js","./node_modules/moment/locale/lo.js","./node_modules/moment/locale/lt.js","./node_modules/moment/locale/lv.js","./node_modules/moment/locale/me.js","./node_modules/moment/locale/mi.js","./node_modules/moment/locale/mk.js","./node_modules/moment/locale/ml.js","./node_modules/moment/locale/mn.js","./node_modules/moment/locale/mr.js","./node_modules/moment/locale/ms-my.js","./node_modules/moment/locale/ms.js","./node_modules/moment/locale/mt.js","./node_modules/moment/locale/my.js","./node_modules/moment/locale/nb.js","./node_modules/moment/locale/ne.js","./node_modules/moment/locale/nl-be.js","./node_modules/moment/locale/nl.js","./node_modules/moment/locale/nn.js","./node_modules/moment/locale/oc-lnc.js","./node_modules/moment/locale/pa-in.js","./node_modules/moment/locale/pl.js","./node_modules/moment/locale/pt-br.js","./node_modules/moment/locale/pt.js","./node_modules/moment/locale/ro.js","./node_modules/moment/locale/ru.js","./node_modules/moment/locale/sd.js","./node_modules/moment/locale/se.js","./node_modules/moment/locale/si.js","./node_modules/moment/locale/sk.js","./node_modules/moment/locale/sl.js","./node_modules/moment/locale/sq.js","./node_modules/moment/locale/sr-cyrl.js","./node_modules/moment/locale/sr.js","./node_modules/moment/locale/ss.js","./node_modules/moment/locale/sv.js","./node_modules/moment/locale/sw.js","./node_modules/moment/locale/ta.js","./node_modules/moment/locale/te.js","./node_modules/moment/locale/tet.js","./node_modules/moment/locale/tg.js","./node_modules/moment/locale/th.js","./node_modules/moment/locale/tk.js","./node_modules/moment/locale/tl-ph.js","./node_modules/moment/locale/tlh.js","./node_modules/moment/locale/tr.js","./node_modules/moment/locale/tzl.js","./node_modules/moment/locale/tzm-latn.js","./node_modules/moment/locale/tzm.js","./node_modules/moment/locale/ug-cn.js","./node_modules/moment/locale/uk.js","./node_modules/moment/locale/ur.js","./node_modules/moment/locale/uz-latn.js","./node_modules/moment/locale/uz.js","./node_modules/moment/locale/vi.js","./node_modules/moment/locale/x-pseudo.js","./node_modules/moment/locale/yo.js","./node_modules/moment/locale/zh-cn.js","./node_modules/moment/locale/zh-hk.js","./node_modules/moment/locale/zh-mo.js","./node_modules/moment/locale/zh-tw.js","./node_modules/moment/moment.js","./node_modules/polylabel/polylabel.js","./node_modules/rxjs/dist/esm/internal/BehaviorSubject.js","./node_modules/rxjs/dist/esm/internal/Observable.js","./node_modules/rxjs/dist/esm/internal/util/ObjectUnsubscribedError.js","./node_modules/rxjs/dist/esm/internal/Subject.js","./node_modules/rxjs/dist/esm/internal/util/noop.js","./node_modules/rxjs/dist/esm/internal/NotificationFactories.js","./node_modules/rxjs/dist/esm/internal/Subscriber.js","./node_modules/rxjs/dist/esm/internal/util/UnsubscriptionError.js","./node_modules/rxjs/dist/esm/internal/Subscription.js","./node_modules/rxjs/dist/esm/internal/config.js","./node_modules/rxjs/dist/esm/internal/firstValueFrom.js","./node_modules/rxjs/dist/esm/internal/observable/empty.js","./node_modules/rxjs/dist/esm/internal/observable/forkJoin.js","./node_modules/rxjs/dist/esm/internal/operators/observeOn.js","./node_modules/rxjs/dist/esm/internal/operators/subscribeOn.js","./node_modules/rxjs/dist/esm/internal/scheduled/scheduleAsyncIterable.js","./node_modules/rxjs/dist/esm/internal/observable/from.js","./node_modules/rxjs/dist/esm/internal/scheduled/scheduled.js","./node_modules/rxjs/dist/esm/internal/scheduled/scheduleObservable.js","./node_modules/rxjs/dist/esm/internal/scheduled/scheduleArray.js","./node_modules/rxjs/dist/esm/internal/scheduled/schedulePromise.js","./node_modules/rxjs/dist/esm/internal/scheduled/scheduleIterable.js","./node_modules/rxjs/dist/esm/internal/scheduled/scheduleReadableStreamLike.js","./node_modules/rxjs/dist/esm/internal/observable/innerFrom.js","./node_modules/rxjs/dist/esm/internal/observable/of.js","./node_modules/rxjs/dist/esm/internal/operators/OperatorSubscriber.js","./node_modules/rxjs/dist/esm/internal/operators/concatMap.js","./node_modules/rxjs/dist/esm/internal/operators/filter.js","./node_modules/rxjs/dist/esm/internal/operators/map.js","./node_modules/rxjs/dist/esm/internal/operators/mergeAll.js","./node_modules/rxjs/dist/esm/internal/operators/mergeMap.js","./node_modules/rxjs/dist/esm/internal/operators/mergeInternals.js","./node_modules/rxjs/dist/esm/internal/operators/share.js","./node_modules/rxjs/dist/esm/internal/ReplaySubject.js","./node_modules/rxjs/dist/esm/internal/operators/shareReplay.js","./node_modules/rxjs/dist/esm/internal/operators/take.js","./node_modules/rxjs/dist/esm/internal/scheduler/dateTimestampProvider.js","./node_modules/rxjs/dist/esm/internal/scheduler/timeoutProvider.js","./node_modules/rxjs/dist/esm/internal/symbol/iterator.js","./node_modules/rxjs/dist/esm/internal/symbol/observable.js","./node_modules/rxjs/dist/esm/internal/util/EmptyError.js","./node_modules/rxjs/dist/esm/internal/util/args.js","./node_modules/rxjs/dist/esm/internal/util/isScheduler.js","./node_modules/rxjs/dist/esm/internal/util/argsArgArrayOrObject.js","./node_modules/rxjs/dist/esm/internal/util/arrRemove.js","./node_modules/rxjs/dist/esm/internal/util/createErrorClass.js","./node_modules/rxjs/dist/esm/internal/util/createObject.js","./node_modules/rxjs/dist/esm/internal/util/errorContext.js","./node_modules/rxjs/dist/esm/internal/util/executeSchedule.js","./node_modules/rxjs/dist/esm/internal/util/identity.js","./node_modules/rxjs/dist/esm/internal/util/isArrayLike.js","./node_modules/rxjs/dist/esm/internal/util/isAsyncIterable.js","./node_modules/rxjs/dist/esm/internal/util/isFunction.js","./node_modules/rxjs/dist/esm/internal/util/isInteropObservable.js","./node_modules/rxjs/dist/esm/internal/util/isIterable.js","./node_modules/rxjs/dist/esm/internal/util/isPromise.js","./node_modules/rxjs/dist/esm/internal/util/isReadableStreamLike.js","./node_modules/rxjs/dist/esm/internal/util/lift.js","./node_modules/rxjs/dist/esm/internal/util/mapOneOrManyArgs.js","./node_modules/rxjs/dist/esm/internal/util/pipe.js","./node_modules/rxjs/dist/esm/internal/util/reportUnhandledError.js","./node_modules/rxjs/dist/esm/internal/util/throwUnobservableError.js","./node_modules/tinyqueue/index.js","./node_modules/rxjs/node_modules/tslib/tslib.es6.js","./node_modules/tslib/tslib.es6.js","./node_modules/@angular/animations/fesm2020/animations.mjs","./node_modules/@angular/common/fesm2020/common.mjs","./node_modules/@angular/common/fesm2020/http.mjs","./node_modules/@angular/core/fesm2020/core.mjs","./node_modules/rxjs/dist/esm/internal/observable/merge.js","./node_modules/@angular/forms/fesm2020/forms.mjs","./node_modules/@angular/animations/fesm2020/browser.mjs","./node_modules/@angular/platform-browser/fesm2020/animations.mjs","./node_modules/@angular/platform-browser/fesm2020/platform-browser.mjs","./node_modules/rxjs/dist/esm/internal/observable/combineLatest.js","./node_modules/rxjs/dist/esm/internal/observable/concat.js","./node_modules/rxjs/dist/esm/internal/operators/concatAll.js","./node_modules/rxjs/dist/esm/internal/observable/defer.js","./node_modules/rxjs/dist/esm/internal/observable/throwError.js","./node_modules/rxjs/dist/esm/internal/operators/refCount.js","./node_modules/rxjs/dist/esm/internal/observable/ConnectableObservable.js","./node_modules/rxjs/dist/esm/internal/operators/switchMap.js","./node_modules/rxjs/dist/esm/internal/operators/defaultIfEmpty.js","./node_modules/rxjs/dist/esm/internal/operators/throwIfEmpty.js","./node_modules/rxjs/dist/esm/internal/operators/first.js","./node_modules/rxjs/dist/esm/internal/operators/tap.js","./node_modules/rxjs/dist/esm/internal/operators/catchError.js","./node_modules/rxjs/dist/esm/internal/operators/scanInternals.js","./node_modules/rxjs/dist/esm/internal/operators/scan.js","./node_modules/rxjs/dist/esm/internal/operators/takeLast.js","./node_modules/rxjs/dist/esm/internal/operators/last.js","./node_modules/rxjs/dist/esm/internal/operators/finalize.js","./node_modules/@angular/router/fesm2020/router.mjs","./node_modules/rxjs/dist/esm/internal/operators/startWith.js","./node_modules/rxjs/dist/esm/internal/operators/takeWhile.js","./node_modules/rxjs/dist/esm/internal/operators/mapTo.js","./node_modules/chart.js/dist/chart.js","./node_modules/@kurkle/color/dist/color.esm.js","./node_modules/chart.js/dist/chunks/helpers.segment.js","./node_modules/d3-selection/src/selector.js","./node_modules/d3-selection/src/array.js","./node_modules/d3-selection/src/selectorAll.js","./node_modules/d3-selection/src/matcher.js","./node_modules/d3-selection/src/selection/selectChild.js","./node_modules/d3-selection/src/selection/selectChildren.js","./node_modules/d3-selection/src/selection/sparse.js","./node_modules/d3-selection/src/selection/enter.js","./node_modules/d3-selection/src/constant.js","./node_modules/d3-selection/src/selection/data.js","./node_modules/d3-selection/src/selection/sort.js","./node_modules/d3-selection/src/namespaces.js","./node_modules/d3-selection/src/namespace.js","./node_modules/d3-selection/src/selection/attr.js","./node_modules/d3-selection/src/window.js","./node_modules/d3-selection/src/selection/style.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/creator.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/on.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/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/iterator.js","./node_modules/d3-dispatch/src/dispatch.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-interpolate/src/number.js","./node_modules/d3-interpolate/src/transform/decompose.js","./node_modules/d3-interpolate/src/transform/parse.js","./node_modules/d3-interpolate/src/transform/index.js","./node_modules/d3-transition/src/transition/tween.js","./node_modules/d3-color/src/define.js","./node_modules/d3-color/src/color.js","./node_modules/d3-interpolate/src/basis.js","./node_modules/d3-interpolate/src/constant.js","./node_modules/d3-interpolate/src/color.js","./node_modules/d3-interpolate/src/rgb.js","./node_modules/d3-interpolate/src/basisClosed.js","./node_modules/d3-interpolate/src/string.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/ease.js","./node_modules/d3-transition/src/transition/on.js","./node_modules/d3-transition/src/transition/selection.js","./node_modules/d3-transition/src/transition/style.js","./node_modules/d3-transition/src/transition/styleTween.js","./node_modules/d3-transition/src/transition/textTween.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/text.js","./node_modules/d3-transition/src/transition/remove.js","./node_modules/d3-transition/src/transition/easeVarying.js","./node_modules/d3-transition/src/transition/end.js","./node_modules/d3-transition/src/selection/transition.js","./node_modules/d3-ease/src/cubic.js","./node_modules/d3-transition/src/selection/index.js","./node_modules/d3-transition/src/selection/interrupt.js","./node_modules/d3-transition/src/interrupt.js","./node_modules/d3-brush/src/brush.js","./node_modules/d3-selection/src/select.js","./node_modules/d3-shape/src/constant.js","./node_modules/d3-shape/src/math.js","./node_modules/d3-path/src/path.js","./node_modules/d3-shape/src/arc.js","./node_modules/d3-shape/src/path.js","./node_modules/d3-zoom/src/transform.js","./node_modules/d3-zoom/src/zoom.js","./node_modules/rxjs/dist/esm/internal/operators/distinctUntilChanged.js","./node_modules/lodash-es/eq.js","./node_modules/lodash-es/_assocIndexOf.js","./node_modules/lodash-es/_listCacheDelete.js","./node_modules/lodash-es/_ListCache.js","./node_modules/lodash-es/_listCacheClear.js","./node_modules/lodash-es/_listCacheGet.js","./node_modules/lodash-es/_listCacheHas.js","./node_modules/lodash-es/_listCacheSet.js","./node_modules/lodash-es/_freeGlobal.js","./node_modules/lodash-es/_root.js","./node_modules/lodash-es/_Symbol.js","./node_modules/lodash-es/_getRawTag.js","./node_modules/lodash-es/_objectToString.js","./node_modules/lodash-es/_baseGetTag.js","./node_modules/lodash-es/isObject.js","./node_modules/lodash-es/isFunction.js","./node_modules/lodash-es/_coreJsData.js","./node_modules/lodash-es/_isMasked.js","./node_modules/lodash-es/_toSource.js","./node_modules/lodash-es/_baseIsNative.js","./node_modules/lodash-es/_getNative.js","./node_modules/lodash-es/_getValue.js","./node_modules/lodash-es/_Map.js","./node_modules/lodash-es/_nativeCreate.js","./node_modules/lodash-es/_hashGet.js","./node_modules/lodash-es/_hashHas.js","./node_modules/lodash-es/_Hash.js","./node_modules/lodash-es/_hashClear.js","./node_modules/lodash-es/_hashDelete.js","./node_modules/lodash-es/_hashSet.js","./node_modules/lodash-es/_getMapData.js","./node_modules/lodash-es/_isKeyable.js","./node_modules/lodash-es/_MapCache.js","./node_modules/lodash-es/_mapCacheClear.js","./node_modules/lodash-es/_mapCacheDelete.js","./node_modules/lodash-es/_mapCacheGet.js","./node_modules/lodash-es/_mapCacheHas.js","./node_modules/lodash-es/_mapCacheSet.js","./node_modules/lodash-es/_Stack.js","./node_modules/lodash-es/_stackClear.js","./node_modules/lodash-es/_stackDelete.js","./node_modules/lodash-es/_stackGet.js","./node_modules/lodash-es/_stackHas.js","./node_modules/lodash-es/_stackSet.js","./node_modules/lodash-es/_defineProperty.js","./node_modules/lodash-es/_baseAssignValue.js","./node_modules/lodash-es/_assignMergeValue.js","./node_modules/lodash-es/_baseFor.js","./node_modules/lodash-es/_createBaseFor.js","./node_modules/lodash-es/_cloneBuffer.js","./node_modules/lodash-es/_Uint8Array.js","./node_modules/lodash-es/_cloneTypedArray.js","./node_modules/lodash-es/_cloneArrayBuffer.js","./node_modules/lodash-es/_baseCreate.js","./node_modules/lodash-es/_getPrototype.js","./node_modules/lodash-es/_overArg.js","./node_modules/lodash-es/_isPrototype.js","./node_modules/lodash-es/isObjectLike.js","./node_modules/lodash-es/_baseIsArguments.js","./node_modules/lodash-es/isArguments.js","./node_modules/lodash-es/isArray.js","./node_modules/lodash-es/isLength.js","./node_modules/lodash-es/isArrayLike.js","./node_modules/lodash-es/isBuffer.js","./node_modules/lodash-es/stubFalse.js","./node_modules/lodash-es/isPlainObject.js","./node_modules/lodash-es/_baseIsTypedArray.js","./node_modules/lodash-es/_nodeUtil.js","./node_modules/lodash-es/isTypedArray.js","./node_modules/lodash-es/_baseUnary.js","./node_modules/lodash-es/_safeGet.js","./node_modules/lodash-es/_assignValue.js","./node_modules/lodash-es/_isIndex.js","./node_modules/lodash-es/_arrayLikeKeys.js","./node_modules/lodash-es/_baseTimes.js","./node_modules/lodash-es/_baseKeysIn.js","./node_modules/lodash-es/_nativeKeysIn.js","./node_modules/lodash-es/keysIn.js","./node_modules/lodash-es/toPlainObject.js","./node_modules/lodash-es/_copyObject.js","./node_modules/lodash-es/_baseMergeDeep.js","./node_modules/lodash-es/isArrayLikeObject.js","./node_modules/lodash-es/_copyArray.js","./node_modules/lodash-es/_initCloneObject.js","./node_modules/lodash-es/_baseMerge.js","./node_modules/lodash-es/identity.js","./node_modules/lodash-es/_apply.js","./node_modules/lodash-es/_overRest.js","./node_modules/lodash-es/constant.js","./node_modules/lodash-es/_baseSetToString.js","./node_modules/lodash-es/_shortOut.js","./node_modules/lodash-es/_setToString.js","./node_modules/lodash-es/_baseRest.js","./node_modules/lodash-es/merge.js","./node_modules/lodash-es/_createAssigner.js","./node_modules/lodash-es/_isIterateeCall.js","./node_modules/ng2-charts/fesm2020/ng2-charts.mjs","./node_modules/ngx-drag-drop/fesm2020/ngx-drag-drop.mjs","./node_modules/rxjs/dist/esm/internal/scheduler/Action.js","./node_modules/rxjs/dist/esm/internal/scheduler/intervalProvider.js","./node_modules/rxjs/dist/esm/internal/Scheduler.js","./node_modules/rxjs/dist/esm/internal/scheduler/async.js","./node_modules/rxjs/dist/esm/internal/scheduler/AsyncScheduler.js","./node_modules/rxjs/dist/esm/internal/scheduler/AsyncAction.js","./node_modules/rxjs/dist/esm/internal/observable/fromEvent.js","./node_modules/ngx-guided-tour/fesm2020/ngx-guided-tour.mjs","./node_modules/rxjs/dist/esm/internal/operators/debounceTime.js","./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","./node_modules/@babel/runtime/helpers/esm/defineProperty.js"],"sourcesContent":["var map = { \"type\": \"FeatureCollection\", \"features\": [\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[179.2223, -8.554], [179.2023, -8.4653], [179.2312, -8.5048], [179.2223, -8.554]]] }, \"properties\": { \"name\": \"Tuvalu\", \"id\": \"TV\" }, \"id\": \"TV\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[3.4624, -54.4471], [3.3461, -54.4511], [3.3669, -54.3997], [3.4814, -54.4001], [3.4624, -54.4471]]] }, \"properties\": { \"name\": \"Bouvet Island\", \"id\": \"BV\" }, \"id\": \"BV\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-5.3345, 36.1623], [-5.3382, 36.1122], [-5.3562, 36.1264], [-5.3551, 36.1455], [-5.3345, 36.1623]]] }, \"properties\": { \"name\": \"Gibraltar\", \"id\": \"GI\" }, \"id\": \"GI\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[47.3029, -11.5752], [47.282, -11.5747], [47.2789, -11.5574], [47.2971, -11.5543], [47.3029, -11.5752]]] }, \"properties\": { \"name\": \"Glorioso Islands\", \"id\": \"GO\" }, \"id\": \"GO\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[42.7579, -17.075], [42.7415, -17.0741], [42.7379, -17.0519], [42.761, -17.0652], [42.7579, -17.075]]] }, \"properties\": { \"name\": \"Juan De Nova Island\", \"id\": \"JU\" }, \"id\": \"JU\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-160.0213, -0.398], [-160.0453, -0.3802], [-160.0178, -0.3744], [-160.0213, -0.398]]] }, \"properties\": { \"name\": \"Jarvis Island\", \"id\": \"UM-DQ\" }, \"id\": \"UM-DQ\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-176.456, 0.2226], [-176.4615, 0.215], [-176.4675, 0.2195], [-176.456, 0.2226]]] }, \"properties\": { \"name\": \"Baker Island\", \"id\": \"UM-FQ\" }, \"id\": \"UM-FQ\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-176.6311, 0.7952], [-176.6433, 0.7934], [-176.6429, 0.8081], [-176.6329, 0.8085], [-176.6311, 0.7952]]] }, \"properties\": { \"name\": \"Howland Island\", \"id\": \"UM-HQ\" }, \"id\": \"UM-HQ\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-169.5237, 16.7305], [-169.5388, 16.7243], [-169.5388, 16.7296], [-169.5237, 16.7305]]] }, \"properties\": { \"name\": \"Johnston Atoll\", \"id\": \"UM-JQ\" }, \"id\": \"UM-JQ\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-177.3881, 28.1865], [-177.3879, 28.2144], [-177.3646, 28.2042], [-177.3881, 28.1865]]] }, \"properties\": { \"name\": \"Midway Islands\", \"id\": \"UM-MQ\" }, \"id\": \"UM-MQ\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[166.6588, 19.2829], [166.6087, 19.3073], [166.6277, 19.3246], [166.6588, 19.3117], [166.6588, 19.2829]]] }, \"properties\": { \"name\": \"Wake Island\", \"id\": \"UM-WQ\" }, \"id\": \"UM-WQ\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-68.2058, 12.1446], [-68.2873, 12.1717], [-68.3711, 12.2574], [-68.3694, 12.3018], [-68.2196, 12.2312], [-68.2058, 12.1446]]] }, \"properties\": { \"name\": \"Bonair, Saint Eustachius and Saba\", \"id\": \"BQ\" }, \"id\": \"BQ\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"MultiPolygon\", \"coordinates\": [[[[4.2263, 51.3865], [3.9023, 51.2076], [3.35, 51.3776], [4.2263, 51.3865]]], [[[4.2263, 51.3865], [3.5871, 51.454], [4.4829, 52.3091], [4.7687, 52.9412], [5.1203, 52.3881], [5.5611, 52.5948], [5.3755, 53.0957], [6.0622, 53.4071], [6.8164, 53.4413], [7.1973, 53.2823], [7.0352, 52.3801], [6.7418, 51.9109], [5.9486, 51.7625], [6.1932, 51.4888], [5.8949, 50.9843], [5.9939, 50.7504], [5.7972, 50.7546], [5.6938, 50.7748], [5.827, 51.1257], [4.5033, 51.4746], [4.2263, 51.3865]]]] }, \"properties\": { \"name\": \"Netherlands\", \"id\": \"NL\" }, \"id\": \"NL\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[31.2877, -22.4021], [30.4603, -22.3289], [29.6631, -22.1465], [29.3648, -22.194], [29.0372, -21.8113], [28.0455, -21.5729], [27.6696, -21.0642], [27.6997, -20.5307], [27.2807, -20.4788], [27.2217, -20.1458], [26.6784, -19.8928], [26.1683, -19.5381], [25.7613, -18.6495], [25.2242, -17.9153], [25.2588, -17.7936], [25.8634, -17.9521], [27.0206, -17.9583], [27.9323, -16.8961], [28.7606, -16.5321], [28.9129, -15.9879], [29.7297, -15.6448], [30.3959, -15.643], [30.4377, -15.9954], [31.2362, -16.0239], [31.9398, -16.4287], [32.2434, -16.4487], [32.9479, -16.7123], [32.9932, -18.3596], [32.7166, -19.0019], [33.0069, -19.8737], [32.4778, -20.7131], [32.3713, -21.335], [31.2877, -22.4021]]] }, \"properties\": { \"name\": \"Zimbabwe\", \"id\": \"ZW\" }, \"id\": \"ZW\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[32.9199, -9.4072], [33.3509, -9.8622], [33.659, -10.5906], [33.2613, -10.8934], [33.3798, -11.1579], [33.2262, -11.5348], [33.2524, -12.1127], [33.398, -12.49], [33.0216, -12.6303], [32.9679, -13.2251], [32.6722, -13.6104], [32.9812, -14.0095], [33.2018, -14.0135], [31.729, -14.496], [30.2317, -14.9905], [30.3959, -15.643], [29.7297, -15.6448], [28.9129, -15.9879], [28.7606, -16.5321], [27.9323, -16.8961], [27.0206, -17.9583], [25.8634, -17.9521], [25.2588, -17.7936], [24.9325, -17.5433], [24.2751, -17.4812], [23.3807, -17.6405], [22.1507, -16.5974], [21.9798, -15.9555], [21.9789, -13.0009], [23.8432, -13.0009], [23.9915, -12.4221], [23.9666, -10.8716], [24.32, -11.0718], [24.5184, -11.4384], [25.1847, -11.2431], [25.3493, -11.6231], [26.0258, -11.8903], [26.5962, -11.972], [26.9496, -11.8988], [27.0459, -11.616], [27.5333, -12.1953], [28.3576, -12.482], [29.0141, -13.3689], [29.5543, -13.2491], [29.7954, -13.3929], [29.7954, -12.1553], [29.4274, -12.4314], [29.0643, -12.3489], [28.4823, -11.8122], [28.3572, -11.4828], [28.639, -10.6692], [28.6301, -9.8311], [28.4007, -9.2248], [28.9178, -8.7005], [28.9724, -8.4648], [30.7511, -8.1936], [31.0764, -8.6117], [31.3508, -8.6069], [31.9425, -9.0539], [32.4334, -9.1564], [32.9199, -9.4072]]] }, \"properties\": { \"name\": \"Zambia\", \"id\": \"ZM\" }, \"id\": \"ZM\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[31.2877, -22.4021], [31.5456, -23.4821], [31.7995, -23.8923], [31.986, -24.4605], [31.9482, -25.9577], [31.4151, -25.7464], [31.2074, -25.8432], [30.8034, -26.4136], [30.7941, -26.7643], [31.0636, -27.1123], [31.4697, -27.2956], [31.9584, -27.3058], [32.1129, -26.8393], [32.8862, -26.8495], [32.5346, -28.1998], [32.2856, -28.6215], [31.7782, -28.9371], [31.3352, -29.3779], [30.2885, -30.9701], [28.8561, -32.2943], [27.8604, -33.0538], [27.0774, -33.5212], [26.4293, -33.7596], [25.9894, -33.7112], [25.6383, -34.0112], [25.0031, -33.9735], [24.8273, -34.1688], [23.5858, -33.9851], [23.2684, -34.0814], [22.2456, -34.0694], [21.7889, -34.3726], [21.06, -34.3646], [20.53, -34.4631], [20.0204, -34.7858], [19.6351, -34.7534], [18.8086, -34.108], [18.3545, -33.9389], [18.4331, -33.7174], [17.8782, -32.9614], [18.2511, -32.652], [18.3105, -32.1225], [18.2107, -31.7425], [17.6776, -31.019], [17.1893, -30.0997], [16.95, -29.4036], [16.4475, -28.6175], [16.7556, -28.4524], [17.0561, -28.0311], [17.3855, -28.3534], [17.4481, -28.6983], [18.1028, -28.8719], [19.2458, -28.9016], [19.6715, -28.5039], [19.9805, -28.4515], [19.9805, -26.5312], [19.9805, -24.777], [20.3453, -25.03], [20.7932, -25.9155], [20.6268, -26.4438], [20.74, -26.849], [21.6464, -26.8544], [22.0907, -26.5801], [22.6403, -26.0714], [22.8786, -25.4579], [23.2662, -25.2666], [23.8938, -25.6008], [24.7483, -25.8174], [25.5837, -25.6062], [25.9122, -24.7477], [26.3974, -24.6136], [26.835, -24.2407], [27.1462, -23.5243], [27.8906, -23.0737], [28.2102, -22.6938], [28.8397, -22.4807], [29.3648, -22.194], [29.6631, -22.1465], [30.4603, -22.3289], [31.2877, -22.4021]], [[27.8303, -28.9091], [27.2945, -29.5195], [27.0517, -29.6642], [27.3886, -30.3158], [28.018, -30.6421], [28.3922, -30.1476], [29.098, -29.919], [29.3905, -29.2696], [29.3013, -29.0898], [28.6257, -28.5816], [27.8303, -28.9091]]] }, \"properties\": { \"name\": \"South Africa\", \"id\": \"ZA\" }, \"id\": \"ZA\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[53.0855, 16.6484], [52.3278, 16.2937], [52.2177, 15.6554], [51.6038, 15.3367], [50.5269, 15.0384], [50.1669, 14.8511], [49.3497, 14.638], [48.6683, 14.0503], [47.9901, 14.0481], [47.4077, 13.6614], [46.7889, 13.4657], [45.6574, 13.3387], [45.0386, 12.8158], [44.6178, 12.8171], [43.9298, 12.6165], [43.4752, 12.8389], [43.232, 13.2672], [43.2826, 13.6397], [43.089, 14.0108], [43.0211, 14.555], [42.7171, 15.6545], [42.7992, 16.3718], [43.1649, 16.6892], [43.1911, 17.3595], [43.418, 17.5162], [43.9169, 17.3249], [44.1557, 17.3986], [45.1483, 17.4274], [45.4066, 17.32], [46.3104, 17.2312], [46.6819, 17.2685], [46.9758, 16.9533], [47.4418, 17.1118], [47.5795, 17.4483], [48.172, 18.1567], [49.0421, 18.582], [51.9775, 18.9961], [52.729, 17.3005], [53.0855, 16.6484]]] }, \"properties\": { \"name\": \"Yemen\", \"id\": \"YE\" }, \"id\": \"YE\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-172.3335, -13.4653], [-172.225, -13.8044], [-172.5357, -13.7915], [-172.7441, -13.5789], [-172.3335, -13.4653]]] }, \"properties\": { \"name\": \"Samoa\", \"id\": \"WS\" }, \"id\": \"WS\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-178.0467, -14.3184], [-178.1585, -14.3118], [-178.1423, -14.2425], [-178.0467, -14.3184]]] }, \"properties\": { \"name\": \"Wallis and Futuna\", \"id\": \"WF\" }, \"id\": \"WF\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"MultiPolygon\", \"coordinates\": [[[[34.2454, 31.2085], [34.1983, 31.3226], [34.4775, 31.5849], [34.2454, 31.2085]]], [[[35.4505, 31.4793], [34.9507, 31.6022], [34.9561, 32.1611], [35.1931, 32.5344], [35.5513, 32.3955], [35.5589, 31.7656], [35.4505, 31.4793]]]] }, \"properties\": { \"name\": \"Palestinian Territories\", \"id\": \"PS\" }, \"id\": \"PS\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"MultiPolygon\", \"coordinates\": [[[[166.7458, -14.8267], [166.8102, -15.1574], [167.1316, -15.1352], [167.1995, -15.4859], [166.8257, -15.635], [166.6313, -15.406], [166.5274, -14.8502], [166.7458, -14.8267]]], [[[167.4125, -16.0958], [167.8365, -16.4495], [167.4494, -16.5552], [167.4125, -16.0958]]]] }, \"properties\": { \"name\": \"Vanuatu\", \"id\": \"VU\" }, \"id\": \"VU\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[107.9727, 21.5081], [107.4099, 21.2848], [107.3544, 21.0553], [106.6757, 20.9603], [106.7534, 20.7348], [106.5181, 20.2887], [105.9841, 19.9389], [105.6219, 18.9664], [105.8882, 18.5025], [106.499, 17.9463], [106.479, 17.7195], [107.1804, 16.8978], [108.0296, 16.331], [108.8215, 15.378], [109.0847, 14.7161], [109.3035, 13.8563], [109.272, 13.2792], [109.4238, 12.9561], [109.2187, 12.6458], [109.1988, 11.7247], [108.8206, 11.3155], [108.2715, 10.9342], [107.2616, 10.3984], [106.8128, 10.4334], [106.5723, 9.6411], [105.5011, 9.0933], [105.3223, 8.8013], [104.8921, 8.5833], [104.8184, 8.8017], [104.8451, 9.606], [105.028, 10.0672], [104.6635, 10.1698], [104.4265, 10.4112], [104.8504, 10.5347], [105.3866, 10.9399], [106.1679, 11.0123], [105.8558, 11.2941], [105.8514, 11.6351], [106.3401, 11.6817], [106.4138, 11.9484], [106.9305, 12.0776], [107.5062, 12.3644], [107.4756, 13.0302], [107.6056, 13.4377], [107.3313, 14.1266], [107.5195, 14.705], [107.6531, 15.255], [107.1897, 15.7473], [107.3966, 16.0429], [106.6961, 16.4588], [106.5021, 16.9542], [105.6916, 17.7377], [105.4581, 18.1545], [105.0857, 18.4501], [105.115, 18.6787], [104.7163, 18.8035], [103.8965, 19.3401], [104.0319, 19.6753], [104.5463, 19.6105], [104.9281, 20.018], [104.6187, 20.3744], [104.5832, 20.6465], [104.0518, 20.9413], [103.635, 20.6971], [103.1046, 20.8915], [102.8511, 21.2657], [102.9488, 21.5698], [102.1276, 22.379], [102.5173, 22.7408], [103.0051, 22.4532], [103.3008, 22.7643], [104.3719, 22.704], [104.7958, 22.9112], [104.8646, 23.1363], [105.2752, 23.3454], [105.8429, 22.9228], [106.5421, 22.9081], [106.7804, 22.779], [106.5363, 22.3954], [106.7294, 22.0004], [107.3513, 21.6089], [107.9727, 21.5081]]] }, \"properties\": { \"name\": \"Vietnam\", \"id\": \"VN\" }, \"id\": \"VN\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-64.7656, 17.7945], [-64.6862, 17.7062], [-64.889, 17.7017], [-64.8848, 17.7723], [-64.7656, 17.7945]]] }, \"properties\": { \"name\": \"US Virgin Islands\", \"id\": \"VI\" }, \"id\": \"VI\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-64.3952, 18.4648], [-64.4261, 18.5132], [-64.3246, 18.5176], [-64.3952, 18.4648]]] }, \"properties\": { \"name\": \"British Virgin Islands\", \"id\": \"VG\" }, \"id\": \"VG\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-60.0175, 8.5491], [-59.8315, 8.3059], [-60.0324, 8.0537], [-60.5136, 7.8131], [-60.7191, 7.4989], [-60.3951, 6.9453], [-61.1457, 6.6945], [-61.1286, 6.2142], [-61.3767, 5.9071], [-60.7422, 5.2022], [-60.6046, 4.9944], [-61.0028, 4.5354], [-62.1531, 4.0982], [-62.7122, 4.0179], [-62.9685, 3.594], [-63.2948, 3.9224], [-64.0214, 3.9291], [-64.2556, 4.1404], [-64.5679, 3.8998], [-64.2212, 3.5873], [-64.2188, 3.2047], [-63.9242, 2.4523], [-63.3893, 2.4119], [-63.394, 2.2223], [-64.0354, 1.9045], [-64.1149, 1.6191], [-65.1037, 1.1082], [-65.3609, 0.8685], [-65.6814, 0.9834], [-66.06, 0.7854], [-66.4293, 0.8218], [-66.8761, 1.2231], [-67.2108, 2.3901], [-67.8347, 2.8926], [-67.3111, 3.416], [-67.6616, 3.8643], [-67.8553, 4.507], [-67.8249, 5.2705], [-67.4394, 6.0256], [-67.8591, 6.2897], [-68.4717, 6.1565], [-69.4392, 6.1348], [-70.095, 6.9378], [-70.6552, 7.0829], [-71.0134, 6.9946], [-72.0843, 7.0967], [-72.443, 7.4549], [-72.4166, 8.3818], [-72.6654, 8.6277], [-72.7963, 9.1089], [-73.3563, 9.2269], [-73.0065, 9.7894], [-72.8693, 10.4911], [-72.6902, 10.8361], [-72.2485, 11.1965], [-71.958, 11.6666], [-71.3197, 11.8619], [-71.8686, 11.6275], [-71.9469, 11.4144], [-71.5942, 10.6572], [-72.1129, 9.8155], [-71.6868, 9.0725], [-71.2979, 9.1257], [-71.0858, 9.3481], [-71.0527, 9.7059], [-71.3867, 10.2639], [-71.5445, 10.7788], [-71.4695, 10.9643], [-70.2326, 11.3732], [-70.2865, 11.8859], [-70.004, 12.1779], [-69.6316, 11.4801], [-68.8279, 11.4318], [-68.3987, 11.161], [-68.234, 10.5693], [-67.8715, 10.4721], [-66.9891, 10.6106], [-66.2471, 10.6323], [-65.8518, 10.2577], [-65.1292, 10.0699], [-64.8504, 10.0979], [-63.8734, 10.6638], [-62.7024, 10.7499], [-62.8429, 10.4179], [-62.5151, 10.176], [-60.7923, 9.3606], [-61.0531, 9.0951], [-61.3039, 8.4102], [-60.801, 8.5922], [-60.0175, 8.5491]]] }, \"properties\": { \"name\": \"Venezuela\", \"id\": \"VE\" }, \"id\": \"VE\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-61.1745, 13.1581], [-61.2773, 13.2095], [-61.1821, 13.356], [-61.1239, 13.2939], [-61.1745, 13.1581]]] }, \"properties\": { \"name\": \"Saint Vincent and the Grenadines\", \"id\": \"VC\" }, \"id\": \"VC\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[12.4392, 41.8983], [12.4307, 41.8974], [12.4307, 41.9054], [12.4383, 41.9063], [12.4392, 41.8983]]] }, \"properties\": { \"name\": \"Vatican City\", \"id\": \"VA\" }, \"id\": \"VA\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[70.9468, 42.2485], [70.8421, 42.0195], [70.1811, 41.5716], [70.7826, 41.2626], [71.4085, 41.1361], [71.7924, 41.4131], [72.6585, 40.8698], [73.113, 40.7859], [71.6926, 40.1525], [70.9579, 40.239], [70.3826, 40.4534], [70.7511, 40.7397], [70.4417, 41.0234], [69.7128, 40.6572], [69.2063, 40.5666], [69.2281, 40.1875], [68.6528, 40.1827], [68.4632, 39.5368], [67.7193, 39.6216], [67.3495, 39.242], [67.6767, 39.0086], [68.1037, 38.9619], [68.0478, 38.6694], [68.2941, 38.0329], [67.8143, 37.4869], [67.7592, 37.1722], [67.069, 37.3346], [66.5221, 37.3484], [66.5745, 38.0107], [65.8572, 38.2686], [65.613, 38.2384], [64.1628, 38.9535], [62.6505, 39.8586], [61.903, 41.0935], [60.455, 41.2218], [60.0897, 41.3994], [60.107, 41.9076], [59.8584, 42.2951], [59.4509, 42.2996], [58.5889, 42.7785], [58.2595, 42.688], [57.8143, 42.1899], [57.3819, 42.1562], [56.9642, 41.8566], [57.0179, 41.2635], [55.9774, 41.3221], [55.9766, 42.929], [55.9757, 44.9949], [58.5551, 45.5555], [61.0081, 44.3939], [61.1608, 44.1688], [61.9904, 43.4923], [63.2071, 43.6281], [64.4434, 43.5513], [64.9054, 43.7147], [65.4963, 43.3108], [65.803, 42.8771], [66.1004, 42.9907], [66.0094, 42.0048], [66.4986, 41.9951], [66.6686, 41.2706], [66.8142, 41.1423], [67.9359, 41.1965], [68.2919, 40.6563], [69.0652, 41.367], [70.0954, 41.8206], [70.4159, 42.0785], [70.9468, 42.2485]]] }, \"properties\": { \"name\": \"Uzbekistan\", \"id\": \"UZ\" }, \"id\": \"UZ\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"MultiPolygon\", \"coordinates\": [[[[-166.1355, 60.3835], [-165.7298, 60.3143], [-165.5917, 59.9132], [-166.1876, 59.7738], [-167.1389, 60.0086], [-166.1355, 60.3835]]], [[[-171.4631, 63.6401], [-170.4304, 63.6989], [-169.7778, 63.0937], [-171.4631, 63.6401]]], [[[-141.0021, 69.6509], [-141.0021, 68.4819], [-141.0021, 65.56], [-141.0021, 63.2222], [-141.0021, 60.3003], [-139.1852, 60.0837], [-137.5932, 59.2263], [-137.4385, 58.9031], [-136.5787, 59.1522], [-136.3219, 59.6049], [-135.4759, 59.7934], [-134.9439, 59.2882], [-133.8208, 58.7049], [-131.8661, 56.7929], [-131.5752, 56.5989], [-130.4772, 56.2307], [-130.0251, 55.8882], [-130.0366, 55.2978], [-130.2142, 55.026], [-130.5753, 54.7696], [-131.0478, 55.1576], [-130.9186, 55.736], [-131.8439, 56.1601], [-132.8143, 57.0408], [-133.4659, 57.1722], [-133.5543, 57.6951], [-134.0634, 58.2111], [-134.7761, 58.4539], [-135.3025, 58.2559], [-135.8618, 58.5771], [-136.5827, 58.2453], [-137.544, 58.5811], [-138.3525, 59.0873], [-140.2168, 59.7266], [-140.8432, 59.749], [-141.6702, 59.9698], [-142.9457, 60.097], [-143.8051, 60.0129], [-144.9012, 60.3351], [-145.8989, 60.4783], [-146.8741, 61.005], [-148.3445, 60.8536], [-148.1976, 60.1678], [-148.4306, 59.9891], [-149.4323, 60.0011], [-150.9608, 59.244], [-151.7383, 59.1886], [-151.7345, 59.9882], [-151.4515, 60.2026], [-151.3217, 60.7428], [-150.4412, 61.0236], [-150.6124, 61.3013], [-151.7341, 60.9106], [-151.7505, 60.7548], [-153.1061, 59.875], [-154.0883, 59.3632], [-154.1298, 59.12], [-153.327, 58.8843], [-154.0199, 58.493], [-154.2469, 58.1594], [-155.0069, 58.016], [-156.4784, 57.328], [-156.4751, 57.1051], [-157.5784, 56.6344], [-158.4144, 56.4358], [-158.2757, 56.1963], [-159.5233, 55.8101], [-159.9623, 55.7948], [-161.0995, 55.4057], [-161.7416, 55.3911], [-162.0741, 55.1394], [-162.8651, 54.9545], [-162.9621, 55.1838], [-162.1571, 55.7195], [-161.2156, 56.0214], [-160.8514, 55.7719], [-160.3021, 56.3141], [-159.2831, 56.6886], [-158.321, 57.2978], [-157.6077, 57.6014], [-157.5235, 58.4213], [-158.5032, 58.8503], [-159.0827, 58.4697], [-159.6702, 58.9111], [-160.3631, 59.0512], [-161.7554, 58.6119], [-161.8286, 59.5887], [-162.2425, 60.1782], [-163.2193, 59.8455], [-163.9069, 59.8067], [-164.6622, 60.3038], [-165.3538, 60.5413], [-164.8051, 60.892], [-165.566, 61.1024], [-166.0789, 61.8031], [-165.1944, 62.4736], [-164.409, 63.2151], [-163.3589, 63.0458], [-161.974, 63.453], [-161.0997, 63.558], [-160.7786, 63.819], [-160.932, 64.5792], [-161.7594, 64.8162], [-162.807, 64.3743], [-163.7132, 64.5883], [-164.8995, 64.4607], [-166.1428, 64.5827], [-167.4039, 65.4221], [-168.0884, 65.6578], [-164.6742, 66.5549], [-163.7755, 66.5312], [-163.6954, 66.0838], [-161.8164, 66.0536], [-161.557, 66.2504], [-160.2317, 66.4202], [-160.864, 66.6708], [-161.8566, 66.7003], [-161.9653, 67.0497], [-163.0016, 67.0272], [-163.7205, 67.1955], [-164.1251, 67.6067], [-166.3805, 68.4251], [-166.2092, 68.8854], [-164.3024, 68.9364], [-163.1614, 69.3879], [-162.9521, 69.7581], [-161.881, 70.3318], [-160.9963, 70.3045], [-159.3144, 70.8785], [-157.9985, 70.8454], [-156.7833, 71.319], [-155.1669, 71.0993], [-154.1952, 70.801], [-153.2329, 70.9326], [-152.233, 70.8103], [-151.9447, 70.4521], [-149.2694, 70.5007], [-147.7053, 70.2173], [-145.8232, 70.16], [-145.1973, 70.0086], [-143.2184, 70.1163], [-141.4078, 69.6533], [-141.0021, 69.6509]]], [[[-155.5813, 19.0121], [-155.8814, 19.0707], [-156.0487, 19.7498], [-155.8316, 20.2759], [-155.1989, 19.9944], [-154.8043, 19.5244], [-155.5813, 19.0121]]], [[[-72.5098, 40.9861], [-73.1943, 40.6541], [-73.5738, 40.9195], [-72.5098, 40.9861]]], [[[-93.3778, 48.6166], [-92.9963, 48.6117], [-91.5183, 48.0582], [-90.8403, 48.2007], [-89.4556, 47.996], [-88.3782, 48.3032], [-84.8759, 46.9001], [-84.5617, 46.4575], [-84.1921, 46.5494], [-83.9777, 46.0851], [-83.5926, 45.817], [-82.5511, 45.3473], [-82.1378, 43.5709], [-82.5453, 42.6245], [-83.0731, 42.3005], [-83.1419, 41.976], [-82.439, 41.675], [-81.2778, 42.209], [-80.2475, 42.3662], [-79.0368, 42.8025], [-79.1719, 43.4666], [-78.7205, 43.625], [-76.82, 43.6286], [-76.4646, 44.0574], [-75.1793, 44.8994], [-74.7088, 45.0038], [-71.5175, 45.0078], [-71.3272, 45.2901], [-70.898, 45.2626], [-70.2963, 45.9062], [-70.0078, 46.7088], [-69.243, 47.4629], [-68.8288, 47.2032], [-68.311, 47.3546], [-67.8067, 47.083], [-67.7845, 45.7016], [-67.4328, 45.603], [-67.4725, 45.2759], [-67.1249, 45.1693], [-67.1067, 44.8852], [-67.9071, 44.4538], [-68.2775, 44.5075], [-69.7916, 43.8053], [-70.1789, 43.7662], [-70.829, 42.8251], [-71.0463, 42.3311], [-70.7382, 42.229], [-70.4046, 41.6271], [-70.6572, 41.5343], [-71.4265, 41.6333], [-71.5228, 41.3789], [-72.8471, 41.2657], [-73.5831, 41.022], [-74.2267, 40.6079], [-73.9575, 40.3282], [-74.1761, 39.7268], [-74.4289, 39.3872], [-74.897, 39.1453], [-75.3922, 39.0929], [-75.036, 38.5034], [-75.6592, 37.9539], [-76.2948, 38.4945], [-76.2635, 37.3568], [-75.8905, 36.6568], [-76.4788, 36.0283], [-75.7722, 35.9], [-75.7739, 35.647], [-76.513, 35.2705], [-76.7449, 34.9412], [-77.7508, 34.2851], [-78.0134, 33.9118], [-78.5778, 33.8732], [-78.9202, 33.6588], [-79.276, 33.1354], [-80.8492, 32.114], [-81.5203, 30.8747], [-81.2496, 29.7938], [-80.9, 29.0498], [-80.524, 28.4861], [-80.6501, 28.1811], [-80.2262, 27.2072], [-80.0413, 26.5685], [-80.1263, 25.8334], [-80.3669, 25.3313], [-80.7366, 25.1565], [-81.0978, 25.3194], [-81.365, 25.8312], [-81.7154, 25.983], [-81.8666, 26.4349], [-82.4414, 27.0599], [-82.6609, 27.7186], [-82.8436, 27.846], [-82.6607, 28.4857], [-82.6516, 28.8874], [-83.2906, 29.452], [-83.6943, 29.9261], [-84.0443, 30.1036], [-84.3828, 29.9074], [-85.3189, 29.6802], [-85.3536, 29.8759], [-86.2573, 30.4929], [-87.7903, 30.2918], [-88.9051, 30.4152], [-89.5885, 30.1658], [-90.2253, 30.3793], [-90.4131, 30.1405], [-89.5894, 29.915], [-90.1014, 29.1817], [-90.3793, 29.2953], [-90.7511, 29.1311], [-91.2902, 29.2891], [-91.331, 29.5137], [-91.8932, 29.836], [-92.2608, 29.5568], [-93.1756, 29.7792], [-93.6947, 29.7698], [-94.8884, 29.3708], [-95.2734, 28.9637], [-95.8534, 28.6401], [-96.4487, 28.5944], [-96.5616, 28.3671], [-97.1564, 28.1443], [-97.1715, 27.8797], [-97.5546, 26.9675], [-97.4024, 26.3967], [-97.1462, 25.9617], [-97.3582, 25.8707], [-98.0828, 26.0642], [-99.1078, 26.4469], [-99.4436, 27.0368], [-99.5053, 27.5482], [-100.2961, 28.3276], [-100.6587, 29.0685], [-101.4404, 29.7769], [-102.269, 29.871], [-102.7342, 29.6438], [-102.892, 29.2163], [-103.2577, 29.001], [-104.1107, 29.3863], [-104.504, 29.6775], [-104.9179, 30.5835], [-106.2558, 31.5445], [-106.4533, 31.77], [-108.2118, 31.7793], [-108.2145, 31.3292], [-111.042, 31.3243], [-112.939, 31.916], [-114.836, 32.5082], [-114.7248, 32.7155], [-117.1282, 32.5335], [-117.4674, 33.2957], [-118.5063, 34.0174], [-119.1437, 34.112], [-119.6061, 34.4178], [-120.4812, 34.4715], [-120.6448, 34.5798], [-120.6337, 35.0766], [-120.8603, 35.3655], [-121.8774, 36.331], [-121.79, 36.7323], [-122.3948, 37.2077], [-122.4669, 37.838], [-122.9681, 38.0968], [-122.9865, 38.277], [-123.7012, 38.9073], [-123.8845, 39.8608], [-124.324, 40.2519], [-124.3717, 40.4912], [-124.0685, 41.3843], [-124.5397, 42.8127], [-124.1486, 43.6916], [-123.9293, 45.5768], [-124.0716, 46.7447], [-124.3761, 47.6587], [-124.6211, 47.9042], [-124.6327, 48.3751], [-123.9757, 48.1683], [-122.2421, 48.0107], [-122.7888, 48.993], [-120.1281, 48.993], [-118.4226, 48.993], [-115.8643, 48.993], [-112.4532, 48.993], [-109.895, 48.993], [-106.4839, 48.993], [-103.9256, 48.993], [-102.2201, 48.993], [-99.2354, 48.993], [-97.5297, 48.9932], [-95.162, 48.9917], [-94.6209, 48.7427], [-93.7078, 48.5256], [-93.3778, 48.6166]]], [[[-163.4761, 54.9807], [-163.3581, 54.7357], [-164.5907, 54.4043], [-164.8877, 54.6078], [-164.5297, 54.8808], [-163.4761, 54.9807]]], [[[-130.9792, 55.4892], [-131.0827, 55.2668], [-131.8111, 55.223], [-131.6249, 55.8316], [-130.9792, 55.4892]]], [[[-133.566, 56.3392], [-133.2029, 56.3199], [-131.9764, 55.2086], [-131.9809, 54.8049], [-132.7823, 55.0484], [-133.4471, 55.797], [-133.566, 56.3392]]], [[[-133.3663, 57.0035], [-132.9541, 56.8803], [-133.2127, 56.4646], [-133.6029, 56.4642], [-133.8661, 57.0687], [-133.3663, 57.0035]]], [[[-134.9698, 57.3515], [-134.6207, 56.7183], [-135.787, 57.3173], [-134.9698, 57.3515]]], [[[-152.898, 57.8238], [-152.4121, 57.4547], [-153.7933, 56.9895], [-154.3391, 56.9209], [-154.7059, 57.3353], [-154.2813, 57.638], [-153.8184, 57.5956], [-152.898, 57.8238]]], [[[-135.7304, 58.2442], [-135.002, 58.0511], [-135.0848, 57.5111], [-136.0767, 57.6747], [-136.5123, 58.0959], [-135.7304, 58.2442]]], [[[-134.6802, 58.1616], [-133.9611, 57.6143], [-133.9253, 57.3369], [-134.4354, 57.057], [-134.66, 57.638], [-134.6802, 58.1616]]]] }, \"properties\": { \"name\": \"United States\", \"id\": \"US\" }, \"id\": \"US\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-53.3707, -33.7422], [-53.7853, -34.3806], [-54.1686, -34.6709], [-54.9023, -34.9328], [-55.6732, -34.7756], [-56.1179, -34.9079], [-56.8552, -34.6766], [-57.1706, -34.4525], [-57.8291, -34.4773], [-58.4002, -33.9123], [-58.3534, -33.2602], [-58.0824, -32.8935], [-58.2011, -32.4718], [-58.1889, -31.9241], [-57.8105, -30.8587], [-57.8724, -30.5911], [-57.609, -30.188], [-57.2144, -30.2834], [-56.8328, -30.1072], [-56.1761, -30.6283], [-55.8736, -31.0696], [-55.5573, -30.876], [-55.2546, -31.2258], [-54.5876, -31.4851], [-54.2205, -31.8553], [-53.7618, -32.0568], [-53.6017, -32.403], [-53.1254, -32.7368], [-53.5314, -33.171], [-53.3707, -33.7422]]] }, \"properties\": { \"name\": \"Uruguay\", \"id\": \"UY\" }, \"id\": \"UY\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[38.2142, 47.0914], [37.5435, 47.0745], [37.3398, 46.9169], [36.2793, 46.6586], [35.827, 46.6244], [34.8495, 46.1898], [35.0231, 45.7011], [35.558, 45.3109], [36.1705, 45.453], [36.3934, 45.0655], [35.5695, 45.1192], [35.0879, 44.8027], [34.7168, 44.8071], [33.9098, 44.3876], [33.4508, 44.5537], [33.5551, 45.0979], [32.508, 45.4037], [33.6648, 45.947], [33.2022, 46.1756], [32.4769, 46.0838], [32.0357, 46.2609], [31.9744, 46.7088], [30.7963, 46.5521], [30.2193, 45.8667], [29.6018, 45.6825], [29.7061, 45.2599], [29.2236, 45.4028], [28.7606, 45.2341], [28.2124, 45.4503], [28.9475, 46.05], [29.1464, 46.5268], [29.838, 46.3505], [29.8779, 46.829], [29.5494, 47.2467], [29.1597, 47.4558], [29.1948, 47.8824], [27.5493, 48.4777], [26.6189, 48.2597], [26.1625, 47.9925], [24.8935, 47.7177], [23.2027, 48.0844], [22.8764, 47.9472], [22.132, 48.4053], [22.5386, 49.0727], [22.6496, 49.539], [23.7118, 50.3773], [24.1056, 50.8449], [23.6053, 51.5179], [24.3617, 51.8674], [25.9251, 51.9136], [27.1422, 51.752], [27.2701, 51.6135], [28.5991, 51.5427], [29.1357, 51.6173], [29.3466, 51.3825], [30.5331, 51.5964], [30.9806, 52.0461], [31.7636, 52.1012], [32.508, 52.3084], [33.7353, 52.3448], [34.3976, 51.7804], [34.2809, 51.3117], [35.3121, 51.0438], [35.4115, 50.5398], [36.3059, 50.2805], [37.4228, 50.4115], [38.0469, 49.9201], [38.2586, 50.0524], [39.1748, 49.8559], [39.7807, 49.5721], [40.0701, 49.2003], [39.6866, 49.0079], [39.9609, 48.238], [39.7359, 47.8447], [38.9005, 47.8553], [38.2875, 47.5592], [38.2142, 47.0914]]] }, \"properties\": { \"name\": \"Ukraine\", \"id\": \"UA\" }, \"id\": \"UA\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[33.9031, -1.0021], [32.1942, -1.0021], [30.8447, -1.0021], [30.51, -1.0674], [30.1016, -1.3688], [29.577, -1.3878], [29.5619, -0.9772], [29.7177, 0.0983], [29.9343, 0.4991], [29.9427, 0.8192], [30.9424, 1.683], [31.2527, 2.0448], [31.1763, 2.2703], [30.7284, 2.4554], [30.8385, 3.4905], [31.1523, 3.7857], [31.4799, 3.6805], [31.7982, 3.8026], [32.0996, 3.5291], [32.3358, 3.7063], [32.8382, 3.7986], [33.4894, 3.7551], [33.9759, 4.2203], [34.165, 3.8128], [34.3928, 3.6916], [34.4478, 3.1634], [34.7425, 2.818], [34.964, 2.0625], [34.9654, 1.6435], [34.7874, 1.2307], [34.4815, 1.042], [33.9431, 0.1738], [33.9031, -1.0021]]] }, \"properties\": { \"name\": \"Uganda\", \"id\": \"UG\" }, \"id\": \"UG\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[33.9031, -1.0021], [34.7709, -1.4416], [36.2633, -2.2747], [37.6438, -3.0453], [37.6087, -3.4604], [37.7974, -3.6743], [39.2219, -4.6922], [38.8192, -5.8778], [38.8738, -6.3315], [39.4722, -6.8788], [39.5193, -7.1243], [39.2884, -7.518], [39.4411, -8.0116], [39.304, -8.444], [39.7838, -9.9146], [40.4634, -10.4641], [39.9889, -10.821], [39.3217, -11.1224], [38.7948, -11.2289], [38.4917, -11.4131], [37.9204, -11.2946], [37.5417, -11.675], [36.9789, -11.5667], [36.5185, -11.7163], [35.7852, -11.4531], [35.6312, -11.5818], [34.9596, -11.5783], [34.608, -11.0807], [34.6617, -10.71], [34.5241, -10.03], [34.3208, -9.7317], [32.9199, -9.4072], [32.4334, -9.1564], [31.9425, -9.0539], [31.3508, -8.6069], [31.0764, -8.6117], [30.7511, -8.1936], [30.3134, -7.2037], [29.7097, -6.6169], [29.4802, -6.0252], [29.5943, -5.651], [29.3426, -4.9829], [29.4034, -4.4494], [29.7177, -4.456], [30.1469, -4.0854], [30.4252, -3.5891], [30.7901, -3.2744], [30.5149, -2.9175], [30.5535, -2.3999], [30.8287, -2.3387], [30.8128, -1.5632], [30.51, -1.0674], [30.8447, -1.0021], [32.1942, -1.0021], [33.9031, -1.0021]]] }, \"properties\": { \"name\": \"Tanzania\", \"id\": \"TZ\" }, \"id\": \"TZ\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[121.009, 22.6205], [120.5815, 22.3564], [120.3258, 22.5424], [120.0723, 23.1496], [120.1589, 23.7089], [121.0405, 25.0326], [121.5936, 25.2754], [121.9291, 24.9736], [121.2957, 22.9667], [121.009, 22.6205]]] }, \"properties\": { \"name\": \"Taiwan\", \"id\": \"TW\" }, \"id\": \"TW\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"MultiPolygon\", \"coordinates\": [[[[41.5101, 41.5174], [42.4663, 41.4398], [42.7876, 41.5636], [43.4393, 41.1073], [43.7225, 40.7193], [43.5693, 40.4823], [43.7917, 40.0703], [44.2893, 40.0406], [44.7683, 39.7037], [44.8171, 39.6504], [44.023, 39.3774], [44.4309, 38.3569], [44.2112, 37.9081], [44.5614, 37.7448], [44.7652, 37.1424], [44.2818, 36.9782], [44.1562, 37.2831], [43.5161, 37.2445], [42.7748, 37.3719], [42.3588, 37.1087], [42.2683, 37.2765], [41.5154, 37.0892], [40.7058, 37.0976], [40.0164, 36.8259], [39.3568, 36.6817], [38.7669, 36.6932], [38.1916, 36.9014], [37.4365, 36.6435], [36.6584, 36.8024], [36.1275, 35.8316], [35.8927, 35.9164], [35.811, 36.3097], [36.1883, 36.659], [36.0489, 36.9107], [35.5375, 36.5969], [34.6014, 36.7847], [33.6945, 36.1819], [32.7947, 36.0358], [32.3775, 36.1836], [32.0219, 36.5352], [31.3525, 36.8011], [30.6441, 36.8654], [30.4838, 36.3106], [29.6893, 36.1565], [29.1433, 36.3971], [29.0381, 36.6937], [28.4837, 36.8037], [28.1339, 37.0297], [27.3491, 37.0195], [27.0779, 37.6875], [27.2323, 37.9787], [26.6828, 38.1985], [26.7636, 38.7098], [27.0135, 38.8869], [26.6819, 39.2922], [26.1133, 39.4675], [26.1812, 39.99], [26.7378, 40.4002], [27.4756, 40.3198], [28.2892, 40.4033], [29.3648, 40.8094], [29.3222, 41.2276], [31.2549, 41.1077], [31.4582, 41.3199], [32.3065, 41.7296], [33.3816, 42.0177], [34.7505, 41.9569], [35.2978, 41.7287], [36.0516, 41.6826], [36.5097, 41.2626], [38.3811, 40.9244], [39.4265, 41.1064], [40.2654, 40.9612], [40.9597, 41.2116], [41.5101, 41.5174]]], [[[28.0145, 41.9689], [28.3465, 41.4664], [29.0572, 41.2298], [28.7802, 40.9741], [28.172, 41.0806], [27.4996, 40.9732], [27.2581, 40.6874], [26.1053, 40.6114], [26.0391, 40.7269], [26.6246, 41.4016], [26.321, 41.7167], [26.6153, 41.9649], [27.2949, 42.0794], [28.0145, 41.9689]]]] }, \"properties\": { \"name\": \"Türkiye\", \"id\": \"TR\" }, \"id\": \"TR\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[11.5043, 33.182], [11.5048, 32.4137], [10.8265, 32.0807], [10.115, 31.4637], [10.2162, 30.7832], [9.8952, 30.3873], [9.5188, 30.2293], [9.0439, 32.0723], [8.3332, 32.5437], [8.2111, 32.9268], [7.7628, 33.2331], [7.5, 33.8323], [7.5138, 34.0805], [8.2457, 34.7339], [8.3944, 35.204], [8.2457, 35.8707], [8.2306, 36.5454], [8.5764, 36.9374], [9.6879, 37.3404], [10.1962, 37.2059], [10.5713, 36.8796], [11.1266, 36.8739], [10.5256, 36.3235], [10.5908, 35.8871], [11.0045, 35.6336], [11.1199, 35.2404], [10.5349, 34.5448], [10.0648, 34.2119], [10.1589, 33.8501], [10.7227, 33.5145], [11.0844, 33.5629], [11.2025, 33.2491], [11.5043, 33.182]]] }, \"properties\": { \"name\": \"Tunisia\", \"id\": \"TN\" }, \"id\": \"TN\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-61.0121, 10.1343], [-61.5967, 10.0646], [-61.4648, 10.5391], [-61.0338, 10.67], [-61.0121, 10.1343]]] }, \"properties\": { \"name\": \"Trinidad and Tobago\", \"id\": \"TT\" }, \"id\": \"TT\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-175.162, -21.1695], [-175.1567, -21.2636], [-175.3354, -21.1579], [-175.2255, -21.1188], [-175.162, -21.1695]]] }, \"properties\": { \"name\": \"Tonga\", \"id\": \"TO\" }, \"id\": \"TO\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[125.0679, -9.512], [124.9223, -8.9424], [125.178, -8.6477], [125.8043, -8.4923], [126.6198, -8.4595], [126.9149, -8.7152], [126.3823, -8.9575], [125.4079, -9.2758], [125.0679, -9.512]]] }, \"properties\": { \"name\": \"Timor-Leste\", \"id\": \"TL\" }, \"id\": \"TL\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[66.5221, 37.3484], [65.7648, 37.569], [65.5549, 37.2512], [64.8162, 37.1322], [64.5108, 36.3408], [63.8623, 36.0123], [63.1086, 35.8187], [63.0566, 35.4459], [62.6105, 35.2333], [61.262, 35.6194], [61.1195, 36.6426], [60.3413, 36.6377], [60.0626, 36.9631], [59.5623, 37.1788], [59.2409, 37.5206], [58.8157, 37.6835], [58.4357, 37.6387], [57.4236, 37.9477], [57.1937, 38.2162], [56.4409, 38.2495], [56.2287, 38.0733], [55.5784, 38.0999], [55.0755, 37.9024], [54.7452, 37.502], [53.9142, 37.3435], [53.8237, 37.9281], [53.8685, 38.9491], [53.6177, 39.2159], [53.125, 39.432], [53.4721, 39.6686], [53.4042, 39.9603], [52.9874, 39.9878], [52.7335, 40.3988], [53.1454, 40.825], [53.8698, 40.6487], [54.7101, 40.8911], [54.5921, 41.1934], [54.0949, 41.5192], [53.8463, 42.0914], [52.9701, 41.9764], [52.4938, 41.7802], [53.2502, 42.2059], [54.1211, 42.3351], [54.9037, 41.9192], [55.5451, 41.2626], [55.9774, 41.3221], [57.0179, 41.2635], [56.9642, 41.8566], [57.3819, 42.1562], [57.8143, 42.1899], [58.2595, 42.688], [58.5889, 42.7785], [59.4509, 42.2996], [59.8584, 42.2951], [60.107, 41.9076], [60.0897, 41.3994], [60.455, 41.2218], [61.903, 41.0935], [62.6505, 39.8586], [64.1628, 38.9535], [65.613, 38.2384], [65.8572, 38.2686], [66.5745, 38.0107], [66.5221, 37.3484]]] }, \"properties\": { \"name\": \"Turkmenistan\", \"id\": \"TM\" }, \"id\": \"TM\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-172.4791, -8.5807], [-172.4836, -8.5829], [-172.4987, -8.5478], [-172.4874, -8.5563], [-172.4791, -8.5807]]] }, \"properties\": { \"name\": \"Tokelau\", \"id\": \"TK\" }, \"id\": \"TK\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[70.9579, 40.239], [70.4514, 40.049], [69.9667, 40.2022], [69.5304, 40.0974], [69.229, 39.761], [69.5987, 39.5736], [70.6077, 39.5643], [70.7333, 39.4134], [71.4045, 39.598], [71.8062, 39.2758], [72.0428, 39.3521], [73.2351, 39.3743], [73.6315, 39.4489], [73.8015, 38.6068], [74.2773, 38.6597], [74.7452, 38.5101], [74.8912, 37.2317], [74.2596, 37.4154], [73.7496, 37.2317], [73.4814, 37.4718], [72.8955, 37.2676], [71.8022, 36.6941], [71.4329, 37.1273], [71.5518, 37.933], [71.2558, 38.3068], [70.8789, 38.4564], [70.2148, 37.9246], [70.2512, 37.664], [69.4922, 37.553], [69.2649, 37.1083], [68.9604, 37.3249], [68.0677, 36.9498], [67.7592, 37.1722], [67.8143, 37.4869], [68.2941, 38.0329], [68.0478, 38.6694], [68.1037, 38.9619], [67.6767, 39.0086], [67.3495, 39.242], [67.7193, 39.6216], [68.4632, 39.5368], [68.6528, 40.1827], [69.2281, 40.1875], [69.2063, 40.5666], [69.7128, 40.6572], [70.4417, 41.0234], [70.7511, 40.7397], [70.3826, 40.4534], [70.9579, 40.239]]] }, \"properties\": { \"name\": \"Tajikistan\", \"id\": \"TJ\" }, \"id\": \"TJ\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[100.1225, 20.3167], [100.5429, 20.0885], [100.3977, 19.7561], [100.6254, 19.4999], [101.1546, 19.5794], [101.2864, 18.977], [101.0507, 18.4071], [101.1133, 18.0333], [100.9086, 17.5837], [101.1053, 17.4793], [102.1014, 18.2104], [102.7175, 17.8922], [103.0913, 18.1381], [103.3669, 18.4235], [103.9497, 18.3192], [104.8162, 17.3005], [104.7505, 16.6475], [105.047, 16.1601], [105.4062, 15.9874], [105.6223, 15.6998], [105.5131, 15.3606], [105.4754, 14.5301], [105.1833, 14.3464], [104.7789, 14.428], [103.1996, 14.3326], [102.729, 13.8421], [102.3198, 13.5398], [102.4995, 12.6698], [102.7557, 12.4261], [102.7366, 12.0896], [102.9341, 11.7065], [102.7628, 12.0124], [101.7236, 12.6893], [101.4449, 12.6187], [100.8634, 12.7146], [100.9628, 13.4319], [100.6561, 13.5212], [100.0173, 13.3534], [100.0901, 13.0457], [99.964, 12.6902], [99.9889, 12.1708], [99.6271, 11.4628], [99.4869, 10.8898], [99.165, 10.3198], [99.1606, 9.7339], [99.3936, 9.2136], [99.7239, 9.3144], [99.9046, 9.1129], [99.9605, 8.6712], [100.2792, 8.2686], [100.4537, 7.4425], [100.5864, 7.1762], [101.0178, 6.861], [101.4977, 6.8654], [102.1009, 6.2422], [101.8737, 5.8254], [101.5563, 5.908], [101.2571, 5.7894], [101.0533, 6.2427], [100.3453, 6.5498], [100.119, 6.442], [99.6959, 6.8765], [99.7203, 7.106], [99.051, 7.8877], [98.5791, 8.3445], [98.2382, 8.4231], [98.3714, 9.2904], [98.7025, 10.1902], [98.7571, 10.6612], [99.1903, 11.1051], [99.6147, 11.7811], [99.4052, 12.5477], [99.2196, 12.7399], [99.1366, 13.7165], [98.2462, 14.8147], [98.1911, 15.204], [98.5653, 15.4037], [98.6892, 16.3052], [98.4388, 16.9755], [97.793, 17.6813], [97.4849, 18.4941], [97.7539, 18.621], [97.8169, 19.46], [98.1112, 19.7623], [98.9169, 19.7729], [99.0208, 20.0419], [99.3382, 20.0788], [99.8904, 20.4246], [100.1225, 20.3167]]] }, \"properties\": { \"name\": \"Thailand\", \"id\": \"TH\" }, \"id\": \"TH\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[0.9007, 10.9932], [0.7799, 10.3598], [1.3299, 9.9971], [1.4244, 9.2851], [1.6002, 9.0498], [1.6224, 6.2169], [1.1874, 6.0895], [0.7369, 6.4526], [0.5256, 6.8508], [0.6348, 7.3537], [0.5837, 8.1456], [0.688, 8.3041], [0.4153, 8.6525], [0.5291, 9.3583], [0.2619, 9.4955], [0.3627, 10.2364], [-0.0577, 10.6305], [-0.0686, 11.1157], [0.9007, 10.9932]]] }, \"properties\": { \"name\": \"Togo\", \"id\": \"TG\" }, \"id\": \"TG\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[22.86, 10.9195], [22.4938, 10.9963], [21.7063, 10.5746], [21.7258, 10.3664], [21.2638, 9.9745], [20.7733, 9.4058], [20.3422, 9.1271], [19.1455, 9.0161], [19.1087, 8.6561], [18.4553, 8.032], [17.6496, 7.9836], [16.7849, 7.5508], [16.3787, 7.6835], [15.8452, 7.4753], [15.4803, 7.5237], [15.443, 7.8518], [15.1163, 8.5571], [14.3324, 9.2034], [13.9773, 9.6917], [14.2432, 9.9798], [15.5411, 9.9603], [15.1323, 10.6483], [15.0297, 11.1135], [15.0812, 11.8455], [14.7612, 12.6556], [14.5162, 12.9796], [14.0638, 13.0786], [13.6062, 13.7045], [13.4481, 14.3805], [14.3679, 15.7499], [15.4745, 16.9085], [15.7351, 19.9039], [15.949, 20.3034], [15.5873, 20.7335], [15.6072, 20.9546], [15.182, 21.5232], [15.1722, 21.9223], [14.9791, 22.996], [15.9841, 23.4452], [17.7521, 22.5721], [19.6684, 21.6257], [21.5847, 20.6794], [23.9804, 19.4968], [23.9822, 17.2663], [23.9835, 15.7801], [23.105, 15.7024], [22.9323, 15.1622], [22.6709, 14.7223], [22.3815, 14.5505], [22.5098, 14.1275], [22.1076, 13.7302], [22.2283, 13.3294], [21.8253, 12.7905], [22.3522, 12.6604], [22.5564, 11.6697], [22.9226, 11.3448], [22.86, 10.9195]]] }, \"properties\": { \"name\": \"Chad\", \"id\": \"TD\" }, \"id\": \"TD\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-71.6615, 21.7651], [-71.8304, 21.7904], [-71.8062, 21.8521], [-71.6684, 21.8335], [-71.6615, 21.7651]]] }, \"properties\": { \"name\": \"Turks and Caicos Islands\", \"id\": \"TC\" }, \"id\": \"TC\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[42.3588, 37.1087], [41.7884, 36.5973], [41.4169, 36.5148], [41.2456, 36.0735], [41.3543, 35.6403], [41.1945, 34.7689], [40.9872, 34.4289], [40.6894, 34.3322], [38.7735, 33.372], [36.8182, 32.3173], [36.3721, 32.387], [35.7875, 32.735], [35.8691, 33.4319], [35.9424, 33.6676], [36.5851, 34.2212], [36.4329, 34.6136], [35.9761, 34.6291], [35.9433, 35.2239], [35.7644, 35.5715], [35.8927, 35.9164], [36.1275, 35.8316], [36.6584, 36.8024], [37.4365, 36.6435], [38.1916, 36.9014], [38.7669, 36.6932], [39.3568, 36.6817], [40.0164, 36.8259], [40.7058, 37.0976], [41.5154, 37.0892], [42.2683, 37.2765], [42.3588, 37.1087]]] }, \"properties\": { \"name\": \"Syria\", \"id\": \"SY\" }, \"id\": \"SY\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[55.5402, -4.6931], [55.3835, -4.6092], [55.4559, -4.5586], [55.5402, -4.6931]]] }, \"properties\": { \"name\": \"Seychelles\", \"id\": \"SC\" }, \"id\": \"SC\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-63.123, 18.0688], [-63.0111, 18.0688], [-63.0231, 18.0191], [-63.123, 18.0688]]] }, \"properties\": { \"name\": \"Sint Maarten\", \"id\": \"SX\" }, \"id\": \"SX\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[31.9482, -25.9577], [32.1129, -26.8393], [31.9584, -27.3058], [31.4697, -27.2956], [31.0636, -27.1123], [30.7941, -26.7643], [30.8034, -26.4136], [31.2074, -25.8432], [31.4151, -25.7464], [31.9482, -25.9577]]] }, \"properties\": { \"name\": \"Eswatini\", \"id\": \"SZ\" }, \"id\": \"SZ\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"MultiPolygon\", \"coordinates\": [[[[24.1557, 65.8052], [23.1024, 65.7353], [21.5656, 65.4081], [21.1381, 64.8087], [21.4653, 64.3796], [20.7626, 63.8678], [19.0345, 63.2377], [18.4632, 62.8959], [17.8955, 62.8305], [17.4174, 61.7407], [17.1307, 61.5758], [17.251, 60.7009], [17.9559, 60.5897], [18.5573, 60.2537], [18.9706, 59.7572], [17.876, 59.2709], [17.4569, 58.8585], [16.6522, 58.4344], [16.5279, 57.0681], [15.9965, 56.2227], [14.782, 56.1619], [14.2152, 55.8325], [14.3417, 55.5278], [13.3212, 55.3464], [12.5923, 56.1377], [12.8835, 56.6178], [12.4214, 56.9063], [11.4493, 58.1183], [11.147, 58.9886], [11.3885, 59.0365], [11.7982, 59.29], [11.6806, 59.5923], [12.4862, 60.1067], [12.5888, 60.4508], [12.294, 61.0027], [12.8809, 61.3523], [12.1555, 61.7207], [12.3034, 62.2856], [12.2181, 63.0007], [11.9997, 63.2917], [12.6625, 63.9404], [13.9604, 64.0141], [14.0776, 64.464], [13.6501, 64.5816], [14.4798, 65.3014], [14.5432, 66.1292], [15.423, 66.4899], [16.4036, 67.055], [16.1275, 67.4259], [17.3247, 68.1039], [17.9168, 67.965], [18.3785, 68.5624], [19.9698, 68.3565], [20.6223, 69.037], [21.9975, 68.5207], [22.7823, 68.3911], [23.639, 67.9543], [23.4681, 67.45], [23.9884, 66.8106], [23.7012, 66.4808], [24.1557, 65.8052]]], [[[19.0767, 57.836], [18.6998, 57.2428], [18.1365, 57.5566], [18.5374, 57.8305], [19.0767, 57.836]]]] }, \"properties\": { \"name\": \"Sweden\", \"id\": \"SE\" }, \"id\": \"SE\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[16.5163, 46.4997], [15.6361, 46.2005], [15.6246, 45.8338], [15.3396, 45.4672], [13.8787, 45.4286], [13.5778, 45.5169], [13.7198, 45.5875], [13.3993, 46.3177], [13.6998, 46.5201], [14.5037, 46.4171], [15.0009, 46.6262], [15.9575, 46.6777], [16.0929, 46.8632], [16.5163, 46.4997]]] }, \"properties\": { \"name\": \"Slovenia\", \"id\": \"SI\" }, \"id\": \"SI\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[22.5386, 49.0727], [22.132, 48.4053], [21.4515, 48.5522], [20.4901, 48.5269], [19.8988, 48.1314], [18.7917, 48.0005], [18.7242, 47.787], [17.7619, 47.7701], [17.1475, 48.0058], [16.9531, 48.5988], [17.1884, 48.861], [17.7583, 48.888], [18.161, 49.2574], [18.8321, 49.5108], [19.4416, 49.5976], [19.802, 49.1923], [20.6161, 49.3916], [21.6397, 49.4121], [22.5386, 49.0727]]] }, \"properties\": { \"name\": \"Slovakia\", \"id\": \"SK\" }, \"id\": \"SK\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-54.1559, 5.3589], [-54.4522, 5.0135], [-54.3508, 4.0543], [-53.9904, 3.5895], [-54.2032, 3.1381], [-54.1954, 2.818], [-54.6163, 2.3266], [-55.0058, 2.593], [-56.1295, 2.2996], [-56.0198, 1.8424], [-56.4828, 1.9422], [-56.7043, 2.0363], [-57.2097, 2.8828], [-57.3036, 3.3769], [-57.5497, 3.3529], [-57.8327, 3.6761], [-58.0544, 4.1719], [-57.7111, 4.9909], [-57.3309, 5.0202], [-57.1948, 5.5484], [-56.9698, 5.9927], [-55.9395, 5.7957], [-55.8283, 5.9617], [-54.8338, 5.9883], [-54.0543, 5.8081], [-54.1559, 5.3589]]] }, \"properties\": { \"name\": \"Suriname\", \"id\": \"SR\" }, \"id\": \"SR\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[6.6602, 0.1205], [6.5243, 0.3402], [6.6868, 0.4041], [6.7498, 0.2435], [6.6602, 0.1205]]] }, \"properties\": { \"name\": \"Sao Tome and Principe\", \"id\": \"ST\" }, \"id\": \"ST\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[20.2419, 46.1086], [20.775, 45.7499], [20.7741, 45.4845], [21.4919, 45.1223], [21.3845, 44.8701], [22.7051, 44.2376], [22.421, 44.0077], [22.5546, 43.4546], [22.9767, 43.1878], [22.4667, 42.8425], [22.3442, 42.3138], [21.5625, 42.2476], [21.7529, 42.6698], [21.3907, 42.7515], [21.0569, 43.0915], [20.3445, 42.8278], [19.5517, 43.2122], [19.1943, 43.5331], [19.4882, 43.7036], [19.1517, 44.3024], [19.3568, 44.8586], [19.007, 44.8693], [19.0549, 45.5271], [18.9054, 45.9315], [19.5308, 46.1552], [20.2419, 46.1086]]] }, \"properties\": { \"name\": \"Serbia\", \"id\": \"RS\" }, \"id\": \"RS\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-56.2671, 46.8384], [-56.3869, 47.0679], [-56.2873, 47.071], [-56.3148, 46.9538], [-56.2671, 46.8384]]] }, \"properties\": { \"name\": \"Saint Pierre and Miquelon\", \"id\": \"PM\" }, \"id\": \"PM\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[41.5328, -1.6955], [40.9788, -0.8703], [40.9699, 1.378], [40.9646, 2.8145], [41.3419, 3.2016], [41.8839, 3.9779], [42.0241, 4.1377], [42.7916, 4.2922], [43.0158, 4.5634], [43.5383, 4.8404], [44.0283, 4.9509], [44.9405, 4.9119], [45.9348, 5.9972], [47.9781, 7.9969], [46.9784, 7.9969], [44.023, 8.9859], [43.4828, 9.3796], [43.1818, 9.8799], [42.8418, 10.2031], [42.6594, 10.6212], [42.9226, 10.9994], [43.2462, 11.4997], [43.853, 10.7841], [44.3865, 10.4303], [44.9427, 10.4365], [45.8168, 10.8361], [46.5652, 10.7459], [47.405, 11.1739], [48.0193, 11.1392], [48.6745, 11.3226], [48.9031, 11.2546], [50.1101, 11.5294], [50.7923, 11.9835], [51.2549, 11.8308], [51.0844, 11.3354], [51.1408, 10.6567], [50.8984, 10.2532], [50.8247, 9.428], [50.4297, 8.8452], [50.103, 8.1998], [49.3484, 6.9906], [49.0492, 6.1739], [48.6492, 5.4943], [47.9754, 4.4968], [46.879, 3.2854], [46.0511, 2.4753], [44.9201, 1.81], [44.3328, 1.3909], [43.4677, 0.6217], [41.9798, -0.9728], [41.5328, -1.6955]]] }, \"properties\": { \"name\": \"Somalia\", \"id\": \"SO\" }, \"id\": \"SO\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[12.4853, 43.9016], [12.397, 43.9344], [12.441, 43.9824], [12.5146, 43.9531], [12.4853, 43.9016]]] }, \"properties\": { \"name\": \"San Marino\", \"id\": \"SM\" }, \"id\": \"SM\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-89.3626, 14.416], [-89.0572, 14.329], [-88.4491, 13.851], [-88.151, 13.9872], [-87.7153, 13.8128], [-87.8143, 13.3991], [-87.9308, 13.1807], [-88.5121, 13.1838], [-89.2776, 13.4781], [-89.8043, 13.5602], [-90.0952, 13.7364], [-89.8726, 14.0454], [-89.3626, 14.416]]] }, \"properties\": { \"name\": \"El Salvador\", \"id\": \"SV\" }, \"id\": \"SV\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-10.2832, 8.4852], [-10.6474, 7.7594], [-11.2678, 7.2325], [-11.5075, 6.9067], [-11.7334, 7.0887], [-12.4856, 7.3861], [-12.5104, 7.6658], [-12.8809, 7.8566], [-13.2284, 8.696], [-13.2928, 9.0494], [-12.7559, 9.3734], [-12.5016, 9.8622], [-11.911, 9.9931], [-11.2056, 9.9776], [-10.6905, 9.3144], [-10.5005, 8.6876], [-10.2832, 8.4852]]] }, \"properties\": { \"name\": \"Sierra Leone\", \"id\": \"SL\" }, \"id\": \"SL\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"MultiPolygon\", \"coordinates\": [[[[161.7152, -10.3873], [162.1054, -10.4539], [162.1236, -10.8245], [161.5381, -10.5666], [161.7152, -10.3873]]], [[[159.7505, -9.2727], [159.9707, -9.4334], [160.3547, -9.4214], [160.6254, -9.5888], [160.6494, -9.9288], [159.8535, -9.7916], [159.6218, -9.5319], [159.7505, -9.2727]]], [[[160.7493, -8.3139], [160.9979, -8.6122], [161.2584, -9.3171], [160.8736, -9.1568], [160.5904, -8.3729], [160.7493, -8.3139]]], [[[159.8793, -8.5341], [158.944, -8.0409], [159.1095, -7.9037], [159.8433, -8.3272], [159.8793, -8.5341]]]] }, \"properties\": { \"name\": \"Solomon Islands\", \"id\": \"SB\" }, \"id\": \"SB\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-5.6923, -15.9977], [-5.775, -15.9568], [-5.7078, -15.9062], [-5.6923, -15.9977]]] }, \"properties\": { \"name\": \"Saint Helena\", \"id\": \"SH\" }, \"id\": \"SH\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-37.1034, -54.0658], [-36.3264, -54.2509], [-35.7986, -54.7636], [-36.0855, -54.8666], [-37.1034, -54.0658]]] }, \"properties\": { \"name\": \"South Georgia and South Sandwich Islands\", \"id\": \"GS\" }, \"id\": \"GS\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[103.9697, 1.3314], [103.8201, 1.2653], [103.6501, 1.3257], [103.8179, 1.4473], [103.9697, 1.3314]]] }, \"properties\": { \"name\": \"Singapore\", \"id\": \"SG\" }, \"id\": \"SG\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-12.2807, 14.8089], [-12.0193, 14.2065], [-12.0543, 13.633], [-11.6349, 13.3698], [-11.3903, 12.9419], [-11.3894, 12.4043], [-12.2912, 12.328], [-13.0828, 12.6334], [-13.7294, 12.6738], [-15.1962, 12.68], [-15.5748, 12.4904], [-16.7119, 12.3551], [-16.7634, 13.064], [-16.6488, 13.1541], [-15.8343, 13.1563], [-15.5096, 13.5864], [-16.5623, 13.5873], [-17.168, 14.6407], [-17.1471, 14.9221], [-16.5352, 15.8383], [-16.4411, 16.2045], [-16.1683, 16.5472], [-15.6208, 16.5068], [-15.1128, 16.6448], [-14.3, 16.5805], [-13.8685, 16.1481], [-13.4095, 16.0593], [-13.2579, 15.7002], [-12.8584, 15.2426], [-12.2807, 14.8089]]] }, \"properties\": { \"name\": \"Senegal\", \"id\": \"SN\" }, \"id\": \"SN\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[34.078, 9.4613], [34.0945, 8.5824], [33.9533, 8.4435], [33.2342, 8.3964], [33.0127, 7.9516], [33.2262, 7.7608], [33.6661, 7.6711], [34.0643, 7.2259], [34.7106, 6.6604], [35.0821, 5.6731], [35.2681, 5.4925], [33.9759, 4.2203], [33.4894, 3.7551], [32.8382, 3.7986], [32.3358, 3.7063], [32.0996, 3.5291], [31.7982, 3.8026], [31.4799, 3.6805], [31.1523, 3.7857], [30.8385, 3.4905], [30.5083, 3.8359], [30.1949, 3.9819], [29.6768, 4.5869], [29.1513, 4.3881], [28.7269, 4.5048], [28.192, 4.3503], [27.7881, 4.6446], [27.4032, 5.1094], [27.0836, 5.777], [26.5141, 6.0691], [26.3619, 6.6355], [25.8891, 7.0647], [25.3809, 7.3333], [25.2472, 7.7244], [24.8535, 8.1376], [24.2915, 8.2912], [24.1473, 8.6654], [24.5321, 8.8869], [24.7852, 9.7747], [25.067, 10.2936], [25.7981, 10.4206], [25.8913, 10.2026], [26.5514, 9.5257], [27.0743, 9.614], [27.8857, 9.5998], [28.0491, 9.3286], [28.8445, 9.3259], [28.9995, 9.61], [29.4731, 9.7685], [29.6054, 10.065], [30.0031, 10.2772], [30.7395, 9.7427], [31.2247, 9.7991], [31.6548, 10.2213], [31.9331, 10.6625], [32.4041, 11.0576], [32.3353, 11.7158], [32.0721, 12.0066], [32.7366, 12.0097], [33.1991, 12.2174], [33.0731, 11.5916], [33.172, 10.8503], [33.892, 10.1991], [34.078, 9.4613]]] }, \"properties\": { \"name\": \"South Sudan\", \"id\": \"SS\" }, \"id\": \"SS\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[36.8714, 21.9968], [36.9269, 21.5867], [37.1507, 21.1037], [37.2274, 20.5568], [37.2483, 19.5821], [37.4711, 18.8203], [37.9217, 18.5558], [38.6093, 18.0049], [38.2537, 17.5845], [37.7823, 17.458], [37.4112, 17.0616], [37.0091, 17.059], [36.9136, 16.2964], [36.4267, 15.132], [36.5243, 14.2567], [36.3907, 13.6259], [36.2123, 13.2712], [36.1075, 12.7266], [35.5961, 12.5375], [35.1123, 11.8166], [34.9312, 10.8649], [34.5716, 10.88], [34.2756, 10.528], [34.2915, 10.1249], [34.078, 9.4613], [33.892, 10.1991], [33.172, 10.8503], [33.0731, 11.5916], [33.1991, 12.2174], [32.7366, 12.0097], [32.0721, 12.0066], [32.3353, 11.7158], [32.4041, 11.0576], [31.9331, 10.6625], [31.6548, 10.2213], [31.2247, 9.7991], [30.7395, 9.7427], [30.0031, 10.2772], [29.6054, 10.065], [29.4731, 9.7685], [28.9995, 9.61], [28.8445, 9.3259], [28.0491, 9.3286], [27.8857, 9.5998], [27.0743, 9.614], [26.5514, 9.5257], [25.8913, 10.2026], [25.7981, 10.4206], [25.067, 10.2936], [24.7852, 9.7747], [24.5321, 8.8869], [24.1473, 8.6654], [23.5374, 8.8159], [23.6461, 9.8231], [23.2559, 10.4579], [22.86, 10.9195], [22.9226, 11.3448], [22.5564, 11.6697], [22.3522, 12.6604], [21.8253, 12.7905], [22.2283, 13.3294], [22.1076, 13.7302], [22.5098, 14.1275], [22.3815, 14.5505], [22.6709, 14.7223], [22.9323, 15.1622], [23.105, 15.7024], [23.9835, 15.7801], [23.9822, 17.2663], [23.9804, 19.4968], [23.9804, 19.9958], [24.9796, 20.0024], [24.9805, 21.9959], [27.2723, 21.9955], [30.3285, 21.9951], [32.6061, 21.9959], [34.2467, 21.9964], [36.8714, 21.9968]]] }, \"properties\": { \"name\": \"Sudan\", \"id\": \"SD\" }, \"id\": \"SD\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[46.5314, 29.0964], [47.4334, 28.9895], [47.6713, 28.5331], [48.4424, 28.5429], [48.9067, 27.6289], [49.4052, 27.1811], [49.9862, 26.829], [50.214, 26.3084], [50.0315, 26.1108], [50.558, 25.0868], [50.8043, 24.7894], [51.2682, 24.6074], [51.5683, 24.286], [51.5927, 24.0787], [52.555, 22.933], [55.1043, 22.6214], [55.186, 22.704], [55.641, 22.0017], [54.9774, 19.9958], [53.667, 19.559], [51.9775, 18.9961], [49.0421, 18.582], [48.172, 18.1567], [47.5795, 17.4483], [47.4418, 17.1118], [46.9758, 16.9533], [46.6819, 17.2685], [46.3104, 17.2312], [45.4066, 17.32], [45.1483, 17.4274], [44.1557, 17.3986], [43.9169, 17.3249], [43.418, 17.5162], [43.1911, 17.3595], [43.1649, 16.6892], [42.7992, 16.3718], [42.6989, 16.7372], [42.3833, 17.1225], [42.294, 17.435], [41.7498, 17.8855], [41.2296, 18.6783], [41.1159, 19.0822], [40.7591, 19.7556], [40.0808, 20.2661], [39.6138, 20.5178], [39.0936, 21.3101], [38.9879, 21.8819], [39.0958, 22.3928], [38.9413, 22.882], [38.4641, 23.712], [37.9195, 24.1852], [37.5431, 24.2918], [37.1808, 24.82], [37.1489, 25.291], [36.7627, 25.7513], [36.2496, 26.5947], [35.5815, 27.4323], [35.1807, 28.0347], [34.616, 28.1483], [34.7798, 28.5074], [34.9507, 29.3535], [36.0156, 29.1906], [36.4759, 29.4951], [36.7551, 29.8662], [37.4694, 29.9949], [37.6336, 30.3132], [37.9803, 30.5], [36.9584, 31.4917], [38.9622, 31.9951], [39.1455, 32.1247], [40.3693, 31.9391], [42.0743, 31.0802], [42.8578, 30.4952], [44.7163, 29.1937], [46.3565, 29.0636], [46.5314, 29.0964]]] }, \"properties\": { \"name\": \"Saudi Arabia\", \"id\": \"SA\" }, \"id\": \"SA\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-8.6834, 27.6565], [-8.6834, 27.2858], [-8.6821, 25.9954], [-10.5624, 25.9954], [-12.0164, 25.9954], [-12.0235, 23.4674], [-12.6203, 23.2712], [-13.0316, 23], [-13.0944, 22.4958], [-13.0163, 21.3341], [-15.0018, 21.3314], [-16.9647, 21.3292], [-17.0481, 20.8063], [-16.9309, 21.9001], [-16.5143, 22.3333], [-16.2103, 23.0981], [-15.5864, 24.0729], [-15.0388, 24.5488], [-14.856, 24.8715], [-14.7949, 25.4041], [-14.4138, 26.2538], [-13.5758, 26.7349], [-13.1774, 27.652], [-8.6834, 27.6565]]] }, \"properties\": { \"name\": \"Western Sahara\", \"id\": \"EH\" }, \"id\": \"EH\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[30.51, -1.0674], [30.8128, -1.5632], [30.8287, -2.3387], [30.5535, -2.3999], [29.9303, -2.3396], [29.8682, -2.7164], [29.3901, -2.8087], [29.0146, -2.7204], [28.8765, -2.4004], [29.1064, -2.2335], [29.1295, -1.8601], [29.577, -1.3878], [30.1016, -1.3688], [30.51, -1.0674]]] }, \"properties\": { \"name\": \"Rwanda\", \"id\": \"RW\" }, \"id\": \"RW\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"MultiPolygon\", \"coordinates\": [[[[-178.8765, 71.5769], [-177.5322, 71.2631], [-177.8218, 71.0675], [-179.5066, 70.9235], [-180, 70.993], [-180, 71.1843], [-180, 71.3998], [-180, 71.5379], [-178.8765, 71.5769]]], [[[178.8614, 70.8265], [178.8911, 71.2311], [180, 71.5379], [180, 70.993], [178.8614, 70.8265]]], [[[60.4505, 69.935], [59.5783, 69.7385], [58.473, 70.2668], [59.0052, 70.4652], [60.4505, 69.935]]], [[[169.201, 69.5805], [167.789, 69.8369], [168.358, 70.0157], [169.375, 69.8826], [169.201, 69.5805]]], [[[50.265, 69.1857], [49.6262, 68.8596], [48.667, 68.7331], [48.279, 69.0403], [48.6315, 69.436], [49.225, 69.5113], [50.265, 69.1857]]], [[[-179.7985, 68.9404], [-178.8739, 68.7542], [-177.4075, 68.2451], [-175.3451, 67.678], [-174.4476, 67.1031], [-173.6797, 67.1449], [-172.6405, 66.9249], [-171.7956, 66.9318], [-170.192, 66.2014], [-170.6663, 65.6214], [-172.2115, 65.4252], [-172.2133, 65.0482], [-172.9239, 64.705], [-173.0092, 64.2975], [-173.7298, 64.3646], [-174.318, 64.6376], [-175.3951, 64.8025], [-175.8538, 65.0109], [-176.0933, 65.471], [-177.0563, 65.6137], [-178.3103, 65.4849], [-178.8794, 65.9364], [-179.7283, 65.8039], [-179.3521, 65.5167], [-180, 65.0672], [-180, 65.312], [-180, 65.5569], [-180, 65.8014], [-180, 66.0462], [-180, 66.291], [-180, 66.5359], [-180, 66.7807], [-180, 67.0252], [-180, 67.2701], [-180, 67.5149], [-180, 67.7597], [-180, 68.0045], [-180, 68.2491], [-180, 68.4939], [-180, 68.7387], [-180, 68.9835], [-179.7985, 68.9404]]], [[[163.635, 58.6033], [163.7611, 59.015], [164.6156, 58.8856], [163.635, 58.6033]]], [[[21.2358, 55.2641], [22.8311, 54.8384], [22.7663, 54.3568], [19.6045, 54.4591], [19.9747, 54.9212], [20.5202, 54.9949], [20.8998, 55.2867], [20.9579, 55.279], [21.2358, 55.2641]]], [[[142.761, 54.3939], [142.9181, 53.7942], [143.2235, 53.2961], [143.3234, 52.6136], [143.1556, 52.0838], [143.4552, 51.4715], [143.8161, 50.2825], [144.272, 49.3113], [143.105, 49.1988], [142.5741, 48.0719], [142.5568, 47.7381], [143.0056, 47.2228], [143.2821, 46.5592], [142.5781, 46.7008], [142.2088, 46.0891], [141.8302, 46.4508], [142.0388, 47.1402], [141.9642, 47.5872], [142.1817, 48.0133], [141.8661, 48.75], [142.1422, 49.5692], [142.0712, 50.5149], [142.2066, 51.2225], [141.7223, 51.7363], [141.8235, 53.3394], [142.5262, 53.4475], [142.761, 54.3939]]], [[[148.5995, 45.3176], [147.9137, 44.9904], [147.7694, 45.1906], [148.5995, 45.3176]]], [[[96.5265, 81.0755], [97.8316, 80.7983], [97.1751, 80.241], [94.565, 80.1261], [93.8725, 80.0102], [91.5239, 80.3584], [93.2626, 80.7912], [93.0651, 80.9885], [95.8008, 81.2804], [96.5265, 81.0755]]], [[[54.719, 81.1159], [57.694, 80.7923], [55.7124, 80.6372], [54.0665, 80.8136], [54.719, 81.1159]]], [[[62.168, 80.8347], [61.0511, 80.4186], [59.3044, 80.5216], [59.5921, 80.8165], [62.168, 80.8347]]], [[[97.6744, 80.1582], [100.0613, 79.7772], [99.4394, 78.8341], [97.5555, 78.8266], [94.6524, 79.1275], [93.0708, 79.4953], [94.9871, 80.0968], [97.6744, 80.1582]]], [[[102.8848, 79.254], [105.146, 78.8188], [105.3125, 78.4999], [103.7194, 78.2582], [101.2043, 78.192], [100.2841, 78.6792], [101.5905, 79.3504], [102.8848, 79.254]]], [[[130.6871, 42.3027], [130.5269, 42.5353], [130.5771, 42.8118], [131.0684, 42.9024], [131.262, 43.4333], [131.2553, 44.0716], [131.0822, 44.9101], [131.9775, 45.2439], [132.9359, 45.03], [133.1858, 45.4947], [133.8614, 46.2475], [134.1677, 47.3022], [134.7523, 47.7155], [134.5636, 48.3219], [134.2933, 48.3733], [133.4686, 48.0972], [133.1441, 48.1057], [132.5617, 47.7683], [131.0027, 47.6915], [130.712, 48.1279], [130.8043, 48.3414], [130.1962, 48.8916], [129.5339, 49.3235], [128.5267, 49.5943], [127.9998, 49.5685], [127.5027, 49.8735], [127.5901, 50.2091], [126.9247, 51.1002], [126.313, 52.3997], [125.649, 53.0422], [124.8122, 53.1339], [123.6079, 53.5465], [122.338, 53.485], [120.704, 53.1718], [120.0945, 52.7872], [120.6561, 52.5666], [120.7497, 52.0965], [120.067, 51.6007], [119.1921, 50.3797], [119.26, 50.0664], [118.4517, 49.8444], [117.8733, 49.5135], [116.6832, 49.8238], [116.1346, 50.0109], [115.2743, 49.9489], [114.743, 50.2337], [114.2969, 50.2743], [113.1641, 49.7971], [113.0557, 49.6162], [111.3366, 49.3559], [110.8279, 49.1661], [110.1997, 49.1704], [109.2365, 49.3348], [108.6137, 49.3228], [108.034, 49.594], [107.9479, 49.9247], [107.2332, 49.9893], [106.7112, 50.3125], [106.218, 50.3045], [105.3835, 50.4736], [103.6328, 50.1387], [102.6833, 50.3871], [102.2883, 50.585], [102.1116, 51.3534], [101.3814, 51.4526], [100.4687, 51.7261], [98.8485, 52.0701], [97.947, 51.3483], [97.8254, 50.9852], [98.2795, 50.5333], [98.1032, 50.0779], [97.2088, 49.7308], [96.986, 49.8828], [95.8518, 50.0129], [95.5229, 49.9112], [94.6147, 50.0237], [94.2511, 50.5564], [91.8044, 50.6936], [89.644, 49.903], [89.6542, 49.7175], [88.8317, 49.4485], [88.1925, 49.4518], [87.8143, 49.1624], [87.3229, 49.0858], [86.6144, 49.6098], [86.1807, 49.4993], [85.21, 49.6648], [84.9893, 50.0615], [84.2578, 50.2883], [83.9453, 50.7746], [83.3571, 50.9945], [82.4938, 50.7275], [81.4657, 50.7397], [80.8771, 51.2815], [79.9862, 50.7746], [79.4687, 51.493], [78.4757, 52.6385], [77.7042, 53.3791], [76.5758, 53.9424], [76.2664, 54.312], [74.4518, 53.6472], [73.2857, 53.5984], [73.3993, 53.8115], [72.9141, 54.1073], [71.0933, 54.2123], [71.1856, 54.5994], [70.7382, 55.3052], [70.1824, 55.1625], [68.9773, 55.3895], [68.2062, 55.1609], [68.0739, 54.9596], [66.2225, 54.6673], [65.4767, 54.6233], [65.1576, 54.3643], [64.4611, 54.3841], [63.0739, 54.1053], [61.9287, 53.9464], [61.3339, 54.0492], [60.9797, 53.6217], [61.1994, 53.2872], [62.0148, 53.1079], [61.974, 52.9437], [61.0476, 52.9725], [60.8021, 52.7448], [60.9375, 52.2805], [60.0657, 51.9764], [60.4647, 51.6513], [61.3632, 51.442], [61.5851, 51.2298], [61.3894, 50.8609], [60.6379, 50.6638], [59.9552, 50.7992], [59.8122, 50.5819], [58.8836, 50.6945], [58.3594, 51.0638], [57.8387, 51.0917], [57.4423, 50.8889], [57.0117, 51.0651], [56.4915, 51.0196], [55.7977, 50.6021], [55.5424, 50.6017], [54.727, 50.9981], [54.4216, 50.7804], [54.0416, 51.1153], [53.3381, 51.4824], [52.571, 51.4817], [52.3309, 51.6812], [51.6091, 51.4839], [50.7941, 51.7292], [50.2468, 51.2895], [49.498, 51.0835], [48.8086, 50.6012], [48.8432, 50.0131], [48.4344, 49.8284], [47.706, 50.378], [47.3264, 50.2734], [46.8022, 49.367], [47.0144, 49.0984], [46.7028, 48.8055], [46.661, 48.4124], [47.0042, 48.2846], [47.0934, 47.9477], [48.1099, 47.7452], [48.9595, 46.7744], [48.6102, 46.5663], [49.2321, 46.3372], [48.1592, 45.7371], [47.5244, 45.6017], [46.7529, 44.4205], [47.2301, 44.1923], [47.5089, 43.5096], [47.4632, 43.0351], [48.5729, 41.8446], [47.8609, 41.2129], [47.2612, 41.315], [46.7494, 41.8126], [46.4298, 41.8907], [45.6388, 42.205], [45.7275, 42.4749], [45.1602, 42.6751], [44.5059, 42.7488], [43.9573, 42.5664], [43.7824, 42.747], [42.4192, 43.2242], [41.5807, 43.2193], [40.6481, 43.534], [39.9782, 43.42], [38.7171, 44.2882], [38.1814, 44.4196], [37.8516, 44.6988], [37.4112, 44.7352], [36.9411, 45.2896], [37.6474, 45.3771], [37.9332, 46.0016], [38.1836, 46.0948], [37.9679, 46.6182], [39.2933, 47.1056], [38.2142, 47.0914], [38.2875, 47.5592], [38.9005, 47.8553], [39.7359, 47.8447], [39.9609, 48.238], [39.6866, 49.0079], [40.0701, 49.2003], [39.7807, 49.5721], [39.1748, 49.8559], [38.2586, 50.0524], [38.0469, 49.9201], [37.4228, 50.4115], [36.3059, 50.2805], [35.4115, 50.5398], [35.3121, 51.0438], [34.2809, 51.3117], [34.3976, 51.7804], [33.7353, 52.3448], [32.508, 52.3084], [31.7636, 52.1012], [31.5771, 52.3122], [31.4178, 53.196], [32.1422, 53.0913], [32.7042, 53.3363], [31.792, 54.0558], [31.4036, 54.1959], [31.1213, 54.6484], [30.9069, 55.5699], [30.2335, 55.8452], [29.4824, 55.6845], [29.375, 55.9386], [28.7948, 55.9426], [28.1481, 56.143], [27.8063, 56.867], [27.797, 57.3169], [27.3517, 57.5282], [27.753, 57.8411], [27.4272, 58.7331], [28.0127, 59.4842], [28.014, 59.7248], [28.9471, 59.8289], [29.0692, 60.1915], [28.6506, 60.611], [27.7978, 60.5362], [29.6902, 61.5461], [31.2855, 62.5679], [31.5341, 62.8855], [31.1807, 63.2082], [30.0555, 63.689], [30.5038, 64.0205], [30.1083, 64.3661], [30.0728, 64.7649], [29.604, 64.9685], [29.9032, 66.0911], [29.0869, 66.9709], [29.9414, 67.5475], [29.3439, 68.062], [28.4708, 68.4883], [28.9657, 69.0219], [30.8696, 69.7834], [31.9846, 69.9536], [32.9417, 69.7519], [32.3775, 69.4791], [33.6843, 69.3102], [35.858, 69.1917], [40.3809, 67.8318], [40.9663, 67.7135], [41.1887, 66.8262], [40.5216, 66.4466], [39.2889, 66.1321], [38.3975, 66.0644], [35.5136, 66.3958], [34.8247, 66.6111], [32.4636, 66.9163], [33.5667, 66.321], [34.7865, 65.8645], [34.4065, 65.3957], [34.8034, 64.986], [34.8695, 64.5601], [35.6472, 64.3783], [36.365, 64.0028], [37.4423, 63.8135], [38.0708, 64.0259], [37.9537, 64.3202], [37.1835, 64.4085], [36.5283, 64.8473], [36.883, 65.1724], [38.0096, 64.8788], [39.7581, 64.577], [40.281, 64.998], [39.8167, 65.5979], [41.4759, 66.1235], [42.2106, 66.5197], [44.0971, 66.2351], [44.4886, 66.6719], [44.292, 67.0996], [43.7824, 67.2545], [44.2254, 67.9956], [44.0483, 68.5489], [45.8922, 68.4797], [46.6903, 67.8489], [45.5287, 67.7577], [44.9396, 67.4776], [45.9859, 66.853], [46.6908, 66.8255], [47.7091, 67.045], [47.8746, 67.5841], [48.8778, 67.7315], [50.839, 68.3498], [52.5502, 68.5924], [53.8019, 68.9959], [53.9679, 68.2273], [54.5614, 68.273], [56.0436, 68.649], [57.1267, 68.554], [58.9191, 69.0039], [59.8975, 68.422], [60.9335, 68.9868], [60.1704, 69.5909], [61.0161, 69.8515], [63.3616, 69.6753], [68.5041, 68.3485], [69.1406, 68.9506], [68.5427, 68.9671], [68.006, 69.48], [67.0645, 69.6937], [66.9265, 70.0142], [67.2847, 70.7386], [66.6664, 70.9006], [66.9176, 71.2824], [68.2693, 71.6828], [69.039, 72.67], [69.6449, 72.8975], [71.5003, 72.9137], [72.8121, 72.6915], [72.6243, 72.0794], [71.9118, 71.5478], [72.7317, 70.823], [72.5297, 70.1724], [72.5275, 69.0805], [73.548, 68.5744], [73.1521, 67.8651], [72.5945, 67.587], [71.5514, 66.7605], [70.9393, 66.5481], [69.877, 66.8455], [69.1943, 66.5787], [70.3396, 66.3423], [71.9172, 66.2467], [72.4174, 66.5607], [73.7922, 66.9953], [74.0745, 67.4141], [74.7696, 67.7663], [74.3914, 68.4206], [74.5796, 68.7511], [76.4591, 68.9784], [77.2385, 68.4697], [77.6509, 68.9029], [76.001, 69.2349], [74.8149, 69.0907], [73.7757, 69.1983], [73.56, 69.7072], [74.3111, 70.6536], [73.0864, 71.4449], [73.6719, 71.845], [75.7413, 72.2962], [76.0325, 71.9103], [78.4828, 72.395], [79.422, 72.3808], [80.7626, 72.0892], [81.511, 71.7463], [82.9861, 71.7487], [82.1835, 72.2376], [80.827, 72.4882], [80.5096, 73.0861], [80.5833, 73.5684], [83.5449, 73.6665], [86.5913, 73.8943], [86.6513, 74.6824], [87.6713, 75.1296], [90.1851, 75.591], [93.5498, 75.854], [94.5756, 76.1517], [96.879, 75.9311], [100.3223, 76.479], [100.9899, 76.9904], [103.1312, 77.6265], [104.0146, 77.7304], [105.8944, 77.4889], [104.9121, 77.1748], [107.4299, 76.9265], [108.0278, 76.7185], [111.1151, 76.723], [112.6194, 76.3836], [113.8712, 75.856], [113.6137, 75.293], [111.8683, 74.7401], [109.8402, 74.3219], [108.1996, 73.6941], [107.2709, 73.621], [106.4782, 73.1394], [107.7503, 73.1731], [109.8553, 73.4726], [110.2614, 74.0174], [112.1471, 73.7089], [114.0607, 73.5846], [115.3378, 73.7025], [118.4504, 73.5897], [118.4304, 73.2466], [119.7505, 72.9792], [123.1605, 72.955], [123.6222, 73.1933], [123.3052, 73.5329], [124.3883, 73.7549], [125.617, 73.5207], [127.7406, 73.4817], [128.8885, 73.1902], [129.4118, 72.3156], [128.3589, 72.0883], [129.7621, 71.1195], [131.1572, 70.7422], [131.562, 70.9011], [132.5621, 71.8952], [134.1029, 71.3789], [135.8847, 71.6306], [137.3153, 71.3594], [138.1183, 71.5663], [139.695, 71.7003], [139.6014, 72.496], [142.0614, 72.7208], [145.4856, 72.5422], [146.594, 72.3025], [148.402, 72.312], [149.5015, 72.1644], [150.5997, 71.5201], [151.5825, 71.2871], [152.5089, 70.8345], [153.7944, 70.88], [155.8953, 71.0955], [158.0371, 71.0394], [159.3506, 70.7908], [160.0062, 70.3096], [159.8326, 69.7849], [161.5367, 69.3796], [162.3757, 69.6491], [164.1597, 69.7192], [164.5135, 69.6091], [166.8204, 69.4995], [167.6283, 69.7403], [168.303, 69.2716], [169.3106, 69.0796], [169.6098, 68.7862], [170.5375, 68.8254], [170.9952, 69.0454], [170.5824, 69.5834], [170.4869, 70.1076], [172.5595, 69.9682], [173.2772, 69.8238], [176.1075, 69.8604], [176.9243, 69.646], [178.8485, 69.3872], [180, 68.9835], [180, 65.0672], [178.5196, 64.6029], [177.4671, 64.7368], [177.433, 64.4445], [178.6501, 63.9653], [178.7065, 63.5216], [179.3324, 63.1902], [179.5703, 62.6875], [179.1206, 62.3204], [177.3513, 62.5874], [175.2681, 62.1025], [174.5144, 61.8237], [173.6235, 61.7161], [172.8564, 61.4693], [172.3926, 61.0618], [170.6081, 60.435], [169.9827, 60.067], [169.2267, 60.5959], [168.1374, 60.5739], [166.9642, 60.3069], [166.3521, 60.4847], [165.0843, 60.0985], [163.7802, 60.041], [163.41, 59.8349], [163.2728, 59.3026], [162.1418, 58.4475], [161.9602, 58.0768], [162.4671, 57.7661], [163.2138, 57.6869], [162.7792, 57.3577], [162.8027, 56.8115], [163.2564, 56.6881], [163.3354, 56.2325], [162.5284, 56.2606], [162.085, 56.0897], [161.7294, 55.358], [162.1058, 54.7521], [161.7258, 54.533], [160.7728, 54.5414], [160.0746, 54.1892], [159.8437, 53.7837], [159.8975, 53.3807], [158.6088, 52.8735], [158.4637, 52.3049], [158.1037, 51.8095], [156.7476, 50.9692], [156.5003, 51.475], [156.3645, 52.5093], [156.0986, 53.0065], [155.6201, 54.8646], [155.5549, 55.3484], [155.9828, 56.6952], [156.7285, 57.1522], [157.4503, 57.7994], [158.2102, 58.0253], [159.0367, 58.4239], [159.8473, 59.1271], [161.7534, 60.1522], [162.0037, 60.4201], [162.9732, 60.7828], [163.71, 60.9168], [164.0052, 61.3439], [164.2556, 62.6966], [163.3318, 62.5508], [163.0091, 61.7915], [162.3926, 61.6621], [160.7666, 60.7533], [159.8832, 61.2917], [160.3174, 61.7933], [159.5525, 61.7194], [159.0767, 61.9223], [158.07, 61.7536], [157.4694, 61.7989], [156.6801, 61.4806], [156.63, 61.2724], [155.8532, 60.7772], [154.9707, 60.3766], [154.2929, 59.8333], [154.5827, 59.5401], [155.1669, 59.3601], [154.011, 59.0756], [153.3611, 59.2147], [152.8822, 58.9391], [151.99, 59.1601], [151.4857, 59.5241], [150.4572, 59.5907], [149.6427, 59.7705], [149.205, 59.4882], [147.8746, 59.3881], [147.5146, 59.2687], [146.4444, 59.4305], [145.9317, 59.1983], [145.5544, 59.4136], [143.192, 59.3701], [142.0255, 58.9997], [141.7547, 58.7453], [140.6849, 58.2122], [140.447, 57.8136], [140.0022, 57.6875], [138.6621, 56.9655], [137.6913, 56.1395], [136.175, 55.3522], [135.2623, 54.9434], [135.8514, 54.5838], [136.7973, 54.6209], [136.6828, 53.9313], [137.1555, 53.8217], [137.3282, 53.5389], [138.2923, 53.5924], [138.6608, 53.7449], [138.6958, 54.3199], [139.7075, 54.2771], [140.3471, 53.8126], [141.4022, 53.184], [141.1696, 52.3684], [141.4853, 52.1786], [140.6876, 51.2322], [140.4763, 50.546], [140.5171, 49.596], [140.1704, 48.5238], [139.3728, 47.8873], [139.0012, 47.3835], [138.5866, 47.0572], [138.3367, 46.5432], [137.6855, 45.8183], [136.8035, 45.1711], [136.1421, 44.4893], [135.8745, 44.3734], [135.1309, 43.5256], [133.7092, 42.83], [133.1601, 42.6969], [132.4813, 42.9099], [132.3344, 43.2388], [131.7946, 43.2553], [131.1586, 42.6258], [130.6871, 42.3027]]], [[[67.7654, 76.2376], [66.2824, 75.9837], [61.3561, 75.3149], [60.2224, 74.7965], [58.5347, 74.4988], [58.4415, 74.1288], [56.9638, 73.3665], [55.0067, 73.4539], [53.7629, 73.7662], [54.6427, 73.9595], [57.0876, 75.3837], [58.8814, 75.8547], [62.9714, 76.2367], [65.8629, 76.6133], [67.5351, 77.0077], [68.4859, 76.9338], [68.9, 76.5729], [67.7654, 76.2376]]], [[[140.0488, 75.829], [140.9442, 75.7004], [142.4605, 75.9035], [143.6856, 75.8636], [145.2552, 75.5857], [144.0199, 75.0446], [141.9873, 74.9913], [139.0993, 74.6566], [138.0921, 74.7974], [137.0064, 75.235], [137.5013, 75.9097], [138.8139, 76.1996], [140.0488, 75.829]]], [[[146.7951, 75.3709], [150.1039, 75.2193], [150.6463, 74.9445], [149.5969, 74.7725], [148.0926, 74.8258], [146.1483, 75.1984], [146.7951, 75.3709]]], [[[113.3873, 74.4005], [112.7823, 74.0951], [111.6428, 74.2729], [112.0845, 74.549], [113.3873, 74.4005]]], [[[142.1848, 73.8958], [143.3438, 73.5687], [143.1934, 73.2206], [140.6627, 73.4519], [141.0849, 73.8658], [142.1848, 73.8958]]], [[[55.32, 73.3083], [56.4293, 73.2011], [55.356, 72.4651], [55.2978, 71.9354], [57.1458, 70.589], [54.6009, 70.68], [53.7225, 70.8145], [53.3638, 71.5416], [51.8124, 71.4912], [51.5825, 72.0712], [52.6221, 72.3009], [53.7531, 73.2932], [55.32, 73.3083]]]] }, \"properties\": { \"name\": \"Russia\", \"id\": \"RU\" }, \"id\": \"RU\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[28.2124, 45.4503], [28.7606, 45.2341], [29.2236, 45.4028], [29.7061, 45.2599], [29.5574, 44.8435], [29.0483, 44.7574], [28.6452, 44.2958], [28.5853, 43.7422], [27.0867, 44.1675], [26.2158, 44.0072], [25.4972, 43.6708], [23.2244, 43.8741], [22.7051, 44.2376], [21.3845, 44.8701], [21.4919, 45.1223], [20.7741, 45.4845], [20.775, 45.7499], [20.2419, 46.1086], [21.1519, 46.3044], [22.2905, 47.7279], [22.8764, 47.9472], [23.2027, 48.0844], [24.8935, 47.7177], [26.1625, 47.9925], [26.6189, 48.2597], [26.9806, 48.155], [27.3366, 47.6396], [28.0717, 46.9786], [28.2444, 46.4513], [28.0997, 45.9728], [28.2124, 45.4503]]] }, \"properties\": { \"name\": \"Romania\", \"id\": \"RO\" }, \"id\": \"RO\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[55.7972, -21.3395], [55.3627, -21.2738], [55.3112, -20.904], [55.6618, -20.9062], [55.7972, -21.3395]]] }, \"properties\": { \"name\": \"Reunion\", \"id\": \"RE\" }, \"id\": \"RE\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[51.2682, 24.6074], [50.8043, 24.7894], [50.763, 25.4445], [51.0032, 25.9816], [51.2624, 26.1534], [51.543, 25.9022], [51.4853, 25.5249], [51.602, 25.148], [51.2682, 24.6074]]] }, \"properties\": { \"name\": \"Qatar\", \"id\": \"QA\" }, \"id\": \"QA\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-149.3215, -17.6902], [-149.579, -17.7351], [-149.6114, -17.5318], [-149.3792, -17.5224], [-149.3215, -17.6902]]] }, \"properties\": { \"name\": \"French Polynesia\", \"id\": \"PF\" }, \"id\": \"PF\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-58.1598, -20.1645], [-57.8303, -20.9981], [-57.9856, -22.0461], [-56.9374, -22.2712], [-56.5239, -22.1025], [-55.8492, -22.3076], [-55.6541, -22.8105], [-55.3662, -23.9913], [-54.6254, -23.8124], [-54.2418, -24.0472], [-54.4731, -25.2204], [-54.6158, -25.576], [-54.7552, -26.533], [-55.1358, -26.9312], [-55.4266, -27.0093], [-55.7147, -27.415], [-56.0673, -27.3076], [-56.3705, -27.5375], [-57.1118, -27.4701], [-58.6186, -27.1323], [-58.1914, -26.6302], [-58.2031, -26.3816], [-57.8906, -26.0065], [-57.5872, -25.4051], [-57.8216, -25.1365], [-58.3654, -24.9594], [-59.373, -24.4538], [-59.8924, -24.0934], [-61.0329, -23.7556], [-61.7984, -23.1821], [-62.3726, -22.439], [-62.6509, -22.2339], [-62.2767, -21.066], [-62.2763, -20.5627], [-61.917, -20.0553], [-61.7569, -19.6451], [-60.0073, -19.2976], [-59.0905, -19.286], [-58.1803, -19.8178], [-58.1598, -20.1645]]] }, \"properties\": { \"name\": \"Paraguay\", \"id\": \"PY\" }, \"id\": \"PY\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-7.4061, 37.1793], [-7.8343, 37.0057], [-8.5977, 37.1211], [-8.8141, 37.431], [-8.9147, 38.5123], [-9.4742, 38.7307], [-9.3748, 39.3384], [-9.1482, 39.5426], [-8.8867, 40.1795], [-8.6557, 41.0296], [-8.7771, 41.9409], [-8.2131, 42.1336], [-7.9208, 41.8836], [-7.4037, 41.8335], [-6.6182, 41.9422], [-6.2125, 41.5321], [-6.9285, 41.0092], [-6.8102, 40.3429], [-7.0146, 40.2084], [-7.0368, 39.7139], [-7.4452, 39.5363], [-7.0461, 38.9069], [-7.3431, 38.4572], [-7.1855, 38.0062], [-7.5036, 37.5854], [-7.4061, 37.1793]]] }, \"properties\": { \"name\": \"Portugal\", \"id\": \"PT\" }, \"id\": \"PT\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[130.5269, 42.5353], [130.6871, 42.3027], [130.4576, 42.3018], [129.7563, 41.7123], [129.7088, 40.8574], [128.3043, 40.0362], [127.5684, 39.7818], [127.3943, 39.2079], [127.7863, 39.084], [128.3745, 38.6233], [128.0389, 38.3085], [127.1697, 38.3045], [126.634, 37.7816], [125.9419, 37.8735], [125.4492, 37.7301], [125.1931, 38.0378], [124.691, 38.1292], [125.0675, 38.5567], [125.4097, 39.2882], [125.3609, 39.5266], [124.5574, 39.7907], [124.3621, 40.0042], [124.8895, 40.4596], [125.989, 40.9049], [126.9034, 41.7811], [127.1795, 41.5312], [128.1112, 41.3891], [128.291, 41.5627], [128.0451, 41.9875], [128.9236, 42.0381], [129.3137, 42.4137], [129.7199, 42.4749], [129.8983, 42.9983], [130.2406, 42.8917], [130.5269, 42.5353]]] }, \"properties\": { \"name\": \"North Korea\", \"id\": \"KP\" }, \"id\": \"KP\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-66.1295, 18.4448], [-65.6288, 18.3813], [-65.9708, 17.9743], [-67.1968, 17.9943], [-67.1587, 18.4994], [-66.1295, 18.4448]]] }, \"properties\": { \"name\": \"Puerto Rico\", \"id\": \"PR\" }, \"id\": \"PR\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[19.6045, 54.4591], [22.7663, 54.3568], [23.37, 54.2005], [23.4845, 53.9398], [23.8872, 53.0276], [23.8445, 52.6642], [23.1969, 52.257], [23.6523, 52.0403], [23.6053, 51.5179], [24.1056, 50.8449], [23.7118, 50.3773], [22.6496, 49.539], [22.5386, 49.0727], [21.6397, 49.4121], [20.6161, 49.3916], [19.802, 49.1923], [19.4416, 49.5976], [18.8321, 49.5108], [18.5622, 49.8792], [17.8746, 49.9722], [17.152, 50.3784], [16.6792, 50.0974], [16.0072, 50.6117], [14.8096, 50.8589], [15.0164, 51.2527], [14.6018, 51.8324], [14.7527, 52.0818], [14.6196, 52.5284], [14.1286, 52.8782], [14.4145, 53.2835], [14.2587, 53.7296], [14.2139, 53.8707], [14.2112, 53.9504], [16.1865, 54.2904], [16.5598, 54.5539], [17.2621, 54.7294], [18.3234, 54.8382], [18.6697, 54.4309], [19.6045, 54.4591]]] }, \"properties\": { \"name\": \"Poland\", \"id\": \"PL\" }, \"id\": \"PL\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"MultiPolygon\", \"coordinates\": [[[[152.9656, -4.7565], [152.6807, -4.4986], [152.5985, -3.9948], [153.1241, -4.2523], [152.9656, -4.7565]]], [[[155.9575, -6.687], [155.7191, -6.8628], [155.344, -6.7217], [155.202, -6.3075], [154.782, -5.9706], [154.7412, -5.5453], [154.9969, -5.54], [155.467, -6.145], [155.8225, -6.3803], [155.9575, -6.687]]], [[[151.9158, -4.2967], [152.4054, -4.3406], [152.4001, -4.7312], [152.0135, -5.0038], [152.1431, -5.3571], [151.8652, -5.5649], [151.515, -5.5524], [151.2291, -5.92], [150.4283, -6.2764], [149.6524, -6.2906], [149.3825, -6.078], [149.1264, -6.1277], [148.4011, -5.7651], [148.3447, -5.5449], [148.999, -5.4845], [149.2454, -5.5729], [150.2987, -5.5356], [150.953, -5.4237], [151.3268, -4.9603], [151.6712, -4.8835], [151.5518, -4.3455], [151.9158, -4.2967]]], [[[140.9761, -9.1187], [140.9748, -6.3461], [140.9739, -4.0232], [140.9734, -2.6099], [141.1856, -2.6276], [142.2115, -3.0835], [142.9053, -3.3206], [143.509, -3.4311], [144.0159, -3.7835], [144.4775, -3.8253], [145.0879, -4.349], [145.3347, -4.3854], [145.767, -4.8231], [145.8527, -5.4712], [146.4036, -5.6164], [147.0344, -5.9191], [147.3766, -5.9506], [147.8018, -6.315], [147.8453, -6.6626], [147.1191, -6.7217], [146.9607, -6.929], [147.1902, -7.3782], [147.7242, -7.8762], [148.1268, -8.1035], [148.2471, -8.5545], [148.5831, -9.0516], [149.2476, -9.0712], [149.2032, -9.4068], [149.7612, -9.8058], [149.8744, -10.0131], [150.6672, -10.2573], [150.4825, -10.6368], [150.0169, -10.5773], [149.7541, -10.3531], [147.7685, -10.0699], [146.6965, -9.0255], [146.0334, -8.0764], [144.9738, -7.8021], [144.5099, -7.5673], [143.6137, -8.2003], [143.0948, -8.3112], [143.366, -8.9611], [142.6474, -9.3277], [142.2297, -9.1697], [141.1332, -9.2212], [140.9761, -9.1187]]]] }, \"properties\": { \"name\": \"Papua New Guinea\", \"id\": \"PG\" }, \"id\": \"PG\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[134.5956, 7.3821], [134.5064, 7.4372], [134.5561, 7.5939], [134.6595, 7.6631], [134.5956, 7.3821]]] }, \"properties\": { \"name\": \"Palau\", \"id\": \"PW\" }, \"id\": \"PW\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"MultiPolygon\", \"coordinates\": [[[[126.0059, 9.3211], [126.1932, 9.2767], [126.3197, 8.8448], [126.4355, 7.8327], [126.5816, 7.2476], [126.08, 6.7332], [125.8243, 7.3333], [125.4008, 6.7957], [125.5886, 6.4659], [125.6681, 5.9785], [125.4559, 5.6643], [124.6364, 5.9981], [124.078, 6.4042], [123.9853, 6.9937], [124.2068, 7.3963], [123.9684, 7.6644], [123.493, 7.8078], [123.3909, 7.4074], [122.4978, 7.6729], [122.176, 7.0044], [122.0472, 7.3635], [122.132, 7.8105], [122.3371, 8.0284], [122.911, 8.1563], [123.0176, 8.3982], [123.4344, 8.7032], [124.2258, 8.2712], [124.4513, 8.6064], [124.731, 8.5629], [124.869, 8.9722], [125.5336, 9.1408], [125.5211, 9.7592], [126.0059, 9.3211]]], [[[124.5938, 9.7871], [124.3599, 9.63], [123.9355, 9.6238], [123.817, 9.8173], [124.1726, 10.1351], [124.577, 10.0268], [124.5938, 9.7871]]], [[[123.1308, 9.064], [122.5626, 9.4826], [122.4716, 9.9616], [122.8556, 10.0868], [122.8169, 10.5036], [122.9834, 10.8867], [123.2564, 10.9941], [123.5676, 10.7806], [123.1618, 9.8644], [123.3083, 9.357], [123.1308, 9.064]]], [[[123.3705, 9.4498], [123.386, 9.9669], [123.7114, 10.4738], [123.952, 10.3167], [123.6435, 10.0202], [123.3705, 9.4498]]], [[[117.3109, 8.4395], [117.35, 8.7134], [117.8848, 9.2407], [118.1148, 9.3468], [119.0239, 10.3535], [119.2241, 10.4774], [119.2614, 10.8449], [119.5268, 10.9532], [119.6844, 10.5515], [119.1917, 10.061], [118.782, 9.9163], [118.4348, 9.2562], [117.9896, 8.8772], [117.3109, 8.4395]]], [[[124.5747, 11.343], [124.9299, 11.3727], [125.0133, 10.7854], [125.2535, 10.2639], [125.0266, 10.0331], [124.7807, 10.168], [124.7869, 10.7815], [124.4456, 10.9235], [124.5747, 11.343]]], [[[122.4964, 11.6151], [123.1583, 11.5356], [123.0167, 11.1166], [122.7699, 10.8236], [122.1977, 10.623], [121.9642, 10.8716], [122.1036, 11.643], [122.4964, 11.6151]]], [[[125.2397, 12.5277], [125.5358, 12.1913], [125.4568, 11.9524], [125.6281, 11.1321], [125.2335, 11.145], [124.8841, 11.7753], [124.3848, 12.2441], [124.2946, 12.5695], [125.2397, 12.5277]]], [[[120.7045, 13.4794], [121.2029, 13.4324], [121.5225, 13.131], [121.5407, 12.6383], [121.2367, 12.2188], [120.922, 12.5117], [120.7635, 12.9698], [120.5082, 13.2601], [120.7045, 13.4794]]], [[[121.1017, 18.6153], [121.8457, 18.2952], [122.2998, 18.4026], [122.1511, 17.7563], [122.2368, 17.435], [122.5191, 17.1247], [122.1351, 16.185], [121.5953, 15.9333], [121.3925, 15.3242], [121.6957, 14.7374], [121.8004, 14.1138], [122.4907, 14.3224], [122.856, 14.2509], [123.2315, 13.7475], [123.4322, 13.9664], [123.726, 13.8843], [123.6079, 13.5283], [124.1428, 13.036], [124.0598, 12.5672], [123.311, 13.044], [123.1632, 13.4417], [122.5954, 13.9078], [122.4068, 13.4927], [121.7778, 13.9375], [121.2034, 13.6401], [120.6166, 14.1879], [120.922, 14.4933], [120.8882, 14.7157], [120.0821, 14.8511], [119.8309, 16.3266], [120.1598, 16.0478], [120.3893, 16.2218], [120.3054, 16.5294], [120.4088, 16.9555], [120.3582, 17.6383], [120.5997, 18.5078], [121.1017, 18.6153]]]] }, \"properties\": { \"name\": \"Philippines\", \"id\": \"PH\" }, \"id\": \"PH\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-69.9658, -4.2359], [-70.7995, -4.1733], [-70.9737, -4.3504], [-71.8448, -4.5044], [-72.6987, -5.0673], [-72.8871, -5.1228], [-72.9799, -5.635], [-73.2355, -6.0984], [-73.1374, -6.466], [-73.758, -6.9059], [-73.7496, -7.3356], [-74.0021, -7.5562], [-73.5491, -8.3459], [-72.9741, -8.993], [-73.2093, -9.4116], [-72.379, -9.5102], [-72.1815, -10.0038], [-71.238, -9.9661], [-70.637, -9.4782], [-70.6423, -11.0101], [-70.2202, -11.0478], [-69.5785, -10.9519], [-68.6852, -12.502], [-68.9786, -12.8802], [-69.0741, -13.6828], [-68.8803, -14.199], [-69.235, -14.5972], [-69.3748, -14.963], [-69.1726, -15.2368], [-69.4185, -15.6035], [-69.2176, -16.149], [-68.9134, -16.2618], [-69.0208, -16.6422], [-69.6249, -17.2002], [-69.5108, -17.506], [-69.8522, -17.704], [-69.9263, -18.206], [-70.4184, -18.3454], [-71.337, -17.6827], [-71.5323, -17.2943], [-72.1114, -17.0026], [-72.4676, -16.7079], [-73.825, -16.153], [-74.1471, -15.9124], [-75.1043, -15.4117], [-75.5336, -14.899], [-75.934, -14.6336], [-76.2891, -14.1333], [-76.1839, -13.5154], [-76.8322, -12.3489], [-77.1527, -12.0603], [-77.2204, -11.6635], [-77.6332, -11.288], [-77.7362, -10.8365], [-78.1856, -10.089], [-78.7622, -8.6171], [-79.3772, -7.8354], [-79.7621, -7.0666], [-80.1103, -6.6497], [-80.8117, -6.2822], [-81.1805, -5.9426], [-80.8827, -5.7589], [-81.1084, -5.0278], [-81.3366, -4.6695], [-81.2833, -4.3224], [-80.7986, -3.7312], [-80.3247, -3.388], [-80.1793, -3.8776], [-80.51, -4.0694], [-80.4885, -4.3939], [-80.1396, -4.2962], [-79.6385, -4.4547], [-79.3308, -4.9279], [-79.0763, -4.9905], [-78.4198, -3.7769], [-78.3472, -3.4311], [-77.8607, -2.9819], [-76.679, -2.5628], [-76.0898, -2.1331], [-75.5706, -1.5312], [-75.2632, -0.5555], [-75.2845, -0.1063], [-74.8018, -0.2], [-74.4178, -0.5809], [-74.2465, -0.9706], [-73.6643, -1.2489], [-73.4963, -1.6932], [-73.1969, -1.8304], [-73.1545, -2.2783], [-72.3957, -2.4288], [-71.7525, -2.1527], [-71.3969, -2.3342], [-70.9146, -2.2184], [-70.0741, -2.7502], [-70.7351, -3.7818], [-70.3396, -3.8142], [-69.9658, -4.2359]]] }, \"properties\": { \"name\": \"Peru\", \"id\": \"PE\" }, \"id\": \"PE\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-128.2901, -24.3974], [-128.3205, -24.3997], [-128.3503, -24.3402], [-128.3037, -24.3335], [-128.2901, -24.3974]]] }, \"properties\": { \"name\": \"Pitcairn Islands\", \"id\": \"PN\" }, \"id\": \"PN\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-77.3742, 8.6583], [-77.2124, 8.0338], [-77.3509, 7.7057], [-77.7439, 7.537], [-77.9011, 7.2294], [-78.1701, 7.5437], [-78.4215, 8.0608], [-78.1139, 8.3796], [-79.0865, 8.997], [-79.4416, 9.0059], [-79.7505, 8.5953], [-80.3687, 8.289], [-80.4581, 8.0768], [-80.0752, 7.6671], [-80.4388, 7.2752], [-80.8456, 7.2201], [-81.0352, 7.7111], [-81.5041, 7.7213], [-81.7276, 8.1376], [-82.6796, 8.3218], [-82.8793, 8.0706], [-82.9976, 8.3676], [-82.917, 8.7404], [-82.9399, 9.4493], [-82.5635, 9.5767], [-82.2441, 9.0316], [-81.3548, 8.7804], [-80.8387, 8.8874], [-80.1272, 9.2101], [-79.5774, 9.598], [-78.5043, 9.4063], [-78.0828, 9.2363], [-77.3742, 8.6583]]] }, \"properties\": { \"name\": \"Panama\", \"id\": \"PA\" }, \"id\": \"PA\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[77.7992, 35.496], [77.0486, 35.1099], [76.5945, 34.7357], [75.7093, 34.5031], [74.3004, 34.7654], [73.9613, 34.6535], [74.1499, 33.507], [73.9941, 33.2424], [74.6578, 32.5189], [75.3334, 32.2792], [74.5099, 31.7127], [74.6329, 31.0345], [73.8991, 30.4352], [73.809, 30.0934], [73.3816, 29.9345], [72.903, 29.029], [72.342, 28.752], [71.8701, 27.9623], [70.7373, 27.7293], [70.4035, 28.0249], [70.1447, 27.8491], [69.5681, 27.1744], [69.47, 26.8046], [70.1567, 26.4713], [70.0777, 26.0718], [70.2646, 25.7064], [70.6521, 25.4228], [71.048, 24.6877], [71.044, 24.4001], [70.5469, 24.4183], [69.7163, 24.1728], [69.5592, 24.2731], [68.7282, 24.2656], [68.7242, 23.9646], [68.1649, 23.8572], [67.6687, 23.811], [67.3096, 24.175], [67.1715, 24.7561], [66.7032, 24.8608], [66.6988, 25.2261], [66.4284, 25.5755], [65.6796, 25.3553], [64.7767, 25.3074], [64.6591, 25.184], [63.7207, 25.3859], [63.4912, 25.2106], [62.5723, 25.2546], [62.3153, 25.1347], [61.5878, 25.2022], [61.6686, 25.769], [61.8697, 26.2422], [62.4392, 26.5609], [63.1681, 26.6657], [63.1667, 27.2525], [62.7632, 27.2503], [62.7397, 28.0023], [62.3531, 28.4146], [61.8901, 28.5465], [61.6229, 28.7915], [61.3184, 29.3725], [60.8434, 29.8586], [62.4765, 29.4085], [63.5676, 29.4982], [64.0989, 29.3921], [64.521, 29.5643], [65.0954, 29.5594], [66.1772, 29.8355], [66.3974, 30.9124], [66.9243, 31.3057], [67.2874, 31.2178], [67.5781, 31.5063], [68.2138, 31.8073], [68.869, 31.6342], [69.2791, 31.9369], [69.2414, 32.4336], [69.5015, 33.02], [69.9201, 33.1123], [70.2841, 33.3689], [69.8682, 33.8976], [71.0516, 34.0498], [70.9655, 34.5306], [71.6206, 35.1831], [71.4276, 35.8338], [71.1852, 36.042], [71.6206, 36.4366], [72.623, 36.8295], [73.7691, 36.8885], [74.0017, 36.8233], [74.5415, 37.0221], [75.3467, 36.9134], [75.8403, 36.6497], [75.945, 36.0176], [76.2518, 35.8108], [77.4467, 35.4756], [77.7992, 35.496]]] }, \"properties\": { \"name\": \"Pakistan\", \"id\": \"PK\" }, \"id\": \"PK\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[56.388, 24.9793], [56.6406, 24.4702], [57.2199, 23.9229], [58.5782, 23.6437], [59.7998, 22.2201], [59.3714, 21.4988], [58.8956, 21.1126], [58.4743, 20.4068], [57.8618, 20.2439], [57.7153, 19.6069], [57.8116, 19.017], [57.1764, 18.9025], [56.6553, 18.5873], [56.551, 18.166], [56.2704, 17.9508], [55.479, 17.8433], [55.0644, 17.039], [54.0683, 17.0057], [53.6097, 16.7598], [53.0855, 16.6484], [52.729, 17.3005], [51.9775, 18.9961], [53.667, 19.559], [54.9774, 19.9958], [55.641, 22.0017], [55.186, 22.704], [55.1997, 23.0346], [55.7608, 24.2425], [55.7959, 24.8679], [56.064, 24.7388], [56.388, 24.9793]]] }, \"properties\": { \"name\": \"Oman\", \"id\": \"OM\" }, \"id\": \"OM\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"MultiPolygon\", \"coordinates\": [[[[173.1152, -41.2791], [173.738, -40.9888], [174.3026, -41.0194], [174.0922, -41.505], [174.2831, -41.7407], [173.5449, -42.518], [173.2213, -42.9765], [172.7184, -43.2589], [172.9208, -43.8914], [172.3855, -43.8297], [171.4426, -44.136], [171.1133, -45.0393], [170.7005, -45.6843], [169.6866, -46.5516], [168.382, -46.6054], [168.1889, -46.3621], [167.682, -46.193], [166.7316, -46.1979], [166.7338, -45.5436], [167.1946, -44.9634], [167.7872, -44.595], [168.3665, -44.0818], [168.8064, -43.9922], [169.6613, -43.5913], [170.3027, -43.1075], [170.7417, -42.9273], [171.2571, -42.4652], [171.4861, -41.7949], [172.0108, -41.4447], [172.1396, -40.9471], [172.6407, -40.5183], [172.9887, -40.8481], [173.1152, -41.2791]]], [[[173.2693, -34.935], [173.8441, -35.0264], [174.3204, -35.2466], [174.5437, -35.5822], [174.391, -35.7739], [174.802, -36.3093], [174.7226, -36.8411], [175.2996, -36.9933], [175.4608, -36.4757], [175.8762, -36.9578], [176.1084, -37.6449], [177.3358, -37.9907], [178.0091, -37.5548], [178.536, -37.692], [178.2679, -38.5509], [177.9763, -38.7223], [177.9656, -39.1426], [177.4077, -39.0809], [176.954, -39.3677], [177.1098, -39.6731], [176.8421, -40.1578], [175.9828, -41.2134], [175.3098, -41.6107], [174.6356, -41.2893], [175.1625, -40.6217], [175.2543, -40.2892], [175.0093, -39.9523], [173.9342, -39.5093], [173.8441, -39.1395], [174.5974, -38.7849], [174.9281, -37.8043], [174.7292, -37.4487], [174.782, -36.9436], [174.4758, -36.9418], [174.4469, -36.4509], [173.9453, -36.1761], [173.1166, -35.2053], [173.2693, -34.935]]]] }, \"properties\": { \"name\": \"New Zealand\", \"id\": \"NZ\" }, \"id\": \"NZ\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"MultiPolygon\", \"coordinates\": [[[[20.898, 80.2499], [22.4507, 80.4022], [26.8608, 80.16], [27.1986, 79.9065], [25.641, 79.403], [23.9475, 79.1943], [20.8611, 79.3978], [18.7251, 79.7607], [18.3438, 80.0595], [20.898, 80.2499]]], [[[16.7867, 79.9068], [18.5813, 79.5716], [19.0896, 79.157], [20.4581, 79.1293], [21.3889, 78.7404], [19.7687, 78.6228], [18.4393, 78.0251], [16.7005, 76.5794], [14.3657, 77.2345], [14.921, 77.6889], [13.6807, 78.028], [11.7738, 78.7165], [10.866, 79.7965], [12.7535, 79.7758], [13.3838, 79.4809], [15.8163, 79.6819], [16.7867, 79.9068]]], [[[21.6082, 78.5957], [23.1166, 77.9916], [24.2383, 77.8986], [23.8414, 77.4978], [22.057, 77.5011], [21.6082, 77.9161], [20.2282, 78.4779], [21.6082, 78.5957]]]] }, \"properties\": { \"name\": \"Svalbard and Jan Mayen\", \"id\": \"SJ\" }, \"id\": \"SJ\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[166.9584, -0.5165], [166.9163, -0.5467], [166.9136, -0.4992], [166.9584, -0.5165]]] }, \"properties\": { \"name\": \"Nauru\", \"id\": \"NR\" }, \"id\": \"NR\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[88.1099, 27.8704], [87.9843, 27.134], [88.1614, 26.7247], [88.0549, 26.43], [87.2874, 26.3603], [87.0166, 26.5556], [86.7014, 26.4349], [86.3663, 26.5743], [85.293, 26.7412], [84.6853, 27.0412], [84.6103, 27.2987], [84.0909, 27.4913], [83.2897, 27.371], [82.7335, 27.5189], [81.9877, 27.9139], [81.8528, 27.8669], [80.5868, 28.6494], [80.0706, 28.8301], [80.4017, 29.7303], [81.0103, 30.1645], [81.4169, 30.3376], [82.0432, 30.3269], [82.1591, 30.1152], [82.8542, 29.6833], [83.1556, 29.6127], [83.5835, 29.1834], [84.1016, 29.2198], [84.2285, 28.9118], [84.7141, 28.5957], [85.1589, 28.5922], [85.1225, 28.3161], [85.6783, 28.2775], [86.4089, 27.9286], [86.5545, 28.0853], [87.1413, 27.8385], [88.1099, 27.8704]]] }, \"properties\": { \"name\": \"Nepal\", \"id\": \"NP\" }, \"id\": \"NP\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[30.8696, 69.7834], [28.9657, 69.0219], [29.1415, 69.6715], [27.8897, 70.0617], [26.5257, 69.915], [26.0116, 69.6526], [25.7484, 68.9901], [24.9414, 68.5933], [23.8539, 68.8059], [22.4108, 68.7198], [21.622, 69.2707], [20.6223, 69.037], [19.9698, 68.3565], [18.3785, 68.5624], [17.9168, 67.965], [17.3247, 68.1039], [16.1275, 67.4259], [16.4036, 67.055], [15.423, 66.4899], [14.5432, 66.1292], [14.4798, 65.3014], [13.6501, 64.5816], [14.0776, 64.464], [13.9604, 64.0141], [12.6625, 63.9404], [11.9997, 63.2917], [12.2181, 63.0007], [12.3034, 62.2856], [12.1555, 61.7207], [12.8809, 61.3523], [12.294, 61.0027], [12.5888, 60.4508], [12.4862, 60.1067], [11.6806, 59.5923], [11.7982, 59.29], [11.3885, 59.0365], [10.8345, 59.1839], [9.6182, 58.946], [8.1663, 58.1452], [7.0051, 58.0242], [5.7067, 58.5236], [5.8452, 59.3535], [5.1314, 59.2265], [5.2441, 60.5695], [5.0493, 60.7076], [4.9276, 61.7107], [5.5336, 62.3109], [6.353, 62.6112], [7.2838, 62.6023], [7.0086, 62.9576], [8.1006, 63.091], [8.398, 63.5351], [9.6968, 63.6246], [9.7079, 63.865], [11.3499, 64.9059], [12.1595, 65.1789], [12.2727, 65.5682], [12.9763, 66.0192], [13.1046, 66.5394], [14.755, 67.4991], [14.7989, 67.8094], [16.0644, 68.2], [16.6517, 68.6257], [18.1015, 69.1564], [18.2932, 69.4751], [20.0688, 69.8835], [21.163, 69.8895], [21.4005, 70.1744], [22.6847, 70.3749], [23.0464, 70.1019], [24.4198, 70.702], [24.6582, 71.001], [25.7684, 70.8531], [27.5972, 71.0913], [29.1024, 70.8607], [30.9442, 70.2745], [29.6014, 69.9767], [29.7923, 69.7279], [30.8696, 69.7834]]] }, \"properties\": { \"name\": \"Norway\", \"id\": \"NO\" }, \"id\": \"NO\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-169.8034, -19.0832], [-169.9039, -19.1378], [-169.9483, -19.0729], [-169.834, -18.966], [-169.8034, -19.0832]]] }, \"properties\": { \"name\": \"Niue\", \"id\": \"NU\" }, \"id\": \"NU\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-83.1576, 14.9931], [-83.2992, 14.749], [-83.1878, 14.3401], [-83.4124, 13.9966], [-83.5673, 13.3205], [-83.511, 12.4119], [-83.7693, 11.9316], [-83.6517, 11.6422], [-83.8679, 11.2999], [-83.6419, 10.9173], [-84.1684, 10.7806], [-84.3484, 10.9799], [-84.9092, 10.9453], [-85.6215, 11.1845], [-85.7444, 11.062], [-86.4688, 11.7385], [-86.7556, 12.1566], [-87.6676, 12.9037], [-87.3373, 12.9792], [-87.0592, 12.9916], [-86.7108, 13.3134], [-86.7336, 13.7635], [-86.3317, 13.7702], [-86.1512, 13.9948], [-85.7868, 13.8443], [-85.1796, 14.3432], [-84.9851, 14.7525], [-84.646, 14.6611], [-83.8674, 14.7947], [-83.1576, 14.9931]]] }, \"properties\": { \"name\": \"Nicaragua\", \"id\": \"NI\" }, \"id\": \"NI\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[13.6062, 13.7045], [14.0638, 13.0786], [14.1974, 12.3839], [14.6271, 12.1087], [14.5597, 11.4921], [13.892, 11.1401], [13.5352, 10.6052], [13.2697, 10.0362], [13.1756, 9.5394], [12.9297, 9.4263], [12.8067, 8.8865], [12.4037, 8.5957], [12.0162, 7.5899], [11.7676, 7.272], [11.5518, 6.6972], [11.1532, 6.438], [11.0325, 6.6981], [10.6064, 7.063], [10.1438, 6.9964], [9.0603, 6.0092], [8.801, 5.1973], [8.556, 4.7552], [8.2932, 4.5576], [7.1546, 4.5146], [6.7569, 4.3437], [6.0764, 4.2904], [5.5877, 4.6473], [5.2326, 5.4836], [4.8611, 6.0265], [4.4314, 6.3487], [4.126, 6.4113], [2.7064, 6.3692], [2.7748, 6.7119], [2.686, 7.874], [2.7748, 9.0485], [3.0451, 9.084], [3.3252, 9.7783], [3.5573, 9.9074], [3.5764, 10.2683], [3.8343, 10.6074], [3.7163, 11.0797], [3.4877, 11.3954], [3.5955, 11.6963], [3.6466, 12.5299], [3.948, 12.775], [4.1477, 13.4577], [4.8233, 13.76], [5.4918, 13.8727], [6.3863, 13.6037], [6.8044, 13.1074], [7.0565, 13], [7.7885, 13.3378], [8.0953, 13.2912], [8.7504, 12.9081], [9.616, 12.8105], [10.1847, 13.2699], [10.9588, 13.3716], [11.412, 13.3538], [12.4632, 13.0937], [12.6549, 13.3267], [13.3239, 13.6707], [13.6062, 13.7045]]] }, \"properties\": { \"name\": \"Nigeria\", \"id\": \"NG\" }, \"id\": \"NG\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[167.9394, -29.0175], [167.979, -29.0756], [167.9204, -29.0827], [167.9394, -29.0175]]] }, \"properties\": { \"name\": \"Norfolk Island\", \"id\": \"NF\" }, \"id\": \"NF\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[14.9791, 22.996], [15.1722, 21.9223], [15.182, 21.5232], [15.6072, 20.9546], [15.5873, 20.7335], [15.949, 20.3034], [15.7351, 19.9039], [15.4745, 16.9085], [14.3679, 15.7499], [13.4481, 14.3805], [13.6062, 13.7045], [13.3239, 13.6707], [12.6549, 13.3267], [12.4632, 13.0937], [11.412, 13.3538], [10.9588, 13.3716], [10.1847, 13.2699], [9.616, 12.8105], [8.7504, 12.9081], [8.0953, 13.2912], [7.7885, 13.3378], [7.0565, 13], [6.8044, 13.1074], [6.3863, 13.6037], [5.4918, 13.8727], [4.8233, 13.76], [4.1477, 13.4577], [3.948, 12.775], [3.6466, 12.5299], [3.5955, 11.6963], [2.8782, 12.3679], [2.3659, 12.2219], [2.389, 11.897], [2.0912, 12.2778], [2.0739, 12.7142], [1.5652, 12.6356], [0.9872, 13.0418], [0.9779, 13.5518], [0.6183, 13.7036], [0.1638, 14.4973], [0.2175, 14.9114], [0.9601, 14.9869], [1.3002, 15.2723], [3.5041, 15.3562], [3.8769, 15.7553], [4.1823, 16.5818], [4.2347, 16.9964], [4.2276, 19.1426], [5.8367, 19.4791], [7.4818, 20.8729], [9.3785, 21.9915], [11.9678, 23.518], [13.4814, 23.1802], [14.2307, 22.6183], [14.9791, 22.996]]] }, \"properties\": { \"name\": \"Niger\", \"id\": \"NE\" }, \"id\": \"NE\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[164.2023, -20.2462], [164.4358, -20.2821], [165.1918, -20.7691], [165.6627, -21.2671], [166.9425, -22.0901], [166.7742, -22.3759], [166.096, -21.9565], [165.2419, -21.5255], [164.4549, -20.829], [164.1699, -20.4801], [164.2023, -20.2462]]] }, \"properties\": { \"name\": \"New Caledonia\", \"id\": \"NC\" }, \"id\": \"NC\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[23.3807, -17.6405], [24.2751, -17.4812], [24.9325, -17.5433], [25.2588, -17.7936], [24.359, -17.9783], [23.5804, -18.4528], [23.2986, -18.0276], [20.9739, -18.3188], [20.9779, -20.9684], [20.9708, -22], [19.9774, -22], [19.9805, -24.777], [19.9805, -26.5312], [19.9805, -28.4515], [19.6715, -28.5039], [19.2458, -28.9016], [18.1028, -28.8719], [17.4481, -28.6983], [17.3855, -28.3534], [17.0561, -28.0311], [16.7556, -28.4524], [16.4475, -28.6175], [15.7191, -27.9659], [15.3413, -27.3866], [14.9676, -26.3182], [14.8451, -25.7256], [14.8371, -25.0331], [14.5015, -24.2021], [14.474, -23.281], [14.5259, -22.7027], [14.3217, -22.19], [13.9733, -21.7678], [13.4504, -20.9169], [13.1685, -20.1845], [12.4583, -18.9269], [12.0956, -18.5412], [11.776, -18.0018], [11.7432, -17.2494], [12.5479, -17.2126], [13.101, -16.9676], [13.4038, -17.008], [13.9382, -17.3888], [16.9136, -17.3915], [18.3962, -17.3995], [18.8259, -17.7661], [19.6396, -17.8687], [20.3928, -17.8873], [20.625, -17.9965], [21.4169, -18.0005], [23.3807, -17.6405]]] }, \"properties\": { \"name\": \"Namibia\", \"id\": \"NA\" }, \"id\": \"NA\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[45.1802, -12.9765], [45.0692, -12.8957], [45.1349, -12.7093], [45.2233, -12.7519], [45.1802, -12.9765]]] }, \"properties\": { \"name\": \"Mayotte\", \"id\": \"YT\" }, \"id\": \"YT\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"MultiPolygon\", \"coordinates\": [[[[102.1009, 6.2422], [102.9825, 5.5249], [103.4157, 4.8502], [103.4686, 4.3934], [103.362, 3.7693], [103.4397, 2.933], [103.8121, 2.5805], [104.2884, 1.4806], [103.6945, 1.4495], [102.7273, 1.8557], [101.2953, 2.8851], [101.2997, 3.2535], [100.7155, 3.9664], [100.6143, 4.6522], [100.3524, 5.5875], [100.3431, 5.9843], [100.119, 6.442], [100.3453, 6.5498], [101.0533, 6.2427], [101.2571, 5.7894], [101.5563, 5.908], [101.8737, 5.8254], [102.1009, 6.2422]]], [[[117.5746, 4.1706], [117.1005, 4.337], [115.8962, 4.3486], [115.5686, 3.9389], [115.4545, 3.0342], [115.0861, 2.8411], [115.1509, 2.4931], [114.7865, 2.2503], [114.8304, 1.98], [114.5459, 1.4673], [113.9022, 1.4344], [113.6222, 1.236], [112.476, 1.5592], [112.1857, 1.4393], [112.0783, 1.1432], [111.7698, 0.9994], [110.9379, 1.0172], [110.5056, 0.8618], [109.6542, 1.6151], [109.6289, 2.0275], [109.9845, 1.7176], [110.3493, 1.7198], [110.9402, 1.5174], [111.1541, 1.7389], [111.242, 2.4358], [111.7276, 2.854], [112.7375, 3.0706], [113.0446, 3.2051], [113.924, 4.2434], [114.0638, 4.5927], [114.6085, 4.0241], [114.8402, 4.3934], [114.7465, 4.7179], [115.0266, 4.8999], [115.1398, 4.8999], [115.5198, 5.049], [115.419, 5.413], [115.7968, 5.536], [116.1386, 6.1295], [116.4946, 6.5219], [117.294, 6.6768], [117.6456, 6.4735], [117.6172, 5.9408], [118.0038, 6.0531], [118.1157, 5.8627], [118.5946, 5.5919], [119.2236, 5.4126], [119.1322, 5.1005], [118.1854, 4.8284], [118.4979, 4.3623], [117.5746, 4.1706]]]] }, \"properties\": { \"name\": \"Malaysia\", \"id\": \"MY\" }, \"id\": \"MY\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[34.9596, -11.5783], [34.6595, -11.5885], [34.3608, -12.2104], [34.5636, -13.3601], [35.2477, -13.8967], [35.8474, -14.6709], [35.7555, -16.0585], [35.3587, -16.1606], [35.1673, -16.5601], [35.2903, -17.0967], [34.3954, -16.1992], [34.248, -15.8876], [34.541, -15.2972], [34.5055, -14.5981], [34.3324, -14.4085], [33.6364, -14.5683], [33.2018, -14.0135], [32.9812, -14.0095], [32.6722, -13.6104], [32.9679, -13.2251], [33.0216, -12.6303], [33.398, -12.49], [33.2524, -12.1127], [33.2262, -11.5348], [33.3798, -11.1579], [33.2613, -10.8934], [33.659, -10.5906], [33.3509, -9.8622], [32.9199, -9.4072], [34.3208, -9.7317], [34.5241, -10.03], [34.6617, -10.71], [34.608, -11.0807], [34.9596, -11.5783]]] }, \"properties\": { \"name\": \"Malawi\", \"id\": \"MW\" }, \"id\": \"MW\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[57.6514, -20.485], [57.3859, -20.2284], [57.5759, -19.9971], [57.7921, -20.2124], [57.6514, -20.485]]] }, \"properties\": { \"name\": \"Mauritius\", \"id\": \"MU\" }, \"id\": \"MU\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-60.8263, 14.4946], [-61.0638, 14.4671], [-61.2198, 14.8044], [-60.9186, 14.7352], [-60.8263, 14.4946]]] }, \"properties\": { \"name\": \"Martinique\", \"id\": \"MQ\" }, \"id\": \"MQ\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-62.1484, 16.7403], [-62.1542, 16.6812], [-62.2217, 16.6994], [-62.223, 16.7518], [-62.1484, 16.7403]]] }, \"properties\": { \"name\": \"Montserrat\", \"id\": \"MS\" }, \"id\": \"MS\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-12.2807, 14.8089], [-12.8584, 15.2426], [-13.2579, 15.7002], [-13.4095, 16.0593], [-13.8685, 16.1481], [-14.3, 16.5805], [-15.1128, 16.6448], [-15.6208, 16.5068], [-16.1683, 16.5472], [-16.4411, 16.2045], [-16.5352, 15.8383], [-16.5356, 16.2866], [-16.0789, 17.5459], [-16.0849, 18.5212], [-16.2132, 19.0032], [-16.5146, 19.3619], [-16.2835, 19.7871], [-16.2105, 20.2279], [-16.4298, 20.6523], [-17.0481, 20.8063], [-16.9647, 21.3292], [-15.0018, 21.3314], [-13.0163, 21.3341], [-13.0944, 22.4958], [-13.0316, 23], [-12.6203, 23.2712], [-12.0235, 23.4674], [-12.0164, 25.9954], [-10.5624, 25.9954], [-8.6821, 25.9954], [-8.6834, 27.2858], [-6.2387, 25.848], [-4.8227, 24.9958], [-6.594, 24.9944], [-6.3113, 22.5291], [-6.1404, 21.0367], [-5.8556, 18.5505], [-5.6286, 16.5685], [-5.36, 16.2831], [-5.5125, 15.4965], [-7.3555, 15.496], [-9.1768, 15.496], [-9.9414, 15.374], [-10.6965, 15.4228], [-10.8956, 15.1502], [-11.5026, 15.6367], [-11.7603, 15.4255], [-11.8728, 14.9953], [-12.2807, 14.8089]]] }, \"properties\": { \"name\": \"Mauritania\", \"id\": \"MR\" }, \"id\": \"MR\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[32.8862, -26.8495], [32.1129, -26.8393], [31.9482, -25.9577], [31.986, -24.4605], [31.7995, -23.8923], [31.5456, -23.4821], [31.2877, -22.4021], [32.3713, -21.335], [32.4778, -20.7131], [33.0069, -19.8737], [32.7166, -19.0019], [32.9932, -18.3596], [32.9479, -16.7123], [32.2434, -16.4487], [31.9398, -16.4287], [31.2362, -16.0239], [30.4377, -15.9954], [30.3959, -15.643], [30.2317, -14.9905], [31.729, -14.496], [33.2018, -14.0135], [33.6364, -14.5683], [34.3324, -14.4085], [34.5055, -14.5981], [34.541, -15.2972], [34.248, -15.8876], [34.3954, -16.1992], [35.2903, -17.0967], [35.1673, -16.5601], [35.3587, -16.1606], [35.7555, -16.0585], [35.8474, -14.6709], [35.2477, -13.8967], [34.5636, -13.3601], [34.3608, -12.2104], [34.6595, -11.5885], [34.9596, -11.5783], [35.6312, -11.5818], [35.7852, -11.4531], [36.5185, -11.7163], [36.9789, -11.5667], [37.5417, -11.675], [37.9204, -11.2946], [38.4917, -11.4131], [38.7948, -11.2289], [39.3217, -11.1224], [39.9889, -10.821], [40.4634, -10.4641], [40.5447, -11.0656], [40.403, -11.3319], [40.5806, -12.6356], [40.5451, -13.463], [40.6401, -14.3899], [40.835, -14.7916], [40.5589, -15.4734], [40.1087, -15.9795], [39.8446, -16.4358], [39.0842, -16.9729], [38.145, -17.2428], [37.2443, -17.7399], [36.5403, -18.5181], [35.6512, -19.1639], [34.9481, -19.8129], [34.7559, -19.8218], [34.6981, -20.4042], [34.9822, -20.8063], [35.2677, -21.6511], [35.3156, -22.3968], [35.5753, -22.9632], [35.3702, -23.7982], [35.4381, -24.171], [35.1558, -24.5413], [34.6072, -24.8214], [33.3474, -25.2608], [32.7921, -25.6443], [32.5905, -26.0039], [32.9337, -26.2525], [32.8862, -26.8495]]] }, \"properties\": { \"name\": \"Mozambique\", \"id\": \"MZ\" }, \"id\": \"MZ\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[145.7519, 15.1334], [145.6845, 15.1249], [145.7133, 15.2155], [145.7821, 15.1747], [145.7519, 15.1334]]] }, \"properties\": { \"name\": \"Northern Mariana Islands\", \"id\": \"MP\" }, \"id\": \"MP\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[116.6832, 49.8238], [115.5575, 47.945], [115.8984, 47.6871], [116.7605, 47.87], [117.3508, 47.652], [117.7685, 47.988], [118.4983, 47.9841], [119.711, 47.15], [119.8979, 46.8579], [119.7066, 46.6062], [118.3088, 46.7172], [117.3335, 46.3621], [116.5625, 46.2897], [116.2407, 45.7961], [115.6809, 45.4583], [114.517, 45.3646], [114.0305, 44.9425], [113.5871, 44.7459], [111.8981, 45.0641], [111.4022, 44.3672], [111.9331, 43.7116], [111.0072, 43.3414], [110.4004, 42.7736], [109.4434, 42.4558], [108.1712, 42.4474], [106.7702, 42.2889], [105.1971, 41.738], [104.4984, 41.6586], [104.4984, 41.877], [103.7109, 41.7514], [103.0726, 42.0062], [101.9731, 42.2157], [101.7139, 42.4656], [99.984, 42.6773], [99.4678, 42.5681], [97.2057, 42.7896], [96.3854, 42.7204], [95.9126, 43.2064], [95.3502, 44.278], [94.7119, 44.3508], [93.6563, 44.9008], [92.7876, 45.0357], [91.5842, 45.0766], [90.8771, 45.196], [90.6618, 45.5253], [91.0019, 46.0358], [91.0338, 46.529], [90.87, 46.9547], [90.4963, 47.2854], [90.3134, 47.676], [89.561, 48.004], [89.0478, 48.0027], [88.517, 48.3844], [87.9798, 48.5549], [87.8143, 49.1624], [88.1925, 49.4518], [88.8317, 49.4485], [89.6542, 49.7175], [89.644, 49.903], [91.8044, 50.6936], [94.2511, 50.5564], [94.6147, 50.0237], [95.5229, 49.9112], [95.8518, 50.0129], [96.986, 49.8828], [97.2088, 49.7308], [98.1032, 50.0779], [98.2795, 50.5333], [97.8254, 50.9852], [97.947, 51.3483], [98.8485, 52.0701], [100.4687, 51.7261], [101.3814, 51.4526], [102.1116, 51.3534], [102.2883, 50.585], [102.6833, 50.3871], [103.6328, 50.1387], [105.3835, 50.4736], [106.218, 50.3045], [106.7112, 50.3125], [107.2332, 49.9893], [107.9479, 49.9247], [108.034, 49.594], [108.6137, 49.3228], [109.2365, 49.3348], [110.1997, 49.1704], [110.8279, 49.1661], [111.3366, 49.3559], [113.0557, 49.6162], [113.1641, 49.7971], [114.2969, 50.2743], [114.743, 50.2337], [115.2743, 49.9489], [116.1346, 50.0109], [116.6832, 49.8238]]] }, \"properties\": { \"name\": \"Mongolia\", \"id\": \"MN\" }, \"id\": \"MN\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[19.1943, 43.5331], [19.5517, 43.2122], [20.3445, 42.8278], [20.0639, 42.5473], [19.6546, 42.6285], [19.2809, 42.1726], [19.3426, 41.869], [18.5174, 42.4327], [18.4362, 42.5597], [18.4437, 42.9685], [18.9404, 43.4967], [19.1943, 43.5331]]] }, \"properties\": { \"name\": \"Montenegro\", \"id\": \"ME\" }, \"id\": \"ME\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[101.139, 21.5676], [100.7564, 21.3128], [100.2495, 20.7304], [100.1225, 20.3167], [99.8904, 20.4246], [99.3382, 20.0788], [99.0208, 20.0419], [98.9169, 19.7729], [98.1112, 19.7623], [97.8169, 19.46], [97.7539, 18.621], [97.4849, 18.4941], [97.793, 17.6813], [98.4388, 16.9755], [98.6892, 16.3052], [98.5653, 15.4037], [98.1911, 15.204], [98.2462, 14.8147], [99.1366, 13.7165], [99.2196, 12.7399], [99.4052, 12.5477], [99.6147, 11.7811], [99.1903, 11.1051], [98.7571, 10.6612], [98.7025, 10.1902], [98.465, 10.6758], [98.6754, 10.987], [98.7416, 11.5916], [98.576, 13.162], [98.2453, 13.7333], [97.8121, 14.859], [97.7104, 15.8756], [97.5843, 16.0194], [97.6194, 16.5374], [97.3757, 16.5228], [97.1782, 17.0621], [96.6224, 16.564], [95.7635, 16.169], [95.3897, 15.7229], [94.9427, 15.8183], [94.5876, 16.2888], [94.2143, 16.1268], [94.589, 17.5695], [94.4309, 18.2016], [94.07, 18.8936], [93.7056, 19.0267], [93.9981, 19.4409], [93.3625, 20.0584], [93.002, 20.0748], [92.7357, 20.5626], [92.3242, 20.7917], [92.1795, 21.2933], [92.5937, 21.4673], [92.575, 21.9782], [92.9643, 22.0039], [93.1618, 22.3604], [93.0788, 22.7182], [93.366, 23.1323], [93.4149, 23.6823], [93.3074, 24.0219], [94.1277, 23.8763], [94.2929, 24.3219], [94.7075, 25.0486], [94.6227, 25.4099], [95.1323, 26.0411], [95.1287, 26.5973], [96.0613, 27.217], [96.6659, 27.3391], [97.3353, 27.9379], [97.3224, 28.218], [97.5377, 28.5101], [98.0988, 28.1421], [98.299, 27.5499], [98.651, 27.5726], [98.7318, 26.5836], [98.6546, 25.9177], [98.0109, 25.2923], [97.8196, 25.2519], [97.5315, 24.4915], [97.686, 23.898], [98.2124, 24.1106], [98.7642, 24.116], [98.8636, 23.1913], [99.3408, 23.0959], [99.3377, 22.498], [99.193, 22.126], [99.9179, 22.0279], [100.2148, 21.4628], [101.139, 21.5676]]] }, \"properties\": { \"name\": \"Myanmar\", \"id\": \"MM\" }, \"id\": \"MM\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[14.5663, 35.8529], [14.4363, 35.8219], [14.3524, 35.8725], [14.4482, 35.9572], [14.5663, 35.8529]]] }, \"properties\": { \"name\": \"Malta\", \"id\": \"MT\" }, \"id\": \"MT\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[4.2276, 19.1426], [4.2347, 16.9964], [4.1823, 16.5818], [3.8769, 15.7553], [3.5041, 15.3562], [1.3002, 15.2723], [0.9601, 14.9869], [0.2175, 14.9114], [-0.2359, 15.0592], [-0.7604, 15.0477], [-1.0496, 14.8195], [-1.7678, 14.4862], [-2.1132, 14.1684], [-2.4572, 14.274], [-3.1985, 13.673], [-3.3017, 13.2806], [-3.5758, 13.194], [-4.0512, 13.3822], [-4.3286, 13.119], [-4.2272, 12.7936], [-4.4807, 12.6724], [-4.4287, 12.3377], [-4.798, 12.0319], [-5.2881, 11.8277], [-5.2999, 11.2058], [-5.4905, 11.0425], [-5.5236, 10.4259], [-6.0345, 10.1946], [-6.2611, 10.7242], [-6.6932, 10.3495], [-7.1049, 10.2035], [-7.6611, 10.4272], [-7.9907, 10.1627], [-8.2315, 10.4379], [-8.4075, 11.3865], [-8.8219, 11.6732], [-9.043, 12.4025], [-9.8207, 12.0426], [-10.2748, 12.2126], [-10.6774, 11.8996], [-10.9333, 12.205], [-11.3053, 12.0155], [-11.3894, 12.4043], [-11.3903, 12.9419], [-11.6349, 13.3698], [-12.0543, 13.633], [-12.0193, 14.2065], [-12.2807, 14.8089], [-11.8728, 14.9953], [-11.7603, 15.4255], [-11.5026, 15.6367], [-10.8956, 15.1502], [-10.6965, 15.4228], [-9.9414, 15.374], [-9.1768, 15.496], [-7.3555, 15.496], [-5.5125, 15.4965], [-5.36, 16.2831], [-5.6286, 16.5685], [-5.8556, 18.5505], [-6.1404, 21.0367], [-6.3113, 22.5291], [-6.594, 24.9944], [-4.8227, 24.9958], [-3.2579, 23.981], [-1.2931, 22.6964], [1.1457, 21.1024], [1.1657, 20.8174], [1.6855, 20.3784], [2.2195, 20.2479], [2.4063, 20.0637], [3.2036, 19.7898], [3.2559, 19.4107], [3.1059, 19.1502], [3.4007, 18.9886], [4.2276, 19.1426]]] }, \"properties\": { \"name\": \"Mali\", \"id\": \"ML\" }, \"id\": \"ML\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[22.3442, 42.3138], [22.8369, 41.9937], [23.0056, 41.7172], [22.9159, 41.3363], [22.7246, 41.1783], [21.9296, 41.1073], [21.5758, 40.8689], [20.9641, 40.8498], [20.4892, 41.2724], [20.566, 41.8739], [21.0596, 42.1713], [21.5625, 42.2476], [22.3442, 42.3138]]] }, \"properties\": { \"name\": \"North Macedonia\", \"id\": \"MK\" }, \"id\": \"MK\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[171.1017, 7.1384], [171.2269, 7.0869], [171.2025, 7.0736], [171.0955, 7.1091], [171.1017, 7.1384]]] }, \"properties\": { \"name\": \"Marshall Islands\", \"id\": \"MH\" }, \"id\": \"MH\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-97.1462, 25.9617], [-97.5071, 25.0144], [-97.6676, 24.3899], [-97.8578, 22.6245], [-97.6376, 21.6035], [-97.1214, 20.615], [-96.456, 19.8697], [-96.2895, 19.3437], [-95.821, 18.7546], [-95.1818, 18.7005], [-94.798, 18.5145], [-94.5461, 18.1749], [-94.189, 18.1953], [-93.5523, 18.4306], [-92.8849, 18.4688], [-92.7102, 18.6117], [-91.9738, 18.716], [-91.8031, 18.4706], [-91.2753, 18.6246], [-91.343, 18.9007], [-90.7393, 19.3521], [-90.5072, 19.9119], [-90.4841, 20.5564], [-90.3531, 21.0096], [-89.8198, 21.2746], [-88.8787, 21.414], [-88.1317, 21.616], [-86.8242, 21.4215], [-86.8648, 20.8849], [-87.4672, 20.1023], [-87.4248, 19.5834], [-87.7619, 18.4461], [-88.1967, 18.7196], [-88.2957, 18.4723], [-88.523, 18.4457], [-88.8064, 17.9654], [-89.1615, 17.8149], [-90.9892, 17.8163], [-90.993, 17.2525], [-91.4096, 17.2561], [-90.7107, 16.7083], [-90.417, 16.3909], [-90.4472, 16.0726], [-91.7365, 16.07], [-92.1871, 15.3207], [-92.0748, 15.0743], [-92.2352, 14.5452], [-92.809, 15.1387], [-93.916, 16.0536], [-94.3741, 16.2848], [-94.6615, 16.2018], [-94.9004, 16.4176], [-95.4643, 15.9745], [-96.5108, 15.6518], [-97.1846, 15.9093], [-97.7548, 15.967], [-98.5203, 16.3048], [-98.7622, 16.5347], [-99.6906, 16.7198], [-100.0244, 16.9205], [-100.8478, 17.2006], [-101.6002, 17.6516], [-101.847, 17.9223], [-102.6995, 18.0626], [-103.4415, 18.3254], [-103.9125, 18.8283], [-104.9385, 19.3095], [-105.4821, 19.9762], [-105.6694, 20.3855], [-105.237, 21.1193], [-105.2086, 21.4908], [-105.6492, 21.988], [-105.7917, 22.6276], [-106.4023, 23.1958], [-106.9354, 23.8812], [-107.9512, 24.6149], [-108.3736, 25.1942], [-109.385, 25.7273], [-109.4256, 26.0327], [-109.1997, 26.3052], [-109.4829, 26.7105], [-109.7548, 26.703], [-109.9441, 27.0794], [-110.4779, 27.3227], [-110.5298, 27.8642], [-111.1215, 27.9672], [-111.6801, 28.4706], [-112.1618, 29.0188], [-112.2235, 29.2696], [-112.7384, 29.9856], [-113.1104, 30.7934], [-113.0467, 31.1792], [-114.1493, 31.5072], [-114.8395, 31.7984], [-114.8819, 31.1565], [-114.6334, 30.5067], [-114.6498, 30.2381], [-114.3726, 29.8302], [-113.7556, 29.3677], [-113.4997, 28.9269], [-112.8709, 28.4244], [-112.7339, 27.826], [-112.3291, 27.5233], [-112.0091, 26.9671], [-111.5696, 26.7074], [-111.2917, 25.7899], [-111.0345, 25.5271], [-110.6774, 24.7885], [-110.5471, 24.2141], [-110.0229, 24.1746], [-109.421, 23.4803], [-109.458, 23.2149], [-109.9234, 22.8859], [-110.3627, 23.6051], [-111.4194, 24.329], [-112.0725, 24.84], [-112.0557, 25.488], [-112.3773, 26.2138], [-113.0207, 26.5831], [-113.2058, 26.857], [-113.5986, 26.7212], [-113.841, 26.9667], [-114.4454, 27.2183], [-114.9936, 27.7359], [-114.3007, 27.8731], [-114.0485, 28.4262], [-114.1455, 28.6055], [-114.9936, 29.3845], [-115.6738, 29.7565], [-116.0622, 30.8041], [-116.6622, 31.5649], [-117.1282, 32.5335], [-114.7248, 32.7155], [-114.836, 32.5082], [-112.939, 31.916], [-111.042, 31.3243], [-108.2145, 31.3292], [-108.2118, 31.7793], [-106.4533, 31.77], [-106.2558, 31.5445], [-104.9179, 30.5835], [-104.504, 29.6775], [-104.1107, 29.3863], [-103.2577, 29.001], [-102.892, 29.2163], [-102.7342, 29.6438], [-102.269, 29.871], [-101.4404, 29.7769], [-100.6587, 29.0685], [-100.2961, 28.3276], [-99.5053, 27.5482], [-99.4436, 27.0368], [-99.1078, 26.4469], [-98.0828, 26.0642], [-97.3582, 25.8707], [-97.1462, 25.9617]]] }, \"properties\": { \"name\": \"Mexico\", \"id\": \"MX\" }, \"id\": \"MX\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[73.5121, 4.1644], [73.473, 4.1706], [73.5041, 4.2345], [73.5285, 4.2434], [73.5121, 4.1644]]] }, \"properties\": { \"name\": \"Maldives\", \"id\": \"MV\" }, \"id\": \"MV\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[49.5383, -12.4323], [49.9374, -13.0724], [50.174, -14.0401], [50.2353, -14.7321], [50.4829, -15.3855], [50.2091, -15.9604], [49.8926, -15.4579], [49.6498, -15.5671], [49.8389, -16.4864], [49.4491, -17.2406], [49.478, -17.8984], [48.6071, -20.4574], [48.3509, -21.3488], [47.9084, -22.4661], [47.5581, -23.8745], [47.1773, -24.7872], [46.7285, -25.1498], [46.1586, -25.2306], [45.5078, -25.5631], [45.1154, -25.5431], [44.8131, -25.334], [44.3457, -25.2262], [44.0354, -24.9958], [43.6874, -24.3579], [43.7225, -23.5296], [43.398, -22.8864], [43.2666, -22.0492], [43.5019, -21.3563], [43.8556, -21.0767], [44.4047, -19.9221], [44.4487, -19.4285], [44.2387, -19.0752], [44.2329, -18.7405], [44.0399, -18.2886], [43.9795, -17.3915], [44.4216, -16.7026], [44.4762, -16.2174], [44.9094, -16.1743], [45.1669, -15.983], [45.5984, -15.9928], [45.7, -15.8139], [46.3317, -15.7136], [46.475, -15.5134], [47.8116, -14.5448], [47.9954, -13.9606], [48.7966, -13.2673], [48.8996, -12.4585], [49.2072, -12.0794], [49.5383, -12.4323]]] }, \"properties\": { \"name\": \"Madagascar\", \"id\": \"MG\" }, \"id\": \"MG\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[28.2124, 45.4503], [28.0997, 45.9728], [28.2444, 46.4513], [28.0717, 46.9786], [27.3366, 47.6396], [26.9806, 48.155], [26.6189, 48.2597], [27.5493, 48.4777], [29.1948, 47.8824], [29.1597, 47.4558], [29.5494, 47.2467], [29.8779, 46.829], [29.838, 46.3505], [29.1464, 46.5268], [28.9475, 46.05], [28.2124, 45.4503]]] }, \"properties\": { \"name\": \"Moldova\", \"id\": \"MD\" }, \"id\": \"MD\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[7.4387, 43.7507], [7.3779, 43.7316], [7.4143, 43.7711], [7.4387, 43.7507]]] }, \"properties\": { \"name\": \"Monaco\", \"id\": \"MC\" }, \"id\": \"MC\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-2.2197, 35.1041], [-1.7955, 34.7521], [-1.6792, 33.3187], [-1.5099, 32.8775], [-1.0656, 32.4683], [-1.2753, 32.0892], [-2.4485, 32.13], [-2.9308, 32.0426], [-3.0174, 31.8344], [-3.8268, 31.6617], [-3.8335, 31.1978], [-4.3228, 30.6989], [-4.9683, 30.4654], [-5.4488, 29.9567], [-6.5008, 29.8093], [-6.6353, 29.5687], [-7.095, 29.6251], [-7.6851, 29.3495], [-8.6599, 28.7187], [-8.6834, 27.6565], [-13.1774, 27.652], [-12.949, 27.9144], [-11.986, 28.1292], [-11.4302, 28.3822], [-11.0809, 28.7138], [-10.4865, 29.0649], [-9.6671, 30.1094], [-9.6529, 30.4477], [-9.8755, 30.718], [-9.8087, 31.4247], [-9.3475, 32.0865], [-9.2458, 32.5726], [-8.5962, 33.1874], [-6.901, 33.969], [-6.3532, 34.776], [-5.9249, 35.7859], [-5.3973, 35.9297], [-5.1054, 35.4676], [-4.3299, 35.1613], [-3.6932, 35.2799], [-2.84, 35.1281], [-2.2197, 35.1041]]] }, \"properties\": { \"name\": \"Morocco\", \"id\": \"MA\" }, \"id\": \"MA\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-63.0111, 18.0688], [-63.123, 18.0688], [-63.0631, 18.1154], [-63.0111, 18.0688]]] }, \"properties\": { \"name\": \"Saint Martin\", \"id\": \"MF\" }, \"id\": \"MF\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[113.4788, 22.1957], [113.4943, 22.2414], [113.5467, 22.2241], [113.4788, 22.1957]]] }, \"properties\": { \"name\": \"Macau\", \"id\": \"MO\" }, \"id\": \"MO\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[27.3517, 57.5282], [27.797, 57.3169], [27.8063, 56.867], [28.1481, 56.143], [27.5768, 55.7988], [26.5936, 55.6676], [24.9032, 56.3982], [24.1206, 56.2642], [22.0845, 56.4067], [21.0462, 56.07], [21.0711, 56.8237], [21.7285, 57.571], [22.5546, 57.7242], [23.6479, 56.9711], [24.4034, 57.3251], [24.3226, 57.8706], [25.111, 58.0635], [25.9912, 57.8382], [26.5328, 57.5311], [27.3517, 57.5282]]] }, \"properties\": { \"name\": \"Latvia\", \"id\": \"LV\" }, \"id\": \"LV\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[6.1164, 50.1209], [6.4875, 49.7985], [6.3441, 49.4527], [5.7897, 49.5383], [5.744, 49.9196], [6.1164, 50.1209]]] }, \"properties\": { \"name\": \"Luxembourg\", \"id\": \"LU\" }, \"id\": \"LU\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[26.5936, 55.6676], [26.175, 55.0033], [25.8594, 54.9192], [25.5473, 54.3317], [24.7683, 53.9746], [23.4845, 53.9398], [23.37, 54.2005], [22.7663, 54.3568], [22.8311, 54.8384], [21.2358, 55.2641], [21.0462, 56.07], [22.0845, 56.4067], [24.1206, 56.2642], [24.9032, 56.3982], [26.5936, 55.6676]]] }, \"properties\": { \"name\": \"Lithuania\", \"id\": \"LT\" }, \"id\": \"LT\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[27.8303, -28.9091], [28.6257, -28.5816], [29.3013, -29.0898], [29.3905, -29.2696], [29.098, -29.919], [28.3922, -30.1476], [28.018, -30.6421], [27.3886, -30.3158], [27.0517, -29.6642], [27.2945, -29.5195], [27.8303, -28.9091]]] }, \"properties\": { \"name\": \"Lesotho\", \"id\": \"LS\" }, \"id\": \"LS\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[79.9822, 9.8129], [80.253, 9.7965], [80.7111, 9.3663], [81.373, 8.4315], [81.436, 8.119], [81.8741, 7.2885], [81.8612, 6.9014], [81.6375, 6.4251], [80.724, 5.979], [80.0954, 6.153], [79.8593, 6.8295], [79.7923, 7.5854], [79.929, 8.8994], [80.1185, 9.3268], [79.9822, 9.8129]]] }, \"properties\": { \"name\": \"Sri Lanka\", \"id\": \"LK\" }, \"id\": \"LK\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[9.5801, 47.0572], [9.4877, 47.0621], [9.5277, 47.2707], [9.5801, 47.0572]]] }, \"properties\": { \"name\": \"Liechtenstein\", \"id\": \"LI\" }, \"id\": \"LI\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-60.8953, 13.8221], [-61.0636, 13.9158], [-60.8867, 14.0112], [-60.8953, 13.8221]]] }, \"properties\": { \"name\": \"Saint Lucia\", \"id\": \"LC\" }, \"id\": \"LC\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[25.1505, 31.655], [24.8526, 31.335], [24.9738, 30.7766], [24.7115, 30.1316], [24.9805, 29.1817], [24.9805, 27.8345], [24.9805, 25.8134], [24.9805, 24.2416], [24.9805, 21.9959], [24.9796, 20.0024], [23.9804, 19.9958], [23.9804, 19.4968], [21.5847, 20.6794], [19.6684, 21.6257], [17.7521, 22.5721], [15.9841, 23.4452], [14.9791, 22.996], [14.2307, 22.6183], [13.4814, 23.1802], [11.9678, 23.518], [11.5075, 24.3144], [10.6863, 24.5514], [10.2557, 24.5909], [10.0009, 25.3322], [9.4482, 26.0673], [9.4913, 26.3337], [9.8593, 26.5521], [9.7474, 27.3306], [9.9161, 27.7856], [9.8424, 28.9668], [9.6724, 29.567], [9.3102, 30.1152], [9.5188, 30.2293], [9.8952, 30.3873], [10.2162, 30.7832], [10.115, 31.4637], [10.8265, 32.0807], [11.5048, 32.4137], [11.5043, 33.182], [12.2798, 32.8584], [12.7535, 32.8012], [13.2835, 32.9148], [14.2369, 32.6813], [14.5135, 32.5109], [15.1767, 32.391], [15.4963, 31.6568], [16.123, 31.2644], [17.3491, 31.0815], [18.1902, 30.7775], [18.9364, 30.2905], [19.2915, 30.2879], [19.7132, 30.4885], [20.1509, 31.0784], [19.9263, 31.8175], [20.1216, 32.2188], [20.621, 32.5801], [21.6357, 32.9374], [22.1875, 32.9184], [23.0908, 32.6187], [23.2866, 32.2139], [24.1295, 32.0093], [24.6839, 32.0159], [25.1505, 31.655]]] }, \"properties\": { \"name\": \"Libya\", \"id\": \"LY\" }, \"id\": \"LY\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-8.4863, 7.5584], [-8.2966, 7.0741], [-8.3325, 6.8015], [-8.6035, 6.5077], [-7.8886, 6.2347], [-7.7965, 5.975], [-7.4543, 5.8414], [-7.4299, 5.3247], [-7.5688, 5.0805], [-7.5451, 4.3512], [-8.2591, 4.59], [-9.1322, 5.0548], [-10.2763, 6.0775], [-11.5075, 6.9067], [-11.2678, 7.2325], [-10.6474, 7.7594], [-10.2832, 8.4852], [-9.7683, 8.5345], [-9.5182, 8.3463], [-9.369, 7.6396], [-9.4598, 7.4425], [-9.1175, 7.2157], [-8.8896, 7.2627], [-8.7083, 7.6591], [-8.4863, 7.5584]]] }, \"properties\": { \"name\": \"Liberia\", \"id\": \"LR\" }, \"id\": \"LR\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[35.8691, 33.4319], [35.411, 33.0755], [35.1087, 33.0835], [35.9761, 34.6291], [36.4329, 34.6136], [36.5851, 34.2212], [35.9424, 33.6676], [35.8691, 33.4319]]] }, \"properties\": { \"name\": \"Lebanon\", \"id\": \"LB\" }, \"id\": \"LB\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[102.1276, 22.379], [102.9488, 21.5698], [102.8511, 21.2657], [103.1046, 20.8915], [103.635, 20.6971], [104.0518, 20.9413], [104.5832, 20.6465], [104.6187, 20.3744], [104.9281, 20.018], [104.5463, 19.6105], [104.0319, 19.6753], [103.8965, 19.3401], [104.7163, 18.8035], [105.115, 18.6787], [105.0857, 18.4501], [105.4581, 18.1545], [105.6916, 17.7377], [106.5021, 16.9542], [106.6961, 16.4588], [107.3966, 16.0429], [107.1897, 15.7473], [107.6531, 15.255], [107.5195, 14.705], [106.82, 14.3148], [106.5012, 14.5781], [105.9788, 14.3432], [105.9046, 13.9247], [105.1833, 14.3464], [105.4754, 14.5301], [105.5131, 15.3606], [105.6223, 15.6998], [105.4062, 15.9874], [105.047, 16.1601], [104.7505, 16.6475], [104.8162, 17.3005], [103.9497, 18.3192], [103.3669, 18.4235], [103.0913, 18.1381], [102.7175, 17.8922], [102.1014, 18.2104], [101.1053, 17.4793], [100.9086, 17.5837], [101.1133, 18.0333], [101.0507, 18.4071], [101.2864, 18.977], [101.1546, 19.5794], [100.6254, 19.4999], [100.3977, 19.7561], [100.5429, 20.0885], [100.1225, 20.3167], [100.2495, 20.7304], [100.7564, 21.3128], [101.139, 21.5676], [101.2242, 21.2236], [101.705, 21.1503], [101.744, 21.778], [101.5243, 22.2538], [101.6712, 22.4625], [102.1276, 22.379]]] }, \"properties\": { \"name\": \"Lao People's Democratic Republic\", \"id\": \"LA\" }, \"id\": \"LA\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[48.4424, 28.5429], [47.6713, 28.5331], [47.4334, 28.9895], [46.5314, 29.0964], [46.9056, 29.5377], [47.1143, 29.9611], [47.6727, 30.0956], [47.9785, 29.9829], [47.9696, 29.6167], [48.1836, 28.9793], [48.4424, 28.5429]]] }, \"properties\": { \"name\": \"Kuwait\", \"id\": \"KW\" }, \"id\": \"KW\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[21.5625, 42.2476], [21.0596, 42.1713], [20.566, 41.8739], [20.4856, 42.2232], [20.0639, 42.5473], [20.3445, 42.8278], [21.0569, 43.0915], [21.3907, 42.7515], [21.7529, 42.6698], [21.5625, 42.2476]]] }, \"properties\": { \"name\": \"Kosovo\", \"id\": \"XK\" }, \"id\": \"XK\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[128.3745, 38.6233], [128.619, 38.1763], [129.335, 37.2747], [129.4735, 36.742], [129.4034, 36.0522], [129.5619, 35.9475], [129.2143, 35.1818], [128.5112, 35.101], [128.4442, 34.8706], [127.7148, 34.9545], [127.0308, 34.6069], [126.4817, 34.4937], [126.2913, 35.1542], [126.7174, 35.769], [126.5483, 36.4775], [126.2171, 36.8708], [126.7463, 37.1935], [126.634, 37.7816], [127.1697, 38.3045], [128.0389, 38.3085], [128.3745, 38.6233]]] }, \"properties\": { \"name\": \"South Korea\", \"id\": \"KR\" }, \"id\": \"KR\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-62.6307, 17.2401], [-62.8389, 17.3391], [-62.7945, 17.4025], [-62.7137, 17.3533], [-62.6307, 17.2401]]] }, \"properties\": { \"name\": \"Saint Kitts and Nevis\", \"id\": \"KN\" }, \"id\": \"KN\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-157.3422, 1.8557], [-157.2461, 1.7318], [-157.4201, 1.7873], [-157.3422, 1.8557]]] }, \"properties\": { \"name\": \"Kiribati\", \"id\": \"KI\" }, \"id\": \"KI\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[104.4265, 10.4112], [104.2622, 10.5413], [103.532, 10.6048], [103.722, 10.8902], [103.5325, 11.1468], [103.153, 10.9137], [103.1254, 11.4606], [102.9341, 11.7065], [102.7366, 12.0896], [102.7557, 12.4261], [102.4995, 12.6698], [102.3198, 13.5398], [102.729, 13.8421], [103.1996, 14.3326], [104.7789, 14.428], [105.1833, 14.3464], [105.9046, 13.9247], [105.9788, 14.3432], [106.5012, 14.5781], [106.82, 14.3148], [107.5195, 14.705], [107.3313, 14.1266], [107.6056, 13.4377], [107.4756, 13.0302], [107.5062, 12.3644], [106.9305, 12.0776], [106.4138, 11.9484], [106.3401, 11.6817], [105.8514, 11.6351], [105.8558, 11.2941], [106.1679, 11.0123], [105.3866, 10.9399], [104.8504, 10.5347], [104.4265, 10.4112]]] }, \"properties\": { \"name\": \"Cambodia\", \"id\": \"KH\" }, \"id\": \"KH\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[80.2095, 42.1899], [80.2162, 42.0323], [79.2938, 41.7829], [78.3625, 41.3718], [78.1232, 41.0758], [76.8239, 40.9821], [76.4804, 40.4494], [75.8718, 40.3034], [75.5837, 40.6052], [75.0044, 40.4494], [74.4118, 40.1374], [73.9915, 40.0433], [73.9147, 39.6065], [73.6315, 39.4489], [73.2351, 39.3743], [72.0428, 39.3521], [71.8062, 39.2758], [71.4045, 39.598], [70.7333, 39.4134], [70.6077, 39.5643], [69.5987, 39.5736], [69.229, 39.761], [69.5304, 40.0974], [69.9667, 40.2022], [70.4514, 40.049], [70.9579, 40.239], [71.6926, 40.1525], [73.113, 40.7859], [72.6585, 40.8698], [71.7924, 41.4131], [71.4085, 41.1361], [70.7826, 41.2626], [70.1811, 41.5716], [70.8421, 42.0195], [70.9468, 42.2485], [71.2567, 42.7337], [71.8168, 42.822], [72.8551, 42.561], [73.422, 42.5934], [73.5565, 43.0027], [74.209, 43.2402], [75.0475, 42.9046], [76.9442, 42.9716], [79.1646, 42.759], [79.49, 42.4576], [80.2095, 42.1899]]] }, \"properties\": { \"name\": \"Kyrgyzstan\", \"id\": \"KG\" }, \"id\": \"KG\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[41.8839, 3.9779], [41.3419, 3.2016], [40.9646, 2.8145], [40.9699, 1.378], [40.9788, -0.8703], [41.5328, -1.6955], [40.9956, -1.9507], [40.6441, -2.5393], [40.2224, -2.6884], [40.1154, -3.2504], [39.4909, -4.4787], [39.2219, -4.6922], [37.7974, -3.6743], [37.6087, -3.4604], [37.6438, -3.0453], [36.2633, -2.2747], [34.7709, -1.4416], [33.9031, -1.0021], [33.9431, 0.1738], [34.4815, 1.042], [34.7874, 1.2307], [34.9654, 1.6435], [34.964, 2.0625], [34.7425, 2.818], [34.4478, 3.1634], [34.3928, 3.6916], [34.165, 3.8128], [33.9759, 4.2203], [35.2681, 5.4925], [35.7448, 5.3442], [35.763, 4.808], [36.0818, 4.4498], [36.9056, 4.4116], [38.0864, 3.649], [39.4944, 3.4559], [39.8424, 3.8514], [40.7653, 4.2731], [41.2207, 3.9437], [41.8839, 3.9779]]] }, \"properties\": { \"name\": \"Kenya\", \"id\": \"KE\" }, \"id\": \"KE\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[87.3229, 49.0858], [86.7534, 49.0088], [86.5496, 48.5287], [85.7493, 48.3849], [85.526, 47.9157], [85.6565, 47.2547], [84.786, 46.8308], [83.1929, 47.1864], [83.0043, 47.0337], [82.3264, 45.52], [82.4787, 45.1236], [81.602, 45.3109], [80.059, 45.0064], [80.4554, 44.7463], [80.3551, 44.0973], [80.7857, 43.1616], [80.1651, 42.6653], [80.2095, 42.1899], [79.49, 42.4576], [79.1646, 42.759], [76.9442, 42.9716], [75.0475, 42.9046], [74.209, 43.2402], [73.5565, 43.0027], [73.422, 42.5934], [72.8551, 42.561], [71.8168, 42.822], [71.2567, 42.7337], [70.9468, 42.2485], [70.4159, 42.0785], [70.0954, 41.8206], [69.0652, 41.367], [68.2919, 40.6563], [67.9359, 41.1965], [66.8142, 41.1423], [66.6686, 41.2706], [66.4986, 41.9951], [66.0094, 42.0048], [66.1004, 42.9907], [65.803, 42.8771], [65.4963, 43.3108], [64.9054, 43.7147], [64.4434, 43.5513], [63.2071, 43.6281], [61.9904, 43.4923], [61.1608, 44.1688], [61.0081, 44.3939], [58.5551, 45.5555], [55.9757, 44.9949], [55.9766, 42.929], [55.9774, 41.3221], [55.5451, 41.2626], [54.9037, 41.9192], [54.1211, 42.3351], [53.2502, 42.2059], [52.4938, 41.7802], [52.5968, 42.7603], [51.8439, 42.9104], [51.3019, 43.4825], [50.8305, 44.1928], [50.3311, 44.3255], [50.4093, 44.6242], [50.8603, 44.6287], [51.4156, 45.358], [52.5311, 45.3988], [52.7739, 45.5728], [53.1352, 46.1916], [53.1703, 46.6692], [52.9159, 46.9542], [52.1888, 46.8397], [51.1781, 47.11], [50.4195, 46.8796], [50, 46.6342], [49.3475, 46.5192], [49.2321, 46.3372], [48.6102, 46.5663], [48.9595, 46.7744], [48.1099, 47.7452], [47.0934, 47.9477], [47.0042, 48.2846], [46.661, 48.4124], [46.7028, 48.8055], [47.0144, 49.0984], [46.8022, 49.367], [47.3264, 50.2734], [47.706, 50.378], [48.4344, 49.8284], [48.8432, 50.0131], [48.8086, 50.6012], [49.498, 51.0835], [50.2468, 51.2895], [50.7941, 51.7292], [51.6091, 51.4839], [52.3309, 51.6812], [52.571, 51.4817], [53.3381, 51.4824], [54.0416, 51.1153], [54.4216, 50.7804], [54.727, 50.9981], [55.5424, 50.6017], [55.7977, 50.6021], [56.4915, 51.0196], [57.0117, 51.0651], [57.4423, 50.8889], [57.8387, 51.0917], [58.3594, 51.0638], [58.8836, 50.6945], [59.8122, 50.5819], [59.9552, 50.7992], [60.6379, 50.6638], [61.3894, 50.8609], [61.5851, 51.2298], [61.3632, 51.442], [60.4647, 51.6513], [60.0657, 51.9764], [60.9375, 52.2805], [60.8021, 52.7448], [61.0476, 52.9725], [61.974, 52.9437], [62.0148, 53.1079], [61.1994, 53.2872], [60.9797, 53.6217], [61.3339, 54.0492], [61.9287, 53.9464], [63.0739, 54.1053], [64.4611, 54.3841], [65.1576, 54.3643], [65.4767, 54.6233], [66.2225, 54.6673], [68.0739, 54.9596], [68.2062, 55.1609], [68.9773, 55.3895], [70.1824, 55.1625], [70.7382, 55.3052], [71.1856, 54.5994], [71.0933, 54.2123], [72.9141, 54.1073], [73.3993, 53.8115], [73.2857, 53.5984], [74.4518, 53.6472], [76.2664, 54.312], [76.5758, 53.9424], [77.7042, 53.3791], [78.4757, 52.6385], [79.4687, 51.493], [79.9862, 50.7746], [80.8771, 51.2815], [81.4657, 50.7397], [82.4938, 50.7275], [83.3571, 50.9945], [83.9453, 50.7746], [84.2578, 50.2883], [84.9893, 50.0615], [85.21, 49.6648], [86.1807, 49.4993], [86.6144, 49.6098], [87.3229, 49.0858]]] }, \"properties\": { \"name\": \"Kazakhstan\", \"id\": \"KZ\" }, \"id\": \"KZ\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"MultiPolygon\", \"coordinates\": [[[[141.2296, 41.3727], [141.4626, 40.611], [141.7969, 40.2914], [141.978, 39.8444], [141.9007, 39.1115], [141.6584, 38.9748], [141.4675, 38.404], [141.1084, 38.3378], [140.9282, 37.9494], [141.0365, 37.4674], [140.9686, 37.0022], [140.6272, 36.5028], [140.6219, 36.0593], [140.874, 35.7251], [140.4572, 35.5102], [140.4164, 35.267], [139.7994, 34.9567], [139.6502, 35.409], [139.2494, 35.2781], [138.9826, 34.6984], [138.5773, 35.0863], [138.1889, 34.5963], [136.8848, 34.8058], [136.5332, 34.6784], [136.8537, 34.3242], [136.3299, 34.1768], [135.9162, 33.5616], [135.4528, 33.5536], [135.1753, 33.898], [135.1003, 34.2882], [135.3848, 34.5004], [134.7399, 34.7654], [134.2081, 34.6975], [133.9684, 34.5275], [133.1423, 34.3024], [132.2381, 34.227], [132.0903, 33.8554], [131.7405, 34.0521], [130.9188, 33.9757], [131.0041, 34.3925], [131.3543, 34.4134], [132.923, 35.5111], [133.3767, 35.4588], [134.2139, 35.5391], [135.1744, 35.7473], [135.6805, 35.5031], [136.0955, 35.7677], [136.0063, 35.9905], [136.6983, 36.742], [137.3424, 36.7705], [137.5142, 36.9516], [138.3199, 37.2183], [138.8849, 37.8438], [139.4012, 38.1425], [140.0479, 39.4635], [139.9228, 40.5986], [140.2814, 40.8463], [141.1186, 40.8822], [141.2296, 41.3727]]], [[[143.8241, 44.1169], [144.7985, 43.9402], [145.1012, 43.7644], [145.3476, 43.1767], [144.6307, 42.9468], [143.9693, 42.8815], [143.4295, 42.419], [143.2364, 42.0004], [141.8515, 42.5792], [140.9863, 42.3422], [140.4803, 42.5592], [140.3267, 42.2934], [140.7337, 42.1162], [140.3848, 41.5192], [139.9951, 41.5765], [140.1083, 41.9129], [139.8211, 42.3875], [139.8912, 42.6494], [140.7808, 43.2149], [141.2962, 43.1998], [141.6446, 44.0197], [141.7822, 44.7166], [141.5829, 45.156], [141.9376, 45.5094], [142.7042, 44.8191], [143.8241, 44.1169]]], [[[131.1745, 33.6024], [131.5829, 33.6526], [131.8967, 33.2548], [131.9766, 32.8438], [131.7321, 32.593], [131.3374, 31.4047], [130.5886, 31.1783], [130.2006, 31.2919], [130.3218, 31.6013], [130.1944, 32.0909], [130.6405, 32.6192], [129.5801, 33.2362], [130.3649, 33.6344], [130.4838, 33.8345], [130.953, 33.8718], [131.1745, 33.6024]]], [[[134.3572, 34.2562], [134.6373, 34.2265], [134.739, 33.8203], [134.3772, 33.6082], [134.1815, 33.2473], [133.6319, 33.511], [133.2861, 33.36], [132.9772, 32.842], [132.4951, 32.9166], [132.3659, 33.5123], [132.7841, 33.9926], [133.5822, 34.017], [134.0758, 34.3583], [134.3572, 34.2562]]]] }, \"properties\": { \"name\": \"Japan\", \"id\": \"JP\" }, \"id\": \"JP\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[39.1455, 32.1247], [38.9622, 31.9951], [36.9584, 31.4917], [37.9803, 30.5], [37.6336, 30.3132], [37.4694, 29.9949], [36.7551, 29.8662], [36.4759, 29.4951], [36.0156, 29.1906], [34.9507, 29.3535], [34.9734, 29.555], [35.174, 30.524], [35.4394, 31.1326], [35.4505, 31.4793], [35.5589, 31.7656], [35.5513, 32.3955], [35.7875, 32.735], [36.3721, 32.387], [36.8182, 32.3173], [38.7735, 33.372], [39.1455, 32.1247]]] }, \"properties\": { \"name\": \"Jordan\", \"id\": \"JO\" }, \"id\": \"JO\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-2.0186, 49.2312], [-2.2359, 49.1763], [-2.2206, 49.2665], [-2.0186, 49.2312]]] }, \"properties\": { \"name\": \"Jersey\", \"id\": \"JE\" }, \"id\": \"JE\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-77.2614, 18.4572], [-76.3499, 18.1518], [-76.5246, 17.8664], [-76.8533, 17.9738], [-77.3615, 17.8336], [-77.7681, 17.8775], [-78.2167, 18.4479], [-77.8735, 18.522], [-77.2614, 18.4572]]] }, \"properties\": { \"name\": \"Jamaica\", \"id\": \"JM\" }, \"id\": \"JM\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"MultiPolygon\", \"coordinates\": [[[[9.632, 40.8822], [9.8051, 40.4996], [9.5623, 39.1661], [9.0563, 39.2394], [8.8814, 38.9127], [8.418, 39.2056], [8.4712, 40.2927], [8.1898, 40.6518], [9.2831, 41.2018], [9.632, 40.8822]]], [[[15.5766, 38.2202], [15.0994, 37.4585], [15.2943, 37.0133], [15.1127, 36.6879], [14.5019, 36.7989], [12.4356, 37.8198], [13.3518, 38.1807], [13.6816, 38.0009], [14.5059, 38.0453], [14.846, 38.1718], [15.5766, 38.2202]]], [[[13.6998, 46.5201], [13.3993, 46.3177], [13.7198, 45.5875], [13.2062, 45.7713], [12.2745, 45.4459], [12.5235, 44.9678], [12.2483, 44.7223], [12.3961, 44.2238], [13.564, 43.5713], [14.0106, 42.6898], [14.8659, 42.0523], [15.1687, 41.9338], [15.9641, 41.9396], [16.0125, 41.4353], [17.1032, 41.062], [17.955, 40.6554], [18.4859, 40.105], [18.0779, 39.9367], [17.8649, 40.2803], [16.9283, 40.4579], [16.5301, 39.8595], [16.5976, 39.6389], [17.1147, 39.3805], [17.1746, 38.9979], [16.5589, 38.7147], [16.5456, 38.4093], [16.0569, 37.9419], [15.7244, 37.9392], [15.9726, 38.7125], [16.1967, 38.7591], [16.0236, 39.3535], [15.6929, 39.99], [14.9507, 40.239], [14.7656, 40.6683], [14.1024, 40.8272], [13.7331, 41.2356], [13.0886, 41.244], [12.6309, 41.4695], [11.6375, 42.2876], [10.7084, 42.9361], [10.0475, 44.0201], [8.766, 44.4223], [8.0815, 43.9189], [7.4929, 43.7671], [7.6771, 44.0831], [6.9673, 44.2802], [7.0308, 44.7166], [6.6277, 45.1178], [7.1533, 45.401], [7.021, 45.9257], [7.9932, 46.0158], [8.4584, 46.2458], [8.9537, 45.8298], [9.2512, 46.2866], [9.9392, 46.3616], [10.4528, 46.865], [11.0249, 46.7971], [11.2442, 46.9755], [12.1542, 46.9351], [12.3881, 46.7025], [13.6998, 46.5201]], [[12.4853, 43.9016], [12.5146, 43.9531], [12.441, 43.9824], [12.397, 43.9344], [12.4853, 43.9016]]]] }, \"properties\": { \"name\": \"Italy\", \"id\": \"IT\" }, \"id\": \"IT\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[35.7875, 32.735], [35.5513, 32.3955], [35.1931, 32.5344], [34.9561, 32.1611], [34.9507, 31.6022], [35.4505, 31.4793], [35.4394, 31.1326], [35.174, 30.524], [34.9734, 29.555], [34.9041, 29.4773], [34.2454, 31.2085], [34.4775, 31.5849], [34.6786, 31.8956], [35.1087, 33.0835], [35.411, 33.0755], [35.8691, 33.4319], [35.7875, 32.735]]] }, \"properties\": { \"name\": \"Israel\", \"id\": \"IL\" }, \"id\": \"IL\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-15.5431, 66.2285], [-14.6982, 66.0203], [-14.7576, 65.7557], [-13.6159, 65.4872], [-13.853, 64.8622], [-15.0215, 64.296], [-16.0605, 64.1113], [-16.6404, 63.8654], [-17.8156, 63.7129], [-18.6537, 63.4066], [-20.1982, 63.5558], [-21.8328, 64.2054], [-21.9502, 64.515], [-22.684, 65.0264], [-22.0057, 65.4934], [-22.9024, 65.5804], [-24.2241, 65.4872], [-23.7371, 66.0695], [-22.4261, 66.4302], [-21.3035, 65.8765], [-21.23, 65.4206], [-20.3567, 65.7191], [-20.3567, 66.0331], [-18.7775, 66.1688], [-16.7485, 66.1317], [-15.9854, 66.5145], [-15.5431, 66.2285]]] }, \"properties\": { \"name\": \"Iceland\", \"id\": \"IS\" }, \"id\": \"IS\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[44.7652, 37.1424], [45.3618, 36.0154], [45.7235, 35.8365], [46.1337, 35.1276], [45.6783, 34.7982], [45.4377, 34.4152], [45.3968, 33.9708], [46.1457, 33.2295], [46.1128, 32.9579], [46.57, 32.834], [47.3713, 32.4239], [47.8298, 31.7944], [47.6793, 31.0025], [48.0105, 30.9896], [48.0149, 30.4654], [48.5467, 29.9625], [47.9785, 29.9829], [47.6727, 30.0956], [47.1143, 29.9611], [46.9056, 29.5377], [46.5314, 29.0964], [46.3565, 29.0636], [44.7163, 29.1937], [42.8578, 30.4952], [42.0743, 31.0802], [40.3693, 31.9391], [39.1455, 32.1247], [38.7735, 33.372], [40.6894, 34.3322], [40.9872, 34.4289], [41.1945, 34.7689], [41.3543, 35.6403], [41.2456, 36.0735], [41.4169, 36.5148], [41.7884, 36.5973], [42.3588, 37.1087], [42.7748, 37.3719], [43.5161, 37.2445], [44.1562, 37.2831], [44.2818, 36.9782], [44.7652, 37.1424]]] }, \"properties\": { \"name\": \"Iraq\", \"id\": \"IQ\" }, \"id\": \"IQ\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[46.1146, 38.8776], [46.4906, 38.9065], [47.773, 39.6486], [47.9958, 39.6842], [48.2422, 38.9788], [48.0233, 38.819], [48.5929, 38.4111], [48.8685, 38.4355], [49.0811, 37.6676], [49.47, 37.4967], [50.1305, 37.407], [50.5331, 37.0137], [51.1186, 36.7425], [52.1902, 36.6217], [54.0172, 36.9524], [53.9142, 37.3435], [54.7452, 37.502], [55.0755, 37.9024], [55.5784, 38.0999], [56.2287, 38.0733], [56.4409, 38.2495], [57.1937, 38.2162], [57.4236, 37.9477], [58.4357, 37.6387], [58.8157, 37.6835], [59.2409, 37.5206], [59.5623, 37.1788], [60.0626, 36.9631], [60.3413, 36.6377], [61.1195, 36.6426], [61.262, 35.6194], [61.08, 34.8555], [60.4856, 34.0947], [60.5109, 33.6388], [60.9171, 33.5052], [60.5606, 33.1376], [60.8292, 32.2494], [60.854, 31.4833], [61.6602, 31.3825], [61.7844, 30.8321], [61.104, 30.1285], [60.8434, 29.8586], [61.3184, 29.3725], [61.6229, 28.7915], [61.8901, 28.5465], [62.3531, 28.4146], [62.7397, 28.0023], [62.7632, 27.2503], [63.1667, 27.2525], [63.1681, 26.6657], [62.4392, 26.5609], [61.8697, 26.2422], [61.6686, 25.769], [61.5878, 25.2022], [61.412, 25.1023], [60.6641, 25.2821], [59.4562, 25.4814], [59.0461, 25.4175], [58.7979, 25.5546], [57.7961, 25.6532], [57.3344, 25.7917], [56.9824, 26.9054], [56.3561, 27.2001], [55.6503, 26.9777], [54.8957, 26.5565], [53.7056, 26.7256], [53.4548, 26.9431], [52.6918, 27.3235], [52.476, 27.6165], [51.6664, 27.8451], [51.2788, 28.1314], [51.0622, 28.7262], [50.6752, 29.1466], [50.6499, 29.42], [49.9831, 30.2093], [49.5548, 30.0291], [48.9191, 30.1209], [48.5467, 29.9625], [48.0149, 30.4654], [48.0105, 30.9896], [47.6793, 31.0025], [47.8298, 31.7944], [47.3713, 32.4239], [46.57, 32.834], [46.1128, 32.9579], [46.1457, 33.2295], [45.3968, 33.9708], [45.4377, 34.4152], [45.6783, 34.7982], [46.1337, 35.1276], [45.7235, 35.8365], [45.3618, 36.0154], [44.7652, 37.1424], [44.5614, 37.7448], [44.2112, 37.9081], [44.4309, 38.3569], [44.023, 39.3774], [44.8171, 39.6504], [45.4798, 39.0063], [46.1146, 38.8776]]] }, \"properties\": { \"name\": \"Iran\", \"id\": \"IR\" }, \"id\": \"IR\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-6.218, 54.0887], [-6.0274, 52.927], [-6.5612, 52.1888], [-7.5273, 52.0989], [-8.8135, 51.5849], [-10.3786, 51.8688], [-9.9558, 52.1367], [-9.2993, 53.0975], [-9.7954, 53.3951], [-9.996, 54.276], [-8.6231, 54.3468], [-8.764, 54.6813], [-8.2746, 55.1463], [-7.2468, 55.3531], [-7.2186, 55.0921], [-8.1183, 54.4143], [-7.3553, 54.1213], [-6.218, 54.0887]]] }, \"properties\": { \"name\": \"Ireland\", \"id\": \"IE\" }, \"id\": \"IE\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[72.492, -7.3773], [72.4671, -7.3675], [72.4738, -7.3098], [72.4356, -7.2304], [72.4938, -7.2619], [72.492, -7.3773]]] }, \"properties\": { \"name\": \"British Indian Ocean Territory\", \"id\": \"IO\" }, \"id\": \"IO\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[78.7198, 31.8876], [78.8445, 31.3017], [79.1073, 31.4025], [79.3386, 31.1055], [79.3697, 31.0798], [79.9165, 30.8942], [79.9245, 30.8889], [80.1913, 30.5684], [80.6823, 30.4148], [81.0103, 30.1645], [80.4017, 29.7303], [80.0706, 28.8301], [80.5868, 28.6494], [81.8528, 27.8669], [81.9877, 27.9139], [82.7335, 27.5189], [83.2897, 27.371], [84.0909, 27.4913], [84.6103, 27.2987], [84.6853, 27.0412], [85.293, 26.7412], [86.3663, 26.5743], [86.7014, 26.4349], [87.0166, 26.5556], [87.2874, 26.3603], [88.0549, 26.43], [88.1614, 26.7247], [87.9843, 27.134], [88.1099, 27.8704], [88.6213, 28.0919], [88.8485, 27.8686], [88.8912, 27.316], [88.8579, 26.9613], [89.7638, 26.7016], [90.3458, 26.8903], [90.7395, 26.7718], [91.9984, 26.8548], [92.0836, 27.2907], [91.5949, 27.5575], [91.6317, 27.7599], [91.9775, 27.7301], [92.6642, 27.949], [92.702, 28.147], [93.2067, 28.5909], [93.9022, 28.803], [94.6231, 29.3126], [94.7696, 29.1759], [95.4204, 29.0543], [96.0352, 29.4471], [96.4355, 29.0507], [96.776, 28.3671], [97.3224, 28.218], [97.3353, 27.9379], [96.6659, 27.3391], [96.0613, 27.217], [95.1287, 26.5973], [95.1323, 26.0411], [94.6227, 25.4099], [94.7075, 25.0486], [94.2929, 24.3219], [94.1277, 23.8763], [93.3074, 24.0219], [93.4149, 23.6823], [93.366, 23.1323], [93.0788, 22.7182], [93.1618, 22.3604], [92.9643, 22.0039], [92.575, 21.9782], [92.4916, 22.6853], [92.3615, 22.929], [92.2461, 23.6836], [91.938, 23.5047], [91.6198, 22.9796], [91.3152, 23.1043], [91.1603, 23.6605], [91.3672, 24.0933], [91.8768, 24.1954], [92.2514, 24.895], [92.0499, 25.1693], [90.4394, 25.1578], [89.814, 25.3052], [89.8229, 25.9413], [89.2893, 26.0376], [89.1082, 26.2023], [88.4402, 26.3696], [88.0846, 25.8884], [88.4521, 25.5746], [88.4561, 25.1884], [88.1454, 24.4857], [88.7336, 24.2309], [88.5671, 23.6743], [88.7407, 23.4368], [89.0514, 22.0932], [89.0518, 21.6541], [88.2537, 21.6222], [87.9483, 21.8255], [87.1005, 21.5006], [86.8595, 21.2369], [86.9753, 20.7002], [86.7503, 20.3131], [86.2793, 19.9194], [85.5748, 19.693], [84.7709, 19.1253], [84.1042, 18.2926], [83.6541, 18.0697], [83.1982, 17.609], [82.3597, 17.0963], [82.259, 16.56], [81.7618, 16.3297], [81.2385, 16.264], [80.9788, 15.7584], [80.6467, 15.8951], [80.2934, 15.7109], [80.0533, 15.0739], [80.1656, 14.5776], [80.1119, 14.2123], [80.3422, 13.3614], [80.229, 12.6902], [79.8584, 11.9888], [79.7541, 11.5751], [79.8486, 11.1969], [79.838, 10.3225], [79.3905, 10.306], [78.9964, 9.6833], [78.9795, 9.2687], [78.4215, 9.1049], [78.1925, 8.8909], [78.0602, 8.3844], [77.5178, 8.0782], [76.9669, 8.4071], [76.5536, 8.9029], [76.3246, 9.452], [76.3463, 9.9221], [75.9224, 10.7841], [75.724, 11.3616], [75.1966, 12.0576], [74.7705, 13.0773], [74.6711, 13.6676], [74.3821, 14.4946], [73.9493, 15.0748], [73.932, 15.397], [73.4761, 16.0544], [73.3376, 16.4597], [73.1561, 17.6218], [72.8711, 18.6832], [72.6678, 19.8311], [72.8813, 20.5631], [72.8138, 21.117], [72.5431, 21.6968], [72.5901, 22.2783], [72.3326, 22.2703], [72.037, 21.8233], [72.2541, 21.5312], [72.0153, 21.1557], [71.0245, 20.7388], [70.7191, 20.7406], [70.1274, 21.0948], [69.0088, 22.1966], [70.1771, 22.5726], [70.2512, 22.9707], [69.6644, 22.759], [69.2361, 22.8487], [68.6408, 23.19], [68.1649, 23.8572], [68.7242, 23.9646], [68.7282, 24.2656], [69.5592, 24.2731], [69.7163, 24.1728], [70.5469, 24.4183], [71.044, 24.4001], [71.048, 24.6877], [70.6521, 25.4228], [70.2646, 25.7064], [70.0777, 26.0718], [70.1567, 26.4713], [69.47, 26.8046], [69.5681, 27.1744], [70.1447, 27.8491], [70.4035, 28.0249], [70.7373, 27.7293], [71.8701, 27.9623], [72.342, 28.752], [72.903, 29.029], [73.3816, 29.9345], [73.809, 30.0934], [73.8991, 30.4352], [74.6329, 31.0345], [74.5099, 31.7127], [75.3334, 32.2792], [74.6578, 32.5189], [73.9941, 33.2424], [74.1499, 33.507], [73.9613, 34.6535], [74.3004, 34.7654], [75.7093, 34.5031], [76.5945, 34.7357], [77.0486, 35.1099], [77.7992, 35.496], [77.8107, 35.4845], [78.2821, 34.654], [78.9364, 34.3521], [78.7531, 34.0876], [78.8019, 33.4999], [79.1127, 33.2264], [79.1353, 33.1718], [79.2165, 32.5641], [79.2192, 32.5011], [78.3896, 32.5197], [78.7198, 31.8876]]] }, \"properties\": { \"name\": \"India\", \"id\": \"IN\" }, \"id\": \"IN\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-4.4121, 54.1854], [-4.7457, 54.1189], [-4.5086, 54.3768], [-4.4121, 54.1854]]] }, \"properties\": { \"name\": \"Isle of Man\", \"id\": \"IM\" }, \"id\": \"IM\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"MultiPolygon\", \"coordinates\": [[[[96.4924, 5.2293], [97.4512, 5.2359], [97.9084, 4.8799], [98.2484, 4.4147], [98.3074, 4.0929], [99.7323, 3.1829], [100.4572, 2.2574], [100.6854, 2.1202], [101.0462, 2.2574], [101.4768, 1.6932], [101.7849, 1.6213], [102.1573, 1.2591], [102.4694, 0.7792], [102.8493, 0.7153], [103.0664, 0.492], [103.4788, 0.4801], [103.7868, 0.0468], [103.4286, -0.1916], [103.4313, -0.5334], [103.7211, -0.8867], [104.3608, -1.0385], [104.5685, -1.9218], [104.8451, -2.0932], [104.6684, -2.3857], [105.3968, -2.3804], [105.5819, -2.4918], [106.0445, -3.1062], [105.8438, -3.6135], [105.8873, -5.0096], [105.8163, -5.6767], [105.6183, -5.7997], [105.3493, -5.5493], [105.0812, -5.7455], [104.6396, -5.5205], [104.6014, -5.9044], [103.8312, -5.0797], [102.919, -4.4707], [102.5377, -4.152], [102.1276, -3.5993], [101.5785, -3.167], [100.8478, -2.1438], [100.8554, -1.9343], [100.4865, -1.2991], [100.3081, -0.8268], [99.5978, 0.1023], [99.1593, 0.3518], [98.7962, 1.4948], [98.5644, 1.9023], [97.7006, 2.3586], [97.591, 2.8464], [97.3912, 2.9752], [96.9691, 3.5753], [96.4449, 3.8163], [95.4949, 4.7614], [95.2068, 5.2839], [95.2277, 5.5648], [95.629, 5.6092], [96.1333, 5.2941], [96.4924, 5.2293]]], [[[120.0124, -9.3748], [120.5038, -9.674], [120.8327, -10.0375], [120.439, -10.2941], [120.1447, -10.2], [119.6009, -9.7734], [119.0856, -9.7068], [119.1855, -9.3846], [120.0124, -9.3748]]], [[[125.0679, -9.512], [124.4274, -10.1485], [123.8574, -10.3438], [123.5893, -9.9669], [123.7092, -9.6149], [124.0363, -9.3415], [124.4442, -9.1901], [124.9223, -8.9424], [125.0679, -9.512]]], [[[116.6406, -8.614], [116.3774, -8.9291], [116.0764, -8.7449], [116.0613, -8.4373], [116.4014, -8.2043], [116.7343, -8.3871], [116.6406, -8.614]]], [[[122.7828, -8.6117], [121.6513, -8.8989], [121.0351, -8.9353], [119.8078, -8.6974], [119.9183, -8.4453], [120.6103, -8.2407], [121.4444, -8.578], [121.9664, -8.4551], [122.263, -8.6251], [122.6034, -8.4027], [122.7828, -8.6117]]], [[[118.2426, -8.3179], [118.9879, -8.3379], [119.0061, -8.7498], [118.1898, -8.8403], [117.0614, -9.0991], [116.7884, -9.0064], [116.835, -8.5323], [117.1649, -8.3672], [117.567, -8.4266], [118.1174, -8.1221], [118.2426, -8.3179]]], [[[115.4479, -8.155], [115.7045, -8.4071], [115.2361, -8.7977], [114.4753, -8.1195], [115.4479, -8.155]]], [[[126.8009, -7.668], [126.4719, -7.9503], [125.8434, -7.8167], [126.6095, -7.5717], [126.8009, -7.668]]], [[[138.5351, -8.2735], [138.2963, -8.4053], [137.6851, -8.2624], [138.0074, -7.6414], [138.2954, -7.4385], [138.77, -7.3906], [138.9893, -7.696], [138.5351, -8.2735]]], [[[131.3255, -7.9996], [131.0866, -7.8651], [131.2602, -7.4705], [131.6912, -7.439], [131.3255, -7.9996]]], [[[113.8445, -7.1052], [113.4708, -7.2184], [112.7637, -7.1398], [112.868, -6.9001], [113.9746, -6.873], [113.8445, -7.1052]]], [[[134.537, -6.4424], [134.3559, -6.8149], [134.0589, -6.7691], [134.1681, -6.1761], [134.537, -6.4424]]], [[[107.3739, -6.0074], [107.6669, -6.2156], [108.295, -6.2649], [108.6776, -6.7905], [110.4261, -6.9471], [110.7369, -6.4722], [111.1546, -6.6693], [111.5403, -6.6484], [112.0872, -6.8934], [112.5391, -6.9263], [112.7943, -7.5526], [113.2484, -7.7182], [114.0705, -7.633], [114.4442, -7.8957], [114.387, -8.4053], [114.5836, -8.7698], [113.2533, -8.2868], [112.6789, -8.4093], [111.5101, -8.305], [110.6072, -8.1497], [110.0386, -7.8904], [109.2818, -7.7049], [108.7411, -7.6671], [108.4517, -7.7968], [107.9173, -7.724], [107.2852, -7.4718], [106.6313, -7.4155], [106.5199, -7.0537], [105.4838, -6.7816], [105.8682, -6.1166], [106.0751, -5.9142], [106.8253, -6.0984], [107.0463, -5.9044], [107.3739, -6.0074]]], [[[134.747, -5.7069], [134.7559, -6.1708], [134.4411, -6.335], [134.3413, -5.7127], [134.747, -5.7069]]], [[[122.6451, -5.2692], [122.3961, -5.0699], [122.369, -4.7672], [122.702, -4.6185], [122.6451, -5.2692]]], [[[126.8612, -3.0879], [127.2274, -3.3911], [127.2297, -3.6331], [126.6863, -3.8235], [126.2145, -3.6051], [126.0263, -3.1705], [126.8612, -3.0879]]], [[[129.7545, -2.866], [130.3791, -2.9894], [130.8598, -3.5705], [130.8052, -3.8577], [129.8442, -3.3272], [129.4678, -3.4533], [128.9675, -3.3259], [128.4193, -3.416], [128.0819, -3.1838], [128.1987, -2.866], [129.4274, -2.7905], [129.7545, -2.866]]], [[[108.2071, -2.9978], [107.6145, -3.2096], [107.6665, -2.5664], [108.0744, -2.597], [108.2071, -2.9978]]], [[[124.9694, -1.7057], [124.8344, -1.8943], [124.4176, -2.0053], [124.3808, -1.6875], [124.9694, -1.7057]]], [[[135.4741, -1.5916], [136.2016, -1.6551], [136.1927, -1.8593], [135.4741, -1.5916]]], [[[106.0458, -1.6693], [106.3658, -2.4647], [106.6788, -2.704], [106.547, -3.0555], [105.9988, -2.8247], [105.7857, -2.1815], [105.1332, -2.0426], [105.5855, -1.5268], [106.0458, -1.6693]]], [[[128.153, -1.6604], [127.5617, -1.7283], [127.6465, -1.3324], [128.153, -1.6604]]], [[[99.1637, -1.778], [98.8743, -1.6639], [98.6017, -1.1979], [98.869, -0.9155], [99.2671, -1.6275], [99.1637, -1.778]]], [[[135.3831, -0.6514], [135.8935, -0.726], [135.8389, -1.1193], [135.3831, -0.6514]]], [[[140.9734, -2.6099], [140.9739, -4.0232], [140.9748, -6.3461], [140.9761, -9.1187], [139.9347, -8.1013], [139.3856, -8.1892], [138.8561, -8.1452], [139.0878, -7.5872], [138.7478, -7.2517], [138.8645, -6.8584], [138.4388, -6.3435], [138.0611, -5.4654], [137.0894, -4.9243], [136.6189, -4.8187], [135.9797, -4.531], [135.1957, -4.4507], [134.1473, -3.7968], [133.9737, -3.8182], [133.6532, -3.3645], [133.2488, -4.0623], [132.9687, -4.0947], [132.7539, -3.7036], [132.7512, -3.2948], [132.3482, -2.9752], [133.1911, -2.4377], [133.6088, -2.5473], [133.9049, -2.391], [133.9218, -2.1021], [132.963, -2.2725], [132.3078, -2.2423], [132.0233, -1.9902], [131.9305, -1.5596], [131.2935, -1.3936], [131.2571, -0.8556], [131.8044, -0.7038], [132.1285, -0.4539], [132.6252, -0.3589], [133.4726, -0.726], [133.9746, -0.7442], [134.2596, -1.363], [134.106, -1.7212], [134.1557, -2.1953], [135.0373, -3.333], [135.4865, -3.345], [136.2433, -2.5832], [136.3898, -2.2734], [136.843, -2.1975], [137.1236, -1.8411], [137.8063, -1.4833], [138.6497, -1.7909], [139.7896, -2.3484], [140.6223, -2.4456], [140.9734, -2.6099]]], [[[97.4814, 1.4651], [97.9319, 0.9741], [97.8764, 0.6283], [97.4054, 0.947], [97.2443, 1.4238], [97.4814, 1.4651]]], [[[124.889, 0.9954], [124.4274, 0.4707], [123.754, 0.3056], [123.2653, 0.3265], [123.0824, 0.4858], [121.8421, 0.4366], [121.4258, 0.4947], [120.3489, 0.4494], [120.1274, 0.1667], [120.012, -0.307], [120.0972, -0.6501], [120.5176, -1.0394], [120.6676, -1.3701], [121.0338, -1.4065], [121.5194, -0.8556], [121.9695, -0.9333], [122.2798, -0.7571], [122.8888, -0.7553], [122.5067, -1.3479], [121.7187, -1.8628], [121.349, -1.9458], [121.8484, -2.3316], [122.3992, -3.2007], [122.2527, -3.6206], [122.8773, -4.1089], [122.8973, -4.349], [122.207, -4.4964], [121.9172, -4.848], [121.4866, -4.5812], [121.618, -4.0929], [120.9144, -3.5558], [121.0542, -3.167], [121.052, -2.7515], [120.6538, -2.6676], [120.2539, -3.0529], [120.4368, -3.7072], [120.3627, -4.0858], [120.4199, -4.6176], [120.2792, -5.1463], [120.3116, -5.5418], [119.7172, -5.6932], [119.3763, -5.425], [119.6116, -4.4236], [119.6236, -4.0343], [119.4198, -3.4755], [118.9946, -3.5376], [118.8126, -3.1568], [118.7837, -2.7648], [119.0922, -2.4829], [119.3217, -1.9298], [119.3089, -1.4083], [119.7718, -0.4836], [119.8091, 0.2386], [120.2694, 0.971], [120.5167, 0.8174], [120.9122, 1.2888], [121.44, 1.2142], [121.5918, 1.0678], [122.4365, 1.018], [122.8924, 0.8498], [123.2781, 0.9279], [123.8468, 0.8383], [124.2738, 1.022], [124.9893, 1.7012], [125.2339, 1.5023], [124.889, 0.9954]]], [[[127.7326, 0.848], [128.1609, 1.1579], [128.4242, 1.5174], [128.6883, 1.5725], [128.7025, 1.1064], [128.299, 0.8769], [128.6914, 0.3602], [127.9829, 0.4721], [127.8875, 0.2985], [128.0464, -0.706], [127.6918, -0.2417], [127.7086, 0.2883], [127.5555, 0.4898], [127.4201, 1.252], [127.6318, 1.8437], [128.0109, 1.7012], [128.0118, 1.3319], [127.6527, 1.0141], [127.7326, 0.848]]], [[[117.5746, 4.1706], [117.6301, 3.6361], [117.1662, 3.5922], [117.6105, 3.0644], [118.0664, 2.3178], [117.8649, 1.9684], [118.0806, 1.7016], [118.9848, 0.9821], [118.5347, 0.8134], [118.196, 0.8742], [117.745, 0.7295], [117.5222, 0.2359], [117.4627, -0.3238], [117.5626, -0.7708], [116.5545, -1.474], [116.4236, -2.0528], [116.5656, -2.2996], [116.3308, -2.9024], [115.9561, -3.5949], [114.6937, -4.1697], [114.5361, -3.4946], [114.0825, -3.2788], [113.7957, -3.4564], [113.5258, -3.1838], [112.9714, -3.1869], [112.6003, -3.4005], [112.2851, -3.321], [111.8222, -3.5323], [111.8231, -3.0573], [111.3676, -2.9335], [111.0445, -3.0555], [110.5739, -2.8913], [110.2326, -2.925], [110.0191, -1.3989], [109.7874, -1.0114], [109.454, -0.8689], [109.1606, -0.4947], [109.2574, 0.0313], [108.9444, 0.3558], [108.9058, 0.7939], [109.0758, 1.4957], [109.3785, 1.9227], [109.6289, 2.0275], [109.6542, 1.6151], [110.5056, 0.8618], [110.9379, 1.0172], [111.7698, 0.9994], [112.0783, 1.1432], [112.1857, 1.4393], [112.476, 1.5592], [113.6222, 1.236], [113.9022, 1.4344], [114.5459, 1.4673], [114.8304, 1.98], [114.7865, 2.2503], [115.1509, 2.4931], [115.0861, 2.8411], [115.4545, 3.0342], [115.5686, 3.9389], [115.8962, 4.3486], [117.1005, 4.337], [117.5746, 4.1706]]]] }, \"properties\": { \"name\": \"Indonesia\", \"id\": \"ID\" }, \"id\": \"ID\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[22.132, 48.4053], [22.8764, 47.9472], [22.2905, 47.7279], [21.1519, 46.3044], [20.2419, 46.1086], [19.5308, 46.1552], [18.9054, 45.9315], [17.9639, 45.7704], [17.3105, 45.9963], [16.5163, 46.4997], [16.0929, 46.8632], [16.4533, 47.0066], [16.4342, 47.3675], [17.1475, 48.0058], [17.7619, 47.7701], [18.7242, 47.787], [18.7917, 48.0005], [19.8988, 48.1314], [20.4901, 48.5269], [21.4515, 48.5522], [22.132, 48.4053]]] }, \"properties\": { \"name\": \"Hungary\", \"id\": \"HU\" }, \"id\": \"HU\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-71.7791, 19.7183], [-71.6571, 19.1306], [-71.7683, 18.0391], [-72.0599, 18.2286], [-72.8767, 18.1518], [-73.3851, 18.2513], [-73.885, 18.0418], [-74.419, 18.3463], [-74.2276, 18.6628], [-72.7894, 18.4346], [-72.3478, 18.6747], [-72.8112, 19.0716], [-72.7033, 19.4409], [-73.0527, 19.6109], [-73.1177, 19.9039], [-72.6369, 19.9008], [-71.7791, 19.7183]]] }, \"properties\": { \"name\": \"Haiti\", \"id\": \"HT\" }, \"id\": \"HT\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"MultiPolygon\", \"coordinates\": [[[[18.9054, 45.9315], [19.0549, 45.5271], [19.007, 44.8693], [18.6625, 45.0774], [17.8129, 45.0779], [16.5305, 45.2168], [16.2935, 45.0086], [15.7879, 45.1791], [15.7369, 44.7658], [16.214, 44.215], [17.6247, 43.0426], [17.5852, 42.9383], [16.903, 43.3924], [15.9415, 43.6565], [15.123, 44.2567], [14.8548, 45.081], [14.3861, 45.342], [13.9657, 44.8355], [13.6293, 45.1081], [13.5778, 45.5169], [13.8787, 45.4286], [15.3396, 45.4672], [15.6246, 45.8338], [15.6361, 46.2005], [16.5163, 46.4997], [17.3105, 45.9963], [17.9639, 45.7704], [18.9054, 45.9315]]], [[[17.6678, 42.897], [18.4362, 42.5597], [18.5174, 42.4327], [17.6678, 42.897]]]] }, \"properties\": { \"name\": \"Croatia\", \"id\": \"HR\" }, \"id\": \"HR\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-83.1576, 14.9931], [-83.8674, 14.7947], [-84.646, 14.6611], [-84.9851, 14.7525], [-85.1796, 14.3432], [-85.7868, 13.8443], [-86.1512, 13.9948], [-86.3317, 13.7702], [-86.7336, 13.7635], [-86.7108, 13.3134], [-87.0592, 12.9916], [-87.3373, 12.9792], [-87.4891, 13.3529], [-87.8143, 13.3991], [-87.7153, 13.8128], [-88.151, 13.9872], [-88.4491, 13.851], [-89.0572, 14.329], [-89.3626, 14.416], [-89.2223, 14.8661], [-88.9764, 15.1427], [-88.2284, 15.7291], [-87.6181, 15.9097], [-86.9072, 15.7624], [-86.3568, 15.7832], [-85.7839, 16.003], [-85.4836, 15.8995], [-84.9738, 15.9901], [-84.2614, 15.8227], [-83.7604, 15.2204], [-83.3691, 15.2399], [-83.1576, 14.9931]]] }, \"properties\": { \"name\": \"Honduras\", \"id\": \"HN\" }, \"id\": \"HN\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[73.7074, -53.1372], [73.465, -53.1843], [73.3363, -53.0298], [73.5858, -53.0271], [73.7074, -53.1372]]] }, \"properties\": { \"name\": \"Heard Island and McDonald Islands\", \"id\": \"HM\" }, \"id\": \"HM\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[114.0154, 22.5117], [114.2658, 22.541], [114.268, 22.2956], [114.0154, 22.5117]]] }, \"properties\": { \"name\": \"Hong Kong\", \"id\": \"HK\" }, \"id\": \"HK\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-57.1948, 5.5484], [-57.3309, 5.0202], [-57.7111, 4.9909], [-58.0544, 4.1719], [-57.8327, 3.6761], [-57.5497, 3.3529], [-57.3036, 3.3769], [-57.2097, 2.8828], [-56.7043, 2.0363], [-56.4828, 1.9422], [-56.8368, 1.8814], [-57.1189, 2.0141], [-57.5943, 1.7043], [-58.3407, 1.5876], [-58.5119, 1.2848], [-58.8625, 1.2036], [-59.2312, 1.3758], [-59.7563, 1.9005], [-59.7552, 2.2743], [-59.9942, 2.6902], [-59.8544, 3.5873], [-59.5512, 3.9335], [-59.8333, 4.476], [-60.1112, 4.511], [-59.9907, 5.0828], [-60.142, 5.239], [-60.7422, 5.2022], [-61.3767, 5.9071], [-61.1286, 6.2142], [-61.1457, 6.6945], [-60.3951, 6.9453], [-60.7191, 7.4989], [-60.5136, 7.8131], [-60.0324, 8.0537], [-59.8315, 8.3059], [-60.0175, 8.5491], [-59.2003, 8.0746], [-58.6266, 7.5459], [-58.4806, 7.0381], [-57.9825, 6.786], [-57.1902, 6.0975], [-57.1948, 5.5484]]] }, \"properties\": { \"name\": \"Guyana\", \"id\": \"GY\" }, \"id\": \"GY\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[144.7416, 13.2593], [144.6493, 13.4288], [144.7905, 13.5269], [144.7416, 13.2593]]] }, \"properties\": { \"name\": \"Guam\", \"id\": \"GU\" }, \"id\": \"GU\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-51.6526, 4.0614], [-51.9906, 3.7018], [-52.7006, 2.3635], [-52.9648, 2.1837], [-53.7678, 2.3551], [-54.13, 2.1211], [-54.6163, 2.3266], [-54.1954, 2.818], [-54.2032, 3.1381], [-53.9904, 3.5895], [-54.3508, 4.0543], [-54.4522, 5.0135], [-54.1559, 5.3589], [-53.8472, 5.7823], [-53.4544, 5.5635], [-52.8993, 5.425], [-52.2905, 4.9421], [-51.9196, 4.5244], [-51.6526, 4.0614]]] }, \"properties\": { \"name\": \"French Guiana\", \"id\": \"GF\" }, \"id\": \"GF\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-89.1615, 17.8149], [-89.2374, 15.8942], [-88.8941, 15.8907], [-88.2284, 15.7291], [-88.9764, 15.1427], [-89.2223, 14.8661], [-89.3626, 14.416], [-89.8726, 14.0454], [-90.0952, 13.7364], [-90.607, 13.9291], [-91.1461, 13.9255], [-91.8191, 14.2283], [-92.2352, 14.5452], [-92.0748, 15.0743], [-92.1871, 15.3207], [-91.7365, 16.07], [-90.4472, 16.0726], [-90.417, 16.3909], [-90.7107, 16.7083], [-91.4096, 17.2561], [-90.993, 17.2525], [-90.9892, 17.8163], [-89.1615, 17.8149]]] }, \"properties\": { \"name\": \"Guatemala\", \"id\": \"GT\" }, \"id\": \"GT\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"MultiPolygon\", \"coordinates\": [[[[-25.4324, 70.9213], [-25.4022, 70.6527], [-27.898, 70.4541], [-27.7089, 70.8971], [-25.4324, 70.9213]]], [[[-52.7313, 69.9447], [-52.0452, 69.8071], [-52.1125, 69.4891], [-53.5784, 69.2567], [-53.7831, 69.5064], [-54.804, 69.6304], [-54.8304, 70.1611], [-53.3751, 70.2213], [-52.7313, 69.9447]]], [[[-29.953, 83.5649], [-25.9475, 83.2897], [-24.4702, 82.8773], [-21.5208, 82.5954], [-25.1489, 82.0011], [-21.3379, 82.0687], [-21.1466, 81.6952], [-17.2261, 81.4304], [-15.5555, 81.8337], [-12.1928, 81.649], [-11.5288, 81.424], [-14.5035, 80.7633], [-16.7607, 80.5733], [-16.8683, 80.1982], [-19.4292, 80.2577], [-20.1385, 79.8033], [-19.2836, 79.683], [-19.0749, 79.1524], [-20.9557, 78.5551], [-20.8625, 77.9119], [-20.2319, 77.3684], [-18.339, 77.2152], [-18.5103, 76.7782], [-20.9422, 76.887], [-21.8772, 76.5734], [-21.5692, 76.2937], [-20.1037, 76.2191], [-19.5091, 75.7575], [-19.4261, 75.2299], [-20.485, 75.3143], [-19.2252, 74.4795], [-19.3692, 74.284], [-21.1295, 74.1109], [-20.3673, 73.8483], [-20.5096, 73.493], [-22.1851, 73.2699], [-22.0364, 72.9184], [-22.2931, 72.1196], [-24.0692, 72.4987], [-24.6669, 72.4374], [-22.0133, 71.6888], [-21.7523, 71.4784], [-21.5228, 70.5262], [-23.3279, 70.451], [-23.7917, 70.5551], [-24.377, 71.1463], [-25.7422, 71.1836], [-26.7179, 70.9506], [-27.6887, 70.9934], [-28.5409, 70.4769], [-28.0149, 70.4024], [-26.7472, 70.4756], [-23.1732, 70.1145], [-23.0882, 69.883], [-26.3414, 68.7023], [-29.2496, 68.2988], [-29.8686, 68.3116], [-30.9786, 68.0613], [-32.1373, 68.3849], [-32.2747, 67.9228], [-33.157, 67.6267], [-34.1016, 66.7258], [-34.6329, 66.4349], [-36.3792, 65.8307], [-37.7541, 65.593], [-39.9609, 65.5562], [-39.5779, 65.3407], [-40.6554, 64.9154], [-40.1822, 64.48], [-40.6177, 64.1317], [-40.5504, 63.7254], [-42.1529, 62.5686], [-42.3216, 62.1526], [-42.1103, 61.8572], [-42.4188, 61.537], [-42.7171, 60.7675], [-43.3201, 59.9281], [-44.0654, 59.9247], [-45.3793, 60.2028], [-46.0467, 60.6157], [-46.0116, 61.0968], [-46.8746, 60.8163], [-47.7963, 60.829], [-48.922, 61.2775], [-49.2891, 61.59], [-49.5534, 62.2328], [-50.3192, 62.4731], [-50.3382, 62.8287], [-51.4688, 63.6423], [-51.4511, 63.9047], [-52.0934, 64.4158], [-52.259, 65.1549], [-53.6346, 66.4136], [-53.0382, 66.8268], [-53.8845, 67.1356], [-53.4189, 67.5746], [-53.578, 67.8369], [-53.0393, 68.6108], [-51.2493, 68.74], [-50.5, 69.9358], [-52.2545, 70.059], [-54.0143, 70.4217], [-54.1659, 70.8201], [-52.4052, 70.6867], [-51.5246, 70.4394], [-51.1302, 70.9717], [-53.117, 71.3128], [-53.4761, 71.6402], [-54.6891, 71.3672], [-55.5939, 71.5536], [-55.3156, 72.1107], [-55.6017, 72.4536], [-54.7379, 72.8724], [-56.104, 73.5582], [-55.9295, 73.8954], [-56.7063, 74.2192], [-56.2556, 74.5268], [-58.6035, 75.3853], [-58.5163, 75.6891], [-61.3747, 76.1801], [-63.4388, 76.3394], [-66.8262, 75.9688], [-69.3728, 76.3319], [-69.2521, 76.6861], [-70.7928, 76.869], [-70.8629, 77.1755], [-69.3515, 77.4671], [-72.8181, 78.1945], [-72.3957, 78.5043], [-68.9935, 78.8574], [-67.4823, 79.1169], [-65.9679, 79.1324], [-64.7923, 80.0007], [-66.8437, 80.0761], [-66.996, 80.413], [-62.9932, 81.2069], [-61.436, 81.1337], [-61.203, 81.7469], [-58.7174, 82.0932], [-54.7259, 82.3513], [-52.7757, 82.3218], [-50.8944, 81.8952], [-48.8612, 82.4054], [-45.2912, 81.8288], [-44.239, 82.3682], [-46.4782, 82.9519], [-43.1945, 83.255], [-32.9845, 83.5995], [-29.953, 83.5649]]]] }, \"properties\": { \"name\": \"Greenland\", \"id\": \"GL\" }, \"id\": \"GL\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-61.7154, 12.0128], [-61.715, 12.185], [-61.6071, 12.2232], [-61.6271, 12.0541], [-61.7154, 12.0128]]] }, \"properties\": { \"name\": \"Grenada\", \"id\": \"GD\" }, \"id\": \"GD\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"MultiPolygon\", \"coordinates\": [[[[23.8521, 35.5355], [24.3129, 35.3638], [24.7212, 35.425], [25.4758, 35.3061], [25.7448, 35.1427], [24.7998, 34.9345], [24.4638, 35.1605], [23.5618, 35.295], [23.8521, 35.5355]]], [[[26.0391, 40.7269], [25.1043, 40.9945], [24.3839, 40.9129], [23.8787, 40.5444], [23.6643, 40.2239], [23.3119, 40.2164], [22.6296, 40.4956], [22.5923, 40.0371], [22.919, 39.6291], [22.9656, 39.0308], [23.2528, 38.6614], [23.9671, 38.2748], [23.5804, 38.0107], [23.1938, 37.9592], [23.1614, 37.3338], [22.765, 37.3932], [23.0735, 36.7749], [22.6083, 36.7798], [22.0805, 37.0288], [21.5829, 37.0807], [21.5714, 37.541], [21.1448, 37.9192], [21.4036, 38.1967], [21.8248, 38.3281], [22.7996, 37.9814], [22.4219, 38.4386], [21.4724, 38.3214], [21.1133, 38.3849], [20.7795, 39.0086], [20.301, 39.3273], [20.0013, 39.7095], [20.6574, 40.1174], [21.0312, 40.6585], [20.9641, 40.8498], [21.5758, 40.8689], [21.9296, 41.1073], [22.7246, 41.1783], [22.9159, 41.3363], [23.635, 41.3869], [24.0558, 41.5272], [25.2512, 41.2436], [26.1355, 41.3856], [26.321, 41.7167], [26.6246, 41.4016], [26.0391, 40.7269]]], [[[23.4153, 38.9588], [24.0989, 38.6712], [23.7589, 38.4013], [23.2519, 38.8013], [23.4153, 38.9588]]]] }, \"properties\": { \"name\": \"Greece\", \"id\": \"GR\" }, \"id\": \"GR\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[9.5907, 1.0318], [9.3861, 1.1392], [9.8069, 1.9276], [9.8007, 2.3044], [9.98, 2.1677], [11.3286, 2.1673], [11.3352, 0.9998], [9.5907, 1.0318]]] }, \"properties\": { \"name\": \"Equatorial Guinea\", \"id\": \"GQ\" }, \"id\": \"GQ\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-15.0431, 10.9404], [-15.3931, 11.2174], [-15.5018, 11.7238], [-16.1384, 11.9174], [-16.7119, 12.3551], [-15.5748, 12.4904], [-15.1962, 12.68], [-13.7294, 12.6738], [-13.7327, 11.7358], [-14.6831, 11.5085], [-15.0431, 10.9404]]] }, \"properties\": { \"name\": \"Guinea-Bissau\", \"id\": \"GW\" }, \"id\": \"GW\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-16.7634, 13.064], [-16.8248, 13.3409], [-16.5623, 13.5873], [-15.5096, 13.5864], [-15.8343, 13.1563], [-16.6488, 13.1541], [-16.7634, 13.064]]] }, \"properties\": { \"name\": \"Gambia\", \"id\": \"GM\" }, \"id\": \"GM\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-61.3272, 16.2302], [-61.5221, 16.228], [-61.529, 16.434], [-61.4065, 16.4682], [-61.3272, 16.2302]]] }, \"properties\": { \"name\": \"Guadeloupe\", \"id\": \"GP\" }, \"id\": \"GP\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-11.3894, 12.4043], [-11.3053, 12.0155], [-10.9333, 12.205], [-10.6774, 11.8996], [-10.2748, 12.2126], [-9.8207, 12.0426], [-9.043, 12.4025], [-8.8219, 11.6732], [-8.4075, 11.3865], [-8.2315, 10.4379], [-7.9907, 10.1627], [-8.1365, 10.022], [-8.137, 9.4955], [-7.8962, 9.416], [-7.951, 8.7866], [-7.8236, 8.4674], [-8.232, 7.5566], [-8.4863, 7.5584], [-8.7083, 7.6591], [-8.8896, 7.2627], [-9.1175, 7.2157], [-9.4598, 7.4425], [-9.369, 7.6396], [-9.5182, 8.3463], [-9.7683, 8.5345], [-10.2832, 8.4852], [-10.5005, 8.6876], [-10.6905, 9.3144], [-11.2056, 9.9776], [-11.911, 9.9931], [-12.5016, 9.8622], [-12.7559, 9.3734], [-13.2928, 9.0494], [-13.7005, 9.8511], [-14.4269, 10.2483], [-14.7758, 10.9315], [-15.0431, 10.9404], [-14.6831, 11.5085], [-13.7327, 11.7358], [-13.7294, 12.6738], [-13.0828, 12.6334], [-12.2912, 12.328], [-11.3894, 12.4043]]] }, \"properties\": { \"name\": \"Guinea\", \"id\": \"GN\" }, \"id\": \"GN\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-0.0686, 11.1157], [-0.0577, 10.6305], [0.3627, 10.2364], [0.2619, 9.4955], [0.5291, 9.3583], [0.4153, 8.6525], [0.688, 8.3041], [0.5837, 8.1456], [0.6348, 7.3537], [0.5256, 6.8508], [0.7369, 6.4526], [1.1874, 6.0895], [0.9499, 5.8103], [0.2597, 5.7575], [-0.7977, 5.2266], [-1.6384, 4.9807], [-2.0017, 4.7623], [-3.1139, 5.0885], [-3.0868, 5.1285], [-3.0191, 5.1307], [-2.7952, 5.1844], [-3.2007, 6.3483], [-3.2358, 6.8073], [-2.9858, 7.205], [-2.7899, 7.9321], [-2.5058, 8.2087], [-2.7466, 9.1098], [-2.6958, 9.4813], [-2.7865, 10.4019], [-2.9148, 10.5924], [-2.8298, 10.9985], [-0.7014, 10.9888], [-0.0686, 11.1157]]] }, \"properties\": { \"name\": \"Ghana\", \"id\": \"GH\" }, \"id\": \"GH\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-2.5124, 49.4946], [-2.5475, 49.4287], [-2.646, 49.4682], [-2.5124, 49.4946]]] }, \"properties\": { \"name\": \"Guernsey\", \"id\": \"GG\" }, \"id\": \"GG\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[46.4298, 41.8907], [46.1821, 41.6573], [46.6189, 41.3439], [46.4577, 41.07], [45.281, 41.4495], [45.0013, 41.291], [43.4393, 41.1073], [42.7876, 41.5636], [42.4663, 41.4398], [41.5101, 41.5174], [41.7631, 41.9702], [41.4888, 42.6591], [40.8367, 43.0635], [39.9782, 43.42], [40.6481, 43.534], [41.5807, 43.2193], [42.4192, 43.2242], [43.7824, 42.747], [43.9573, 42.5664], [44.5059, 42.7488], [45.1602, 42.6751], [45.7275, 42.4749], [45.6388, 42.205], [46.4298, 41.8907]]] }, \"properties\": { \"name\": \"Georgia\", \"id\": \"GE\" }, \"id\": \"GE\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[13.2937, 2.1615], [13.1627, 1.6479], [13.2741, 1.2409], [13.8512, 1.4189], [14.181, 1.3701], [14.4345, 0.8116], [14.0874, 0.5364], [13.8845, 0.1906], [13.8601, -0.2035], [14.4806, -0.6181], [14.3839, -1.8899], [14.0874, -2.4669], [13.7842, -2.1638], [13.465, -2.3955], [12.9918, -2.3134], [12.7934, -1.9316], [12.4321, -1.929], [12.4463, -2.3298], [11.5754, -2.3973], [11.5376, -2.8367], [11.934, -3.3188], [11.5043, -3.5203], [11.1301, -3.9163], [10.3476, -3.0129], [9.6245, -2.3671], [9.2658, -1.8251], [9.3306, -1.5348], [9.0647, -1.2982], [8.8215, -0.7082], [9.2969, -0.3514], [9.5907, 1.0318], [11.3352, 0.9998], [11.3286, 2.1673], [11.3485, 2.2996], [13.2204, 2.2565], [13.2937, 2.1615]]] }, \"properties\": { \"name\": \"Gabon\", \"id\": \"GA\" }, \"id\": \"GA\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"MultiPolygon\", \"coordinates\": [[[[5.7897, 49.5383], [6.3441, 49.4527], [6.7356, 49.1606], [7.4507, 49.1522], [8.1348, 48.9735], [7.5843, 48.0644], [7.6154, 47.5925], [7.0006, 47.3227], [6.06, 46.4282], [6.7583, 46.4158], [7.021, 45.9257], [7.1533, 45.401], [6.6277, 45.1178], [7.0308, 44.7166], [6.9673, 44.2802], [7.6771, 44.0831], [7.4929, 43.7671], [7.4387, 43.7507], [7.4143, 43.7711], [7.3779, 43.7316], [6.4941, 43.1692], [6.1159, 43.0724], [5.4066, 43.2286], [5.0599, 43.4444], [4.7119, 43.3733], [4.0527, 43.5931], [3.2591, 43.1931], [3.0518, 42.9152], [3.2116, 42.431], [2.0326, 42.3537], [1.7059, 42.5033], [1.4284, 42.5961], [-0.0411, 42.6893], [-1.2855, 43.0595], [-1.794, 43.4075], [-1.4848, 43.5638], [-1.2456, 44.5599], [-1.066, 45.8059], [-1.1464, 46.3115], [-1.7867, 46.5148], [-2.0188, 47.0377], [-3.1587, 47.6946], [-4.312, 47.8229], [-4.6291, 48.0857], [-4.3932, 48.3676], [-4.7208, 48.5398], [-3.2315, 48.8408], [-2.6924, 48.5367], [-2.4463, 48.6483], [-1.4375, 48.6415], [-1.8564, 49.6837], [-1.2587, 49.6802], [-1.1386, 49.3879], [-0.1636, 49.2969], [0.1869, 49.703], [1.2456, 49.9982], [1.5514, 50.2938], [1.5794, 50.7393], [1.9123, 50.9905], [2.5249, 51.0971], [2.8396, 50.7118], [4.1744, 50.2466], [4.8677, 49.788], [5.7897, 49.5383]]], [[[9.4802, 42.8056], [9.5508, 42.1296], [9.1863, 41.3847], [8.8077, 41.5885], [8.7132, 42.5499], [9.4802, 42.8056]]]] }, \"properties\": { \"name\": \"France\", \"id\": \"FR\" }, \"id\": \"FR\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[158.315, 6.8135], [158.1836, 6.8011], [158.1348, 6.9449], [158.2946, 6.9511], [158.315, 6.8135]]] }, \"properties\": { \"name\": \"Federated States of Micronesia\", \"id\": \"FM\" }, \"id\": \"FM\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-6.6311, 62.2279], [-7.0135, 62.094], [-7.1722, 62.2856], [-6.6311, 62.2279]]] }, \"properties\": { \"name\": \"Faroe Islands\", \"id\": \"FO\" }, \"id\": \"FO\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"MultiPolygon\", \"coordinates\": [[[[-58.8501, -51.2698], [-58.4737, -51.509], [-57.9765, -51.3843], [-57.8382, -51.7092], [-58.6834, -51.9361], [-59.0681, -52.1731], [-59.5708, -51.9254], [-59.0596, -51.6857], [-58.8501, -51.2698]]], [[[-60.2863, -51.462], [-59.268, -51.4274], [-59.9214, -51.9693], [-60.2863, -51.462]]]] }, \"properties\": { \"name\": \"Falkland Islands\", \"id\": \"FK\" }, \"id\": \"FK\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"MultiPolygon\", \"coordinates\": [[[[178.2804, -17.372], [178.5915, -17.6516], [178.6679, -18.0808], [177.8471, -18.2549], [177.3215, -18.0773], [177.2638, -17.8633], [177.6181, -17.4612], [178.2804, -17.372]]], [[[179.9991, -16.1686], [179.7483, -16.4464], [179.9281, -16.7443], [179.007, -16.9001], [178.805, -16.6315], [179.5517, -16.2498], [179.9991, -16.1686]]]] }, \"properties\": { \"name\": \"Fiji\", \"id\": \"FJ\" }, \"id\": \"FJ\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[28.9657, 69.0219], [28.4708, 68.4883], [29.3439, 68.062], [29.9414, 67.5475], [29.0869, 66.9709], [29.9032, 66.0911], [29.604, 64.9685], [30.0728, 64.7649], [30.1083, 64.3661], [30.5038, 64.0205], [30.0555, 63.689], [31.1807, 63.2082], [31.5341, 62.8855], [31.2855, 62.5679], [29.6902, 61.5461], [27.7978, 60.5362], [25.6565, 60.3331], [23.7216, 59.9656], [22.7934, 60.0768], [22.5759, 60.3591], [21.436, 60.5964], [21.3605, 60.9675], [21.606, 61.5916], [21.2562, 61.9897], [21.1035, 62.6229], [22.2434, 63.4379], [23.2488, 63.8963], [24.5579, 64.8009], [25.3729, 65.0095], [25.348, 65.4792], [24.1557, 65.8052], [23.7012, 66.4808], [23.9884, 66.8106], [23.4681, 67.45], [23.639, 67.9543], [22.7823, 68.3911], [21.9975, 68.5207], [20.6223, 69.037], [21.622, 69.2707], [22.4108, 68.7198], [23.8539, 68.8059], [24.9414, 68.5933], [25.7484, 68.9901], [26.0116, 69.6526], [26.5257, 69.915], [27.8897, 70.0617], [29.1415, 69.6715], [28.9657, 69.0219]]] }, \"properties\": { \"name\": \"Finland\", \"id\": \"FI\" }, \"id\": \"FI\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[42.3784, 12.4665], [41.7667, 11.5889], [41.7982, 10.9803], [42.5577, 11.0806], [42.9226, 10.9994], [42.6594, 10.6212], [42.8418, 10.2031], [43.1818, 9.8799], [43.4828, 9.3796], [44.023, 8.9859], [46.9784, 7.9969], [47.9781, 7.9969], [45.9348, 5.9972], [44.9405, 4.9119], [44.0283, 4.9509], [43.5383, 4.8404], [43.0158, 4.5634], [42.7916, 4.2922], [42.0241, 4.1377], [41.8839, 3.9779], [41.2207, 3.9437], [40.7653, 4.2731], [39.8424, 3.8514], [39.4944, 3.4559], [38.0864, 3.649], [36.9056, 4.4116], [36.0818, 4.4498], [35.763, 4.808], [35.7448, 5.3442], [35.2681, 5.4925], [35.0821, 5.6731], [34.7106, 6.6604], [34.0643, 7.2259], [33.6661, 7.6711], [33.2262, 7.7608], [33.0127, 7.9516], [33.2342, 8.3964], [33.9533, 8.4435], [34.0945, 8.5824], [34.078, 9.4613], [34.2915, 10.1249], [34.2756, 10.528], [34.5716, 10.88], [34.9312, 10.8649], [35.1123, 11.8166], [35.5961, 12.5375], [36.1075, 12.7266], [36.2123, 13.2712], [36.3907, 13.6259], [36.5243, 14.2567], [37.0246, 14.2718], [37.2572, 14.4538], [37.571, 14.1493], [37.8844, 14.8524], [38.5045, 14.4245], [39.074, 14.6282], [40.2215, 14.4311], [40.7697, 14.1444], [41.3627, 13.4998], [41.7649, 13.1838], [42.3784, 12.4665]]] }, \"properties\": { \"name\": \"Ethiopia\", \"id\": \"ET\" }, \"id\": \"ET\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"MultiPolygon\", \"coordinates\": [[[[28.0127, 59.4842], [27.4272, 58.7331], [27.753, 57.8411], [27.3517, 57.5282], [26.5328, 57.5311], [25.9912, 57.8382], [25.111, 58.0635], [24.3226, 57.8706], [24.529, 58.3543], [23.7678, 58.3609], [23.5094, 58.6585], [23.4943, 59.1957], [24.3803, 59.4726], [25.5091, 59.6389], [26.9749, 59.4507], [28.0127, 59.4842]]], [[[22.6172, 58.6213], [23.2928, 58.4834], [22.1875, 58.1543], [22.0814, 58.4781], [22.6172, 58.6213]]]] }, \"properties\": { \"name\": \"Estonia\", \"id\": \"EE\" }, \"id\": \"EE\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"MultiPolygon\", \"coordinates\": [[[[-1.794, 43.4075], [-1.2855, 43.0595], [-0.0411, 42.6893], [1.4284, 42.5961], [1.4861, 42.4345], [1.7059, 42.5033], [2.0326, 42.3537], [3.2116, 42.431], [3.248, 41.9445], [2.0827, 41.2875], [1.0329, 41.062], [-0.3269, 39.5199], [-0.2049, 39.0627], [0.2015, 38.7591], [-0.3813, 38.4355], [-0.6468, 38.1518], [-0.8221, 37.581], [-1.3275, 37.561], [-1.7975, 37.233], [-2.1116, 36.7767], [-4.3668, 36.7181], [-4.6742, 36.5063], [-5.1716, 36.4238], [-5.6254, 36.026], [-6.0407, 36.1885], [-6.4924, 36.9547], [-6.8845, 37.1944], [-7.4061, 37.1793], [-7.5036, 37.5854], [-7.1855, 38.0062], [-7.3431, 38.4572], [-7.0461, 38.9069], [-7.4452, 39.5363], [-7.0368, 39.7139], [-7.0146, 40.2084], [-6.8102, 40.3429], [-6.9285, 41.0092], [-6.2125, 41.5321], [-6.6182, 41.9422], [-7.4037, 41.8335], [-7.9208, 41.8836], [-8.2131, 42.1336], [-8.7771, 41.9409], [-8.691, 42.2743], [-9.2352, 42.977], [-8.8736, 43.3343], [-7.6982, 43.7644], [-7.2621, 43.5948], [-5.6658, 43.5824], [-4.523, 43.416], [-3.6046, 43.5194], [-3.0455, 43.3716], [-2.3371, 43.3281], [-1.794, 43.4075]]], [[[3.1454, 39.7902], [3.4619, 39.6979], [3.0726, 39.3011], [2.3713, 39.6131], [2.785, 39.8546], [3.1454, 39.7902]]], [[[-16.3346, 28.38], [-16.6579, 28.0071], [-16.9054, 28.3396], [-16.3346, 28.38]]]] }, \"properties\": { \"name\": \"Spain\", \"id\": \"ES\" }, \"id\": \"ES\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[38.6093, 18.0049], [38.9116, 17.427], [39.1424, 16.7292], [39.2991, 15.9213], [39.5064, 15.532], [39.8637, 15.4703], [40.2042, 15.014], [41.1763, 14.6202], [41.6584, 13.9832], [42.2452, 13.5877], [42.7961, 12.8642], [43.1166, 12.7084], [42.67, 12.3764], [42.3784, 12.4665], [41.7649, 13.1838], [41.3627, 13.4998], [40.7697, 14.1444], [40.2215, 14.4311], [39.074, 14.6282], [38.5045, 14.4245], [37.8844, 14.8524], [37.571, 14.1493], [37.2572, 14.4538], [37.0246, 14.2718], [36.5243, 14.2567], [36.4267, 15.132], [36.9136, 16.2964], [37.0091, 17.059], [37.4112, 17.0616], [37.7823, 17.458], [38.2537, 17.5845], [38.6093, 18.0049]]] }, \"properties\": { \"name\": \"Eritrea\", \"id\": \"ER\" }, \"id\": \"ER\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"MultiPolygon\", \"coordinates\": [[[[-6.218, 54.0887], [-7.3553, 54.1213], [-8.1183, 54.4143], [-7.2186, 55.0921], [-6.1293, 55.2175], [-5.4703, 54.5002], [-5.6068, 54.2727], [-6.218, 54.0887]]], [[[-3.1097, 58.5154], [-3.9901, 57.959], [-3.4029, 57.7082], [-2.0741, 57.7024], [-1.778, 57.4938], [-2.6527, 56.3183], [-3.1783, 56.0802], [-2.1471, 55.9031], [-1.6555, 55.5704], [-1.2917, 54.7738], [-0.6714, 54.5039], [-0.2055, 54.0217], [0.5589, 52.967], [1.6566, 52.7537], [1.5589, 52.0869], [0.9553, 51.8077], [0.6867, 51.3865], [1.4151, 51.3632], [0.9601, 50.9259], [0.2051, 50.763], [-1.5168, 50.7475], [-2.5477, 50.6163], [-3.4047, 50.6323], [-3.7933, 50.2293], [-4.1726, 50.3908], [-5.3422, 50.2461], [-4.583, 50.7764], [-4.1881, 51.1885], [-3.1359, 51.2049], [-4.3863, 51.7412], [-4.9023, 51.6262], [-5.0881, 51.9959], [-4.3832, 52.1973], [-3.9804, 52.5417], [-4.1111, 53.2189], [-3.0646, 53.4268], [-2.925, 53.7327], [-3.958, 54.7809], [-5.1354, 54.8575], [-4.7212, 55.421], [-5.2457, 55.9293], [-5.6097, 56.0553], [-5.392, 56.5148], [-5.9368, 56.6058], [-5.562, 57.2328], [-5.8181, 57.4361], [-5.3382, 58.2386], [-4.7155, 58.5101], [-3.1097, 58.5154]]]] }, \"properties\": { \"name\": \"United Kingdom\", \"id\": \"GB\" }, \"id\": \"GB\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[34.1983, 31.3226], [34.2454, 31.2085], [34.9041, 29.4773], [34.7363, 29.2705], [34.3999, 28.016], [34.2201, 27.7643], [33.7602, 28.0475], [33.2475, 28.5678], [33.0757, 29.0729], [32.7215, 29.5217], [32.6318, 28.9921], [32.8982, 28.5651], [33.5471, 27.8984], [33.5498, 27.6072], [33.8929, 27.0497], [33.9591, 26.6488], [34.565, 25.6913], [35.194, 24.4751], [35.6246, 24.0658], [35.5229, 23.4426], [35.6978, 22.9463], [36.2296, 22.6289], [36.8714, 21.9968], [34.2467, 21.9964], [32.6061, 21.9959], [30.3285, 21.9951], [27.2723, 21.9955], [24.9805, 21.9959], [24.9805, 24.2416], [24.9805, 25.8134], [24.9805, 27.8345], [24.9805, 29.1817], [24.7115, 30.1316], [24.9738, 30.7766], [24.8526, 31.335], [25.1505, 31.655], [25.3822, 31.513], [25.8931, 31.6209], [27.2479, 31.3781], [27.9674, 31.0975], [28.5147, 31.0505], [29.0723, 30.8303], [29.5916, 31.0114], [30.3951, 31.4575], [30.7005, 31.4038], [31.1941, 31.5876], [32.1018, 31.0926], [33.1299, 31.1681], [33.6665, 31.1304], [34.1983, 31.3226]]] }, \"properties\": { \"name\": \"Egypt\", \"id\": \"EG\" }, \"id\": \"EG\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"MultiPolygon\", \"coordinates\": [[[[-91.2722, 0.0251], [-90.7997, -0.7522], [-90.9055, -0.9404], [-91.3692, -0.287], [-91.2722, 0.0251]]], [[[-75.2845, -0.1063], [-75.2632, -0.5555], [-75.5706, -1.5312], [-76.0898, -2.1331], [-76.679, -2.5628], [-77.8607, -2.9819], [-78.3472, -3.4311], [-78.4198, -3.7769], [-79.0763, -4.9905], [-79.3308, -4.9279], [-79.6385, -4.4547], [-80.1396, -4.2962], [-80.4885, -4.3939], [-80.51, -4.0694], [-80.1793, -3.8776], [-80.3247, -3.388], [-79.9217, -3.0902], [-79.7299, -2.5793], [-80.4501, -2.6259], [-80.9628, -2.1891], [-80.7704, -2.0768], [-80.8015, -1.3834], [-80.9024, -1.0789], [-80.554, -0.8481], [-80.4823, -0.3682], [-80.1334, -0.006], [-80.0251, 0.4104], [-80.0883, 0.7846], [-79.7412, 0.9799], [-78.8996, 1.2063], [-78.8597, 1.4553], [-78.3121, 1.046], [-77.4676, 0.6363], [-77.4228, 0.425], [-76.4946, 0.2355], [-76.311, 0.4485], [-75.8798, 0.1511], [-75.2845, -0.1063]]]] }, \"properties\": { \"name\": \"Ecuador\", \"id\": \"EC\" }, \"id\": \"EC\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[8.5764, 36.9374], [8.2306, 36.5454], [8.2457, 35.8707], [8.3944, 35.204], [8.2457, 34.7339], [7.5138, 34.0805], [7.5, 33.8323], [7.7628, 33.2331], [8.2111, 32.9268], [8.3332, 32.5437], [9.0439, 32.0723], [9.5188, 30.2293], [9.3102, 30.1152], [9.6724, 29.567], [9.8424, 28.9668], [9.9161, 27.7856], [9.7474, 27.3306], [9.8593, 26.5521], [9.4913, 26.3337], [9.4482, 26.0673], [10.0009, 25.3322], [10.2557, 24.5909], [10.6863, 24.5514], [11.5075, 24.3144], [11.9678, 23.518], [9.3785, 21.9915], [7.4818, 20.8729], [5.8367, 19.4791], [4.2276, 19.1426], [3.4007, 18.9886], [3.1059, 19.1502], [3.2559, 19.4107], [3.2036, 19.7898], [2.4063, 20.0637], [2.2195, 20.2479], [1.6855, 20.3784], [1.1657, 20.8174], [1.1457, 21.1024], [-1.2931, 22.6964], [-3.2579, 23.981], [-4.8227, 24.9958], [-6.2387, 25.848], [-8.6834, 27.2858], [-8.6834, 27.6565], [-8.6599, 28.7187], [-7.6851, 29.3495], [-7.095, 29.6251], [-6.6353, 29.5687], [-6.5008, 29.8093], [-5.4488, 29.9567], [-4.9683, 30.4654], [-4.3228, 30.6989], [-3.8335, 31.1978], [-3.8268, 31.6617], [-3.0174, 31.8344], [-2.9308, 32.0426], [-2.4485, 32.13], [-1.2753, 32.0892], [-1.0656, 32.4683], [-1.5099, 32.8775], [-1.6792, 33.3187], [-1.7955, 34.7521], [-2.2197, 35.1041], [-1.9132, 35.0943], [-0.9175, 35.6683], [0.0479, 35.9004], [0.5149, 36.2618], [1.2571, 36.5197], [2.5932, 36.6009], [2.9727, 36.7847], [3.7788, 36.8961], [4.7581, 36.8965], [5.1958, 36.6768], [6.0649, 36.8641], [6.4866, 37.0856], [6.9274, 36.9196], [7.6079, 36.9999], [7.9106, 36.8566], [8.5764, 36.9374]]] }, \"properties\": { \"name\": \"Algeria\", \"id\": \"DZ\" }, \"id\": \"DZ\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-71.7683, 18.0391], [-71.6571, 19.1306], [-71.7791, 19.7183], [-71.5578, 19.8954], [-70.9542, 19.9141], [-70.1294, 19.6362], [-69.7394, 19.2993], [-68.6848, 18.9047], [-68.3594, 18.538], [-68.6588, 18.222], [-68.9349, 18.408], [-69.7707, 18.4435], [-70.1831, 18.2517], [-71.0278, 18.273], [-71.3958, 17.6462], [-71.7683, 18.0391]]] }, \"properties\": { \"name\": \"Dominican Republic\", \"id\": \"DO\" }, \"id\": \"DO\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"MultiPolygon\", \"coordinates\": [[[[9.7399, 54.8255], [8.6701, 54.9034], [8.6159, 55.4181], [8.1321, 55.5999], [8.1641, 56.6069], [8.6186, 57.1114], [9.5543, 57.2325], [9.9623, 57.581], [10.5371, 57.4485], [10.2828, 56.6204], [10.1829, 55.8651], [9.5912, 55.4932], [9.7399, 54.8255]]], [[[12.5688, 55.785], [11.6539, 55.1869], [11.2864, 55.2044], [10.9788, 55.7215], [12.219, 56.1186], [12.5688, 55.785]]], [[[10.645, 55.6099], [10.7852, 55.1334], [9.9889, 55.1631], [9.8606, 55.5156], [10.645, 55.6099]]]] }, \"properties\": { \"name\": \"Denmark\", \"id\": \"DK\" }, \"id\": \"DK\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-61.2817, 15.2492], [-61.481, 15.5253], [-61.3201, 15.5853], [-61.2817, 15.2492]]] }, \"properties\": { \"name\": \"Dominica\", \"id\": \"DM\" }, \"id\": \"DM\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[43.2462, 11.4997], [42.9226, 10.9994], [42.5577, 11.0806], [41.7982, 10.9803], [41.7667, 11.5889], [42.3784, 12.4665], [42.67, 12.3764], [43.1166, 12.7084], [43.41, 12.1899], [43.2719, 11.9698], [42.7992, 11.7394], [43.2462, 11.4997]]] }, \"properties\": { \"name\": \"Djibouti\", \"id\": \"DJ\" }, \"id\": \"DJ\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[9.7399, 54.8255], [10.3604, 54.4382], [11.3996, 53.9446], [12.1111, 54.1684], [12.5755, 54.4673], [13.0287, 54.4109], [13.8654, 53.8534], [14.2587, 53.7296], [14.4145, 53.2835], [14.1286, 52.8782], [14.6196, 52.5284], [14.7527, 52.0818], [14.6018, 51.8324], [15.0164, 51.2527], [14.8096, 50.8589], [14.3692, 50.8986], [12.4525, 50.3498], [12.2763, 50.0424], [12.6318, 49.4613], [13.8148, 48.7669], [13.4095, 48.3942], [12.8143, 48.1607], [12.686, 47.6693], [11.717, 47.5837], [11.2979, 47.4247], [10.4306, 47.541], [10.3129, 47.3133], [9.5241, 47.5242], [8.6177, 47.7661], [7.6154, 47.5925], [7.5843, 48.0644], [8.1348, 48.9735], [7.4507, 49.1522], [6.7356, 49.1606], [6.3441, 49.4527], [6.4875, 49.7985], [6.1164, 50.1209], [6.3645, 50.3163], [5.9939, 50.7504], [5.8949, 50.9843], [6.1932, 51.4888], [5.9486, 51.7625], [6.7418, 51.9109], [7.0352, 52.3801], [7.1973, 53.2823], [7.2852, 53.6814], [8.0091, 53.6907], [8.5387, 53.5569], [8.8978, 53.8357], [8.9573, 54.5383], [8.6701, 54.9034], [9.7399, 54.8255]]] }, \"properties\": { \"name\": \"Germany\", \"id\": \"DE\" }, \"id\": \"DE\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[14.8096, 50.8589], [16.0072, 50.6117], [16.6792, 50.0974], [17.152, 50.3784], [17.8746, 49.9722], [18.5622, 49.8792], [18.8321, 49.5108], [18.161, 49.2574], [17.7583, 48.888], [17.1884, 48.861], [16.9531, 48.5988], [16.4777, 48.8001], [16.0573, 48.7549], [14.972, 48.9839], [14.6915, 48.5993], [14.0492, 48.6024], [13.8148, 48.7669], [12.6318, 49.4613], [12.2763, 50.0424], [12.4525, 50.3498], [14.3692, 50.8986], [14.8096, 50.8589]]] }, \"properties\": { \"name\": \"Czechia\", \"id\": \"CZ\" }, \"id\": \"CZ\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[34.4633, 35.5937], [33.9418, 35.2918], [34.0501, 34.9882], [32.9417, 34.5758], [32.4489, 34.7294], [32.3171, 34.9532], [32.9417, 35.3904], [33.4588, 35.3358], [34.4633, 35.5937]]] }, \"properties\": { \"name\": \"Cyprus\", \"id\": \"CY\" }, \"id\": \"CY\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-81.3696, 19.349], [-81.1306, 19.3468], [-81.3037, 19.2718], [-81.3696, 19.349]]] }, \"properties\": { \"name\": \"Cayman Islands\", \"id\": \"KY\" }, \"id\": \"KY\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[105.7253, -10.493], [105.6969, -10.564], [105.5842, -10.5125], [105.7053, -10.4308], [105.7253, -10.493]]] }, \"properties\": { \"name\": \"Christmas Island\", \"id\": \"CX\" }, \"id\": \"CX\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-68.7511, 12.0599], [-68.8033, 12.0457], [-68.995, 12.142], [-69.154, 12.2982], [-69.0767, 12.3422], [-69.0132, 12.2312], [-68.8275, 12.1584], [-68.7511, 12.0599]]] }, \"properties\": { \"name\": \"Curaçao\", \"id\": \"CW\" }, \"id\": \"CW\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"MultiPolygon\", \"coordinates\": [[[[-82.5617, 21.5716], [-82.8531, 21.4437], [-83.0826, 21.7913], [-82.7146, 21.8903], [-82.5617, 21.5716]]], [[[-81.8375, 23.1629], [-81.1785, 23.0595], [-80.6501, 23.103], [-80.0752, 22.9423], [-79.183, 22.3879], [-78.6865, 22.367], [-77.8651, 21.9005], [-77.4973, 21.8717], [-76.6475, 21.2844], [-75.7229, 21.1108], [-75.6428, 20.7335], [-74.8826, 20.6505], [-74.2529, 20.0797], [-75.1165, 19.9012], [-76.1586, 19.9896], [-77.7151, 19.8555], [-77.2135, 20.3003], [-77.2297, 20.6438], [-77.9974, 20.7153], [-78.4908, 21.0536], [-78.6366, 21.5157], [-79.2745, 21.5627], [-80.2313, 21.8721], [-80.4992, 22.0634], [-80.9619, 22.0528], [-81.8162, 22.2001], [-81.9034, 22.6791], [-82.7382, 22.6893], [-83.3796, 22.2228], [-84.3264, 22.0745], [-84.3612, 22.379], [-84.045, 22.6662], [-83.2577, 22.9676], [-82.1014, 23.1905], [-81.8375, 23.1629]]]] }, \"properties\": { \"name\": \"Cuba\", \"id\": \"CU\" }, \"id\": \"CU\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-83.6419, 10.9173], [-83.4482, 10.4658], [-82.7783, 9.6695], [-82.5635, 9.5767], [-82.9399, 9.4493], [-82.917, 8.7404], [-82.9976, 8.3676], [-82.8793, 8.0706], [-83.1625, 8.5882], [-83.734, 8.6144], [-83.6373, 9.0352], [-83.8956, 9.2762], [-84.6589, 9.6469], [-85.1145, 9.5816], [-85.6248, 9.9025], [-85.8305, 10.3979], [-85.6672, 10.7451], [-85.7444, 11.062], [-85.6215, 11.1845], [-84.9092, 10.9453], [-84.3484, 10.9799], [-84.1684, 10.7806], [-83.6419, 10.9173]]] }, \"properties\": { \"name\": \"Costa Rica\", \"id\": \"CR\" }, \"id\": \"CR\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-23.4442, 15.0078], [-23.7054, 14.9611], [-23.7007, 15.2714], [-23.4442, 15.0078]]] }, \"properties\": { \"name\": \"Cape Verde\", \"id\": \"CV\" }, \"id\": \"CV\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[43.4659, -11.9014], [43.2266, -11.7518], [43.3793, -11.6142], [43.4659, -11.9014]]] }, \"properties\": { \"name\": \"Comoros\", \"id\": \"KM\" }, \"id\": \"KM\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-71.3197, 11.8619], [-71.958, 11.6666], [-72.2485, 11.1965], [-72.6902, 10.8361], [-72.8693, 10.4911], [-73.0065, 9.7894], [-73.3563, 9.2269], [-72.7963, 9.1089], [-72.6654, 8.6277], [-72.4166, 8.3818], [-72.443, 7.4549], [-72.0843, 7.0967], [-71.0134, 6.9946], [-70.6552, 7.0829], [-70.095, 6.9378], [-69.4392, 6.1348], [-68.4717, 6.1565], [-67.8591, 6.2897], [-67.4394, 6.0256], [-67.8249, 5.2705], [-67.8553, 4.507], [-67.6616, 3.8643], [-67.3111, 3.416], [-67.8347, 2.8926], [-67.2108, 2.3901], [-66.8761, 1.2231], [-67.352, 2.0861], [-67.8152, 1.79], [-68.1765, 1.7198], [-69.8486, 1.7087], [-69.8522, 1.0593], [-69.3615, 1.0642], [-69.1633, 0.864], [-70.0539, 0.5786], [-70.0706, -0.1387], [-69.6675, -0.4823], [-69.4003, -1.1948], [-69.6691, -2.6676], [-69.9658, -4.2359], [-70.3396, -3.8142], [-70.7351, -3.7818], [-70.0741, -2.7502], [-70.9146, -2.2184], [-71.3969, -2.3342], [-71.7525, -2.1527], [-72.3957, -2.4288], [-73.1545, -2.2783], [-73.1969, -1.8304], [-73.4963, -1.6932], [-73.6643, -1.2489], [-74.2465, -0.9706], [-74.4178, -0.5809], [-74.8018, -0.2], [-75.2845, -0.1063], [-75.8798, 0.1511], [-76.311, 0.4485], [-76.4946, 0.2355], [-77.4228, 0.425], [-77.4676, 0.6363], [-78.3121, 1.046], [-78.8597, 1.4553], [-78.5769, 1.774], [-78.6171, 2.3067], [-78.1201, 2.4882], [-77.67, 2.8788], [-77.2428, 3.5855], [-77.1666, 3.8621], [-77.4272, 4.0605], [-77.2863, 4.7219], [-77.4017, 5.4161], [-77.2492, 5.7801], [-77.4694, 6.177], [-77.36, 6.5046], [-77.9011, 7.2294], [-77.7439, 7.537], [-77.3509, 7.7057], [-77.2124, 8.0338], [-77.3742, 8.6583], [-76.8519, 8.0906], [-76.8879, 8.6197], [-76.2769, 8.989], [-76.1355, 9.2656], [-75.6394, 9.4502], [-75.671, 10.1964], [-75.4459, 10.611], [-74.8446, 11.1095], [-74.4542, 10.9892], [-74.0592, 11.3408], [-73.3134, 11.2959], [-72.722, 11.7123], [-72.275, 11.8894], [-72.1358, 12.1886], [-71.7145, 12.4199], [-71.2622, 12.3351], [-71.3197, 11.8619]]] }, \"properties\": { \"name\": \"Colombia\", \"id\": \"CO\" }, \"id\": \"CO\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-159.7406, -21.2494], [-159.8395, -21.2383], [-159.832, -21.2005], [-159.7683, -21.1885], [-159.7406, -21.2494]]] }, \"properties\": { \"name\": \"Cook Islands\", \"id\": \"CK\" }, \"id\": \"CK\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[18.6102, 3.4785], [18.4908, 2.9246], [18.0722, 2.0133], [18.058, 1.5347], [17.9026, 1.1179], [17.8875, 0.2341], [17.7242, -0.2777], [17.753, -0.5489], [17.2789, -0.9994], [16.8799, -1.2258], [16.5407, -1.8402], [16.2154, -2.178], [16.2171, -3.0302], [16.1466, -3.4639], [15.8722, -3.9345], [15.6001, -4.0308], [14.7794, -4.8458], [14.4105, -4.8311], [14.3581, -4.2993], [13.4149, -4.8373], [13.0726, -4.6349], [12.8809, -4.4454], [12.3846, -4.6189], [12.0184, -5.0042], [11.7773, -4.5657], [11.1301, -3.9163], [11.5043, -3.5203], [11.934, -3.3188], [11.5376, -2.8367], [11.5754, -2.3973], [12.4463, -2.3298], [12.4321, -1.929], [12.7934, -1.9316], [12.9918, -2.3134], [13.465, -2.3955], [13.7842, -2.1638], [14.0874, -2.4669], [14.3839, -1.8899], [14.4806, -0.6181], [13.8601, -0.2035], [13.8845, 0.1906], [14.0874, 0.5364], [14.4345, 0.8116], [14.181, 1.3701], [13.8512, 1.4189], [13.2741, 1.2409], [13.1627, 1.6479], [13.2937, 2.1615], [14.4842, 2.1549], [14.9023, 2.0124], [15.7417, 1.9152], [16.0596, 1.6763], [16.1834, 2.2703], [16.4684, 2.8318], [16.6735, 3.5354], [17.4379, 3.6845], [18.161, 3.4998], [18.6102, 3.4785]]] }, \"properties\": { \"name\": \"Republic of Congo\", \"id\": \"CG\" }, \"id\": \"CG\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[27.4032, 5.1094], [27.7881, 4.6446], [28.192, 4.3503], [28.7269, 4.5048], [29.1513, 4.3881], [29.6768, 4.5869], [30.1949, 3.9819], [30.5083, 3.8359], [30.8385, 3.4905], [30.7284, 2.4554], [31.1763, 2.2703], [31.2527, 2.0448], [30.9424, 1.683], [29.9427, 0.8192], [29.9343, 0.4991], [29.7177, 0.0983], [29.5619, -0.9772], [29.577, -1.3878], [29.1295, -1.8601], [29.1064, -2.2335], [28.8765, -2.4004], [29.0146, -2.7204], [29.2245, -3.0533], [29.2232, -3.9109], [29.4034, -4.4494], [29.3426, -4.9829], [29.5943, -5.651], [29.4802, -6.0252], [29.7097, -6.6169], [30.3134, -7.2037], [30.7511, -8.1936], [28.9724, -8.4648], [28.9178, -8.7005], [28.4007, -9.2248], [28.6301, -9.8311], [28.639, -10.6692], [28.3572, -11.4828], [28.4823, -11.8122], [29.0643, -12.3489], [29.4274, -12.4314], [29.7954, -12.1553], [29.7954, -13.3929], [29.5543, -13.2491], [29.0141, -13.3689], [28.3576, -12.482], [27.5333, -12.1953], [27.0459, -11.616], [26.9496, -11.8988], [26.5962, -11.972], [26.0258, -11.8903], [25.3493, -11.6231], [25.1847, -11.2431], [24.5184, -11.4384], [24.32, -11.0718], [23.9666, -10.8716], [23.8339, -11.0136], [22.5613, -11.0558], [22.3069, -10.6914], [22.1977, -10.0406], [21.8133, -9.4689], [21.9056, -8.6934], [21.7511, -7.3054], [20.6077, -7.2778], [20.4821, -6.9161], [19.8753, -6.9862], [19.5277, -7.1447], [19.3408, -7.9668], [18.6532, -7.9361], [17.536, -8.076], [17.1551, -7.4612], [16.7094, -6.4717], [16.7179, -6.2414], [16.3152, -5.8658], [14.3985, -5.8925], [13.0682, -5.8649], [12.4117, -5.9866], [12.2137, -5.7589], [12.5035, -5.6958], [12.5222, -5.1489], [12.8298, -4.7366], [13.0726, -4.6349], [13.4149, -4.8373], [14.3581, -4.2993], [14.4105, -4.8311], [14.7794, -4.8458], [15.6001, -4.0308], [15.8722, -3.9345], [16.1466, -3.4639], [16.2171, -3.0302], [16.2154, -2.178], [16.5407, -1.8402], [16.8799, -1.2258], [17.2789, -0.9994], [17.753, -0.5489], [17.7242, -0.2777], [17.8875, 0.2341], [17.9026, 1.1179], [18.058, 1.5347], [18.0722, 2.0133], [18.4908, 2.9246], [18.6102, 3.4785], [18.5676, 4.2576], [19.0687, 4.8915], [19.5011, 5.1276], [19.8065, 5.0894], [20.2264, 4.8297], [20.558, 4.4627], [21.5376, 4.2447], [22.4223, 4.1351], [22.7557, 4.6469], [23.4171, 4.6633], [24.32, 4.994], [24.7656, 4.9301], [25.2495, 5.0246], [25.5251, 5.3123], [26.8222, 5.0623], [27.1151, 5.1977], [27.4032, 5.1094]]] }, \"properties\": { \"name\": \"Democratic Republic of Congo\", \"id\": \"CD\" }, \"id\": \"CD\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[15.4803, 7.5237], [15.2459, 7.2636], [14.7394, 6.2799], [14.6169, 5.8649], [14.7088, 4.6655], [15.0226, 4.3583], [15.1287, 3.827], [15.775, 3.127], [16.0636, 2.9086], [16.1834, 2.2703], [16.0596, 1.6763], [15.7417, 1.9152], [14.9023, 2.0124], [14.4842, 2.1549], [13.2937, 2.1615], [13.2204, 2.2565], [11.3485, 2.2996], [11.3286, 2.1673], [9.98, 2.1677], [9.8007, 2.3044], [9.8762, 3.3099], [9.4252, 3.9224], [8.9999, 4.0916], [8.9027, 4.4351], [8.556, 4.7552], [8.801, 5.1973], [9.0603, 6.0092], [10.1438, 6.9964], [10.6064, 7.063], [11.0325, 6.6981], [11.1532, 6.438], [11.5518, 6.6972], [11.7676, 7.272], [12.0162, 7.5899], [12.4037, 8.5957], [12.8067, 8.8865], [12.9297, 9.4263], [13.1756, 9.5394], [13.2697, 10.0362], [13.5352, 10.6052], [13.892, 11.1401], [14.5597, 11.4921], [14.6271, 12.1087], [14.1974, 12.3839], [14.0638, 13.0786], [14.5162, 12.9796], [14.7612, 12.6556], [15.0812, 11.8455], [15.0297, 11.1135], [15.1323, 10.6483], [15.5411, 9.9603], [14.2432, 9.9798], [13.9773, 9.6917], [14.3324, 9.2034], [15.1163, 8.5571], [15.443, 7.8518], [15.4803, 7.5237]]] }, \"properties\": { \"name\": \"Cameroon\", \"id\": \"CM\" }, \"id\": \"CM\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-5.5236, 10.4259], [-5.0999, 10.2417], [-4.9698, 9.9301], [-4.6258, 9.7134], [-3.8776, 9.895], [-3.2235, 9.8954], [-2.6958, 9.4813], [-2.7466, 9.1098], [-2.5058, 8.2087], [-2.7899, 7.9321], [-2.9858, 7.205], [-3.2358, 6.8073], [-3.2007, 6.3483], [-2.7952, 5.1844], [-3.0191, 5.1307], [-4.0372, 5.2301], [-5.5646, 5.0894], [-6.9229, 4.6384], [-7.5451, 4.3512], [-7.5688, 5.0805], [-7.4299, 5.3247], [-7.4543, 5.8414], [-7.7965, 5.975], [-7.8886, 6.2347], [-8.6035, 6.5077], [-8.3325, 6.8015], [-8.2966, 7.0741], [-8.4863, 7.5584], [-8.232, 7.5566], [-7.8236, 8.4674], [-7.951, 8.7866], [-7.8962, 9.416], [-8.137, 9.4955], [-8.1365, 10.022], [-7.9907, 10.1627], [-7.6611, 10.4272], [-7.1049, 10.2035], [-6.6932, 10.3495], [-6.2611, 10.7242], [-6.0345, 10.1946], [-5.5236, 10.4259]]] }, \"properties\": { \"name\": \"Côte d'Ivoire\", \"id\": \"CI\" }, \"id\": \"CI\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"MultiPolygon\", \"coordinates\": [[[[110.8887, 19.9918], [111.0138, 19.6553], [110.5722, 19.1719], [110.4514, 18.748], [109.5193, 18.2184], [108.7016, 18.5354], [108.6936, 19.3384], [109.6511, 19.9842], [110.5886, 20.0726], [110.8887, 19.9918]]], [[[130.5269, 42.5353], [130.2406, 42.8917], [129.8983, 42.9983], [129.7199, 42.4749], [129.3137, 42.4137], [128.9236, 42.0381], [128.0451, 41.9875], [128.291, 41.5627], [128.1112, 41.3891], [127.1795, 41.5312], [126.9034, 41.7811], [125.989, 40.9049], [124.8895, 40.4596], [124.3621, 40.0042], [124.1056, 39.8409], [123.3483, 39.7632], [122.3349, 39.3663], [121.6499, 38.8652], [121.7853, 39.401], [121.5177, 39.6389], [122.2749, 40.5418], [121.859, 40.8423], [121.1745, 40.9013], [120.479, 40.231], [119.5912, 39.9026], [118.9125, 39.1666], [118.2977, 39.0671], [117.7845, 39.1346], [117.5577, 38.625], [118.0149, 38.1834], [118.94, 38.0426], [119.0891, 37.7008], [118.9529, 37.3311], [119.45, 37.1247], [120.3702, 37.7008], [120.7502, 37.834], [121.6402, 37.4603], [122.6025, 37.4265], [122.5195, 36.9467], [121.9327, 36.9595], [120.9899, 36.5978], [120.3933, 36.054], [120.0546, 35.8614], [119.2156, 35.0118], [119.5827, 34.5821], [120.2015, 34.3255], [120.8709, 33.0165], [120.8532, 32.6613], [121.4009, 32.3719], [121.3521, 31.8588], [121.0556, 31.7194], [121.6606, 31.3199], [121.8781, 30.9168], [120.9974, 30.5582], [121.1594, 30.3016], [121.9442, 29.8941], [121.7174, 29.2562], [121.602, 28.3667], [121.0986, 28.2903], [120.2788, 27.0972], [119.6484, 25.9186], [119.5392, 25.5915], [119.0248, 25.2235], [118.5605, 24.5803], [118.0873, 24.6269], [118.0562, 24.246], [116.5381, 23.1798], [116.4706, 22.9459], [115.4985, 22.719], [115.1957, 22.8171], [114.854, 22.6169], [114.2658, 22.541], [114.0154, 22.5117], [113.6195, 22.8615], [113.5467, 22.2241], [113.4943, 22.2414], [113.4788, 22.1957], [113.0083, 22.1193], [112.5861, 21.7767], [111.9438, 21.8495], [111.6029, 21.5592], [110.771, 21.3865], [110.1935, 21.0376], [110.5114, 20.5182], [110.123, 20.2639], [109.6626, 20.9168], [109.9307, 21.4806], [109.5441, 21.5378], [109.1486, 21.4255], [109.0305, 21.6266], [108.3247, 21.6937], [107.9727, 21.5081], [107.3513, 21.6089], [106.7294, 22.0004], [106.5363, 22.3954], [106.7804, 22.779], [106.5421, 22.9081], [105.8429, 22.9228], [105.2752, 23.3454], [104.8646, 23.1363], [104.7958, 22.9112], [104.3719, 22.704], [103.3008, 22.7643], [103.0051, 22.4532], [102.5173, 22.7408], [102.1276, 22.379], [101.6712, 22.4625], [101.5243, 22.2538], [101.744, 21.778], [101.705, 21.1503], [101.2242, 21.2236], [101.139, 21.5676], [100.2148, 21.4628], [99.9179, 22.0279], [99.193, 22.126], [99.3377, 22.498], [99.3408, 23.0959], [98.8636, 23.1913], [98.7642, 24.116], [98.2124, 24.1106], [97.686, 23.898], [97.5315, 24.4915], [97.8196, 25.2519], [98.0109, 25.2923], [98.6546, 25.9177], [98.7318, 26.5836], [98.651, 27.5726], [98.299, 27.5499], [98.0988, 28.1421], [97.5377, 28.5101], [97.3224, 28.218], [96.776, 28.3671], [96.4355, 29.0507], [96.0352, 29.4471], [95.4204, 29.0543], [94.7696, 29.1759], [94.6231, 29.3126], [93.9022, 28.803], [93.2067, 28.5909], [92.702, 28.147], [92.6642, 27.949], [91.9775, 27.7301], [91.6317, 27.7599], [91.6056, 27.9516], [90.3529, 28.0804], [89.9809, 28.3112], [89.537, 28.1075], [88.8912, 27.316], [88.8485, 27.8686], [88.6213, 28.0919], [88.1099, 27.8704], [87.1413, 27.8385], [86.5545, 28.0853], [86.4089, 27.9286], [85.6783, 28.2775], [85.1225, 28.3161], [85.1589, 28.5922], [84.7141, 28.5957], [84.2285, 28.9118], [84.1016, 29.2198], [83.5835, 29.1834], [83.1556, 29.6127], [82.8542, 29.6833], [82.1591, 30.1152], [82.0432, 30.3269], [81.4169, 30.3376], [81.0103, 30.1645], [80.6823, 30.4148], [80.1913, 30.5684], [79.9245, 30.8889], [79.9165, 30.8942], [79.3697, 31.0798], [79.3386, 31.1055], [79.1073, 31.4025], [78.8445, 31.3017], [78.7198, 31.8876], [78.3896, 32.5197], [79.2192, 32.5011], [79.2165, 32.5641], [79.1353, 33.1718], [79.1127, 33.2264], [78.8019, 33.4999], [78.7531, 34.0876], [78.9364, 34.3521], [78.2821, 34.654], [77.8107, 35.4845], [77.7992, 35.496], [77.4467, 35.4756], [76.2518, 35.8108], [75.945, 36.0176], [75.8403, 36.6497], [75.3467, 36.9134], [74.5415, 37.0221], [74.8912, 37.2317], [74.7452, 38.5101], [74.2773, 38.6597], [73.8015, 38.6068], [73.6315, 39.4489], [73.9147, 39.6065], [73.9915, 40.0433], [74.4118, 40.1374], [75.0044, 40.4494], [75.5837, 40.6052], [75.8718, 40.3034], [76.4804, 40.4494], [76.8239, 40.9821], [78.1232, 41.0758], [78.3625, 41.3718], [79.2938, 41.7829], [80.2162, 42.0323], [80.2095, 42.1899], [80.1651, 42.6653], [80.7857, 43.1616], [80.3551, 44.0973], [80.4554, 44.7463], [80.059, 45.0064], [81.602, 45.3109], [82.4787, 45.1236], [82.3264, 45.52], [83.0043, 47.0337], [83.1929, 47.1864], [84.786, 46.8308], [85.6565, 47.2547], [85.526, 47.9157], [85.7493, 48.3849], [86.5496, 48.5287], [86.7534, 49.0088], [87.3229, 49.0858], [87.8143, 49.1624], [87.9798, 48.5549], [88.517, 48.3844], [89.0478, 48.0027], [89.561, 48.004], [90.3134, 47.676], [90.4963, 47.2854], [90.87, 46.9547], [91.0338, 46.529], [91.0019, 46.0358], [90.6618, 45.5253], [90.8771, 45.196], [91.5842, 45.0766], [92.7876, 45.0357], [93.6563, 44.9008], [94.7119, 44.3508], [95.3502, 44.278], [95.9126, 43.2064], [96.3854, 42.7204], [97.2057, 42.7896], [99.4678, 42.5681], [99.984, 42.6773], [101.7139, 42.4656], [101.9731, 42.2157], [103.0726, 42.0062], [103.7109, 41.7514], [104.4984, 41.877], [104.4984, 41.6586], [105.1971, 41.738], [106.7702, 42.2889], [108.1712, 42.4474], [109.4434, 42.4558], [110.4004, 42.7736], [111.0072, 43.3414], [111.9331, 43.7116], [111.4022, 44.3672], [111.8981, 45.0641], [113.5871, 44.7459], [114.0305, 44.9425], [114.517, 45.3646], [115.6809, 45.4583], [116.2407, 45.7961], [116.5625, 46.2897], [117.3335, 46.3621], [118.3088, 46.7172], [119.7066, 46.6062], [119.8979, 46.8579], [119.711, 47.15], [118.4983, 47.9841], [117.7685, 47.988], [117.3508, 47.652], [116.7605, 47.87], [115.8984, 47.6871], [115.5575, 47.945], [116.6832, 49.8238], [117.8733, 49.5135], [118.4517, 49.8444], [119.26, 50.0664], [119.1921, 50.3797], [120.067, 51.6007], [120.7497, 52.0965], [120.6561, 52.5666], [120.0945, 52.7872], [120.704, 53.1718], [122.338, 53.485], [123.6079, 53.5465], [124.8122, 53.1339], [125.649, 53.0422], [126.313, 52.3997], [126.9247, 51.1002], [127.5901, 50.2091], [127.5027, 49.8735], [127.9998, 49.5685], [128.5267, 49.5943], [129.5339, 49.3235], [130.1962, 48.8916], [130.8043, 48.3414], [130.712, 48.1279], [131.0027, 47.6915], [132.5617, 47.7683], [133.1441, 48.1057], [133.4686, 48.0972], [134.2933, 48.3733], [134.5636, 48.3219], [134.7523, 47.7155], [134.1677, 47.3022], [133.8614, 46.2475], [133.1858, 45.4947], [132.9359, 45.03], [131.9775, 45.2439], [131.0822, 44.9101], [131.2553, 44.0716], [131.262, 43.4333], [131.0684, 42.9024], [130.5771, 42.8118], [130.5269, 42.5353]]]] }, \"properties\": { \"name\": \"China\", \"id\": \"CN\" }, \"id\": \"CN\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"MultiPolygon\", \"coordinates\": [[[[-67.0799, -55.1538], [-68.07, -55.2213], [-68.107, -54.9292], [-67.2452, -54.9776], [-67.0799, -55.1538]]], [[[-69.703, -54.919], [-68.9007, -55.0176], [-68.2826, -55.255], [-68.2932, -55.5214], [-69.4119, -55.4441], [-69.9798, -55.1476], [-69.703, -54.919]]], [[[-72.9233, -53.4817], [-72.2055, -53.8075], [-73.3048, -53.9438], [-73.6865, -53.4266], [-72.9233, -53.4817]]], [[[-68.6299, -52.6525], [-68.6532, -54.8538], [-69.4862, -54.8591], [-69.7235, -54.7122], [-70.4972, -54.8094], [-71.4409, -54.6198], [-70.8982, -54.338], [-70.8678, -53.8843], [-70.0903, -53.4182], [-70.3906, -53.0263], [-69.7636, -52.7315], [-68.6299, -52.6525]]], [[[-74.4762, -49.148], [-74.5699, -49.9909], [-75.3001, -49.8475], [-75.1842, -49.0836], [-74.7934, -48.705], [-74.4762, -49.148]]], [[[-74.5672, -48.5918], [-74.923, -48.6264], [-75.2129, -48.1417], [-74.7292, -48.1261], [-74.5672, -48.5918]]], [[[-72.9861, -44.7801], [-73.4451, -44.6411], [-73.2078, -44.3348], [-72.7641, -44.5488], [-72.9861, -44.7801]]], [[[-73.7354, -44.3948], [-73.9833, -44.4946], [-73.7271, -45.1192], [-74.0991, -45.3252], [-74.6178, -44.6478], [-74.5017, -44.4733], [-73.7354, -44.3948]]], [[[-73.7733, -43.3459], [-74.355, -43.2637], [-74.2094, -42.8789], [-74.0368, -41.7953], [-73.5278, -41.8961], [-73.4708, -42.4665], [-73.7893, -42.5859], [-73.4364, -42.9366], [-73.7733, -43.3459]]], [[[-67.1948, -22.8216], [-67.0088, -23.0014], [-67.3562, -24.0339], [-68.2502, -24.3921], [-68.562, -24.8378], [-68.3842, -25.0921], [-68.6002, -25.4859], [-68.4144, -26.1539], [-68.5811, -26.5183], [-68.3461, -27.0279], [-68.8463, -27.1536], [-69.1744, -27.9246], [-69.6569, -28.4138], [-69.8278, -29.1031], [-70.0269, -29.3242], [-69.9277, -29.7694], [-69.9563, -30.358], [-70.1614, -30.4401], [-70.5196, -31.1486], [-70.5853, -31.5694], [-70.1696, -32.4718], [-70.0198, -33.2717], [-69.7978, -33.3987], [-69.8524, -34.2243], [-70.2899, -34.733], [-70.4703, -35.3261], [-70.4048, -36.0616], [-71.0556, -36.5237], [-71.1677, -37.7621], [-71.0281, -38.0413], [-70.9517, -38.7383], [-71.4256, -38.9855], [-71.5394, -39.6025], [-71.7199, -39.6354], [-71.6952, -40.3354], [-71.932, -40.6918], [-71.9114, -41.6506], [-71.7501, -42.0466], [-72.1247, -42.2983], [-72.1464, -42.9899], [-71.7816, -43.167], [-71.905, -43.44], [-71.6801, -43.9296], [-71.82, -44.3832], [-71.2127, -44.4414], [-71.2611, -44.7632], [-71.5962, -44.9794], [-71.3537, -45.2306], [-71.7727, -45.7242], [-71.8757, -46.1606], [-71.6952, -46.5783], [-71.9403, -46.8313], [-71.905, -47.2015], [-72.346, -47.4927], [-72.518, -47.8762], [-72.3549, -48.3658], [-72.6143, -48.7929], [-73.5762, -49.583], [-73.5012, -50.1254], [-73.153, -50.7384], [-72.5098, -50.6075], [-72.2763, -50.9102], [-72.4077, -51.541], [-71.9187, -51.9898], [-69.9603, -52.0084], [-68.4433, -52.3569], [-69.241, -52.2055], [-69.5606, -52.4217], [-70.795, -52.7688], [-70.9959, -53.7791], [-71.2977, -53.8834], [-72.1744, -53.6322], [-71.8528, -53.2855], [-71.4003, -53.107], [-71.3878, -52.7644], [-72.4583, -53.2544], [-73.0527, -53.2433], [-74.0143, -52.6392], [-73.5183, -52.0408], [-73.9733, -51.7847], [-73.8958, -51.3315], [-74.8147, -51.0629], [-75.0948, -50.6812], [-74.3337, -49.9745], [-74.3411, -48.5958], [-74.5772, -48.2744], [-74.6549, -47.7022], [-74.1584, -47.1824], [-74.152, -46.9742], [-75.6567, -46.6102], [-74.9245, -46.1597], [-75.0666, -45.8751], [-74.1579, -45.7673], [-74.0377, -45.4175], [-73.5498, -45.4836], [-73.3625, -44.978], [-72.739, -44.7343], [-72.6638, -44.4365], [-73.2651, -44.1688], [-72.9965, -43.6317], [-72.7852, -42.3014], [-72.4993, -41.9809], [-72.6698, -41.6595], [-73.0149, -41.5441], [-73.5214, -41.7971], [-73.966, -41.1184], [-73.6694, -40.0824], [-73.4104, -39.7889], [-73.2264, -39.2243], [-73.5325, -38.3667], [-73.4648, -38.0405], [-73.6619, -37.6987], [-73.6017, -37.1886], [-73.216, -37.1669], [-73.1181, -36.6884], [-72.8747, -36.3905], [-72.6239, -35.5857], [-72.2237, -35.0961], [-72.0029, -34.1653], [-71.6644, -33.6526], [-71.743, -33.0951], [-71.4522, -32.6596], [-71.5259, -31.806], [-71.6619, -31.1695], [-71.6695, -30.3305], [-71.4005, -30.1432], [-71.3157, -29.6496], [-71.5192, -28.9265], [-71.1863, -28.3778], [-71.0527, -27.7275], [-70.6465, -26.3293], [-70.7138, -25.7842], [-70.4455, -25.1725], [-70.5742, -24.6442], [-70.4878, -23.7818], [-70.5633, -23.0569], [-70.3316, -22.8487], [-70.0875, -21.493], [-70.1971, -20.7256], [-70.1483, -19.8049], [-70.4184, -18.3454], [-69.9263, -18.206], [-69.8522, -17.704], [-69.5108, -17.506], [-69.3133, -17.9432], [-69.094, -18.0507], [-68.9684, -18.9682], [-68.4628, -19.4329], [-68.6983, -19.721], [-68.7451, -20.4588], [-68.4999, -20.6119], [-68.1969, -21.3004], [-67.9883, -22.0572], [-67.8795, -22.8229], [-67.1948, -22.8216]]]] }, \"properties\": { \"name\": \"Chile\", \"id\": \"CL\" }, \"id\": \"CL\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[9.5241, 47.5242], [9.5277, 47.2707], [9.4877, 47.0621], [9.5801, 47.0572], [10.4528, 46.865], [9.9392, 46.3616], [9.2512, 46.2866], [8.9537, 45.8298], [8.4584, 46.2458], [7.9932, 46.0158], [7.021, 45.9257], [6.7583, 46.4158], [6.06, 46.4282], [7.0006, 47.3227], [7.6154, 47.5925], [8.6177, 47.7661], [9.5241, 47.5242]]] }, \"properties\": { \"name\": \"Switzerland\", \"id\": \"CH\" }, \"id\": \"CH\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[96.8404, -12.182], [96.835, -12.1797], [96.8279, -12.1509], [96.8257, -12.126], [96.8328, -12.126], [96.8395, -12.1602], [96.8404, -12.182]]] }, \"properties\": { \"name\": \"Cocos (Keeling) Islands\", \"id\": \"CC\" }, \"id\": \"CC\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"MultiPolygon\", \"coordinates\": [[[[-105.289, 72.9199], [-106.9216, 73.4799], [-105.5123, 73.7657], [-104.583, 73.3538], [-105.289, 72.9199]]], [[[-79.5373, 73.6546], [-77.2066, 73.4996], [-76.2895, 73.081], [-76.4005, 72.8207], [-77.836, 72.8968], [-79.5006, 72.7559], [-80.8241, 73.3807], [-80.849, 73.7211], [-79.5373, 73.6546]]], [[[-86.5894, 71.0107], [-84.7896, 71.0933], [-84.6995, 71.6315], [-85.9115, 71.9866], [-85.3411, 72.4216], [-85.6445, 72.7745], [-85.0184, 73.3356], [-82.6596, 73.7296], [-81.406, 73.6346], [-80.2748, 72.7455], [-80.9413, 72.2101], [-78.453, 72.4352], [-77.7532, 72.7248], [-75.2943, 72.4809], [-74.9032, 72.1005], [-73.7136, 71.7198], [-71.6406, 71.5163], [-70.7926, 71.1033], [-70.5609, 70.7382], [-69.1686, 70.7641], [-67.3637, 70.0344], [-66.6852, 69.2858], [-67.7517, 69.0387], [-68.038, 68.5507], [-67.033, 68.3261], [-66.2252, 67.9588], [-64.5275, 67.8127], [-64.0079, 67.3473], [-61.9684, 67.019], [-61.2997, 66.6488], [-61.9915, 66.0354], [-62.6589, 65.6399], [-63.3643, 65.5433], [-63.4018, 65.1185], [-64.6653, 65.1689], [-65.4015, 65.7639], [-65.3054, 66.0085], [-66.4771, 66.2797], [-67.1833, 66.0345], [-68.2568, 65.9386], [-67.3034, 65.4829], [-66.8606, 65.0917], [-65.2748, 64.6316], [-64.6784, 64.0281], [-64.5144, 63.2639], [-65.0688, 63.2635], [-65.2659, 62.7151], [-65.9788, 63.0007], [-67.676, 63.0935], [-66.2813, 62.3027], [-66.2567, 61.8683], [-67.4401, 62.1513], [-69.0823, 62.4052], [-69.5452, 62.7446], [-70.2362, 62.7634], [-71.2538, 63.0424], [-73.4437, 64.4236], [-74.5124, 64.6702], [-75.0675, 64.4567], [-76.7239, 64.242], [-77.7912, 64.367], [-78.0957, 64.9392], [-77.4474, 65.1616], [-77.3267, 65.4532], [-75.8283, 65.227], [-73.5607, 65.5429], [-74.434, 66.139], [-73.0333, 66.7283], [-72.2201, 67.2543], [-73.3283, 68.2668], [-74.648, 68.7076], [-74.9172, 68.9828], [-76.4034, 68.6923], [-75.7873, 69.3186], [-77.1289, 69.6526], [-78.9797, 70.5813], [-79.3475, 70.3722], [-78.7778, 70.0477], [-79.3033, 69.8948], [-81.0982, 70.0912], [-82.1387, 69.8413], [-86.3219, 70.1454], [-86.6244, 70.4013], [-87.9006, 70.2519], [-88.8483, 70.5229], [-89.3655, 71.0671], [-88.0387, 70.9512], [-87.8724, 71.2085], [-89.0794, 71.2879], [-89.8458, 71.4924], [-90.0251, 71.9489], [-89.2631, 73.0691], [-87.7197, 73.7229], [-85.1105, 73.8081], [-86.6293, 72.8709], [-86.0361, 71.7709], [-85.0233, 71.3532], [-86.5894, 71.0107]]], [[[-100.002, 73.946], [-99.1579, 73.7316], [-97.5819, 73.8876], [-97.0017, 73.6665], [-97.7959, 73.2852], [-97.0519, 72.6367], [-96.6133, 71.8339], [-98.663, 71.3021], [-99.167, 71.3672], [-100.5944, 72.1524], [-101.7239, 72.3149], [-102.7137, 72.783], [-100.4847, 72.773], [-100.2828, 73.1203], [-101.4509, 73.4311], [-100.9151, 73.8053], [-100.002, 73.946]]], [[[-93.171, 74.161], [-92.2228, 73.9724], [-90.3547, 73.8687], [-92.118, 72.7539], [-93.3407, 72.8018], [-94.0377, 72.0288], [-95.1929, 72.0275], [-95.5475, 72.7816], [-95.633, 73.6954], [-95.0397, 74.0239], [-93.171, 74.161]]], [[[-119.7363, 74.1126], [-117.5149, 74.2318], [-115.5107, 73.6188], [-115.4468, 73.4388], [-118.9615, 72.6842], [-120.18, 72.2126], [-120.6192, 71.5057], [-123.2107, 71.1235], [-124.0077, 71.6775], [-125.7626, 72.1375], [-124.9871, 72.5881], [-124.8364, 73.0762], [-123.7973, 73.7682], [-124.6962, 74.3481], [-121.3153, 74.5299], [-119.7363, 74.1126]]], [[[-93.5427, 75.028], [-93.5472, 74.691], [-94.6973, 74.6422], [-96.5658, 75.0988], [-95.6707, 75.5287], [-94.4272, 75.5935], [-93.5427, 75.028]]], [[[-102.2275, 76.0149], [-103.3148, 75.7641], [-104.3506, 76.1823], [-102.5841, 76.2817], [-102.2275, 76.0149]]], [[[-97.7009, 76.4664], [-97.4097, 75.5522], [-97.7994, 75.1167], [-100.2344, 75.0078], [-100.712, 75.4064], [-102.5413, 75.5136], [-101.4313, 75.9919], [-102.1378, 76.2848], [-100.388, 76.6135], [-97.7009, 76.4664]]], [[[-108.2924, 76.0571], [-105.481, 75.7457], [-105.8625, 75.1915], [-107.1533, 74.9272], [-108.8312, 75.0648], [-110.9408, 74.6387], [-112.5193, 74.4169], [-113.5141, 74.43], [-114.4518, 75.0879], [-115.7289, 74.9682], [-117.6001, 75.2716], [-116.6098, 76.0738], [-115.5806, 76.4375], [-114.1939, 76.4515], [-112.6975, 76.2016], [-111.0527, 75.5484], [-109.0865, 75.5065], [-108.9449, 75.6989], [-110.2701, 76.4169], [-108.467, 76.7376], [-108.2924, 76.0571]]], [[[-94.2949, 76.9125], [-92.7162, 76.6029], [-91.3051, 76.6808], [-90.2515, 76.0536], [-88.2014, 75.512], [-86.0687, 75.5023], [-83.932, 75.819], [-82.1538, 75.831], [-79.6602, 75.4494], [-79.508, 74.8801], [-80.2777, 74.5816], [-81.8089, 74.4766], [-88.4231, 74.4942], [-89.8444, 74.5485], [-91.9616, 74.7931], [-92.4281, 75.3828], [-92.1851, 75.8465], [-93.0917, 76.3541], [-95.2739, 76.2644], [-96.6397, 76.703], [-95.6383, 77.0639], [-94.2949, 76.9125]]], [[[-115.5513, 77.3633], [-116.2205, 76.6111], [-119.3679, 76.2218], [-119.9128, 75.8589], [-121.9083, 76.0347], [-121.6138, 76.4415], [-119.0903, 77.3051], [-115.5513, 77.3633]]], [[[-95.4843, 77.7921], [-93.301, 77.7399], [-93.5196, 77.4745], [-95.987, 77.484], [-95.4843, 77.7921]]], [[[-110.4581, 78.1032], [-109.7718, 77.9574], [-110.1984, 77.5246], [-111.952, 77.3442], [-113.1643, 77.5302], [-113.1872, 77.9124], [-110.4581, 78.1032]]], [[[-109.816, 78.6503], [-109.3905, 78.3367], [-113.1499, 78.4084], [-110.4077, 78.7566], [-109.816, 78.6503]]], [[[-96.2045, 78.5314], [-94.8873, 78.3452], [-95.087, 77.9927], [-96.9895, 77.8061], [-98.2548, 78.4293], [-96.2045, 78.5314]]], [[[-103.426, 79.3157], [-99.6094, 78.5831], [-99.1664, 77.8569], [-100.5859, 77.8917], [-101.0742, 78.1938], [-102.7313, 78.3711], [-103.5183, 78.7691], [-105.5358, 79.0325], [-105.3877, 79.3235], [-103.426, 79.3157]]], [[[-91.8857, 81.1328], [-90.643, 80.5937], [-87.6749, 80.3722], [-87.1442, 79.6626], [-85.5014, 79.5303], [-85.2899, 79.2083], [-87.0164, 78.8987], [-88.7911, 78.1925], [-90.6144, 78.1498], [-92.6782, 78.3891], [-95.1032, 79.29], [-95.297, 79.6531], [-96.7734, 80.1358], [-95.6146, 80.3962], [-96.1328, 80.6913], [-95.2697, 81.0007], [-91.8857, 81.1328]]], [[[-69.4889, 83.0169], [-63.641, 82.8127], [-61.4771, 82.4674], [-62.1766, 82.0434], [-64.5741, 81.7336], [-65.4839, 81.2848], [-70.1434, 80.3977], [-71.3878, 79.7618], [-75.2595, 79.4209], [-76.2558, 79.0068], [-74.4332, 78.724], [-75.866, 78.0098], [-78.0127, 77.9461], [-78.0762, 77.5191], [-79.3408, 77.1584], [-78.2888, 76.978], [-78.2844, 76.5711], [-80.6903, 76.1765], [-81.1708, 76.5128], [-83.8856, 76.4531], [-85.1412, 76.3046], [-89.5701, 76.4919], [-89.4997, 76.8268], [-88.3982, 77.104], [-86.8737, 77.2004], [-88.0946, 77.7193], [-87.0179, 77.8922], [-87.5517, 78.1767], [-86.808, 78.7744], [-84.3162, 78.9753], [-85.0899, 79.6122], [-86.4207, 79.8453], [-86.3073, 80.3194], [-83.7236, 80.229], [-80.0511, 80.5287], [-83.4013, 80.714], [-85.3074, 80.526], [-88.9214, 80.8057], [-89.9474, 81.1725], [-88.9784, 81.5414], [-90.4903, 81.8772], [-86.5807, 82.1873], [-82.1225, 82.6019], [-79.8864, 82.9386], [-69.97, 83.1161], [-69.4889, 83.0169]]], [[[-61.1053, 45.9448], [-60.8061, 45.738], [-60.5049, 46.204], [-59.8651, 46.1597], [-60.3862, 45.6545], [-61.2837, 45.5737], [-61.4953, 45.9413], [-60.8703, 46.7966], [-60.3318, 46.7678], [-60.5768, 46.1721], [-61.1053, 45.9448]]], [[[-63.8113, 46.4686], [-63.1294, 46.422], [-62.1635, 46.4872], [-62.8784, 46.0012], [-63.641, 46.2307], [-63.8113, 46.4686]]], [[[-74.7088, 45.0038], [-73.558, 45.425], [-73.1596, 46.0101], [-71.901, 46.632], [-71.2611, 46.7562], [-70.5196, 47.0323], [-68.987, 48.2748], [-67.5608, 48.8559], [-66.1781, 49.2132], [-64.8364, 49.1917], [-64.2618, 48.9218], [-64.2538, 48.5505], [-65.2595, 48.0213], [-65.9266, 48.1887], [-65.6665, 47.696], [-65.2282, 47.8114], [-64.7033, 47.7248], [-64.9121, 47.3688], [-65.3189, 47.1012], [-64.9057, 46.8881], [-64.5415, 46.2404], [-63.2928, 45.7522], [-62.4831, 45.6217], [-61.9556, 45.868], [-61.4924, 45.6869], [-61.2837, 45.2355], [-63.7611, 44.4862], [-64.286, 44.5501], [-64.8624, 43.8678], [-65.7382, 43.5607], [-66.1257, 43.8137], [-66.0995, 44.3677], [-65.6567, 44.7605], [-64.4489, 45.2559], [-64.8979, 45.6261], [-65.8845, 45.223], [-66.8726, 45.0672], [-67.1249, 45.1693], [-67.4725, 45.2759], [-67.4328, 45.603], [-67.7845, 45.7016], [-67.8067, 47.083], [-68.311, 47.3546], [-68.8288, 47.2032], [-69.243, 47.4629], [-70.0078, 46.7088], [-70.2963, 45.9062], [-70.898, 45.2626], [-71.3272, 45.2901], [-71.5175, 45.0078], [-74.7088, 45.0038]]], [[[-61.8011, 49.094], [-62.2195, 49.0791], [-63.5658, 49.3994], [-64.1315, 49.9416], [-62.8584, 49.7055], [-61.8171, 49.2835], [-61.8011, 49.094]]], [[[-127.1973, 50.6403], [-125.4821, 50.3167], [-124.6429, 49.4287], [-123.9959, 49.2241], [-123.497, 48.582], [-123.5946, 48.3334], [-124.6893, 48.5975], [-125.8285, 49.0918], [-125.8354, 49.2767], [-126.5485, 49.4189], [-126.683, 49.8764], [-127.1143, 49.8797], [-128.2675, 50.6092], [-127.9182, 50.8605], [-127.1973, 50.6403]]], [[[-55.4588, 51.5365], [-55.8714, 50.9073], [-56.6939, 50.0597], [-55.7648, 49.9605], [-55.892, 49.5803], [-54.9827, 49.268], [-54.579, 49.4908], [-53.9577, 49.4418], [-53.5733, 49.1413], [-53.853, 48.8112], [-53.5312, 48.2317], [-52.955, 48.0293], [-53.1756, 47.6529], [-52.6536, 47.5495], [-53.0697, 46.6812], [-53.6164, 46.6803], [-54.1737, 46.8805], [-53.8692, 47.387], [-54.8566, 47.3848], [-56.2211, 47.6716], [-56.9525, 47.5743], [-58.3332, 47.6769], [-59.1169, 47.5708], [-59.3624, 47.8655], [-58.7105, 48.325], [-58.7165, 48.598], [-58.0158, 49.5426], [-57.4656, 50.4636], [-56.7503, 51.2748], [-56.0256, 51.5685], [-55.4588, 51.5365]]], [[[-80.7318, 52.7472], [-81.8391, 52.9579], [-81.8473, 53.1862], [-81.1357, 53.2058], [-80.7318, 52.7472]]], [[[-132.6556, 54.1275], [-131.7026, 53.9864], [-132.0113, 53.2653], [-132.7475, 53.3105], [-133.0522, 53.7782], [-132.6556, 54.1275]]], [[[-78.9356, 56.2662], [-79.1755, 55.8851], [-80.0009, 55.9322], [-79.5963, 56.2444], [-78.9356, 56.2662]]], [[[-79.5452, 62.4117], [-79.324, 62.0261], [-79.7144, 61.6126], [-80.2652, 61.8182], [-80.0215, 62.3431], [-79.5452, 62.4117]]], [[[-82.0004, 62.9543], [-82.1138, 62.6522], [-83.0158, 62.2099], [-83.699, 62.1602], [-83.8994, 62.4765], [-83.3765, 62.905], [-82.0004, 62.9543]]], [[[-84.9197, 65.261], [-83.4071, 65.1039], [-82.0501, 64.6442], [-81.7161, 64.0219], [-80.829, 64.09], [-80.3021, 63.7622], [-81.0463, 63.4615], [-82.3782, 63.7067], [-82.4672, 63.9269], [-83.4943, 64.0993], [-83.7283, 63.8135], [-84.6329, 63.3092], [-85.4954, 63.1392], [-85.7142, 63.6579], [-87.1888, 63.6723], [-86.252, 64.1368], [-86.3743, 64.5659], [-85.9617, 65.7042], [-85.241, 65.7954], [-84.9197, 65.261]]], [[[-75.6758, 68.3225], [-75.1538, 68.234], [-75.1274, 67.5373], [-75.7801, 67.2836], [-77.0048, 67.2669], [-77.3058, 67.7062], [-76.7403, 68.2313], [-75.6758, 68.3225]]], [[[-97.4394, 69.6427], [-96.2999, 69.3444], [-95.6856, 68.7358], [-96.4016, 68.4708], [-97.472, 68.5438], [-99.254, 68.8632], [-99.5641, 69.0341], [-97.4394, 69.6427]]], [[[-74.7088, 45.0038], [-75.1793, 44.8994], [-76.4646, 44.0574], [-76.82, 43.6286], [-78.7205, 43.625], [-79.1719, 43.4666], [-79.0368, 42.8025], [-80.2475, 42.3662], [-81.2778, 42.209], [-82.439, 41.675], [-83.1419, 41.976], [-83.0731, 42.3005], [-82.5453, 42.6245], [-82.1378, 43.5709], [-82.5511, 45.3473], [-83.5926, 45.817], [-83.9777, 46.0851], [-84.1921, 46.5494], [-84.5617, 46.4575], [-84.8759, 46.9001], [-88.3782, 48.3032], [-89.4556, 47.996], [-90.8403, 48.2007], [-91.5183, 48.0582], [-92.9963, 48.6117], [-93.3778, 48.6166], [-93.7078, 48.5256], [-94.6209, 48.7427], [-95.162, 48.9917], [-97.5297, 48.9932], [-99.2354, 48.993], [-102.2201, 48.993], [-103.9256, 48.993], [-106.4839, 48.993], [-109.895, 48.993], [-112.4532, 48.993], [-115.8643, 48.993], [-118.4226, 48.993], [-120.1281, 48.993], [-122.7888, 48.993], [-123.0491, 48.993], [-123.3356, 49.4591], [-123.859, 49.4829], [-124.4833, 49.8082], [-125.21, 50.4763], [-126.4045, 50.5298], [-126.6318, 50.9151], [-127.0577, 50.8676], [-127.7082, 51.1512], [-127.6449, 51.4784], [-128.3576, 52.1589], [-128.1088, 52.858], [-128.6524, 53.2437], [-129.2842, 53.3931], [-129.5637, 53.2515], [-130.3351, 53.724], [-130.0433, 54.1335], [-130.4304, 54.4209], [-129.6666, 55.4366], [-130.0251, 55.8882], [-130.4772, 56.2307], [-131.5752, 56.5989], [-131.8661, 56.7929], [-133.8208, 58.7049], [-134.9439, 59.2882], [-135.4759, 59.7934], [-136.3219, 59.6049], [-136.5787, 59.1522], [-137.4385, 58.9031], [-137.5932, 59.2263], [-139.1852, 60.0837], [-141.0021, 60.3003], [-141.0021, 63.2222], [-141.0021, 65.56], [-141.0021, 68.4819], [-141.0021, 69.6509], [-139.1815, 69.5155], [-138.1283, 69.1519], [-136.7174, 68.8891], [-135.8763, 68.9169], [-135.6914, 69.3111], [-135.1409, 69.4678], [-133.1632, 69.4338], [-130.4985, 70.1431], [-128.9715, 69.7123], [-127.765, 70.2219], [-127.1385, 70.2392], [-126.6122, 69.7303], [-125.9073, 69.4185], [-124.7679, 69.99], [-123.6091, 69.3774], [-123.0258, 69.81], [-120.9624, 69.6604], [-120.2925, 69.4205], [-118.8687, 69.2571], [-118.0953, 69.043], [-116.0651, 68.8554], [-115.6312, 68.9726], [-114.4138, 68.6597], [-115.1332, 67.8191], [-112.4352, 67.6849], [-110.9901, 67.7907], [-110.0426, 67.9772], [-109.6305, 67.7328], [-108.5929, 67.591], [-107.6263, 67.0031], [-108.2611, 68.1498], [-108.3134, 68.6108], [-106.1646, 68.9198], [-105.4286, 68.4584], [-104.1935, 68.0311], [-103.4741, 68.115], [-102.692, 67.8116], [-101.555, 67.6931], [-100.4561, 67.8396], [-99.1468, 67.7237], [-98.4171, 67.8265], [-98.2184, 68.3174], [-97.2659, 68.453], [-96.0361, 68.1578], [-96.3714, 67.5539], [-95.7826, 67.1937], [-95.2588, 67.2625], [-95.6505, 67.7375], [-93.6517, 68.5431], [-93.6814, 68.8874], [-94.2707, 69.4551], [-96.0503, 69.8311], [-96.4924, 70.1249], [-96.2265, 70.5418], [-96.549, 70.8088], [-96.4056, 71.2737], [-95.2013, 71.9036], [-94.3084, 71.7649], [-92.9488, 71.2622], [-92.9814, 70.8523], [-91.5641, 70.1782], [-92.751, 69.7139], [-90.8221, 69.2904], [-90.4683, 68.8638], [-89.0567, 69.266], [-88.0413, 68.8117], [-87.8103, 68.4042], [-88.347, 68.2883], [-88.1958, 67.7659], [-87.2663, 67.1839], [-86.5363, 67.5162], [-85.9526, 68.0724], [-85.7338, 68.6301], [-84.8622, 69.074], [-85.3869, 69.2318], [-85.5074, 69.8453], [-82.6183, 69.691], [-82.6421, 69.4584], [-81.3286, 69.12], [-81.2815, 68.6572], [-82.5526, 68.4464], [-81.9764, 67.862], [-81.2702, 67.4598], [-81.4675, 67.0699], [-82.6416, 66.5876], [-84.4784, 66.1794], [-85.6039, 66.5683], [-86.6331, 66.5314], [-86.0429, 66.0225], [-87.2914, 65.3549], [-87.9701, 65.3489], [-89.7494, 65.9359], [-89.9241, 65.7804], [-88.974, 65.3482], [-87.0275, 65.1982], [-87.2805, 64.8262], [-88.1057, 64.1832], [-88.653, 64.0094], [-90.1418, 63.9819], [-90.0135, 63.8044], [-91.3301, 63.5067], [-90.7466, 63.3516], [-90.8711, 62.9459], [-91.4491, 62.8041], [-92.3613, 62.8194], [-93.4206, 61.7059], [-93.9127, 61.4815], [-94.6467, 60.4164], [-94.7858, 59.9534], [-94.7135, 58.9034], [-94.2871, 58.716], [-93.2782, 58.7564], [-92.249, 57.009], [-91.1113, 57.2412], [-90.5922, 57.2246], [-89.7909, 56.9813], [-88.9484, 56.8512], [-88.0751, 56.4673], [-87.5608, 56.0565], [-85.8305, 55.6569], [-85.061, 55.2856], [-83.9107, 55.3147], [-82.5775, 55.1487], [-82.2195, 54.8136], [-82.4181, 54.3559], [-82.1413, 53.8177], [-82.2605, 52.9612], [-81.5994, 52.4325], [-81.6613, 52.2938], [-80.6579, 51.7582], [-80.368, 51.3299], [-79.8362, 51.1734], [-79.4975, 51.5698], [-78.9777, 51.7338], [-78.4917, 52.2521], [-78.7238, 52.6278], [-79.2418, 54.0989], [-79.6655, 54.6975], [-77.8911, 55.2364], [-77.3249, 55.5555], [-76.6504, 56.1073], [-76.5729, 57.1813], [-77.1569, 58.0189], [-78.5152, 58.6823], [-77.7606, 59.3801], [-77.3118, 60.0424], [-77.8715, 60.7859], [-77.7362, 61.4373], [-78.1372, 62.1074], [-78.0682, 62.3555], [-77.3724, 62.5726], [-74.69, 62.1835], [-73.6299, 62.4543], [-72.0814, 61.7283], [-71.4227, 61.159], [-70.2792, 61.0687], [-69.6405, 60.6898], [-69.7559, 60.3886], [-69.682, 59.3417], [-69.1735, 58.8967], [-68.6981, 58.9045], [-67.5697, 58.2135], [-66.608, 58.5489], [-65.6061, 59.1107], [-64.9312, 60.2519], [-64.4995, 60.2683], [-63.1854, 58.8579], [-62.5939, 58.4741], [-62.3056, 57.9723], [-61.899, 57.8613], [-61.851, 57.3812], [-61.3337, 57.0106], [-61.5146, 56.3903], [-59.9303, 55.2594], [-58.997, 55.1494], [-58.7802, 54.8384], [-58.1951, 54.8659], [-57.4046, 54.5705], [-58.1514, 54.3504], [-57.4161, 54.1628], [-57.1489, 53.8476], [-56.4651, 53.7651], [-55.7979, 53.212], [-55.8336, 52.3104], [-55.6951, 52.1378], [-56.976, 51.4577], [-58.5103, 51.295], [-59.1655, 50.7799], [-60.0801, 50.2546], [-61.2897, 50.202], [-62.7155, 50.3016], [-64.868, 50.2754], [-65.2686, 50.32], [-66.4955, 50.2119], [-66.9411, 49.9938], [-67.3719, 49.3486], [-68.2819, 49.1972], [-68.9291, 48.829], [-69.775, 48.0981], [-69.9055, 47.8322], [-70.7058, 47.1398], [-71.2678, 46.7958], [-71.8797, 46.687], [-72.981, 46.2098], [-73.974, 45.3451], [-74.7088, 45.0038]]], [[[-114.5215, 72.593], [-113.5001, 72.6944], [-112.7537, 72.986], [-111.2698, 72.7137], [-108.7549, 72.551], [-107.72, 73.329], [-106.4822, 73.1962], [-105.415, 72.7883], [-104.3495, 71.434], [-104.5697, 71.1039], [-103.9535, 70.7626], [-100.9732, 70.0295], [-100.9351, 69.7152], [-102.2343, 69.8422], [-102.9197, 69.5648], [-101.9756, 69.4069], [-101.857, 69.0239], [-103.4681, 68.8086], [-105.0195, 69.0814], [-106.1408, 69.1621], [-106.6591, 69.4396], [-107.4399, 69.0021], [-108.946, 68.7598], [-111.3108, 68.542], [-113.1277, 68.4941], [-113.6941, 69.195], [-116.5135, 69.4247], [-117.1354, 70.1001], [-114.5923, 70.3125], [-112.6378, 70.2253], [-112.1143, 70.4468], [-113.7573, 70.6907], [-115.991, 70.5864], [-117.587, 70.6296], [-118.2642, 70.8882], [-117.8141, 71.1585], [-118.8683, 71.6868], [-118.9447, 71.9855], [-118.2136, 72.2629], [-118.3745, 72.5339], [-117.5517, 72.8311], [-114.6382, 73.3727], [-114.1091, 72.8611], [-114.5215, 72.593]]]] }, \"properties\": { \"name\": \"Canada\", \"id\": \"CA\" }, \"id\": \"CA\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[22.86, 10.9195], [23.2559, 10.4579], [23.6461, 9.8231], [23.5374, 8.8159], [24.1473, 8.6654], [24.2915, 8.2912], [24.8535, 8.1376], [25.2472, 7.7244], [25.3809, 7.3333], [25.8891, 7.0647], [26.3619, 6.6355], [26.5141, 6.0691], [27.0836, 5.777], [27.4032, 5.1094], [27.1151, 5.1977], [26.8222, 5.0623], [25.5251, 5.3123], [25.2495, 5.0246], [24.7656, 4.9301], [24.32, 4.994], [23.4171, 4.6633], [22.7557, 4.6469], [22.4223, 4.1351], [21.5376, 4.2447], [20.558, 4.4627], [20.2264, 4.8297], [19.8065, 5.0894], [19.5011, 5.1276], [19.0687, 4.8915], [18.5676, 4.2576], [18.6102, 3.4785], [18.161, 3.4998], [17.4379, 3.6845], [16.6735, 3.5354], [16.4684, 2.8318], [16.1834, 2.2703], [16.0636, 2.9086], [15.775, 3.127], [15.1287, 3.827], [15.0226, 4.3583], [14.7088, 4.6655], [14.6169, 5.8649], [14.7394, 6.2799], [15.2459, 7.2636], [15.4803, 7.5237], [15.8452, 7.4753], [16.3787, 7.6835], [16.7849, 7.5508], [17.6496, 7.9836], [18.4553, 8.032], [19.1087, 8.6561], [19.1455, 9.0161], [20.3422, 9.1271], [20.7733, 9.4058], [21.2638, 9.9745], [21.7258, 10.3664], [21.7063, 10.5746], [22.4938, 10.9963], [22.86, 10.9195]]] }, \"properties\": { \"name\": \"Central African Republic\", \"id\": \"CF\" }, \"id\": \"CF\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[5.6938, 50.7748], [5.7972, 50.7546], [5.9939, 50.7504], [6.3645, 50.3163], [6.1164, 50.1209], [5.744, 49.9196], [5.7897, 49.5383], [4.8677, 49.788], [4.1744, 50.2466], [2.8396, 50.7118], [2.5249, 51.0971], [3.35, 51.3776], [3.9023, 51.2076], [4.2263, 51.3865], [4.5033, 51.4746], [5.827, 51.1257], [5.6938, 50.7748]]] }, \"properties\": { \"name\": \"Belgium\", \"id\": \"BE\" }, \"id\": \"BE\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[25.2588, -17.7936], [25.2242, -17.9153], [25.7613, -18.6495], [26.1683, -19.5381], [26.6784, -19.8928], [27.2217, -20.1458], [27.2807, -20.4788], [27.6997, -20.5307], [27.6696, -21.0642], [28.0455, -21.5729], [29.0372, -21.8113], [29.3648, -22.194], [28.8397, -22.4807], [28.2102, -22.6938], [27.8906, -23.0737], [27.1462, -23.5243], [26.835, -24.2407], [26.3974, -24.6136], [25.9122, -24.7477], [25.5837, -25.6062], [24.7483, -25.8174], [23.8938, -25.6008], [23.2662, -25.2666], [22.8786, -25.4579], [22.6403, -26.0714], [22.0907, -26.5801], [21.6464, -26.8544], [20.74, -26.849], [20.6268, -26.4438], [20.7932, -25.9155], [20.3453, -25.03], [19.9805, -24.777], [19.9774, -22], [20.9708, -22], [20.9779, -20.9684], [20.9739, -18.3188], [23.2986, -18.0276], [23.5804, -18.4528], [24.359, -17.9783], [25.2588, -17.7936]]] }, \"properties\": { \"name\": \"Botswana\", \"id\": \"BW\" }, \"id\": \"BW\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[91.6317, 27.7599], [91.5949, 27.5575], [92.0836, 27.2907], [91.9984, 26.8548], [90.7395, 26.7718], [90.3458, 26.8903], [89.7638, 26.7016], [88.8579, 26.9613], [88.8912, 27.316], [89.537, 28.1075], [89.9809, 28.3112], [90.3529, 28.0804], [91.6056, 27.9516], [91.6317, 27.7599]]] }, \"properties\": { \"name\": \"Bhutan\", \"id\": \"BT\" }, \"id\": \"BT\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[115.0266, 4.8999], [114.7465, 4.7179], [114.8402, 4.3934], [114.6085, 4.0241], [114.0638, 4.5927], [114.2995, 4.6074], [115.0266, 4.8999], [115.1398, 4.8999], [115.0266, 4.8999]]] }, \"properties\": { \"name\": \"Brunei\", \"id\": \"BN\" }, \"id\": \"BN\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-59.4933, 13.0822], [-59.6114, 13.1021], [-59.5916, 13.3179], [-59.4276, 13.1527], [-59.4933, 13.0822]]] }, \"properties\": { \"name\": \"Barbados\", \"id\": \"BB\" }, \"id\": \"BB\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"MultiPolygon\", \"coordinates\": [[[[-51.8326, -1.4336], [-51.5461, -0.6497], [-51.1608, -0.6665], [-51.2764, -1.0216], [-51.8326, -1.4336]]], [[[-49.6287, -0.2293], [-49.1169, -0.1636], [-48.3798, -0.3527], [-48.5396, -0.801], [-48.9289, -1.4824], [-49.5878, -1.7123], [-50.5076, -1.7878], [-50.7597, -1.2405], [-50.7713, -0.6452], [-50.6454, -0.2728], [-50.2481, -0.1165], [-49.6287, -0.2293]]], [[[-56.4828, 1.9422], [-56.0198, 1.8424], [-56.1295, 2.2996], [-55.0058, 2.593], [-54.6163, 2.3266], [-54.13, 2.1211], [-53.7678, 2.3551], [-52.9648, 2.1837], [-52.7006, 2.3635], [-51.9906, 3.7018], [-51.6526, 4.0614], [-51.2198, 4.0938], [-51.0525, 3.2819], [-50.659, 2.1309], [-50.459, 1.8295], [-49.9572, 1.6599], [-49.8988, 1.1628], [-50.2945, 0.8356], [-50.8163, 0.1724], [-51.2829, -0.085], [-51.7026, -0.7624], [-51.9476, -1.5867], [-51.2973, -1.2236], [-50.9177, -1.1153], [-50.69, -1.7616], [-50.4033, -2.0155], [-49.9991, -1.8317], [-49.7195, -1.9263], [-49.3137, -1.7319], [-48.9913, -1.83], [-48.115, -0.7375], [-47.3981, -0.6266], [-46.8113, -0.7797], [-46.6173, -0.9706], [-46.2192, -1.0314], [-45.6448, -1.3479], [-45.0764, -1.4664], [-44.6513, -1.7456], [-44.3082, -2.5353], [-43.9329, -2.5832], [-42.9368, -2.4652], [-42.2496, -2.7919], [-41.8761, -2.7466], [-41.3181, -2.9361], [-40.4745, -2.7954], [-39.9647, -2.8616], [-38.4757, -3.7174], [-38.0489, -4.2163], [-37.1746, -4.9123], [-36.5907, -5.0975], [-35.9799, -5.0544], [-35.5493, -5.1294], [-35.2355, -5.5666], [-34.9882, -6.3936], [-34.8056, -7.2885], [-34.8347, -7.9717], [-35.1578, -8.9305], [-35.3409, -9.2305], [-36.3983, -10.4841], [-36.9378, -10.8206], [-37.4119, -11.497], [-37.6887, -12.0998], [-38.2397, -12.8443], [-38.788, -12.7826], [-38.8352, -13.147], [-39.0894, -13.5882], [-38.9422, -14.0308], [-39.0596, -14.6549], [-38.8805, -15.8645], [-39.2152, -17.3156], [-39.1539, -17.704], [-39.4869, -17.9903], [-39.7399, -18.6397], [-39.6999, -19.278], [-40.0013, -19.7419], [-40.396, -20.5693], [-40.7892, -20.9062], [-41.0471, -21.5059], [-41.1226, -22.0843], [-41.7054, -22.3098], [-41.9804, -22.5806], [-42.0424, -22.9472], [-42.9583, -22.9672], [-43.5327, -23.0462], [-43.8661, -22.9104], [-44.6373, -23.0555], [-45.4233, -23.6854], [-45.9721, -23.7955], [-46.8672, -24.2363], [-47.8766, -24.9976], [-48.5451, -25.8161], [-48.6776, -26.703], [-48.5542, -27.1962], [-48.6208, -28.0755], [-48.7997, -28.5753], [-49.2714, -28.871], [-49.7461, -29.3633], [-50.2994, -30.4259], [-51.1572, -30.3642], [-51.4637, -31.0527], [-51.9724, -31.3839], [-52.1935, -31.8854], [-52.1274, -32.1678], [-52.6523, -33.1377], [-53.3707, -33.7422], [-53.5314, -33.171], [-53.1254, -32.7368], [-53.6017, -32.403], [-53.7618, -32.0568], [-54.2205, -31.8553], [-54.5876, -31.4851], [-55.2546, -31.2258], [-55.5573, -30.876], [-55.8736, -31.0696], [-56.1761, -30.6283], [-56.8328, -30.1072], [-57.2144, -30.2834], [-57.609, -30.188], [-56.9387, -29.595], [-55.7255, -28.2043], [-55.1014, -27.8669], [-54.8291, -27.5508], [-54.3271, -27.4234], [-53.8381, -27.1212], [-53.6712, -26.2249], [-53.8912, -25.6687], [-54.1546, -25.5231], [-54.6158, -25.576], [-54.4731, -25.2204], [-54.2418, -24.0472], [-54.6254, -23.8124], [-55.3662, -23.9913], [-55.6541, -22.8105], [-55.8492, -22.3076], [-56.5239, -22.1025], [-56.9374, -22.2712], [-57.9856, -22.0461], [-57.8303, -20.9981], [-58.1598, -20.1645], [-58.1314, -19.7446], [-57.8005, -19.0809], [-57.5741, -18.2793], [-57.8325, -17.5122], [-58.396, -17.2343], [-58.538, -16.3284], [-60.1756, -16.2693], [-60.299, -14.6185], [-60.5065, -13.7897], [-61.0769, -13.4897], [-61.79, -13.5256], [-62.176, -13.1337], [-62.7654, -12.9974], [-63.0675, -12.6694], [-63.5858, -12.5189], [-64.4205, -12.4399], [-64.5135, -12.2508], [-64.9925, -11.9751], [-65.39, -11.2462], [-65.334, -10.8929], [-65.4368, -10.449], [-65.3132, -10.2533], [-65.3962, -9.7126], [-66.2635, -9.8262], [-66.7301, -9.9754], [-67.5824, -10.5058], [-68.0717, -10.7029], [-68.398, -11.0185], [-69.5785, -10.9519], [-70.2202, -11.0478], [-70.6423, -11.0101], [-70.637, -9.4782], [-71.238, -9.9661], [-72.1815, -10.0038], [-72.379, -9.5102], [-73.2093, -9.4116], [-72.9741, -8.993], [-73.5491, -8.3459], [-74.0021, -7.5562], [-73.7496, -7.3356], [-73.758, -6.9059], [-73.1374, -6.466], [-73.2355, -6.0984], [-72.9799, -5.635], [-72.8871, -5.1228], [-72.6987, -5.0673], [-71.8448, -4.5044], [-70.9737, -4.3504], [-70.7995, -4.1733], [-69.9658, -4.2359], [-69.6691, -2.6676], [-69.4003, -1.1948], [-69.6675, -0.4823], [-70.0706, -0.1387], [-70.0539, 0.5786], [-69.1633, 0.864], [-69.3615, 1.0642], [-69.8522, 1.0593], [-69.8486, 1.7087], [-68.1765, 1.7198], [-67.8152, 1.79], [-67.352, 2.0861], [-66.8761, 1.2231], [-66.4293, 0.8218], [-66.06, 0.7854], [-65.6814, 0.9834], [-65.3609, 0.8685], [-65.1037, 1.1082], [-64.1149, 1.6191], [-64.0354, 1.9045], [-63.394, 2.2223], [-63.3893, 2.4119], [-63.9242, 2.4523], [-64.2188, 3.2047], [-64.2212, 3.5873], [-64.5679, 3.8998], [-64.2556, 4.1404], [-64.0214, 3.9291], [-63.2948, 3.9224], [-62.9685, 3.594], [-62.7122, 4.0179], [-62.1531, 4.0982], [-61.0028, 4.5354], [-60.6046, 4.9944], [-60.7422, 5.2022], [-60.142, 5.239], [-59.9907, 5.0828], [-60.1112, 4.511], [-59.8333, 4.476], [-59.5512, 3.9335], [-59.8544, 3.5873], [-59.9942, 2.6902], [-59.7552, 2.2743], [-59.7563, 1.9005], [-59.2312, 1.3758], [-58.8625, 1.2036], [-58.5119, 1.2848], [-58.3407, 1.5876], [-57.5943, 1.7043], [-57.1189, 2.0141], [-56.8368, 1.8814], [-56.4828, 1.9422]]]] }, \"properties\": { \"name\": \"Brazil\", \"id\": \"BR\" }, \"id\": \"BR\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-58.1598, -20.1645], [-58.1803, -19.8178], [-59.0905, -19.286], [-60.0073, -19.2976], [-61.7569, -19.6451], [-61.917, -20.0553], [-62.2763, -20.5627], [-62.2767, -21.066], [-62.6509, -22.2339], [-62.8434, -21.9973], [-63.8186, -22.0053], [-63.9762, -22.0728], [-64.3739, -22.7612], [-64.6056, -22.229], [-65.0579, -22.103], [-65.771, -22.0994], [-66.0986, -21.8353], [-66.3652, -22.1136], [-66.7117, -22.2161], [-67.1948, -22.8216], [-67.8795, -22.8229], [-67.9883, -22.0572], [-68.1969, -21.3004], [-68.4999, -20.6119], [-68.7451, -20.4588], [-68.6983, -19.721], [-68.4628, -19.4329], [-68.9684, -18.9682], [-69.094, -18.0507], [-69.3133, -17.9432], [-69.5108, -17.506], [-69.6249, -17.2002], [-69.0208, -16.6422], [-68.9134, -16.2618], [-69.2176, -16.149], [-69.4185, -15.6035], [-69.1726, -15.2368], [-69.3748, -14.963], [-69.235, -14.5972], [-68.8803, -14.199], [-69.0741, -13.6828], [-68.9786, -12.8802], [-68.6852, -12.502], [-69.5785, -10.9519], [-68.398, -11.0185], [-68.0717, -10.7029], [-67.5824, -10.5058], [-66.7301, -9.9754], [-66.2635, -9.8262], [-65.3962, -9.7126], [-65.3132, -10.2533], [-65.4368, -10.449], [-65.334, -10.8929], [-65.39, -11.2462], [-64.9925, -11.9751], [-64.5135, -12.2508], [-64.4205, -12.4399], [-63.5858, -12.5189], [-63.0675, -12.6694], [-62.7654, -12.9974], [-62.176, -13.1337], [-61.79, -13.5256], [-61.0769, -13.4897], [-60.5065, -13.7897], [-60.299, -14.6185], [-60.1756, -16.2693], [-58.538, -16.3284], [-58.396, -17.2343], [-57.8325, -17.5122], [-57.5741, -18.2793], [-57.8005, -19.0809], [-58.1314, -19.7446], [-58.1598, -20.1645]]] }, \"properties\": { \"name\": \"Bolivia\", \"id\": \"BO\" }, \"id\": \"BO\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-64.7303, 32.2934], [-64.8202, 32.2596], [-64.6946, 32.387], [-64.7303, 32.2934]]] }, \"properties\": { \"name\": \"Bermuda\", \"id\": \"BM\" }, \"id\": \"BM\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-88.8941, 15.8907], [-89.2374, 15.8942], [-89.1615, 17.8149], [-88.8064, 17.9654], [-88.523, 18.4457], [-88.2957, 18.4723], [-88.0973, 18.1217], [-88.2717, 17.6098], [-88.3134, 16.6328], [-88.8941, 15.8907]]] }, \"properties\": { \"name\": \"Belize\", \"id\": \"BZ\" }, \"id\": \"BZ\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[28.1481, 56.143], [28.7948, 55.9426], [29.375, 55.9386], [29.4824, 55.6845], [30.2335, 55.8452], [30.9069, 55.5699], [31.1213, 54.6484], [31.4036, 54.1959], [31.792, 54.0558], [32.7042, 53.3363], [32.1422, 53.0913], [31.4178, 53.196], [31.5771, 52.3122], [31.7636, 52.1012], [30.9806, 52.0461], [30.5331, 51.5964], [29.3466, 51.3825], [29.1357, 51.6173], [28.5991, 51.5427], [27.2701, 51.6135], [27.1422, 51.752], [25.9251, 51.9136], [24.3617, 51.8674], [23.6053, 51.5179], [23.6523, 52.0403], [23.1969, 52.257], [23.8445, 52.6642], [23.8872, 53.0276], [23.4845, 53.9398], [24.7683, 53.9746], [25.5473, 54.3317], [25.8594, 54.9192], [26.175, 55.0033], [26.5936, 55.6676], [27.5768, 55.7988], [28.1481, 56.143]]] }, \"properties\": { \"name\": \"Belarus\", \"id\": \"BY\" }, \"id\": \"BY\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-62.832, 17.8766], [-62.8655, 17.9184], [-62.7996, 17.9086], [-62.832, 17.8766]]] }, \"properties\": { \"name\": \"Saint Barthelemy\", \"id\": \"BL\" }, \"id\": \"BL\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"MultiPolygon\", \"coordinates\": [[[[-77.7439, 24.7072], [-78.0449, 24.2873], [-78.2988, 24.7538], [-78.0333, 25.1431], [-77.7439, 24.7072]]], [[[-77.2257, 25.904], [-77.4032, 26.0247], [-77.2468, 26.1565], [-77.2062, 26.489], [-77.0384, 26.3332], [-77.1673, 26.2404], [-77.2257, 25.904]]]] }, \"properties\": { \"name\": \"Bahamas\", \"id\": \"BS\" }, \"id\": \"BS\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[50.6072, 25.8831], [50.4661, 25.9657], [50.4523, 26.1907], [50.6099, 26.1246], [50.6072, 25.8831]]] }, \"properties\": { \"name\": \"Bahrain\", \"id\": \"BH\" }, \"id\": \"BH\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[19.007, 44.8693], [19.3568, 44.8586], [19.1517, 44.3024], [19.4882, 43.7036], [19.1943, 43.5331], [18.9404, 43.4967], [18.4437, 42.9685], [18.4362, 42.5597], [17.6678, 42.897], [17.5852, 42.9383], [17.6247, 43.0426], [16.214, 44.215], [15.7369, 44.7658], [15.7879, 45.1791], [16.2935, 45.0086], [16.5305, 45.2168], [17.8129, 45.0779], [18.6625, 45.0774], [19.007, 44.8693]]] }, \"properties\": { \"name\": \"Bosnia and Herzegovina\", \"id\": \"BA\" }, \"id\": \"BA\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[28.5853, 43.7422], [28.4655, 43.3893], [27.9288, 43.186], [27.8888, 42.7497], [27.4849, 42.4683], [28.0145, 41.9689], [27.2949, 42.0794], [26.6153, 41.9649], [26.321, 41.7167], [26.1355, 41.3856], [25.2512, 41.2436], [24.0558, 41.5272], [23.635, 41.3869], [22.9159, 41.3363], [23.0056, 41.7172], [22.8369, 41.9937], [22.3442, 42.3138], [22.4667, 42.8425], [22.9767, 43.1878], [22.5546, 43.4546], [22.421, 44.0077], [22.7051, 44.2376], [23.2244, 43.8741], [25.4972, 43.6708], [26.2158, 44.0072], [27.0867, 44.1675], [28.5853, 43.7422]]] }, \"properties\": { \"name\": \"Bulgaria\", \"id\": \"BG\" }, \"id\": \"BG\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[92.575, 21.9782], [92.5937, 21.4673], [92.1795, 21.2933], [92.3242, 20.7917], [92.0561, 21.1747], [92.0082, 21.6848], [91.693, 22.5046], [91.4094, 22.7972], [90.9455, 22.597], [90.6334, 23.0941], [90.435, 22.7519], [90.5895, 22.2583], [90.1589, 21.8171], [89.8118, 21.9835], [89.2343, 21.7225], [89.0514, 22.0932], [88.7407, 23.4368], [88.5671, 23.6743], [88.7336, 24.2309], [88.1454, 24.4857], [88.4561, 25.1884], [88.4521, 25.5746], [88.0846, 25.8884], [88.4402, 26.3696], [89.1082, 26.2023], [89.2893, 26.0376], [89.8229, 25.9413], [89.814, 25.3052], [90.4394, 25.1578], [92.0499, 25.1693], [92.2514, 24.895], [91.8768, 24.1954], [91.3672, 24.0933], [91.1603, 23.6605], [91.3152, 23.1043], [91.6198, 22.9796], [91.938, 23.5047], [92.2461, 23.6836], [92.3615, 22.929], [92.4916, 22.6853], [92.575, 21.9782]]] }, \"properties\": { \"name\": \"Bangladesh\", \"id\": \"BD\" }, \"id\": \"BD\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[0.2175, 14.9114], [0.1638, 14.4973], [0.6183, 13.7036], [0.9779, 13.5518], [0.9872, 13.0418], [1.5652, 12.6356], [2.0739, 12.7142], [2.0912, 12.2778], [2.389, 11.897], [1.9802, 11.4184], [1.4267, 11.4473], [0.9007, 10.9932], [-0.0686, 11.1157], [-0.7014, 10.9888], [-2.8298, 10.9985], [-2.9148, 10.5924], [-2.7865, 10.4019], [-2.6958, 9.4813], [-3.2235, 9.8954], [-3.8776, 9.895], [-4.6258, 9.7134], [-4.9698, 9.9301], [-5.0999, 10.2417], [-5.5236, 10.4259], [-5.4905, 11.0425], [-5.2999, 11.2058], [-5.2881, 11.8277], [-4.798, 12.0319], [-4.4287, 12.3377], [-4.4807, 12.6724], [-4.2272, 12.7936], [-4.3286, 13.119], [-4.0512, 13.3822], [-3.5758, 13.194], [-3.3017, 13.2806], [-3.1985, 13.673], [-2.4572, 14.274], [-2.1132, 14.1684], [-1.7678, 14.4862], [-1.0496, 14.8195], [-0.7604, 15.0477], [-0.2359, 15.0592], [0.2175, 14.9114]]] }, \"properties\": { \"name\": \"Burkina Faso\", \"id\": \"BF\" }, \"id\": \"BF\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[3.5955, 11.6963], [3.4877, 11.3954], [3.7163, 11.0797], [3.8343, 10.6074], [3.5764, 10.2683], [3.5573, 9.9074], [3.3252, 9.7783], [3.0451, 9.084], [2.7748, 9.0485], [2.686, 7.874], [2.7748, 6.7119], [2.7064, 6.3692], [1.6224, 6.2169], [1.6002, 9.0498], [1.4244, 9.2851], [1.3299, 9.9971], [0.7799, 10.3598], [0.9007, 10.9932], [1.4267, 11.4473], [1.9802, 11.4184], [2.389, 11.897], [2.3659, 12.2219], [2.8782, 12.3679], [3.5955, 11.6963]]] }, \"properties\": { \"name\": \"Benin\", \"id\": \"BJ\" }, \"id\": \"BJ\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[30.5535, -2.3999], [30.5149, -2.9175], [30.7901, -3.2744], [30.4252, -3.5891], [30.1469, -4.0854], [29.7177, -4.456], [29.4034, -4.4494], [29.2232, -3.9109], [29.2245, -3.0533], [29.0146, -2.7204], [29.3901, -2.8087], [29.8682, -2.7164], [29.9303, -2.3396], [30.5535, -2.3999]]] }, \"properties\": { \"name\": \"Burundi\", \"id\": \"BI\" }, \"id\": \"BI\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"MultiPolygon\", \"coordinates\": [[[[48.5729, 41.8446], [49.1064, 41.3017], [49.2263, 41.026], [49.7758, 40.5839], [49.3244, 39.6083], [49.363, 39.3495], [49.0137, 39.1342], [48.8685, 38.4355], [48.5929, 38.4111], [48.0233, 38.819], [48.2422, 38.9788], [47.9958, 39.6842], [47.773, 39.6486], [46.4906, 38.9065], [46.5501, 39.2012], [45.7897, 39.8812], [45.9646, 40.2337], [45.376, 40.6381], [45.5877, 40.8467], [45.0013, 41.291], [45.281, 41.4495], [46.4577, 41.07], [46.6189, 41.3439], [46.1821, 41.6573], [46.4298, 41.8907], [46.7494, 41.8126], [47.2612, 41.315], [47.8609, 41.2129], [48.5729, 41.8446]]], [[[46.1146, 38.8776], [45.4798, 39.0063], [44.8171, 39.6504], [44.7683, 39.7037], [45.0315, 39.7649], [45.7662, 39.3783], [46.1146, 38.8776]]]] }, \"properties\": { \"name\": \"Azerbaijan\", \"id\": \"AZ\" }, \"id\": \"AZ\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[16.9531, 48.5988], [17.1475, 48.0058], [16.4342, 47.3675], [16.4533, 47.0066], [16.0929, 46.8632], [15.9575, 46.6777], [15.0009, 46.6262], [14.5037, 46.4171], [13.6998, 46.5201], [12.3881, 46.7025], [12.1542, 46.9351], [11.2442, 46.9755], [11.0249, 46.7971], [10.4528, 46.865], [9.5801, 47.0572], [9.5277, 47.2707], [9.5241, 47.5242], [10.3129, 47.3133], [10.4306, 47.541], [11.2979, 47.4247], [11.717, 47.5837], [12.686, 47.6693], [12.8143, 48.1607], [13.4095, 48.3942], [13.8148, 48.7669], [14.0492, 48.6024], [14.6915, 48.5993], [14.972, 48.9839], [16.0573, 48.7549], [16.4777, 48.8001], [16.9531, 48.5988]]] }, \"properties\": { \"name\": \"Austria\", \"id\": \"AT\" }, \"id\": \"AT\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"MultiPolygon\", \"coordinates\": [[[[145.0431, -40.7868], [145.2832, -40.7699], [146.3175, -41.1637], [146.99, -40.9923], [147.4547, -41.0017], [147.9687, -40.7797], [148.2928, -40.9471], [148.3017, -42.0399], [147.9244, -42.5726], [147.9807, -43.1572], [147.4081, -42.894], [146.8741, -43.6126], [146.0431, -43.5474], [145.2681, -42.5442], [145.2384, -42.0195], [144.778, -41.4189], [144.6462, -40.9808], [145.0431, -40.7868]]], [[[137.5963, -35.7384], [137.4485, -36.0749], [136.7551, -36.0332], [136.6388, -35.7491], [137.334, -35.5924], [137.5963, -35.7384]]], [[[136.7147, -13.8039], [136.8945, -14.2931], [136.3632, -14.2288], [136.4249, -13.8648], [136.7147, -13.8039]]], [[[130.6188, -11.3763], [131.2682, -11.1899], [131.5385, -11.4367], [130.9508, -11.9263], [130.645, -11.7425], [130.6188, -11.3763]]], [[[143.1787, -11.9547], [143.1103, -12.3036], [143.4015, -12.6401], [143.5866, -13.4435], [143.5485, -13.7409], [143.7562, -14.349], [143.9617, -14.4627], [144.4731, -14.2319], [144.648, -14.4924], [145.2876, -14.943], [145.2717, -15.4765], [145.4581, -16.0563], [145.4261, -16.406], [145.902, -17.0701], [146.1257, -17.6352], [146.0325, -18.2731], [146.3334, -18.5536], [146.4813, -19.0787], [147.1387, -19.393], [147.4183, -19.3783], [147.9155, -19.8693], [148.7593, -20.2897], [148.6839, -20.5804], [149.205, -21.1251], [149.7039, -22.4408], [150.0763, -22.1647], [150.5415, -22.5593], [150.7639, -22.5761], [150.8429, -23.4582], [151.1537, -23.784], [151.9025, -24.2008], [152.1298, -24.5976], [152.4565, -24.8023], [152.9137, -25.4321], [153.1649, -25.9644], [153.0842, -26.3039], [153.117, -27.1944], [153.5755, -28.2407], [153.6044, -28.8546], [153.3483, -29.2905], [153.2724, -29.8924], [153.0304, -30.5635], [152.9439, -31.4349], [152.5595, -32.0457], [152.4703, -32.439], [151.8128, -32.9011], [151.4839, -33.3476], [151.2313, -34.0294], [150.9601, -34.2971], [150.6902, -35.1778], [150.1953, -35.8334], [149.9605, -36.8455], [149.9325, -37.5286], [149.2986, -37.8021], [148.2626, -37.8309], [147.3957, -38.2189], [146.8568, -38.6632], [145.9353, -38.9016], [145.791, -38.6668], [144.6653, -38.21], [143.5391, -38.8208], [142.6123, -38.4515], [141.725, -38.2713], [141.4244, -38.3636], [141.0112, -38.0769], [140.6272, -38.0285], [139.7843, -37.2459], [139.8575, -36.6622], [139.5486, -36.0967], [139.0376, -35.6892], [138.1845, -35.6128], [138.5112, -35.0242], [138.4899, -34.7636], [138.0895, -34.1697], [137.6918, -35.1432], [136.8834, -35.2399], [137.0144, -34.9159], [137.3908, -34.9132], [137.4938, -34.1613], [137.9319, -33.5789], [137.8524, -33.2007], [137.4423, -33.1936], [137.2372, -33.6295], [136.4307, -34.0299], [135.6476, -34.9394], [135.1855, -33.9069], [134.7909, -33.3285], [134.3013, -33.1652], [134.1002, -32.7488], [134.2343, -32.5486], [133.5511, -32.1829], [133.212, -32.1837], [132.7575, -31.956], [132.2146, -32.0071], [131.7214, -31.6964], [131.1435, -31.4957], [130.783, -31.604], [130.1296, -31.5792], [128.9462, -31.7026], [128.0677, -32.0666], [127.3198, -32.2641], [125.9171, -32.2969], [124.759, -32.8829], [124.126, -33.1292], [123.6506, -33.8364], [123.2076, -33.9882], [122.7774, -33.891], [122.1511, -33.9917], [121.4054, -33.8266], [119.854, -33.9748], [119.4505, -34.3681], [118.8951, -34.48], [118.1356, -34.9865], [117.5817, -35.0979], [116.5172, -34.9878], [115.9868, -34.7952], [115.7262, -34.5262], [115.0089, -34.2558], [115.1815, -33.6433], [115.5154, -33.5314], [115.6831, -33.1927], [115.6982, -31.6946], [115.1767, -30.8081], [114.9947, -30.2164], [114.9592, -29.4334], [114.5375, -28.5429], [114.165, -28.0808], [114.0283, -27.3471], [113.5818, -26.5583], [113.853, -26.3319], [113.5889, -26.0984], [113.5396, -25.6252], [114.2156, -26.2893], [114.2143, -25.8516], [113.671, -24.9772], [113.4175, -24.4356], [113.5529, -23.7329], [113.7571, -23.4182], [113.683, -22.6378], [113.9586, -21.9392], [114.1637, -22.3231], [114.3777, -22.3413], [114.8588, -21.7359], [115.4563, -21.4917], [116.0107, -21.0305], [116.7068, -20.6536], [117.4063, -20.7211], [118.1991, -20.3753], [118.7513, -20.2617], [119.1047, -19.9954], [119.5858, -20.0384], [120.8785, -19.6651], [121.4937, -19.1067], [121.8337, -18.4772], [122.2372, -17.9685], [122.1604, -17.3138], [122.7202, -16.7878], [122.9705, -16.4367], [123.5254, -17.4856], [123.778, -16.8677], [123.4903, -16.4908], [124.577, -16.1135], [124.3817, -15.758], [124.8389, -15.1609], [125.2432, -14.9448], [125.1789, -14.7148], [125.6814, -14.3881], [126.0209, -14.4946], [126.1115, -14.1142], [126.5696, -14.1608], [126.9034, -13.744], [127.6727, -14.195], [128.1996, -14.7517], [129.4589, -14.9332], [129.7536, -14.7894], [129.3785, -14.3926], [129.7097, -13.9802], [129.8389, -13.5731], [130.2597, -13.3024], [130.1682, -12.9574], [130.3999, -12.688], [130.898, -12.5238], [131.0458, -12.1895], [131.4382, -12.277], [132.3722, -12.2392], [132.5839, -12.1101], [132.6829, -11.5055], [133.0247, -11.4527], [133.1854, -11.7057], [133.904, -11.8322], [134.2369, -12.008], [134.7301, -11.9844], [135.2179, -12.2215], [135.7883, -11.9072], [136.0818, -12.4226], [136.5403, -11.9578], [136.9473, -12.3498], [136.5372, -12.7843], [136.5945, -13.0036], [135.9273, -13.3041], [135.9894, -13.8102], [135.8833, -14.1533], [135.4053, -14.7583], [135.5309, -15.0002], [136.2052, -15.4033], [136.7844, -15.8942], [137.0019, -15.8783], [137.7037, -16.2329], [138.2448, -16.7181], [139.0097, -16.8992], [139.2485, -17.3285], [140.0359, -17.7027], [140.5114, -17.6245], [140.8305, -17.4146], [141.2189, -16.6462], [141.412, -16.0696], [141.6255, -15.0566], [141.523, -14.4702], [141.5945, -14.1528], [141.4724, -13.7977], [141.6455, -13.2593], [141.6779, -12.4914], [141.9513, -11.8961], [142.1684, -10.9466], [142.4565, -10.7074], [142.8369, -11.3071], [142.8724, -11.8215], [143.1787, -11.9547]]]] }, \"properties\": { \"name\": \"Australia\", \"id\": \"AU\" }, \"id\": \"AU\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[69.185, -49.1093], [69.9157, -49.3486], [69.6129, -49.6509], [68.8721, -49.4445], [69.185, -49.1093]]] }, \"properties\": { \"name\": \"French Southern and Antarctic Lands\", \"id\": \"TF\" }, \"id\": \"TF\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"MultiPolygon\", \"coordinates\": [[[[-59.7339, -80.3442], [-60.5828, -80.9484], [-64.2683, -80.7486], [-65.9801, -80.3846], [-62.5189, -80.3736], [-61.3432, -79.8866], [-59.7064, -79.8755], [-59.7339, -80.3442]]], [[[-159.053, -79.8076], [-161.8655, -79.7037], [-164.2259, -79.3206], [-163.2562, -78.7223], [-161.6431, -78.9012], [-159.6842, -79.4023], [-159.053, -79.8076]]], [[[-70.334, -79.6797], [-71.7836, -79.4445], [-70.544, -78.8838], [-67.4785, -78.3627], [-66.7281, -78.3836], [-69.2509, -79.2101], [-70.334, -79.6797]]], [[[-45.2226, -78.8106], [-43.722, -78.8186], [-42.9654, -79.4769], [-43.5278, -80.1916], [-49.1875, -80.643], [-49.773, -80.7842], [-54.1626, -80.8703], [-53.4823, -80.1889], [-52.2971, -80.1414], [-50.3391, -79.4796], [-50.7331, -79.2829], [-50.2197, -78.6051], [-49.0811, -78.0476], [-46.8257, -77.7852], [-45.5302, -77.8815], [-43.8086, -78.2864], [-43.9473, -78.5975], [-45.2226, -78.8106]]], [[[-120.5562, -73.756], [-120.2726, -73.9891], [-121.0625, -74.3375], [-122.8591, -74.3428], [-122.6247, -73.9655], [-123.1121, -73.6823], [-120.5562, -73.756]]], [[[-126.3299, -73.2864], [-124.9933, -73.8297], [-124.8731, -74.2083], [-127.4143, -73.5163], [-126.3299, -73.2864]]], [[[-74.3544, -73.0986], [-74.5748, -73.6113], [-75.9009, -73.3325], [-75.3769, -72.8203], [-74.3544, -73.0986]]], [[[-91.1608, -73.1821], [-91.6699, -72.6236], [-90.8072, -72.6108], [-91.1608, -73.1821]]], [[[-98.0911, -71.9125], [-96.8695, -71.8508], [-95.6095, -72.0683], [-96.0518, -72.5775], [-98.4078, -72.5477], [-100.1951, -72.2725], [-102.2647, -72.1354], [-102.128, -71.9853], [-98.6155, -71.7638], [-98.0911, -71.9125]]], [[[-73.7067, -70.635], [-74.205, -70.924], [-76.1763, -71.1326], [-76.5004, -70.9413], [-75.0076, -70.6088], [-73.7067, -70.635]]], [[[-74.9871, -69.7277], [-74.8489, -70.1791], [-75.7267, -70.0961], [-74.9871, -69.7277]]], [[[-70.0511, -69.1892], [-69.417, -69.5834], [-68.3361, -70.8561], [-68.2411, -71.822], [-69.2092, -72.5344], [-72.3675, -72.6698], [-73.0864, -72.4079], [-71.1066, -72.047], [-72.4121, -71.6622], [-73.8994, -72.1522], [-75.3531, -71.8783], [-75.2925, -71.6151], [-74.1872, -71.383], [-72.6216, -71.3883], [-71.1941, -70.9848], [-71.0611, -70.5369], [-70.328, -70.3611], [-71.8537, -69.9692], [-71.869, -68.9411], [-70.417, -68.7889], [-70.0511, -69.1892]]], [[[-67.9885, -67.4745], [-68.5804, -67.7328], [-69.0825, -67.403], [-68.3359, -66.802], [-67.6878, -67.1473], [-67.9885, -67.4745]]], [[[-57.0206, -63.3729], [-58.2631, -63.7636], [-58.8954, -64.389], [-59.9632, -64.4312], [-61.0598, -64.9812], [-61.7361, -65.0335], [-62.1453, -65.3318], [-62.3051, -65.8405], [-61.8754, -66.296], [-63.7525, -66.2778], [-64.0778, -66.6542], [-64.6862, -66.8064], [-64.8193, -67.3076], [-65.4432, -67.3262], [-65.6394, -68.1306], [-64.8984, -68.6734], [-63.3436, -68.8106], [-63.4559, -69.0419], [-62.4505, -69.5843], [-61.9611, -70.1201], [-61.9611, -70.9005], [-61.0172, -71.1668], [-61.2136, -71.5641], [-60.7193, -72.0728], [-60.3846, -73.0072], [-61.4054, -73.467], [-60.8789, -73.6122], [-61.0107, -74.4782], [-62.2257, -74.5057], [-63.9247, -75.0047], [-63.3634, -75.4517], [-66.3705, -76.0132], [-69.3044, -76.3506], [-70.0954, -76.6546], [-71.7987, -76.7527], [-75.2683, -76.5814], [-77.19, -76.6298], [-76.2487, -77.2747], [-75.3869, -77.474], [-72.852, -77.5903], [-73.2515, -77.8944], [-74.812, -78.1776], [-80.6015, -77.7519], [-81.4411, -77.8855], [-77.4325, -78.4346], [-77.8691, -78.7454], [-80.2923, -78.8226], [-83.246, -78.3569], [-83.26, -78.7742], [-80.1512, -79.2683], [-76.499, -79.3255], [-76.5578, -79.9035], [-75.2366, -80.8028], [-73.0296, -80.9173], [-70.239, -80.8565], [-64.7501, -81.5219], [-64.1371, -81.8695], [-65.9133, -82.1833], [-62.7357, -82.5273], [-61.5898, -83.3414], [-59.5159, -83.4586], [-57.3535, -82.8403], [-53.9862, -82.2006], [-48.3607, -81.8921], [-43.6692, -82.2699], [-41.4338, -81.2977], [-38.7718, -80.8823], [-37.2093, -81.0638], [-35.3269, -80.6505], [-29.3291, -80.172], [-24.2403, -80.0619], [-25.2586, -79.7623], [-29.9494, -79.599], [-30.3161, -79.1631], [-32.9943, -79.2288], [-36.2391, -78.7742], [-36.181, -78.4684], [-34.0758, -77.4252], [-32.0634, -77.1598], [-28.9336, -76.3701], [-26.0594, -75.9573], [-24.2696, -75.7668], [-19.4931, -75.54], [-17.2989, -74.334], [-15.6725, -74.4072], [-15.7488, -73.9456], [-16.5188, -73.6441], [-15.5959, -73.0968], [-14.3211, -73.123], [-14.2978, -72.7328], [-13.2087, -72.7852], [-11.497, -72.4128], [-10.8254, -71.5534], [-9.8879, -71.0274], [-9.2307, -71.1739], [-8.6466, -71.6728], [-7.7137, -71.5463], [-7.8735, -70.9404], [-5.9364, -70.7127], [-5.5879, -70.8569], [-5.9499, -71.3417], [-2.8121, -71.3208], [-0.8958, -71.3492], [-0.5431, -71.7128], [0.835, -71.2023], [2.6096, -70.9], [5.1132, -70.6559], [8.5232, -70.4739], [9.1415, -70.1836], [10.2175, -70.5081], [11.7014, -70.7664], [12.9292, -70.2133], [13.8228, -70.3434], [15.807, -70.3238], [18.1246, -70.5405], [19.1966, -70.2932], [19.2649, -70.9022], [21.0707, -70.8436], [21.705, -70.2586], [22.979, -70.8103], [23.8037, -70.4046], [24.7567, -70.892], [25.9743, -71.0372], [27.207, -70.9111], [30.0035, -70.2999], [31.3787, -70.2257], [32.6212, -70.0007], [32.9892, -69.6243], [32.5675, -69.0743], [33.1214, -68.689], [34.193, -68.7023], [35.2246, -69.6371], [37.5599, -69.7184], [38.8592, -70.006], [39.7053, -69.4258], [39.8637, -68.9669], [41.1328, -68.5749], [42.409, -68.3521], [42.8196, -68.123], [44.6999, -67.9042], [44.9893, -67.7692], [47.1174, -67.5726], [48.6479, -67.7941], [48.7136, -67.217], [49.2472, -66.9414], [50.6059, -67.15], [50.3325, -66.4447], [51.8843, -66.0199], [53.6719, -65.8587], [54.9481, -65.9164], [55.7102, -66.0798], [57.1853, -66.6133], [56.4533, -66.7798], [56.8919, -67.0563], [57.6274, -67.0142], [58.7376, -67.2295], [59.2507, -67.4851], [60.4821, -67.3853], [62.6878, -67.6476], [63.6989, -67.5082], [68.3279, -67.8895], [69.4163, -67.743], [69.9822, -68.4644], [69.5344, -68.7369], [69.6293, -69.2314], [68.9062, -69.3726], [69.0825, -69.8666], [68.1783, -69.8373], [67.2678, -70.2732], [67.9408, -70.4228], [69.2503, -70.4313], [68.8725, -71.0354], [68.0375, -71.391], [67.4321, -72.0031], [66.8919, -72.9486], [67.9714, -73.0857], [68.4197, -72.5149], [69.5548, -72.3746], [71.2766, -71.624], [71.9047, -70.7069], [72.7601, -70.3957], [72.8223, -70.0961], [73.9422, -69.7432], [75.4239, -69.8933], [75.8913, -69.5754], [77.8174, -69.069], [78.7265, -68.2779], [79.288, -68.1195], [82.017, -67.6902], [83.3043, -67.6032], [84.4851, -67.1145], [85.7107, -67.1611], [87.9803, -66.7882], [89.6986, -66.8229], [92.0734, -66.5077], [93.9644, -66.6897], [94.8397, -66.5015], [95.5411, -66.6311], [98.2577, -66.4673], [99.3701, -66.6484], [100.8891, -66.3581], [101.4746, -65.9511], [102.674, -65.8654], [103.9511, -65.9879], [108.1578, -66.6391], [109.4629, -66.9085], [110.6223, -66.5241], [110.9069, -66.0767], [113.0992, -65.8001], [113.7096, -65.9297], [114.3368, -66.3603], [115.3103, -66.561], [115.2739, -67.0279], [113.991, -67.2117], [114.0265, -67.4412], [116.7134, -67.047], [118.1388, -67.0825], [119.1331, -67.3706], [121.4875, -67.0905], [122.1826, -66.8593], [123.9693, -66.608], [124.5978, -66.7083], [125.8656, -66.3643], [126.6646, -66.4975], [127.5413, -67.051], [129.2369, -67.0417], [129.7412, -66.4686], [130.9517, -66.1912], [131.831, -66.2356], [133.4446, -66.0816], [134.9716, -66.3301], [135.352, -66.1273], [136.1941, -66.2924], [137.7539, -66.4065], [139.9001, -66.715], [141.9726, -66.8069], [142.8884, -67], [143.4481, -66.877], [144.6214, -67.1416], [143.9422, -67.7941], [145.9752, -67.6241], [146.8279, -67.9645], [147.0938, -68.3685], [148.4561, -68.467], [151.068, -68.3849], [151.562, -68.6939], [153.0819, -68.8568], [154.1997, -68.4178], [155.5202, -69.0246], [157.4813, -69.3087], [158.1578, -69.2088], [159.7838, -69.5217], [160.2095, -69.9749], [161.0369, -70.3172], [161.4244, -70.8268], [162.6749, -70.3047], [163.3487, -70.6208], [164.4034, -70.5103], [166.6269, -70.6643], [167.5692, -70.8103], [168.1725, -71.1832], [170.1625, -71.6307], [169.8287, -72.7288], [169.545, -73.0502], [167.6158, -73.337], [164.7758, -74.0286], [165.3027, -74.5936], [163.1672, -74.6021], [162.5337, -75.1671], [161.6797, -75.2177], [162.8156, -75.8463], [162.7628, -76.7456], [164.4296, -78.0422], [166.2087, -78.4515], [164.6347, -78.6033], [160.4829, -79.2017], [160.542, -80.425], [160.9078, -81.3901], [162.8214, -81.8664], [167.2328, -82.9521], [168.1099, -83.3618], [171.9172, -83.6441], [179.403, -84.2061], [180, -84.3517], [180, -89.9989], [-180, -89.9989], [-180, -89.583], [-180, -89.2931], [-180, -88.5869], [-180, -87.8811], [-180, -87.1753], [-180, -86.4695], [-180, -85.7633], [-180, -85.0575], [-180, -84.3517], [-171.7037, -84.5426], [-162.9335, -84.9012], [-157.1276, -85.1858], [-156.9864, -84.8111], [-163.5685, -84.5288], [-164.951, -83.8057], [-167.5528, -83.8111], [-169.1677, -83.4497], [-174.0661, -82.9002], [-171.8213, -82.8474], [-168.4178, -83.2287], [-163.111, -83.329], [-159.4445, -83.5434], [-157.6796, -83.1292], [-155.4594, -82.9805], [-153.0098, -82.4496], [-154.7175, -81.9409], [-153.9566, -81.7003], [-157.0326, -81.319], [-156.5283, -81.1623], [-148.1228, -80.9009], [-150.5755, -80.3536], [-148.3172, -80.0708], [-148.1765, -79.7761], [-152.0914, -79.2416], [-155.21, -78.9646], [-156.4693, -78.6353], [-154.7164, -78.3982], [-155.3416, -78.1918], [-157.2667, -78.1998], [-158.5003, -77.7786], [-158.2136, -77.1571], [-154.8149, -77.1269], [-153.4606, -77.4159], [-151.719, -77.4261], [-149.7177, -77.7976], [-145.967, -77.0688], [-145.7504, -76.7492], [-147.3404, -76.4384], [-146.383, -76.0998], [-143.5742, -75.5635], [-142.3298, -75.4907], [-141.5057, -75.6905], [-139.6911, -75.2129], [-137.6181, -75.0757], [-136.5494, -75.1396], [-135.362, -74.6904], [-133.4748, -74.852], [-132.0495, -74.7659], [-129.7907, -74.8915], [-127.8633, -74.7193], [-123.8894, -74.773], [-119.6771, -74.6544], [-118.3421, -74.3815], [-115.1052, -74.4551], [-114.7909, -73.9886], [-113.5085, -74.0889], [-113.9318, -74.982], [-111.6963, -74.7921], [-111.8064, -74.2696], [-110.307, -74.3668], [-110.3005, -74.7108], [-111.4631, -75.1334], [-109.2722, -75.1849], [-106.6189, -75.3438], [-104.9019, -75.1152], [-101.7081, -75.1272], [-101.0394, -75.4219], [-98.5578, -75.1898], [-101.2518, -74.4858], [-101.7154, -74.0237], [-102.7663, -73.8838], [-102.4108, -73.6166], [-100.9854, -73.7573], [-99.7812, -73.7201], [-100.0209, -73.4027], [-102.6751, -73.321], [-102.4092, -72.9876], [-98.0125, -73.0334], [-96.1521, -73.3095], [-94.2463, -73.313], [-92.241, -73.1785], [-90.9209, -73.3192], [-90.2954, -72.9779], [-88.1945, -72.8585], [-88.4193, -73.2291], [-87.0379, -73.3538], [-85.9808, -73.2087], [-84.9811, -73.5021], [-82.1835, -73.8568], [-81.3088, -73.7383], [-81.2624, -73.3148], [-80.4421, -72.9446], [-79.5217, -73.0897], [-78.4078, -73.5558], [-76.8506, -73.4604], [-77.1349, -73.8177], [-75.293, -73.6388], [-73.9961, -73.6996], [-72.9293, -73.4479], [-68.821, -73.1053], [-67.6671, -72.8345], [-66.8277, -72.0905], [-67.4603, -71.5268], [-67.8884, -70.4215], [-68.4033, -70.0198], [-68.7078, -69.4321], [-67.3717, -69.4125], [-66.9749, -69.1608], [-67.3906, -68.8612], [-66.7933, -68.2402], [-67.1498, -68.0245], [-66.705, -67.5273], [-67.5859, -67.435], [-67.4934, -67.1127], [-66.371, -66.6089], [-65.7664, -66.6249], [-65.6172, -66.1353], [-64.0658, -65.5538], [-64.0381, -65.1791], [-62.5761, -64.7557], [-61.6317, -64.6047], [-60.8643, -64.0734], [-59.5102, -63.8208], [-58.8721, -63.5518], [-57.3897, -63.2264], [-57.0206, -63.3729]]]] }, \"properties\": { \"name\": \"Antarctica\", \"id\": \"AQ\" }, \"id\": \"AQ\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-170.7262, -14.3513], [-170.8205, -14.3122], [-170.6891, -14.2576], [-170.7262, -14.3513]]] }, \"properties\": { \"name\": \"American Samoa\", \"id\": \"AS\" }, \"id\": \"AS\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[46.4906, 38.9065], [46.1146, 38.8776], [45.7662, 39.3783], [45.0315, 39.7649], [44.7683, 39.7037], [44.2893, 40.0406], [43.7917, 40.0703], [43.5693, 40.4823], [43.7225, 40.7193], [43.4393, 41.1073], [45.0013, 41.291], [45.5877, 40.8467], [45.376, 40.6381], [45.9646, 40.2337], [45.7897, 39.8812], [46.5501, 39.2012], [46.4906, 38.9065]]] }, \"properties\": { \"name\": \"Armenia\", \"id\": \"AM\" }, \"id\": \"AM\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"MultiPolygon\", \"coordinates\": [[[[-62.6509, -22.2339], [-62.3726, -22.439], [-61.7984, -23.1821], [-61.0329, -23.7556], [-59.8924, -24.0934], [-59.373, -24.4538], [-58.3654, -24.9594], [-57.8216, -25.1365], [-57.5872, -25.4051], [-57.8906, -26.0065], [-58.2031, -26.3816], [-58.1914, -26.6302], [-58.6186, -27.1323], [-57.1118, -27.4701], [-56.3705, -27.5375], [-56.0673, -27.3076], [-55.7147, -27.415], [-55.4266, -27.0093], [-55.1358, -26.9312], [-54.7552, -26.533], [-54.6158, -25.576], [-54.1546, -25.5231], [-53.8912, -25.6687], [-53.6712, -26.2249], [-53.8381, -27.1212], [-54.3271, -27.4234], [-54.8291, -27.5508], [-55.1014, -27.8669], [-55.7255, -28.2043], [-56.9387, -29.595], [-57.609, -30.188], [-57.8724, -30.5911], [-57.8105, -30.8587], [-58.1889, -31.9241], [-58.2011, -32.4718], [-58.1709, -32.9592], [-58.4244, -33.1115], [-58.5471, -33.6637], [-58.2835, -34.6837], [-57.3036, -35.1884], [-57.1589, -35.5058], [-57.354, -35.7202], [-57.265, -36.1441], [-56.6981, -36.4265], [-56.6721, -36.8513], [-57.3957, -37.7448], [-57.5471, -38.0857], [-58.1792, -38.436], [-59.8282, -38.8381], [-61.1122, -38.993], [-62.067, -38.9189], [-62.3382, -39.1506], [-62.0537, -39.3739], [-62.2869, -39.8955], [-62.395, -40.8907], [-62.959, -41.1095], [-63.7731, -41.1499], [-64.8531, -40.8139], [-65.1334, -40.8805], [-65.059, -41.9698], [-64.4205, -42.4337], [-63.596, -42.4066], [-63.6925, -42.8052], [-64.1306, -42.8616], [-64.6504, -42.5313], [-65.0269, -42.759], [-64.4323, -43.0591], [-64.9856, -43.2935], [-65.2837, -43.6299], [-65.3613, -44.4773], [-65.6476, -44.6615], [-65.6388, -45.0078], [-66.1901, -44.9647], [-66.9414, -45.2573], [-67.5566, -45.9701], [-67.5633, -46.3452], [-66.7769, -47.0057], [-65.9985, -47.0936], [-65.7382, -47.3449], [-65.8101, -47.941], [-67.033, -48.6277], [-67.6849, -49.2465], [-67.7834, -49.8591], [-68.9396, -50.3824], [-69.2352, -50.9506], [-69.0325, -51.6364], [-68.4433, -52.3569], [-69.9603, -52.0084], [-71.9187, -51.9898], [-72.4077, -51.541], [-72.2763, -50.9102], [-72.5098, -50.6075], [-73.153, -50.7384], [-73.5012, -50.1254], [-73.5762, -49.583], [-72.6143, -48.7929], [-72.3549, -48.3658], [-72.518, -47.8762], [-72.346, -47.4927], [-71.905, -47.2015], [-71.9403, -46.8313], [-71.6952, -46.5783], [-71.8757, -46.1606], [-71.7727, -45.7242], [-71.3537, -45.2306], [-71.5962, -44.9794], [-71.2611, -44.7632], [-71.2127, -44.4414], [-71.82, -44.3832], [-71.6801, -43.9296], [-71.905, -43.44], [-71.7816, -43.167], [-72.1464, -42.9899], [-72.1247, -42.2983], [-71.7501, -42.0466], [-71.9114, -41.6506], [-71.932, -40.6918], [-71.6952, -40.3354], [-71.7199, -39.6354], [-71.5394, -39.6025], [-71.4256, -38.9855], [-70.9517, -38.7383], [-71.0281, -38.0413], [-71.1677, -37.7621], [-71.0556, -36.5237], [-70.4048, -36.0616], [-70.4703, -35.3261], [-70.2899, -34.733], [-69.8524, -34.2243], [-69.7978, -33.3987], [-70.0198, -33.2717], [-70.1696, -32.4718], [-70.5853, -31.5694], [-70.5196, -31.1486], [-70.1614, -30.4401], [-69.9563, -30.358], [-69.9277, -29.7694], [-70.0269, -29.3242], [-69.8278, -29.1031], [-69.6569, -28.4138], [-69.1744, -27.9246], [-68.8463, -27.1536], [-68.3461, -27.0279], [-68.5811, -26.5183], [-68.4144, -26.1539], [-68.6002, -25.4859], [-68.3842, -25.0921], [-68.562, -24.8378], [-68.2502, -24.3921], [-67.3562, -24.0339], [-67.0088, -23.0014], [-67.1948, -22.8216], [-66.7117, -22.2161], [-66.3652, -22.1136], [-66.0986, -21.8353], [-65.771, -22.0994], [-65.0579, -22.103], [-64.6056, -22.229], [-64.3739, -22.7612], [-63.9762, -22.0728], [-63.8186, -22.0053], [-62.8434, -21.9973], [-62.6509, -22.2339]]], [[[-68.6532, -54.8538], [-68.6299, -52.6525], [-68.2782, -52.9841], [-68.0085, -53.5638], [-67.2943, -54.0499], [-65.346, -54.8777], [-66.5112, -55.0322], [-66.9305, -54.9248], [-68.6532, -54.8538]]]] }, \"properties\": { \"name\": \"Argentina\", \"id\": \"AR\" }, \"id\": \"AR\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[56.2979, 25.6505], [56.388, 24.9793], [56.064, 24.7388], [55.7959, 24.8679], [55.7608, 24.2425], [55.1997, 23.0346], [55.186, 22.704], [55.1043, 22.6214], [52.555, 22.933], [51.5927, 24.0787], [51.5683, 24.286], [51.9061, 23.9855], [52.6483, 24.1546], [53.8934, 24.0769], [54.3972, 24.278], [54.747, 24.8102], [55.941, 25.7939], [56.0804, 26.0624], [56.2979, 25.6505]]] }, \"properties\": { \"name\": \"United Arab Emirates\", \"id\": \"AE\" }, \"id\": \"AE\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[1.7059, 42.5033], [1.4861, 42.4345], [1.4284, 42.5961], [1.7059, 42.5033]]] }, \"properties\": { \"name\": \"Andorra\", \"id\": \"AD\" }, \"id\": \"AD\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[19.9893, 60.3511], [20.2588, 60.2612], [19.7461, 60.099], [19.6871, 60.2677], [19.9893, 60.3511]]] }, \"properties\": { \"name\": \"Aland Islands\", \"id\": \"AX\" }, \"id\": \"AX\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[20.0639, 42.5473], [20.4856, 42.2232], [20.566, 41.8739], [20.4892, 41.2724], [20.9641, 40.8498], [21.0312, 40.6585], [20.6574, 40.1174], [20.0013, 39.7095], [19.8517, 40.0437], [19.3981, 40.2847], [19.4407, 41.4247], [19.3426, 41.869], [19.2809, 42.1726], [19.6546, 42.6285], [20.0639, 42.5473]]] }, \"properties\": { \"name\": \"Albania\", \"id\": \"AL\" }, \"id\": \"AL\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-63.0012, 18.222], [-63.1534, 18.2002], [-63.026, 18.2699], [-63.0012, 18.222]]] }, \"properties\": { \"name\": \"Anguilla\", \"id\": \"AI\" }, \"id\": \"AI\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"MultiPolygon\", \"coordinates\": [[[[12.2137, -5.7589], [12.0184, -5.0042], [12.3846, -4.6189], [12.8809, -4.4454], [13.0726, -4.6349], [12.8298, -4.7366], [12.5222, -5.1489], [12.5035, -5.6958], [12.2137, -5.7589]]], [[[23.9666, -10.8716], [23.9915, -12.4221], [23.8432, -13.0009], [21.9789, -13.0009], [21.9798, -15.9555], [22.1507, -16.5974], [23.3807, -17.6405], [21.4169, -18.0005], [20.625, -17.9965], [20.3928, -17.8873], [19.6396, -17.8687], [18.8259, -17.7661], [18.3962, -17.3995], [16.9136, -17.3915], [13.9382, -17.3888], [13.4038, -17.008], [13.101, -16.9676], [12.5479, -17.2126], [11.7432, -17.2494], [11.8191, -16.7043], [11.7507, -15.8321], [11.9678, -15.6341], [12.2803, -14.6376], [12.5506, -13.4377], [12.9834, -12.7759], [13.4171, -12.5202], [13.7855, -11.8127], [13.8477, -11.0545], [13.2093, -9.7033], [12.9985, -9.0481], [13.3589, -8.6872], [13.3785, -8.3698], [12.8622, -7.2317], [12.8236, -6.9547], [12.5213, -6.5903], [12.3025, -6.0927], [13.0682, -5.8649], [14.3985, -5.8925], [16.3152, -5.8658], [16.7179, -6.2414], [16.7094, -6.4717], [17.1551, -7.4612], [17.536, -8.076], [18.6532, -7.9361], [19.3408, -7.9668], [19.5277, -7.1447], [19.8753, -6.9862], [20.4821, -6.9161], [20.6077, -7.2778], [21.7511, -7.3054], [21.9056, -8.6934], [21.8133, -9.4689], [22.1977, -10.0406], [22.3069, -10.6914], [22.5613, -11.0558], [23.8339, -11.0136], [23.9666, -10.8716]]]] }, \"properties\": { \"name\": \"Angola\", \"id\": \"AO\" }, \"id\": \"AO\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[74.8912, 37.2317], [74.5415, 37.0221], [74.0017, 36.8233], [73.7691, 36.8885], [72.623, 36.8295], [71.6206, 36.4366], [71.1852, 36.042], [71.4276, 35.8338], [71.6206, 35.1831], [70.9655, 34.5306], [71.0516, 34.0498], [69.8682, 33.8976], [70.2841, 33.3689], [69.9201, 33.1123], [69.5015, 33.02], [69.2414, 32.4336], [69.2791, 31.9369], [68.869, 31.6342], [68.2138, 31.8073], [67.5781, 31.5063], [67.2874, 31.2178], [66.9243, 31.3057], [66.3974, 30.9124], [66.1772, 29.8355], [65.0954, 29.5594], [64.521, 29.5643], [64.0989, 29.3921], [63.5676, 29.4982], [62.4765, 29.4085], [60.8434, 29.8586], [61.104, 30.1285], [61.7844, 30.8321], [61.6602, 31.3825], [60.854, 31.4833], [60.8292, 32.2494], [60.5606, 33.1376], [60.9171, 33.5052], [60.5109, 33.6388], [60.4856, 34.0947], [61.08, 34.8555], [61.262, 35.6194], [62.6105, 35.2333], [63.0566, 35.4459], [63.1086, 35.8187], [63.8623, 36.0123], [64.5108, 36.3408], [64.8162, 37.1322], [65.5549, 37.2512], [65.7648, 37.569], [66.5221, 37.3484], [67.069, 37.3346], [67.7592, 37.1722], [68.0677, 36.9498], [68.9604, 37.3249], [69.2649, 37.1083], [69.4922, 37.553], [70.2512, 37.664], [70.2148, 37.9246], [70.8789, 38.4564], [71.2558, 38.3068], [71.5518, 37.933], [71.4329, 37.1273], [71.8022, 36.6941], [72.8955, 37.2676], [73.4814, 37.4718], [73.7496, 37.2317], [74.2596, 37.4154], [74.8912, 37.2317]]] }, \"properties\": { \"name\": \"Afghanistan\", \"id\": \"AF\" }, \"id\": \"AF\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-61.7161, 17.0368], [-61.8597, 17.0133], [-61.8173, 17.1691], [-61.7161, 17.0368]]] }, \"properties\": { \"name\": \"Antigua and Barbuda\", \"id\": \"AG\" }, \"id\": \"AG\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [[[-69.8992, 12.4518], [-69.9421, 12.4385], [-70.0661, 12.5468], [-69.9732, 12.5677], [-69.8992, 12.4518]]] }, \"properties\": { \"name\": \"Aruba\", \"id\": \"AW\" }, \"id\": \"AW\" }\r\n ] };\r\nexport default map;\r\n","/**\r\n * Base functionality\r\n*/\r\nimport { __extends } from \"tslib\";\r\nimport { List, ListTemplate } from \"./utils/List\";\r\nimport { OrderedListTemplate, SortedListTemplate } from \"./utils/SortedList\";\r\nimport { Dictionary, DictionaryTemplate } from \"./utils/Dictionary\";\r\nimport { Disposer } from \"./utils/Disposer\";\r\nimport { EventDispatcher } from \"./utils/EventDispatcher\";\r\nimport { Adapter } from \"./utils/Adapter\";\r\nimport { Color, color } from \"./utils/Color\";\r\nimport { Percent, percent } from \"./utils/Percent\";\r\nimport { registry } from \"./Registry\";\r\nimport { cache } from \"./utils/Cache\";\r\nimport * as $array from \"./utils/Array\";\r\nimport * as $object from \"./utils/Object\";\r\nimport * as $type from \"./utils/Type\";\r\n//import * as $debug from \"./utils/Debug\";\r\n/**\r\n * Provides base functionality for all derivative objects, like generating ids,\r\n * handling cache, etc.\r\n */\r\nvar BaseObject = /** @class */ (function () {\r\n //protected _classes: { [index: string]: any } = {};\r\n /**\r\n * Constructor\r\n * * Sets class name\r\n */\r\n function BaseObject() {\r\n /**\r\n * Indicates if this object has already been deleted. Any\r\n * destruction/disposal code should take this into account when deciding\r\n * wheter to run potentially costly disposal operations if they already have\r\n * been run.\r\n */\r\n this._disposed = false;\r\n /**\r\n * List of IDisposer which will be disposed when the BaseObject is disposed.\r\n */\r\n this._disposers = [];\r\n this.className = \"BaseObject\";\r\n //this.debug();\r\n }\r\n BaseObject.prototype.debug = function () {\r\n //$debug.debug(this);\r\n };\r\n Object.defineProperty(BaseObject.prototype, \"uid\", {\r\n /**\r\n * Returns object's internal unique ID.\r\n *\r\n * @return Unique ID\r\n */\r\n get: function () {\r\n if (!this._uid) {\r\n this._uid = registry.getUniqueId();\r\n registry.map.setKey(this._uid, this);\r\n }\r\n return this._uid;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(BaseObject.prototype, \"id\", {\r\n /**\r\n * @return Id\r\n */\r\n get: function () {\r\n return this._id;\r\n },\r\n /**\r\n * Sets the user-defined id of the element.\r\n *\r\n * @param value Id\r\n */\r\n set: function (value) {\r\n //registry.map.setKey(value, this); // registry.map only stores by uid\r\n this._id = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(BaseObject.prototype, \"map\", {\r\n /**\r\n * Returns a universal collection for mapping ids with objects.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Map collection\r\n */\r\n get: function () {\r\n if (!this._map) {\r\n this._map = new Dictionary();\r\n }\r\n return this._map;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(BaseObject.prototype, \"delayedMap\", {\r\n /**\r\n * Returns mapping for objects referenced by id in JSON config that are not yet\r\n * available at processing time.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Map collection\r\n */\r\n get: function () {\r\n if (!this._delayedMap) {\r\n this._delayedMap = new Dictionary();\r\n }\r\n return this._delayedMap;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Logs an id and property of the target element that is not yet available\r\n * for later assignment.\r\n *\r\n * @ignore\r\n * @param property Property to set\r\n * @param id ID of the target element\r\n */\r\n BaseObject.prototype.addDelayedMap = function (property, id) {\r\n var map = this.delayedMap;\r\n if (!map.hasKey(id)) {\r\n map.setKey(id, []);\r\n }\r\n var list = map.getKey(id);\r\n list.push({\r\n property: property,\r\n target: this\r\n });\r\n };\r\n /**\r\n * Processes delayed JSON config items.\r\n *\r\n * @ignore\r\n */\r\n BaseObject.prototype.processDelayedMap = function () {\r\n var _this = this;\r\n this.delayedMap.each(function (id, list) {\r\n if (_this.map.hasKey(id)) {\r\n var target_1 = _this.map.getKey(id);\r\n $array.each(list, function (item) {\r\n item.target[item.property] = target_1;\r\n });\r\n _this.delayedMap.removeKey(id);\r\n }\r\n });\r\n };\r\n /**\r\n * Applies properties from all assigned themes.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n BaseObject.prototype.applyTheme = function () {\r\n var _this = this;\r\n // TODO is this needed ?\r\n if (registry) {\r\n var themes = this.getCurrentThemes();\r\n // TODO is this needed ?\r\n if (themes) {\r\n $array.each(themes, function (theme, index) {\r\n theme(_this);\r\n });\r\n }\r\n }\r\n };\r\n Object.defineProperty(BaseObject.prototype, \"themes\", {\r\n /**\r\n * @ignore Exclude from docs\r\n * @return An array of themes\r\n */\r\n get: function () {\r\n return this._themes;\r\n },\r\n /**\r\n * A list of themes to be used for this element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value An array of themes\r\n */\r\n set: function (value) {\r\n this._themes = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Returns a list of themes that should be applied to this element. It could\r\n * either be a list of themes set explicitly on this element, or system-wide.\r\n *\r\n * @return List of themes\r\n */\r\n BaseObject.prototype.getCurrentThemes = function () {\r\n return this.themes || registry.themes;\r\n };\r\n /**\r\n * Returns if this object has been already been disposed.\r\n *\r\n * @return Is disposed?\r\n */\r\n BaseObject.prototype.isDisposed = function () {\r\n return this._disposed;\r\n };\r\n /**\r\n * Destroys this object and all related data.\r\n */\r\n BaseObject.prototype.dispose = function () {\r\n if (!this._disposed) {\r\n this._disposed = true;\r\n var a = this._disposers;\r\n this._disposers = null;\r\n while (a.length !== 0) {\r\n var disposer = a.shift();\r\n disposer.dispose();\r\n }\r\n // Clear cache\r\n this.clearCache();\r\n // remove from clones list\r\n if (this.clonedFrom) {\r\n this.clonedFrom.clones.removeValue(this);\r\n }\r\n var uid = this._uid;\r\n if (uid != null) {\r\n registry.map.removeKey(uid);\r\n }\r\n }\r\n };\r\n /**\r\n * Adds an IDisposer, which will be disposed when this object is disposed.\r\n *\r\n * @param target Object to dispose\r\n * @ignore Exclude from docs\r\n */\r\n BaseObject.prototype.addDisposer = function (target) {\r\n this._disposers.push(target);\r\n };\r\n /**\r\n * Disposes disposable object and removes it from `_disposers`.\r\n *\r\n * @param target Object to dispose\r\n * @ignore Exclude from docs\r\n */\r\n BaseObject.prototype.removeDispose = function (target) {\r\n //if(target){\r\n if (!this._disposed) {\r\n var index = $array.indexOf(this._disposers, target);\r\n if (index > -1) {\r\n this._disposers.splice(index, 1);\r\n }\r\n }\r\n target.dispose();\r\n //}\r\n };\r\n /**\r\n * Makes a copy of this object and returns the clone. Try to avoid cloning complex objects like chart, create new instances if you need them.\r\n *\r\n * @param cloneId An id to use for clone (if not set a unique id will be generated)\r\n * @returns Clone\r\n */\r\n BaseObject.prototype.clone = function (cloneId) {\r\n if (!cloneId) {\r\n cloneId = \"clone-\" + registry.getUniqueId();\r\n }\r\n var newObject = new this.constructor();\r\n newObject.cloneId = cloneId;\r\n newObject.copyFrom(this);\r\n // add to clones list\r\n // this.clones.push(newObject); // moved this to copyFrom\r\n return newObject;\r\n };\r\n Object.defineProperty(BaseObject.prototype, \"clones\", {\r\n /**\r\n * Returns a collection of object's clones.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Clones\r\n */\r\n get: function () {\r\n if (!this._clones) {\r\n this._clones = new List();\r\n }\r\n return this._clones;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Copies all properties and related data from different element.\r\n *\r\n * @param object Source element\r\n */\r\n BaseObject.prototype.copyFrom = function (object) {\r\n object.clones.push(this); // do not moveValue, as it is expensive! even if there will be several items in clones list, it's not that bad.\r\n this.clonedFrom = object;\r\n };\r\n Object.defineProperty(BaseObject.prototype, \"className\", {\r\n /**\r\n * @ignore Exclude from docs\r\n * @return Class name\r\n */\r\n get: function () {\r\n return this._className;\r\n },\r\n /**\r\n * Element's class name. (a class that was used to instantiate the element)\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Class name\r\n */\r\n set: function (value) {\r\n this._className = value;\r\n /*if (registry) {\r\n registry.registeredClasses[value] = typeof this;\r\n }*/\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Caches value in object's cache.\r\n *\r\n * @ignore Exclude from docs\r\n * @param key Key\r\n * @param value Value\r\n * @param ttl TTL in seconds\r\n */\r\n BaseObject.prototype.setCache = function (key, value, ttl) {\r\n cache.set(this.uid, key, value, ttl);\r\n };\r\n /**\r\n * Retrieves cached value.\r\n *\r\n * If optional second padarameter is specified, it will return that value\r\n * if cache is not available or is expired.\r\n *\r\n * @ignore Exclude from docs\r\n * @param key Key\r\n * @param value Value to return if cache is not available\r\n * @return Value\r\n */\r\n BaseObject.prototype.getCache = function (key, value) {\r\n if (value === void 0) { value = undefined; }\r\n return cache.get(this.uid, key, value);\r\n };\r\n /**\r\n * Clears object's local cache.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n BaseObject.prototype.clearCache = function () {\r\n cache.clear(this.uid);\r\n };\r\n /**\r\n * Creates [[Disposer]] for `setTimeout` function call. This ensures that all\r\n * timeouts created by the object will be cleared when object itself is\r\n * disposed.\r\n *\r\n * @ignore Exclude from docs\r\n * @param fn Callback function\r\n * @param delay Timeout (ms)\r\n * @return Disposer for timeout\r\n */\r\n BaseObject.prototype.setTimeout = function (fn, delay) {\r\n var _this = this;\r\n var id = setTimeout(function () {\r\n _this.removeDispose(disposer);\r\n fn();\r\n }, delay);\r\n var disposer = new Disposer(function () {\r\n clearTimeout(id);\r\n });\r\n this._disposers.push(disposer);\r\n return disposer;\r\n };\r\n /**\r\n * Creates [[Disposer]] for `setInterval` function call. This ensures that all\r\n * timeouts created by the object will be cleared when object itself is\r\n * disposed.\r\n *\r\n * @ignore Exclude from docs\r\n * @param fn Callback function\r\n * @param delay Timeout (ms)\r\n * @return Disposer for timeout\r\n */\r\n BaseObject.prototype.setInterval = function (fn, delay) {\r\n var _this = this;\r\n var id = setInterval(function () {\r\n _this.removeDispose(disposer);\r\n fn();\r\n }, delay);\r\n var disposer = new Disposer(function () {\r\n clearTimeout(id);\r\n });\r\n this._disposers.push(disposer);\r\n return disposer;\r\n };\r\n Object.defineProperty(BaseObject.prototype, \"config\", {\r\n /**\r\n * ==========================================================================\r\n * JSON-BASED CONFIG PROCESSING\r\n * ==========================================================================\r\n * @hidden\r\n */\r\n /**\r\n * Use this property to set JSON-based config. When set, triggers processing\r\n * routine, which will go through all properties, and try to apply values,\r\n * create instances, etc.\r\n *\r\n * Use this with caution, as it is a time-consuming process. It's used for\r\n * initialchart setup only, not routine operations.\r\n *\r\n * @param json JSON config\r\n */\r\n set: function (config) {\r\n try {\r\n this.processConfig(config);\r\n }\r\n catch (e) {\r\n /*if (this instanceof Sprite) {\r\n this.raiseCriticalError(e);\r\n }*/\r\n this.raiseCriticalError(e);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Processes the JSON config.\r\n *\r\n * @param json JSON config\r\n * @ignore Exclude from docs\r\n */\r\n BaseObject.prototype.processConfig = function (config) {\r\n var _this = this;\r\n if (!config) {\r\n return;\r\n }\r\n // Get target\r\n var target = this;\r\n // Iterate through all of the items\r\n $object.eachOrdered(config, function (configKey, value) {\r\n var configValue = value;\r\n // Is this a callback?\r\n if (configKey == \"callback\" && typeof value == \"function\") {\r\n value.call(target);\r\n }\r\n // Check if there's a property in target\r\n if (_this.hasProperty(configKey)) {\r\n var item_1;\r\n // Do we have instructions to create an object?\r\n // We create a new object if \"type\" key is set, but only if the\r\n // target object is of different type.\r\n if ($type.isObject(configValue)\r\n && $type.hasValue(configValue[\"type\"])\r\n && (!$type.isObject(target[configKey])\r\n || !$type.hasValue(target[configKey].className)\r\n || configValue[\"forceCreate\"]\r\n || target[configKey].className != configValue[\"type\"])\r\n && !_this.asIs(configKey)) {\r\n item_1 = _this.createClassInstance(configValue[\"type\"]);\r\n // Create new instance\r\n if (item_1) {\r\n target[configKey] = item_1;\r\n }\r\n else {\r\n item_1 = target[configKey];\r\n }\r\n }\r\n else {\r\n // Get item from the object\r\n item_1 = target[configKey];\r\n }\r\n /**\r\n * It is...\r\n * --------------------------------------------------------------------\r\n */\r\n if (item_1 instanceof Adapter) {\r\n // ... an Adapter, try to add handlers to it\r\n // ------------------------------------------------------------------\r\n _this.processAdapters(item_1, configValue);\r\n }\r\n else if (item_1 instanceof EventDispatcher) {\r\n // ... an EventDispatcher, try to add handlers to it\r\n // ------------------------------------------------------------------\r\n _this.processEvents(item_1, configValue);\r\n }\r\n else if (configKey == \"locale\" && $type.isString(configValue)) {\r\n // ... a locale specified as string, e.g. \"fr_FR\"\r\n // ------------------------------------------------------------------\r\n if (window[\"am4lang_\" + configValue]) {\r\n target[configKey] = window[\"am4lang_\" + configValue];\r\n }\r\n }\r\n else if (configKey == \"parent\" && $type.isString(configValue)) {\r\n // ... a parent referred via its it\r\n // ------------------------------------------------------------------\r\n var parent_1 = _this.map.getKey(configValue);\r\n if (parent_1) {\r\n target[configKey] = parent_1;\r\n }\r\n else {\r\n _this.addDelayedMap(\"parent\", configValue);\r\n }\r\n }\r\n else if (_this.asIs(configKey)) {\r\n // ... a special field, just set it to new value\r\n // ------------------------------------------------------------------\r\n // (no need to add each indvidual item)\r\n target[configKey] = configValue;\r\n }\r\n else if (_this.asFunction(configKey) && $type.isString(configValue)) {\r\n // ... a field indicating function name to look for in registry\r\n // ------------------------------------------------------------------\r\n if ($type.hasValue(registry.registeredClasses[configValue])) {\r\n target[configKey] = registry.registeredClasses[configValue];\r\n }\r\n else {\r\n throw Error(\"Invalid easing function: \" + configValue);\r\n }\r\n }\r\n else if (configValue instanceof BaseObject) {\r\n // ... a BaseObject object, we just going to use it as it is\r\n // ------------------------------------------------------------------\r\n target[configKey] = configValue;\r\n }\r\n else if (item_1 instanceof BaseObject) {\r\n // ... another child BaseObject\r\n // ------------------------------------------------------------------\r\n // Let's just pass in config part in and let itself deal with it\r\n item_1.config = configValue;\r\n }\r\n else if (item_1 instanceof ListTemplate || item_1 instanceof OrderedListTemplate || item_1 instanceof SortedListTemplate) {\r\n // ... a list with template\r\n // ------------------------------------------------------------------\r\n // Let's see what we can do with it\r\n if ($type.isArray(configValue)) {\r\n // It's an array.\r\n // Create a list item for entry, or try to apply properties to an\r\n // existing entry if possible and it is present.\r\n if (item_1 instanceof ListTemplate) {\r\n _this.processListTemplate(configValue, item_1);\r\n }\r\n else {\r\n _this.processOrderedTemplate(configValue, item_1);\r\n }\r\n }\r\n else if ($type.isObject(configValue)) {\r\n // It's a single oject.\r\n // Treat it as a template.\r\n if (configValue instanceof BaseObject) {\r\n // Item is already a BaseObject, no need to process it further\r\n item_1.template = configValue;\r\n }\r\n else {\r\n // Now let's find out if the whole object if a template, or we\r\n // need to get it from `template` key\r\n var templateValue = void 0;\r\n if ($type.hasValue(configValue.template)) {\r\n templateValue = configValue.template;\r\n }\r\n else {\r\n templateValue = configValue;\r\n }\r\n if (item_1.template instanceof BaseObject) {\r\n // Template is a BaseObject so we will just let its config\r\n // deal with the configuration\r\n item_1.template.config = templateValue;\r\n }\r\n else {\r\n $object.each(templateValue, function (entryKey, entryValue) {\r\n var listItem = item_1.template[entryKey];\r\n if (listItem instanceof Adapter) {\r\n _this.processAdapters(listItem, entryValue);\r\n }\r\n else if (listItem instanceof EventDispatcher) {\r\n _this.processEvents(listItem, entryValue);\r\n }\r\n else if (listItem instanceof DictionaryTemplate) {\r\n _this.processDictionaryTemplate(listItem, entryValue);\r\n }\r\n else if (item_1.template[entryKey] instanceof BaseObject) {\r\n // Template is a BaseObject. Let it deal with its own config.\r\n item_1.template[entryKey].config = entryValue;\r\n }\r\n else if ($type.isObject(entryValue) && $type.hasValue(entryValue[\"type\"])) {\r\n listItem = _this.createClassInstance(entryValue[\"type\"]);\r\n if (listItem) {\r\n if (listItem instanceof BaseObject) {\r\n listItem.config = entryValue;\r\n }\r\n item_1.template[entryKey] = listItem;\r\n }\r\n else {\r\n item_1.template[entryKey] = entryValue;\r\n }\r\n }\r\n else if (listItem instanceof List) {\r\n // It's List, process it\r\n _this.processList(entryValue, listItem);\r\n }\r\n else {\r\n // Aything else. Just assing and be done with it.\r\n item_1.template[entryKey] = _this.maybeColorOrPercent(entryValue);\r\n }\r\n });\r\n }\r\n // Check maybe there are `values` to insert\r\n if ($type.hasValue(configValue.values)) {\r\n if (item_1 instanceof ListTemplate) {\r\n _this.processListTemplate(configValue.values, item_1);\r\n }\r\n else {\r\n _this.processOrderedTemplate(configValue.values, item_1);\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n // Something else?\r\n // Not sure what to do with it on a list - ignore\r\n }\r\n }\r\n else if (item_1 instanceof List) {\r\n // ... a list\r\n // ------------------------------------------------------------------\r\n if (configKey == \"children\") {\r\n _this.processList(configValue, item_1, _this);\r\n }\r\n else {\r\n _this.processList(configValue, item_1);\r\n }\r\n }\r\n else if (item_1 instanceof DictionaryTemplate) {\r\n // ... a dictionary with template\r\n // ------------------------------------------------------------------\r\n _this.processDictionaryTemplate(item_1, configValue);\r\n }\r\n else if (item_1 instanceof Dictionary) {\r\n // ... a dictionary\r\n // ------------------------------------------------------------------\r\n _this.processDictionary(item_1, configValue);\r\n }\r\n else if (item_1 instanceof Color || item_1 instanceof Percent) {\r\n // ... it's a Color or Percent\r\n // ------------------------------------------------------------------\r\n target[configKey] = _this.maybeColorOrPercent(configValue);\r\n }\r\n else if ($type.isObject(item_1) && $type.isObject(configValue)) {\r\n // ... a regular object\r\n // ------------------------------------------------------------------\r\n $object.copyAllProperties(configValue, item_1);\r\n }\r\n else {\r\n // ... something else - probably a simple property or object\r\n // ------------------------------------------------------------------\r\n // Maybe convert to `Percent` or `Color`?\r\n configValue = _this.maybeColorOrPercent(configValue);\r\n // Assign\r\n target[configKey] = configValue;\r\n }\r\n }\r\n else if (!_this.isReserved(configKey)) {\r\n // Doesn't have property set. But we're going to assume JSON config\r\n // creator knows what he/she is doing and set it anyway.\r\n target[configKey] = configValue;\r\n }\r\n }, this.configOrder);\r\n // Any errors?\r\n if (this.processingErrors.length) {\r\n var errors = this.processingErrors.join(\"\\n\");\r\n this._processingErrors = [];\r\n throw Error(errors);\r\n }\r\n };\r\n /**\r\n * Tries to detect if value is color or percent and converts to proper object\r\n * if necessary.\r\n *\r\n * Returns the same source value if no color/percent detected\r\n *\r\n * @param value Source value\r\n * @return Converted value\r\n */\r\n BaseObject.prototype.maybeColorOrPercent = function (value) {\r\n if ($type.isString(value)) {\r\n if (value.match(/^[\\-]?[0-9.]+\\%$/)) {\r\n return percent($type.toNumber(value));\r\n }\r\n else if (value.match(/^\\#[0-9abcdef]{3,}$/i)) {\r\n return color(value);\r\n }\r\n }\r\n return value;\r\n };\r\n BaseObject.prototype.processAdapters = function (item, config) {\r\n var _this = this;\r\n if ($type.isArray(config)) {\r\n $array.each(config, function (entry, index) {\r\n item.add(entry.key, entry.callback, entry.priority || 0, _this);\r\n });\r\n }\r\n else if ($type.isObject(config)) {\r\n $object.each(config, function (key, entry) {\r\n if (!item.has(key, entry)) {\r\n item.add(key, entry);\r\n }\r\n });\r\n }\r\n };\r\n BaseObject.prototype.processEvents = function (item, config) {\r\n var _this = this;\r\n if ($type.isArray(config)) {\r\n $array.each(config, function (entry, index) {\r\n item.on(entry.type, entry.callback, _this);\r\n });\r\n }\r\n else if ($type.isObject(config)) {\r\n $object.each(config, function (key, entry) {\r\n if (!item.has(key, entry)) {\r\n item.on(key, entry);\r\n }\r\n });\r\n }\r\n };\r\n /**\r\n * Processes JSON config for a [[DictionaryTemplate]] item.\r\n *\r\n * @todo Description\r\n * @param item Item\r\n * @param config Config\r\n */\r\n BaseObject.prototype.processDictionaryTemplate = function (item, config) {\r\n // We can only process object\r\n // Not sure what to do with other types - ignore\r\n if ($type.isObject(config)) {\r\n // Create an entry for each item, or override properties for\r\n // existing one.\r\n $object.each(config, function (entryKey, entryValue) {\r\n var listItem;\r\n // Get existing one, or create a new one\r\n if (entryKey == \"template\") {\r\n listItem = item.template;\r\n }\r\n else if (item.hasKey(entryKey)) {\r\n listItem = item.getKey(entryKey);\r\n }\r\n else {\r\n listItem = item.create(entryKey);\r\n }\r\n // Set data\r\n if (listItem instanceof BaseObject) {\r\n listItem.config = entryValue;\r\n }\r\n else if ($type.isObject(listItem) && $type.isObject(entryValue)) {\r\n $object.copyAllProperties(entryValue, listItem);\r\n }\r\n else {\r\n listItem.setKey(entryKey, entryValue);\r\n }\r\n });\r\n }\r\n };\r\n /**\r\n * Processes JSON config for a [[Dictionary]] item.\r\n *\r\n * @todo Description\r\n * @param item Item\r\n * @param config Config\r\n */\r\n BaseObject.prototype.processDictionary = function (item, config) {\r\n // We can only process object\r\n // Not sure what to do with other types - ignore\r\n if ($type.isObject(config)) {\r\n // Create an entry for each item, or override properties for\r\n // existing one.\r\n // @todo support for non-basic types\r\n $object.each(config, function (entryKey, entryValue) {\r\n item.setKey(entryKey, entryValue);\r\n });\r\n }\r\n };\r\n /**\r\n * Processes [[ListTemplate]].\r\n *\r\n * @param configValue Config value\r\n * @param item Item\r\n */\r\n BaseObject.prototype.processListTemplate = function (configValue, item) {\r\n var _this = this;\r\n $array.each(configValue, function (entry, index) {\r\n var type = _this.getConfigEntryType(entry);\r\n var listItem;\r\n if (item.hasIndex(index) && !entry[\"forceCreate\"]) {\r\n listItem = item.getIndex(index);\r\n }\r\n else if (entry instanceof BaseObject) {\r\n // Item is already a BaseObject, no need to process it further\r\n item.push(entry);\r\n return;\r\n }\r\n else if (type) {\r\n listItem = item.create(type);\r\n }\r\n else {\r\n listItem = item.create();\r\n }\r\n if (entry === listItem) {\r\n // It's already the same item, do nothing\r\n }\r\n else {\r\n if ($type.isObject(entry)) {\r\n // If the list item is BaseObject, we just need to let it\r\n // deal if its own config\r\n if (listItem instanceof BaseObject) {\r\n listItem.config = entry;\r\n }\r\n else if ($type.isObject(listItem) && $type.isObject(entry)) {\r\n $object.copyAllProperties(entry, listItem);\r\n }\r\n else {\r\n item.setIndex(item.indexOf(listItem), entry);\r\n }\r\n }\r\n }\r\n });\r\n // Truncate the list if it contains less items than the config\r\n // array\r\n while (configValue.length > item.length) {\r\n item.pop();\r\n }\r\n };\r\n /**\r\n * Processes [[OrdererListTemplate]] or [[SortedListTemplate]].\r\n *\r\n * @param configValue Config value\r\n * @param item Item\r\n */\r\n BaseObject.prototype.processOrderedTemplate = function (configValue, item) {\r\n var _this = this;\r\n $array.each(configValue, function (entry, index) {\r\n var type = _this.getConfigEntryType(entry);\r\n var listItem;\r\n if (type) {\r\n listItem = item.create(type);\r\n }\r\n else {\r\n listItem = item.create();\r\n }\r\n if ($type.isObject(entry)) {\r\n // If the list item is BaseObject, we just need to let it\r\n // deal if its own config\r\n if (listItem instanceof BaseObject) {\r\n listItem.config = entry;\r\n }\r\n else if ($type.isObject(listItem) && $type.isObject(entry)) {\r\n $object.copyAllProperties(entry, listItem);\r\n }\r\n else {\r\n item.insert(entry);\r\n }\r\n }\r\n });\r\n };\r\n /**\r\n * Processes [[List]].\r\n *\r\n * @param configValue Config value\r\n * @param item Item\r\n */\r\n BaseObject.prototype.processList = function (configValue, item, parent) {\r\n var _this = this;\r\n // Convert to array if necessary\r\n if (!$type.isArray(configValue)) {\r\n configValue = [configValue];\r\n }\r\n // It's an array\r\n // Create a list item for entry\r\n var itemCount = item.length;\r\n var extraCount = 0;\r\n $array.each(configValue, function (entry, index) {\r\n if ($type.isObject(entry)) {\r\n // An object.\r\n //\r\n // Let's see if we can instantiate a class out of it, or we need\r\n // to push it into list as it is.\r\n //\r\n // If there are items already at the specified index in the list,\r\n // apply properties rather than create a new one.\r\n var listItem = void 0;\r\n if ((index < itemCount) && !entry[\"forceCreate\"]) {\r\n listItem = item.getIndex(index);\r\n }\r\n else if (entry instanceof BaseObject) {\r\n // Item is already a BaseObject, no need to process it further\r\n item.push(entry);\r\n return;\r\n }\r\n else {\r\n extraCount++;\r\n listItem = _this.createEntryInstance(entry);\r\n if (parent) {\r\n listItem.parent = parent;\r\n }\r\n else {\r\n item.push(listItem);\r\n }\r\n }\r\n // If the list item is BaseObject, we just need to let it\r\n // deal if its own config\r\n if (listItem instanceof BaseObject) {\r\n listItem.config = entry;\r\n }\r\n else if ($type.isObject(listItem) && $type.isObject(entry)) {\r\n $object.copyAllProperties(entry, listItem);\r\n }\r\n }\r\n else {\r\n // Basic value.\r\n // Just push it into list, or override existing value\r\n if (item.hasIndex(index)) {\r\n item.setIndex(index, entry);\r\n }\r\n else {\r\n item.push(entry);\r\n }\r\n }\r\n });\r\n // Truncate the list if it contains less items than the config\r\n // array\r\n while (!parent && (configValue.length + extraCount) < item.length) {\r\n item.pop();\r\n }\r\n };\r\n /**\r\n * This function is used to sort element's JSON config properties, so that\r\n * some properties that absolutely need to be processed last, can be put at\r\n * the end.\r\n *\r\n * @ignore Exclude from docs\r\n * @param a Element 1\r\n * @param b Element 2\r\n * @return Sorting number\r\n */\r\n BaseObject.prototype.configOrder = function (a, b) {\r\n if (a == b) {\r\n return 0;\r\n }\r\n // Language must come first, so it's all set up when the rest of the\r\n // elements are being instantiated\r\n else if (a == \"language\") {\r\n return -1;\r\n }\r\n else if (b == \"language\") {\r\n return 1;\r\n }\r\n else {\r\n return 0;\r\n }\r\n };\r\n /**\r\n * Checks if field should be just assigned as is, without any checking when\r\n * processing JSON config.\r\n *\r\n * Extending functions can override this function to do their own checks.\r\n *\r\n * @param field Field name\r\n * @return Assign as is?\r\n */\r\n BaseObject.prototype.asIs = function (field) {\r\n return $array.indexOf([\"locale\"], field) != -1;\r\n };\r\n /**\r\n * Checks if field needs to be converted to function, if it is specified\r\n * as string.\r\n *\r\n * @param field Field name\r\n * @return Assign as function?\r\n */\r\n BaseObject.prototype.asFunction = function (field) {\r\n return false;\r\n };\r\n /**\r\n * Creates a relevant class instance if such class definition exists.\r\n *\r\n * @ignore Exclude from docs\r\n * @param className Class name\r\n * @return Instance\r\n */\r\n BaseObject.prototype.createClassInstance = function (className) {\r\n if ($type.hasValue(registry.registeredClasses[className])) {\r\n return new registry.registeredClasses[className]();\r\n }\r\n else {\r\n throw Error(\"Invalid type: \\\"\" + className + \"\\\".\");\r\n }\r\n };\r\n /**\r\n * Creates a class instance for a config entry using it's type. (as set in\r\n * `type` property)\r\n *\r\n * @ignore Exclude from docs\r\n * @param config Config part\r\n * @return Instance\r\n */\r\n BaseObject.prototype.createEntryInstance = function (config) {\r\n var res;\r\n if ($type.hasValue(config[\"type\"])) {\r\n res = this.createClassInstance(config[\"type\"]);\r\n }\r\n if (!res) {\r\n return config;\r\n }\r\n return res;\r\n };\r\n /**\r\n * Determines config object type.\r\n *\r\n * @ignore Exclude from docs\r\n * @param config Config part\r\n * @return Type\r\n */\r\n BaseObject.prototype.getConfigEntryType = function (config) {\r\n if ($type.hasValue(config[\"type\"])) {\r\n if ($type.hasValue(registry.registeredClasses[config[\"type\"]])) {\r\n return registry.registeredClasses[config[\"type\"]];\r\n }\r\n else {\r\n throw Error(\"Invalid type: \\\"\" + config[\"type\"] + \"\\\".\");\r\n }\r\n }\r\n return;\r\n };\r\n /**\r\n * Checks if this element has a property.\r\n *\r\n * @ignore Exclude from docs\r\n * @param prop Property name\r\n * @return Has property?\r\n */\r\n BaseObject.prototype.hasProperty = function (prop) {\r\n return prop in this ? true : false;\r\n };\r\n /**\r\n * Checkes whether JSON key is a reserved keyword.\r\n *\r\n * @param key Key\r\n * @return Reserved\r\n */\r\n BaseObject.prototype.isReserved = function (key) {\r\n return [\"type\", \"forceCreate\"].indexOf(key) !== -1;\r\n };\r\n Object.defineProperty(BaseObject.prototype, \"processingErrors\", {\r\n /**\r\n * A list of errors that happened during JSON processing.\r\n *\r\n * @return Errors\r\n */\r\n get: function () {\r\n if (!this._processingErrors) {\r\n this._processingErrors = [];\r\n }\r\n return this._processingErrors;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return BaseObject;\r\n}());\r\nexport { BaseObject };\r\n;\r\n/**\r\n * A version of [[BaseObject]] with events properties and methods.\r\n * Classes that use [[EventDispatcher]] should extend this instead of\r\n * [[BaseObject]] directly.\r\n */\r\nvar BaseObjectEvents = /** @class */ (function (_super) {\r\n __extends(BaseObjectEvents, _super);\r\n /**\r\n * Constructor\r\n */\r\n function BaseObjectEvents() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"BaseObjectEvents\";\r\n return _this;\r\n }\r\n Object.defineProperty(BaseObjectEvents.prototype, \"events\", {\r\n /**\r\n * An [[EventDispatcher]] instance\r\n */\r\n get: function () {\r\n if (!this._eventDispatcher) {\r\n this._eventDispatcher = new EventDispatcher();\r\n this._disposers.push(this._eventDispatcher);\r\n }\r\n return this._eventDispatcher;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n //public set events(value:EventDispatcher>){\r\n //\tthis._eventDispatcher = value;\r\n //}\r\n /**\r\n * Dispatches an event using own event dispatcher. Will automatically\r\n * populate event data object with event type and target (this element).\r\n * It also checks if there are any handlers registered for this sepecific\r\n * event.\r\n *\r\n * @param eventType Event type (name)\r\n * @param data Data to pass into event handler(s)\r\n */\r\n BaseObjectEvents.prototype.dispatch = function (eventType, data) {\r\n // @todo Implement proper type check\r\n if (this._eventDispatcher) {\r\n if (this.events.isEnabled(eventType)) {\r\n if (data) {\r\n data.type = eventType;\r\n data.target = data.target || this;\r\n this.events.dispatch(eventType, {\r\n type: eventType,\r\n target: this\r\n });\r\n }\r\n else {\r\n this.events.dispatch(eventType, {\r\n type: eventType,\r\n target: this\r\n });\r\n }\r\n }\r\n }\r\n };\r\n /**\r\n * Works like `dispatch`, except event is triggered immediately, without\r\n * waiting for the next frame cycle.\r\n *\r\n * @param eventType Event type (name)\r\n * @param data Data to pass into event handler(s)\r\n */\r\n BaseObjectEvents.prototype.dispatchImmediately = function (eventType, data) {\r\n // @todo Implement proper type check\r\n if (this._eventDispatcher) {\r\n if (this.events.isEnabled(eventType)) {\r\n if (data) {\r\n data.type = eventType;\r\n data.target = data.target || this;\r\n this.events.dispatchImmediately(eventType, data);\r\n }\r\n else {\r\n this.events.dispatchImmediately(eventType, {\r\n type: eventType,\r\n target: this\r\n });\r\n }\r\n }\r\n }\r\n };\r\n /**\r\n * Copies all parameters from another [[Sprite]].\r\n *\r\n * @param source Source object\r\n */\r\n BaseObjectEvents.prototype.copyFrom = function (source) {\r\n _super.prototype.copyFrom.call(this, source);\r\n if (source._eventDispatcher) {\r\n this.events.copyFrom(source._eventDispatcher);\r\n }\r\n };\r\n return BaseObjectEvents;\r\n}(BaseObject));\r\nexport { BaseObjectEvents };\r\n","import { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Container } from \"./Container\";\r\nimport { List, ListDisposer } from \"./utils/List\";\r\nimport { OrderedListTemplate } from \"./utils/SortedList\";\r\nimport { Dictionary } from \"./utils/Dictionary\";\r\nimport { Disposer, MultiDisposer } from \"./utils/Disposer\";\r\nimport { DataSource } from \"./data/DataSource\";\r\nimport { Responsive } from \"./utils/Responsive\";\r\nimport { system } from \"./System\";\r\nimport { DataItem } from \"./DataItem\";\r\nimport { registry } from \"./Registry\";\r\nimport * as $math from \"./utils/Math\";\r\nimport * as $array from \"./utils/Array\";\r\nimport * as $ease from \"./utils/Ease\";\r\nimport * as $utils from \"./utils/Utils\";\r\nimport * as $iter from \"./utils/Iterator\";\r\nimport * as $object from \"./utils/Object\";\r\nimport * as $type from \"./utils/Type\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * A Component represents an independent functional element or control, that\r\n * can have it's own behavior, children, data, etc.\r\n *\r\n * A few examples of a Component: [[Legend]], [[Series]], [[Scrollbar]].\r\n *\r\n * @see {@link IComponentEvents} for a list of available events\r\n * @see {@link IComponentAdapters} for a list of available Adapters\r\n * @important\r\n */\r\nvar Component = /** @class */ (function (_super) {\r\n __extends(Component, _super);\r\n /**\r\n * Constructor\r\n */\r\n function Component() {\r\n var _this = \r\n // Init\r\n _super.call(this) || this;\r\n /**\r\n * Holds data field names.\r\n *\r\n * Data fields define connection beween [[DataItem]] and actual properties\r\n * in raw data.\r\n */\r\n _this.dataFields = {};\r\n /**\r\n * A list of [[DataSource]] definitions of external data source.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n _this._dataSources = {};\r\n /**\r\n * This is used when only new data is invalidated (if added using `addData`\r\n * method).\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n _this._parseDataFrom = 0;\r\n /**\r\n * Holds the disposers for the dataItems and dataUsers\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n _this._dataDisposers = [];\r\n /**\r\n * Currently selected \"data set\".\r\n *\r\n * If it's set to `\"\"`, main data set (unaggregated data) is used.\r\n */\r\n _this._currentDataSetId = \"\";\r\n /**\r\n * [_start description]\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n _this._start = 0;\r\n /**\r\n * [_end description]\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n _this._end = 1;\r\n /**\r\n * If set to `true`, changing data range in element will not trigger\r\n * `daterangechanged` event.\r\n */\r\n _this.skipRangeEvent = false;\r\n /**\r\n * Whenever selected scope changes (chart is zoomed or panned), for example\r\n * by interaction from a Scrollbar, or API, a chart needs to reposition\r\n * its contents.\r\n *\r\n * `rangeChangeDuration` influences how this is performed.\r\n *\r\n * If set to zero (0), the change will happen instantenously.\r\n *\r\n * If set to non-zero value, the chart will gradually animate into new\r\n * position for the set amount of milliseconds.\r\n *\r\n * @default 0\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/animations/} for more info about animations\r\n */\r\n _this.rangeChangeDuration = 0;\r\n /**\r\n * An easing function to use for range change animation.\r\n *\r\n * @see {@link Ease}\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/animations/} for more info about animations\r\n */\r\n _this.rangeChangeEasing = $ease.cubicOut;\r\n /**\r\n * A duration (ms) of each data parsing step. A Component parses its data in\r\n * chunks in order to avoid completely freezing the machine when large data\r\n * sets are used. This setting will control how many milliseconds should pass\r\n * when parsing data until parser stops for a brief moment to let other\r\n * processes catch up.\r\n */\r\n _this.parsingStepDuration = 50;\r\n /**\r\n * [dataInvalid description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\r\n _this.dataInvalid = false;\r\n /**\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n _this.rawDataInvalid = false;\r\n /**\r\n * [dataRangeInvalid description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\r\n _this.dataRangeInvalid = false;\r\n /**\r\n * [dataItemsInvalid description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\r\n _this.dataItemsInvalid = false;\r\n /**\r\n * If set to a non-zero number the element will \"animate\" data values of its\r\n * children.\r\n *\r\n * This will happen on first load and whenever data values change.\r\n *\r\n * Enabling interpolation will mean that elements will transit smoothly into\r\n * new values rather than updating instantly.\r\n *\r\n * @default 0\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/animations/} for more info about animations\r\n */\r\n _this.interpolationDuration = 0;\r\n /**\r\n * An easing function to use for interpolating values when transiting from\r\n * one source value to another.\r\n *\r\n * @default cubicOut\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/animations/} for more info about animations\r\n * @see {@link Ease}\r\n */\r\n _this.interpolationEasing = $ease.cubicOut;\r\n /**\r\n * Indicates whether transition between data item's values should start and\r\n * play out all at once, or with a small delay (as defined by\r\n * `sequencedInterpolationDelay`) for each subsequent data item.\r\n *\r\n * @default true\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/animations/} for more info about animations\r\n */\r\n _this.sequencedInterpolation = true;\r\n /**\r\n * A delay (ms) to wait between animating each subsequent data item's\r\n * interpolation animation.\r\n *\r\n * Relative only if `sequencedInterpolation = true`.\r\n *\r\n * @default 0\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/animations/} for more info about animations\r\n */\r\n _this.sequencedInterpolationDelay = 0;\r\n /**\r\n * A progress (0-1) for the data validation process.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n _this.dataValidationProgress = 0;\r\n _this._addAllDataItems = true;\r\n _this._usesData = true;\r\n _this.className = \"Component\";\r\n _this.minZoomCount = 1;\r\n _this.maxZoomCount = 0;\r\n _this._dataItems = new OrderedListTemplate(_this.createDataItem());\r\n _this._dataItems.events.on(\"inserted\", _this.handleDataItemAdded, _this, false);\r\n _this._dataItems.events.on(\"removed\", _this.handleDataItemRemoved, _this, false);\r\n _this._disposers.push(new ListDisposer(_this._dataItems));\r\n _this._disposers.push(_this._dataItems.template);\r\n _this.invalidateData();\r\n // TODO what about remove ?\r\n _this.dataUsers.events.on(\"inserted\", _this.handleDataUserAdded, _this, false);\r\n // Set up disposers\r\n _this._disposers.push(new MultiDisposer(_this._dataDisposers));\r\n _this._start = 0;\r\n _this._end = 1;\r\n _this.maxZoomDeclination = 1;\r\n // Apply theme\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * Returns a new/empty DataItem of the type appropriate for this object.\r\n *\r\n * @see {@link DataItem}\r\n * @return Data Item\r\n */\r\n Component.prototype.createDataItem = function () {\r\n return new DataItem();\r\n };\r\n /**\r\n * [handleDataUserAdded description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param event Event object\r\n */\r\n Component.prototype.handleDataUserAdded = function (event) {\r\n var dataUser = event.newValue;\r\n dataUser.dataProvider = this;\r\n };\r\n /**\r\n * [handleDataItemValueChange description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\r\n Component.prototype.handleDataItemValueChange = function (dataItem, name) {\r\n if (!this.dataItemsInvalid) {\r\n this.invalidateDataItems();\r\n }\r\n };\r\n /**\r\n * [handleDataItemWorkingValueChange description]\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Component.prototype.handleDataItemWorkingValueChange = function (dataItem, name) {\r\n };\r\n /**\r\n * [handleDataItemWorkingLocationChange description]\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Component.prototype.handleDataItemWorkingLocationChange = function (dataItem, name) {\r\n };\r\n /**\r\n * [handleDataItemCalculatedValueChange description]\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Component.prototype.handleDataItemCalculatedValueChange = function (dataItem, name) {\r\n };\r\n /**\r\n * [handleDataItemPropertyChange description]\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Component.prototype.handleDataItemPropertyChange = function (dataItem, name) {\r\n };\r\n /**\r\n * Populates a [[DataItem]] width data from data source.\r\n *\r\n * Loops through all the fields and if such a field is found in raw data\r\n * object, a corresponding value on passed in `dataItem` is set.\r\n *\r\n * @ignore Exclude from docs\r\n * @param item\r\n */\r\n Component.prototype.processDataItem = function (dataItem, dataContext) {\r\n var _this = this;\r\n if (dataItem) {\r\n if (!dataContext) {\r\n dataContext = {};\r\n }\r\n // store reference to original data item\r\n dataItem.dataContext = dataContext;\r\n var hasSomeValues_1 = false;\r\n $object.each(this.dataFields, function (key, fieldValue) {\r\n var fieldName = key;\r\n var value = dataContext[fieldValue];\r\n // Apply adapters to a retrieved value\r\n if (_this._adapterO) {\r\n if (_this._adapterO.isEnabled(\"dataContextValue\")) {\r\n value = _this._adapterO.apply(\"dataContextValue\", {\r\n field: fieldName,\r\n value: value,\r\n dataItem: dataItem\r\n }).value;\r\n }\r\n }\r\n if ($type.hasValue(value)) {\r\n hasSomeValues_1 = true;\r\n if (dataItem.hasChildren[fieldName]) {\r\n var template = _this.createDataItem();\r\n template.copyFrom(_this.mainDataSet.template);\r\n var children = new OrderedListTemplate(template);\r\n children.events.on(\"inserted\", _this.handleDataItemAdded, _this, false);\r\n children.events.on(\"removed\", _this.handleDataItemRemoved, _this, false);\r\n _this._dataDisposers.push(new ListDisposer(children));\r\n var count = value.length;\r\n for (var i = 0; i < count; i++) {\r\n var rawDataItem = value[i];\r\n var childDataItem = children.create();\r\n childDataItem.parent = dataItem;\r\n _this.processDataItem(childDataItem, rawDataItem);\r\n }\r\n var anyDataItem = dataItem;\r\n anyDataItem[fieldName] = children;\r\n }\r\n else {\r\n // data is converted to numbers/dates in each dataItem\r\n dataItem[fieldName] = value;\r\n }\r\n }\r\n });\r\n $object.each(this.propertyFields, function (key, fieldValue) {\r\n var f = key;\r\n var value = dataContext[fieldValue];\r\n if ($type.hasValue(value)) {\r\n hasSomeValues_1 = true;\r\n dataItem.setProperty(f, value);\r\n }\r\n });\r\n // @todo we might need some flag which would tell whether we should create empty data items or not.\r\n if (!this._addAllDataItems && !hasSomeValues_1) {\r\n this.mainDataSet.remove(dataItem);\r\n }\r\n }\r\n };\r\n /**\r\n *\r\n * When validating raw data, instead of processing data item, we update it\r\n *\r\n * @ignore Exclude from docs\r\n * @param item\r\n */\r\n Component.prototype.updateDataItem = function (dataItem) {\r\n var _this = this;\r\n if (dataItem) {\r\n var dataContext_1 = dataItem.dataContext;\r\n $object.each(this.dataFields, function (key, fieldValue) {\r\n var fieldName = key;\r\n var value = dataContext_1[fieldValue];\r\n // Apply adapters to a retrieved value\r\n if (_this._adapterO) {\r\n value = _this._adapterO.apply(\"dataContextValue\", {\r\n field: fieldName,\r\n value: value,\r\n dataItem: dataItem\r\n }).value;\r\n }\r\n if ($type.hasValue(value)) {\r\n if (dataItem.hasChildren[fieldName]) {\r\n var anyDataItem = dataItem;\r\n var children = (anyDataItem[fieldName]);\r\n children.each(function (child) {\r\n _this.updateDataItem(child);\r\n });\r\n }\r\n else {\r\n // data is converted to numbers/dates in each dataItem\t\t\t\t\t\r\n dataItem[fieldName] = value;\r\n }\r\n }\r\n });\r\n $object.each(this.propertyFields, function (key, fieldValue) {\r\n var f = key;\r\n var value = dataContext_1[fieldValue];\r\n if ($type.hasValue(value)) {\r\n dataItem.setProperty(f, value);\r\n }\r\n });\r\n }\r\n };\r\n /**\r\n * [validateDataElements description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\r\n Component.prototype.validateDataElements = function () {\r\n var count = this.endIndex;\r\n for (var i = this.startIndex; i < count; i++) {\r\n var dataItem = this.dataItems.getIndex(i);\r\n // TODO is this correct\r\n if (dataItem) {\r\n this.validateDataElement(dataItem);\r\n }\r\n }\r\n };\r\n /**\r\n * Validates this element and its related elements.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Component.prototype.validate = function () {\r\n this.validateDataElements();\r\n _super.prototype.validate.call(this);\r\n };\r\n /**\r\n * [validateDataElement description]\r\n *\r\n * @ignore Exclude from docs\r\n * @param dataItem [description]\r\n */\r\n Component.prototype.validateDataElement = function (dataItem) {\r\n };\r\n /**\r\n * Adds one or several (array) of data items to the existing data.\r\n *\r\n * @param rawDataItem One or many raw data item objects\r\n */\r\n Component.prototype.addData = function (rawDataItem, removeCount, skipRaw) {\r\n var _this = this;\r\n // need to check if data is invalid, as addData might be called multiple times\r\n if (!this.dataInvalid && this.inited) {\r\n this._parseDataFrom = this.data.length; // save length of parsed data\r\n }\r\n if (!skipRaw) {\r\n if (rawDataItem instanceof Array) {\r\n // can't use concat because new array is returned\r\n $array.each(rawDataItem, function (dataItem) {\r\n _this.data.push(dataItem);\r\n });\r\n }\r\n else {\r\n this.data.push(rawDataItem); // add to raw data array\r\n }\r\n }\r\n if (this.inited) {\r\n this.removeData(removeCount, skipRaw);\r\n }\r\n else {\r\n if ($type.isNumber(removeCount)) {\r\n while (removeCount > 0) {\r\n this.data.shift();\r\n removeCount--;\r\n }\r\n }\r\n }\r\n this.invalidateData();\r\n };\r\n /**\r\n * Removes elements from the beginning of data\r\n *\r\n * @param count number of elements to remove\r\n */\r\n Component.prototype.removeData = function (count, skipRaw) {\r\n if ($type.isNumber(count) && count > 0) {\r\n while (count > 0) {\r\n var dataItem = this.mainDataSet.getIndex(0);\r\n if (dataItem) {\r\n this.mainDataSet.remove(dataItem);\r\n }\r\n this.dataUsers.each(function (dataUser) {\r\n if (!dataUser.data || dataUser.data.length == 0) {\r\n var dataItem_1 = dataUser.mainDataSet.getIndex(0);\r\n if (dataItem_1) {\r\n dataUser.mainDataSet.remove(dataItem_1);\r\n }\r\n }\r\n });\r\n if (!skipRaw) {\r\n this.data.shift();\r\n }\r\n if (this._parseDataFrom > 0) {\r\n this._parseDataFrom--;\r\n }\r\n count--;\r\n }\r\n // changed from invalidateData since 4.7.19 to solve #51551\r\n this.invalidateDataItems();\r\n }\r\n };\r\n /**\r\n * Triggers a data (re)parsing.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Component.prototype.invalidateData = function () {\r\n if (this.disabled || this.isTemplate) {\r\n return;\r\n }\r\n //if(!this.dataInvalid){\r\n registry.addToInvalidComponents(this);\r\n system.requestFrame();\r\n this.dataInvalid = true;\r\n $iter.each(this.dataUsers.iterator(), function (x) {\r\n x.invalidateDataItems();\r\n });\r\n //}\r\n };\r\n /**\r\n * [invalidateDataUsers description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\r\n Component.prototype.invalidateDataUsers = function () {\r\n $iter.each(this.dataUsers.iterator(), function (x) {\r\n x.invalidate();\r\n });\r\n };\r\n /**\r\n * Invalidates data values. When data array is not changed, but values within\r\n * it changes, we invalidate data so that component would process changes.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Component.prototype.invalidateDataItems = function () {\r\n if (this.disabled || this.isTemplate) {\r\n return;\r\n }\r\n //if(!this.dataItemsInvalid){\r\n $array.move(registry.invalidDataItems, this);\r\n system.requestFrame();\r\n this.dataItemsInvalid = true;\r\n $iter.each(this.dataUsers.iterator(), function (x) {\r\n x.invalidateDataItems();\r\n });\r\n //}\r\n };\r\n /**\r\n * Invalidates data range. This is done when data which must be shown\r\n * changes (chart is zoomed for example).\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Component.prototype.invalidateDataRange = function () {\r\n if (this.disabled || this.isTemplate) {\r\n return;\r\n }\r\n //if(!this.dataRangeInvalid){\r\n this.dataRangeInvalid = true;\r\n $array.move(registry.invalidDataRange, this);\r\n system.requestFrame();\r\n //}\r\n };\r\n /**\r\n * Processes data range.\r\n *\r\n * @todo Description\r\n * @ignore Exclude from docs\r\n */\r\n Component.prototype.validateDataRange = function () {\r\n $array.remove(registry.invalidDataRange, this);\r\n this.dataRangeInvalid = false;\r\n if (this.startIndex != this._prevStartIndex || this.endIndex != this._prevEndIndex) {\r\n this.rangeChangeUpdate();\r\n this.appendDataItems();\r\n this.invalidate();\r\n this.dispatchImmediately(\"datarangechanged\");\r\n }\r\n };\r\n /**\r\n * [sliceData description]\r\n *\r\n * @todo Description\r\n * @ignore Exclude from docs\r\n */\r\n Component.prototype.sliceData = function () {\r\n this._workingStartIndex = this.startIndex;\r\n this._workingEndIndex = this.endIndex;\r\n };\r\n /**\r\n * [rangeChangeUpdate description]\r\n *\r\n * @todo Description\r\n * @ignore Exclude from docs\r\n */\r\n Component.prototype.rangeChangeUpdate = function () {\r\n this.sliceData();\r\n this._prevStartIndex = this.startIndex;\r\n this._prevEndIndex = this.endIndex;\r\n };\r\n /**\r\n * [appendDataItems description]\r\n *\r\n * @todo Description\r\n * @ignore Exclude from docs\r\n */\r\n Component.prototype.appendDataItems = function () {\r\n // TODO use an iterator instead\r\n var count = this.endIndex;\r\n for (var i = this.startIndex; i < count; i++) {\r\n // data item\r\n var dataItem = this.dataItems.getIndex(i);\r\n if (dataItem) {\r\n dataItem.__disabled = false;\r\n }\r\n }\r\n for (var i = 0; i < this.startIndex; i++) {\r\n var dataItem = this.dataItems.getIndex(i);\r\n if (dataItem) {\r\n dataItem.__disabled = true;\r\n }\r\n }\r\n for (var i = this.endIndex; i < this.dataItems.length; i++) {\r\n var dataItem = this.dataItems.getIndex(i);\r\n if (dataItem) {\r\n dataItem.__disabled = true;\r\n }\r\n }\r\n };\r\n /**\r\n * If you want to have a smooth transition from one data values to another, you change your raw data and then you must call this method.\r\n * then instead of redrawing everything, the chart will check raw data and smoothly transit from previous to new data\r\n */\r\n Component.prototype.invalidateRawData = function () {\r\n if (this.disabled || this.isTemplate) {\r\n return;\r\n }\r\n //if(!this.rawDataInvalid){\r\n $array.move(registry.invalidRawDatas, this);\r\n system.requestFrame();\r\n this.rawDataInvalid = true;\r\n $iter.each(this.dataUsers.iterator(), function (x) {\r\n x.invalidateRawData();\r\n });\r\n //}\r\n };\r\n /**\r\n * @ignore\r\n */\r\n Component.prototype.validateRawData = function () {\r\n var _this = this;\r\n $array.remove(registry.invalidRawDatas, this);\r\n $iter.each(this.mainDataSet.iterator(), function (dataItem) {\r\n if (dataItem) {\r\n _this.updateDataItem(dataItem);\r\n }\r\n });\r\n };\r\n /**\r\n * Destroys this object and all related data.\r\n */\r\n Component.prototype.dispose = function () {\r\n var _this = this;\r\n this.mainDataSet.template.clones.clear();\r\n $object.each(this._dataSources, function (key, source) {\r\n _this.removeDispose(source);\r\n });\r\n this.disposeData();\r\n _super.prototype.dispose.call(this);\r\n };\r\n /**\r\n * @ignore\r\n */\r\n Component.prototype.disposeData = function () {\r\n this.mainDataSet.template.clones.clear();\r\n $array.each(this._dataDisposers, function (x) {\r\n x.dispose();\r\n });\r\n // and for all components\r\n $iter.each(this.dataUsers.iterator(), function (dataUser) {\r\n dataUser.disposeData();\r\n });\r\n this._dataDisposers.length = 0;\r\n this._startIndex = undefined;\r\n this._endIndex = undefined;\r\n // dispose old\r\n this.mainDataSet.clear();\r\n this.mainDataSet.template.clones.clear();\r\n if (this._dataSets) {\r\n this._dataSets.clear();\r\n }\r\n };\r\n Component.prototype.getDataItem = function (dataContext) {\r\n return this.mainDataSet.create();\r\n };\r\n /**\r\n * Validates (processes) data.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Component.prototype.validateData = function () {\r\n this.dispatchImmediately(\"beforedatavalidated\");\r\n this.dataInvalid = false;\r\n registry.removeFromInvalidComponents(this);\r\n if (this.__disabled) {\r\n return;\r\n }\r\n this.dataValidationProgress = 0;\r\n // need this to slice new data\r\n this._prevStartIndex = undefined;\r\n this._prevEndIndex = undefined;\r\n // todo: this needs some overthinking, maybe some extra settings like zoomOotonDataupdate like in v3 or so. some charts like pie chart probably should act like this always\r\n this._startIndex = undefined;\r\n this._endIndex = undefined;\r\n if (this.dataFields.data && this.dataItem) {\r\n var dataContext = this.dataItem.dataContext;\r\n this._data = dataContext[this.dataFields.data];\r\n }\r\n // data items array is reset only if all data is validated, if _parseDataFrom is not 0, we append new data only\r\n // check heatmap demo if uncommented\r\n // fixed both issues by adding && this.data.length > 0\r\n // check adding series example if changed\r\n if (this._parseDataFrom === 0 && this.data.length > 0) {\r\n this.disposeData();\r\n }\r\n if (this.data.length > 0) {\r\n var preloader = this.preloader;\r\n // and for all components\r\n $iter.each(this.dataUsers.iterator(), function (dataUser) {\r\n // todo: this needs some overthinking, maybe some extra settings like zoomOUtonDataupdate like in v3 or so. some charts like pie chart probably should act like this always\r\n dataUser._startIndex = undefined;\r\n dataUser._endIndex = undefined;\r\n });\r\n var counter = 0;\r\n var startTime = Date.now();\r\n // parse data\r\n var i = this._parseDataFrom;\r\n var n = this.data.length;\r\n var _loop_1 = function () {\r\n var rawDataItem = this_1.data[i];\r\n if (this_1._usesData) {\r\n var dataItem = this_1.getDataItem(rawDataItem);\r\n this_1.processDataItem(dataItem, rawDataItem);\r\n }\r\n this_1.dataUsers.each(function (dataUser) {\r\n if (dataUser.data.length == 0) { // checking if data is not set directly\r\n var dataUserDataItem = dataUser.getDataItem(rawDataItem);\r\n dataUser.processDataItem(dataUserDataItem, rawDataItem);\r\n }\r\n });\r\n counter++;\r\n // show preloader if this takes too many time\r\n if (counter == 100) { // no need to check it on each data item\r\n counter = 0;\r\n var elapsed = Date.now() - startTime;\r\n if (elapsed > this_1.parsingStepDuration) {\r\n if (i < this_1.data.length - 10) {\r\n this_1._parseDataFrom = i + 1;\r\n // update preloader\r\n if (preloader) {\r\n if (i / this_1.data.length > 0.5 && !preloader.visible) {\r\n // do not start showing\r\n }\r\n else {\r\n preloader.progress = i / this_1.data.length;\r\n }\r\n }\r\n this_1.dataValidationProgress = i / this_1.data.length;\r\n i = this_1.data.length; // stops cycle\r\n this_1.invalidateData();\r\n return { value: void 0 };\r\n }\r\n }\r\n }\r\n };\r\n var this_1 = this;\r\n for (i; i < n; i++) {\r\n var state_1 = _loop_1();\r\n if (typeof state_1 === \"object\")\r\n return state_1.value;\r\n }\r\n if (preloader) {\r\n preloader.progress = 1;\r\n }\r\n this.dataUsers.each(function (dataUser) {\r\n if (dataUser.hidden || (dataUser.appeared && !dataUser.visible && dataUser.stacked)) {\r\n dataUser.hide(0);\r\n }\r\n });\r\n }\r\n this.dataValidationProgress = 1;\r\n this._parseDataFrom = 0; // reset this index, it is set to dataItems.length if addData() method was used.\r\n this.invalidateDataItems();\r\n if (!this._internalDefaultsApplied) {\r\n this.applyInternalDefaults();\r\n }\r\n this.dispatch(\"datavalidated\"); // can't zoom chart if dispatched immediately\r\n };\r\n /**\r\n * Validates (processes) data items.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Component.prototype.validateDataItems = function () {\r\n $array.remove(registry.invalidDataItems, this);\r\n this.dataItemsInvalid = false;\r\n this.invalidateDataRange();\r\n this.invalidate();\r\n this.dispatch(\"dataitemsvalidated\");\r\n };\r\n Object.defineProperty(Component.prototype, \"data\", {\r\n /**\r\n * Returns element's source (raw) data.\r\n *\r\n * @return Data\r\n */\r\n get: function () {\r\n if (!this._data) {\r\n this._data = [];\r\n }\r\n if (!this._adapterO) {\r\n return this._data;\r\n }\r\n else {\r\n return this._adapterO.apply(\"data\", this._data);\r\n }\r\n },\r\n /**\r\n * Sets source (raw) data for the element. The \"data\" is always an `Array`\r\n * of objects.\r\n *\r\n * IMPORTANT: The order of data items in `data` array is important as it\r\n * might affect chart look and behavior. [More details](https://www.amcharts.com/docs/v4/concepts/data/#Order_of_data_items).\r\n *\r\n * @param value Data\r\n */\r\n set: function (value) {\r\n this.setData(value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Component.prototype.setData = function (value) {\r\n // array might be the same, but there might be items added\r\n // todo: check if array changed, toString maybe?\r\n if (!this.isDisposed()) {\r\n this._parseDataFrom = 0;\r\n this.disposeData();\r\n this._data = value;\r\n if (value && value.length > 0) {\r\n this.invalidateData();\r\n }\r\n else {\r\n this.dispatchImmediately(\"beforedatavalidated\");\r\n this.dispatch(\"datavalidated\");\r\n }\r\n }\r\n };\r\n /**\r\n * Returns (creates if necessary) a [[DataSource]] bound to any specific\r\n * property.\r\n *\r\n * For example if I want to bind `data` to an external JSON file, I'd create\r\n * a DataSource for it.\r\n *\r\n * @param property Property to bind external data to\r\n * @return A DataSource for property\r\n */\r\n Component.prototype.getDataSource = function (property) {\r\n var _this = this;\r\n if (!$type.hasValue(this._dataSources[property])) {\r\n this._dataSources[property] = new DataSource();\r\n this._dataSources[property].component = this;\r\n this.setDataSourceEvents(this._dataSources[property], property);\r\n this._dataSources[property].adapter.add(\"dateFields\", function (val) {\r\n return _this.dataSourceDateFields(val);\r\n });\r\n this._dataSources[property].adapter.add(\"numberFields\", function (val) {\r\n return _this.dataSourceNumberFields(val);\r\n });\r\n this.events.on(\"inited\", function () {\r\n _this.loadData(property);\r\n }, this, false);\r\n }\r\n return this._dataSources[property];\r\n };\r\n Object.defineProperty(Component.prototype, \"dataSource\", {\r\n /**\r\n * @return Data source\r\n */\r\n get: function () {\r\n if (!this._dataSources[\"data\"]) {\r\n this.getDataSource(\"data\");\r\n }\r\n return this._dataSources[\"data\"];\r\n },\r\n /**\r\n *A [[DataSource]] to be used for loading Component's data.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/loading-external-data/} for more on loading external data\r\n * @param value Data source\r\n */\r\n set: function (value) {\r\n var _this = this;\r\n if (this._dataSources[\"data\"]) {\r\n this.removeDispose(this._dataSources[\"data\"]);\r\n }\r\n this._dataSources[\"data\"] = value;\r\n this._dataSources[\"data\"].component = this;\r\n this.events.on(\"inited\", function () {\r\n _this.loadData(\"data\");\r\n }, this, false);\r\n this.setDataSourceEvents(value, \"data\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Initiates loading of the external data via [[DataSource]].\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Component.prototype.loadData = function (property) {\r\n this._dataSources[property].load();\r\n };\r\n /**\r\n * This function is called by the [[DataSource]]'s `dateFields` adapater\r\n * so that particular chart types can popuplate this setting with their\r\n * own type-specific data fields so they are parsed properly.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Array of date fields\r\n * @return Array of date fields populated with chart's date fields\r\n */\r\n Component.prototype.dataSourceDateFields = function (value) {\r\n return value;\r\n };\r\n /**\r\n * This function is called by the [[DataSource]]'s `numberFields` adapater\r\n * so that particular chart types can popuplate this setting with their\r\n * own type-specific data fields so they are parsed properly.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Array of number fields\r\n * @return Array of number fields populated with chart's number fields\r\n */\r\n Component.prototype.dataSourceNumberFields = function (value) {\r\n return value;\r\n };\r\n /**\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param list [description]\r\n * @param dataFields [description]\r\n * @param targetList [description]\r\n * @return [description]\r\n */\r\n Component.prototype.populateDataSourceFields = function (list, dataFields, targetList) {\r\n $array.each(targetList, function (value) {\r\n if (dataFields[value] && $array.indexOf(list, dataFields[value]) === -1) {\r\n list.push(dataFields[value]);\r\n }\r\n });\r\n return list;\r\n };\r\n /**\r\n * Sets events on a [[DataSource]].\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Component.prototype.setDataSourceEvents = function (ds, property) {\r\n var _this = this;\r\n ds.events.on(\"started\", function (ev) {\r\n var preloader = _this.preloader;\r\n if (preloader) {\r\n preloader.progress = 0;\r\n //preloader.label.text = this.language.translate(\"Loading\");\r\n }\r\n }, undefined, false);\r\n ds.events.on(\"loadstarted\", function (ev) {\r\n var preloader = _this.preloader;\r\n if (preloader) {\r\n preloader.progress = 0.25;\r\n }\r\n }, undefined, false);\r\n ds.events.on(\"loadended\", function (ev) {\r\n var preloader = _this.preloader;\r\n if (preloader) {\r\n preloader.progress = 0.5;\r\n }\r\n }, undefined, false);\r\n ds.events.on(\"parseended\", function (ev) {\r\n var preloader = _this.preloader;\r\n if (preloader) {\r\n preloader.progress = 0.75;\r\n }\r\n }, undefined, false);\r\n ds.events.on(\"ended\", function (ev) {\r\n var preloader = _this.preloader;\r\n if (preloader) {\r\n preloader.progress = 1;\r\n }\r\n }, undefined, false);\r\n ds.events.on(\"error\", function (ev) {\r\n var preloader = _this.preloader;\r\n if (preloader) {\r\n preloader.progress = 1;\r\n }\r\n _this.openModal(ev.message);\r\n }, undefined, false);\r\n if (property) {\r\n ds.events.on(\"done\", function (ev) {\r\n var preloader = _this.preloader;\r\n if (preloader) {\r\n preloader.progress = 1;\r\n }\r\n if (property == \"data\" && !$type.isArray(ev.data)) {\r\n ev.data = [ev.data];\r\n }\r\n if (ds.incremental && property == \"data\" && _this.data.length) {\r\n _this.addData(ev.data, ds.keepCount ? ev.data.length : 0);\r\n }\r\n else if (ds.updateCurrentData && property == \"data\" && _this.data.length) {\r\n // cycle through existing data items\r\n $array.each(_this.data, function (item, index) {\r\n if ($type.hasValue(ev.data[index])) {\r\n $object.each(item, function (key, val) {\r\n if ($type.hasValue(ev.data[index][key])) {\r\n item[key] = ev.data[index][key];\r\n }\r\n });\r\n }\r\n });\r\n _this.invalidateRawData();\r\n }\r\n else {\r\n _this[property] = ev.data;\r\n }\r\n });\r\n }\r\n };\r\n Object.defineProperty(Component.prototype, \"responsive\", {\r\n /**\r\n * @return Responsive rules handler\r\n */\r\n get: function () {\r\n if (!this._responsive) {\r\n this._responsive = new Responsive();\r\n this._responsive.component = this;\r\n }\r\n return this._responsive;\r\n },\r\n /**\r\n * A [[Responsive]] instance to be used when applying conditional\r\n * property values.\r\n *\r\n * NOTE: Responsive features are currently in development and may not work\r\n * as expected, if at all.\r\n *\r\n * @param value Responsive rules handler\r\n */\r\n set: function (value) {\r\n this._responsive = value;\r\n this._responsive.component = this;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Sets current zoom.\r\n *\r\n * The range uses relative values from 0 to 1, with 0 marking beginning and 1\r\n * marking end of the available data range.\r\n *\r\n * This method will not have any effect when called on a chart object.\r\n * Since the chart can have a number of axes and series, each with its own\r\n * data, the meaning of \"range\" is very ambiguous.\r\n *\r\n * To zoom the chart use `zoom*` methods on its respective axes.\r\n *\r\n * @param range Range\r\n * @param skipRangeEvent Should rangechanged event not be triggered?\r\n * @param instantly Do not animate?\r\n * @return Actual modidied range (taking `maxZoomFactor` into account)\r\n */\r\n Component.prototype.zoom = function (range, skipRangeEvent, instantly, declination) {\r\n var _this = this;\r\n if (skipRangeEvent === void 0) { skipRangeEvent = false; }\r\n if (instantly === void 0) { instantly = false; }\r\n var start = range.start;\r\n var end = range.end;\r\n var priority = range.priority;\r\n if (range.start == range.end) {\r\n range.start = range.start - 0.5 / this.maxZoomFactor;\r\n range.end = range.end + 0.5 / this.maxZoomFactor;\r\n }\r\n if (priority == \"end\" && end == 1 && start != 0) {\r\n if (start < this.start) {\r\n priority = \"start\";\r\n }\r\n }\r\n if (priority == \"start\" && start == 0) {\r\n if (end > this.end) {\r\n priority = \"end\";\r\n }\r\n }\r\n if (!$type.isNumber(declination)) {\r\n declination = this.maxZoomDeclination;\r\n }\r\n if (!$type.isNumber(start) || !$type.isNumber(end)) {\r\n return { start: this.start, end: this.end };\r\n }\r\n if (this._finalStart != start || this._finalEnd != end) {\r\n var maxZoomFactor = this.maxZoomFactor / this.minZoomCount;\r\n var minZoomFactor = this.maxZoomFactor / this.maxZoomCount;\r\n // most likely we are dragging left scrollbar grip here, so we tend to modify end\r\n if (priority == \"start\") {\r\n if (this.maxZoomCount > 0) {\r\n // add to the end\r\n if (1 / (end - start) < minZoomFactor) {\r\n end = start + 1 / minZoomFactor;\r\n }\r\n }\r\n // add to the end\r\n if (1 / (end - start) > maxZoomFactor) {\r\n end = start + 1 / maxZoomFactor;\r\n }\r\n //unless end is > 0\r\n if (end > 1 && end - start < 1 / maxZoomFactor) {\r\n //end = 1;\r\n start = end - 1 / maxZoomFactor;\r\n }\r\n }\r\n // most likely we are dragging right, so we modify left\r\n else {\r\n if (this.maxZoomCount > 0) {\r\n // add to the end\r\n if (1 / (end - start) < minZoomFactor) {\r\n start = end - 1 / minZoomFactor;\r\n }\r\n }\r\n // remove from start\r\n if (1 / (end - start) > maxZoomFactor) {\r\n if (start <= 0) {\r\n end = start + 1 / maxZoomFactor;\r\n }\r\n else {\r\n start = end - 1 / maxZoomFactor;\r\n }\r\n }\r\n if (start < 0 && end - start < 1 / maxZoomFactor) {\r\n //start = 0;\r\n end = start + 1 / maxZoomFactor;\r\n }\r\n }\r\n if (start < -declination) {\r\n start = -declination;\r\n }\r\n if (1 / (end - start) > maxZoomFactor) {\r\n end = start + 1 / maxZoomFactor;\r\n }\r\n if (end > 1 + declination) {\r\n end = 1 + declination;\r\n }\r\n if (1 / (end - start) > maxZoomFactor) {\r\n start = end - 1 / maxZoomFactor;\r\n }\r\n this._finalEnd = end;\r\n this._finalStart = start;\r\n this.skipRangeEvent = skipRangeEvent;\r\n this.dispatchImmediately(\"rangechangestarted\");\r\n if (this.rangeChangeDuration > 0 && !instantly) {\r\n // todo: maybe move this to Animation\r\n var rangeChangeAnimation = this.rangeChangeAnimation;\r\n if (rangeChangeAnimation && rangeChangeAnimation.progress < 1) {\r\n var options = rangeChangeAnimation.animationOptions;\r\n if (options.length > 1) {\r\n if (options[0].to == start && options[1].to == end) {\r\n return { start: start, end: end };\r\n }\r\n else {\r\n if (!rangeChangeAnimation.isDisposed()) {\r\n rangeChangeAnimation.stop();\r\n }\r\n }\r\n }\r\n }\r\n if (this.rangeChangeAnimation) {\r\n this.rangeChangeAnimation.kill();\r\n }\r\n rangeChangeAnimation = this.animate([{ property: \"start\", to: start }, { property: \"end\", to: end }], this.rangeChangeDuration, this.rangeChangeEasing);\r\n this.rangeChangeAnimation = rangeChangeAnimation;\r\n if (rangeChangeAnimation && !rangeChangeAnimation.isFinished()) {\r\n rangeChangeAnimation.events.on(\"animationended\", function () {\r\n _this.dispatchImmediately(\"rangechangeended\");\r\n });\r\n }\r\n else {\r\n this.dispatchImmediately(\"rangechangeended\");\r\n }\r\n }\r\n else {\r\n this.start = start;\r\n this.end = end;\r\n this.dispatch(\"rangechangeended\");\r\n }\r\n }\r\n return { start: start, end: end };\r\n };\r\n /**\r\n * Zooms to specific data items using their index in data.\r\n *\r\n * This method will not have any effect when called on a chart object.\r\n * Since the chart can have a number of axes and series, each with its own\r\n * data, the meaning of \"index\" is very ambiguous.\r\n *\r\n * To zoom the chart use `zoom*` methods on its respective axes.\r\n *\r\n * @param startIndex Index of the starting data item\r\n * @param endIndex Index of the ending data item\r\n * @param skipRangeEvent Should rangechanged event not be triggered?\r\n * @param instantly Do not animate?\r\n */\r\n Component.prototype.zoomToIndexes = function (startIndex, endIndex, skipRangeEvent, instantly) {\r\n if (!$type.isNumber(startIndex) || !$type.isNumber(endIndex)) {\r\n return;\r\n }\r\n var start = startIndex / this.dataItems.length;\r\n var end = endIndex / this.dataItems.length;\r\n this.zoom({ start: start, end: end }, skipRangeEvent, instantly);\r\n };\r\n Object.defineProperty(Component.prototype, \"zoomFactor\", {\r\n /**\r\n * A current zoom factor (0-1). 1 meaning fully zoomed out. (showing all of\r\n * the available data)\r\n *\r\n * @return Zoom factor\r\n */\r\n get: function () {\r\n return $math.fitToRange(1 / (this.end - this.start), 1, this.maxZoomFactor);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Component.prototype, \"maxZoomFactor\", {\r\n /**\r\n * @return Maximum zoomFactor\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"maxZoomFactor\");\r\n },\r\n /**\r\n * Max available `zoomFactor`.\r\n *\r\n * The element will not allow zoom to occur beyond this factor.\r\n *\r\n * [[DateAxis]] and [[CategoryAxis]] calculate this atutomatically so that\r\n * category axis could be zoomed to one category and date axis allows to be\r\n * zoomed up to one base interval.\r\n *\r\n * In case you want to restrict category or date axis to be zoomed to more\r\n * than one category or more than one base interval, use `minZoomCount`\r\n * property (set it to `> 1`).\r\n *\r\n * Default value of [[ValueAxis]]'s `maxZoomFactor` is `1000`.\r\n *\r\n * Feel free to modify it to allow bigger zoom or to restrict zooming.\r\n *\r\n * @param value Maximum zoomFactor\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"maxZoomFactor\", value)) {\r\n if (value == 1) {\r\n this.maxZoomDeclination = 0;\r\n }\r\n this.invalidateDataRange();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Component.prototype, \"maxZoomDeclination\", {\r\n /**\r\n * @ignore\r\n * @return Maximum zoom declination\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"maxZoomDeclination\");\r\n },\r\n /**\r\n * Max zoom declination.\r\n *\r\n * @ignore\r\n * @default 1\r\n * @param value Maximum zoom declination\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"maxZoomDeclination\", value)) {\r\n this.invalidateDataRange();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Component.prototype, \"startIndex\", {\r\n /**\r\n * Current starting index.\r\n *\r\n * @return Start index\r\n */\r\n get: function () {\r\n if (!$type.isNumber(this._startIndex)) {\r\n this._startIndex = 0;\r\n }\r\n return this._startIndex;\r\n },\r\n /**\r\n * Sets current starting index.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Start index\r\n */\r\n set: function (value) {\r\n this._startIndex = $math.fitToRange(Math.round(value), 0, this.dataItems.length);\r\n //this._workingStartIndex = this._startIndex; // not good, breaks adjusted working start index of line series\r\n this.start = this.indexToPosition(this._startIndex);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * @ignore\r\n * @todo:review description\r\n * returns item's relative position by the index of the item\r\n * @param index\r\n */\r\n Component.prototype.indexToPosition = function (index) {\r\n return index / this.dataItems.length;\r\n };\r\n Object.defineProperty(Component.prototype, \"endIndex\", {\r\n /**\r\n * Current ending index.\r\n *\r\n * @return End index\r\n */\r\n get: function () {\r\n var count = this.dataItems.length;\r\n if (!$type.isNumber(this._endIndex) || this._endIndex > count) {\r\n this._endIndex = count;\r\n }\r\n return this._endIndex;\r\n },\r\n /**\r\n * Sets current ending index.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value End index\r\n */\r\n set: function (value) {\r\n this._endIndex = $math.fitToRange(Math.round(value), 0, this.dataItems.length);\r\n //this._workingEndIndex = this._endIndex; // not good, breaks adjusted workingend index of line series\r\n this.end = this.indexToPosition(this._endIndex);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Component.prototype, \"start\", {\r\n /**\r\n * @return Start (0-1)\r\n */\r\n get: function () {\r\n if (!this._adapterO) {\r\n return this._start;\r\n }\r\n else {\r\n return this._adapterO.apply(\"start\", this._start);\r\n }\r\n },\r\n /**\r\n * Start of the current data range (zoom).\r\n *\r\n * These are relative values from 0 (beginning) to 1 (end).\r\n *\r\n * @param value Start (0-1)\r\n */\r\n set: function (value) {\r\n // value = $math.round(value, 10); not good\r\n //if (1 / (this.end - value) > this.maxZoomFactor) {\r\n //\tvalue = this.end - 1 / this.maxZoomFactor;\r\n //}\r\n if (this._start != value) {\r\n this._start = value;\r\n var startIndex = Math.max(0, Math.floor(this.dataItems.length * value) || 0);\r\n this._startIndex = Math.min(startIndex, this.dataItems.length);\r\n this.invalidateDataRange();\r\n this.invalidate();\r\n this.dispatchImmediately(\"startchanged\");\r\n this.dispatch(\"startendchanged\");\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Component.prototype, \"end\", {\r\n /**\r\n * @return End (0-1)\r\n */\r\n get: function () {\r\n if (!this._adapterO) {\r\n return this._end;\r\n }\r\n else {\r\n return this._adapterO.apply(\"end\", this._end);\r\n }\r\n },\r\n /**\r\n * End of the current data range (zoom).\r\n *\r\n * These are relative values from 0 (beginning) to 1 (end).\r\n *\r\n * @param value End (0-1)\r\n */\r\n set: function (value) {\r\n // value = $math.round(value, 10); // not good\r\n //if (1 / (value - this.start) > this.maxZoomFactor) {\r\n //\tvalue = 1 / this.maxZoomFactor + this.start;\r\n //}\r\n if (this._end != value) {\r\n this._end = value;\r\n this._endIndex = Math.min(this.dataItems.length, Math.ceil(this.dataItems.length * value) || 0);\r\n this.invalidateDataRange();\r\n this.invalidate();\r\n this.dispatchImmediately(\"endchanged\");\r\n this.dispatch(\"startendchanged\");\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * [removeFromInvalids description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\r\n Component.prototype.removeFromInvalids = function () {\r\n _super.prototype.removeFromInvalids.call(this);\r\n registry.removeFromInvalidComponents(this);\r\n $array.remove(registry.invalidDataItems, this);\r\n $array.remove(registry.invalidDataRange, this);\r\n $array.remove(registry.invalidRawDatas, this);\r\n };\r\n Object.defineProperty(Component.prototype, \"dataItems\", {\r\n /**\r\n * Returns a list of source [[DataItem]] objects currently used in the chart.\r\n *\r\n * @return List of data items\r\n */\r\n get: function () {\r\n if (this._currentDataSetId != \"\") {\r\n var dataItems = this.dataSets.getKey(this._currentDataSetId);\r\n if (dataItems) {\r\n return dataItems;\r\n }\r\n }\r\n return this._dataItems;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Component.prototype, \"dataSets\", {\r\n /**\r\n * Holds data items for data sets (usually aggregated data).\r\n *\r\n * @ignore\r\n * @since 4.7.0\r\n * @return Data sets\r\n */\r\n get: function () {\r\n if (!this._dataSets) {\r\n this._dataSets = new Dictionary();\r\n }\r\n return this._dataSets;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Makes the chart use particular data set.\r\n *\r\n * If `id` is not provided or there is no such data set, main data will be\r\n * used.\r\n *\r\n * @ignore\r\n * @since 4.7.0\r\n * @param id Data set id\r\n */\r\n Component.prototype.setDataSet = function (id) {\r\n if (this._currentDataSetId != id) {\r\n var dataSet = this.dataSets.getKey(id);\r\n if (!dataSet) {\r\n if (this._currentDataSetId != \"\") {\r\n this.dataItems.each(function (dataItem) {\r\n dataItem.__disabled = true;\r\n });\r\n this._currentDataSetId = \"\";\r\n this.invalidateDataRange();\r\n this._prevStartIndex = undefined;\r\n this.dataItems.each(function (dataItem) {\r\n dataItem.__disabled = false;\r\n });\r\n return true;\r\n }\r\n }\r\n else {\r\n this.dataItems.each(function (dataItem) {\r\n dataItem.__disabled = true;\r\n });\r\n this._currentDataSetId = id;\r\n this.invalidateDataRange();\r\n this._prevStartIndex = undefined;\r\n this.dataItems.each(function (dataItem) {\r\n dataItem.__disabled = false;\r\n });\r\n return true;\r\n }\r\n }\r\n return false;\r\n };\r\n Object.defineProperty(Component.prototype, \"currentDataSetId\", {\r\n /**\r\n * Returns id of the currently used data set, or `undefined` if main data set\r\n * is in use.\r\n *\r\n * @since 4.7.0\r\n * @return Current data set id\r\n */\r\n get: function () {\r\n return this._currentDataSetId;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Component.prototype, \"mainDataSet\", {\r\n /**\r\n * Returns reference to \"main\" data set (unaggregated data as it was supplied\r\n * in `data`).\r\n *\r\n * @since 4.7.0\r\n * @return Main data set\r\n */\r\n get: function () {\r\n return this._dataItems;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Updates the indexes for the dataItems\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Component.prototype._updateDataItemIndexes = function (startIndex) {\r\n var dataItems = this.mainDataSet.values;\r\n var length = dataItems.length;\r\n for (var i = startIndex; i < length; ++i) {\r\n dataItems[i]._index = i;\r\n }\r\n };\r\n /**\r\n * Processes newly added [[DataItem]] as well as triggers data re-validation.\r\n *\r\n * @ignore Exclude from docs\r\n * @param event [description]\r\n */\r\n Component.prototype.handleDataItemAdded = function (event) {\r\n event.newValue.component = this;\r\n this._updateDataItemIndexes(event.index);\r\n if (!this.dataItemsInvalid) {\r\n this.invalidateDataItems();\r\n }\r\n };\r\n /**\r\n * removes [[DataItem]] as well as triggers data re-validation.\r\n *\r\n * @ignore Exclude from docs\r\n * @param event [description]\r\n */\r\n Component.prototype.handleDataItemRemoved = function (event) {\r\n //\t\tevent.oldValue.component = undefined; // not good, as some items might be not removed from component lists\r\n this._updateDataItemIndexes(event.index);\r\n if (!this.dataItemsInvalid) {\r\n this.invalidateDataItems();\r\n }\r\n };\r\n /**\r\n * Binds a data element's field to a specific field in raw data.\r\n * For example, for the very basic column chart you'd want to bind a `value`\r\n * field to a field in data, such as `price`.\r\n *\r\n * Some more advanced Components, like [[CandlestickSeries]] need several\r\n * data fields bound to data, such as ones for open, high, low and close\r\n * values.\r\n *\r\n * @todo Example\r\n * @param field Field name\r\n * @param value Field name in data\r\n */\r\n Component.prototype.bindDataField = function (field, value) {\r\n this.dataFields[field] = value;\r\n this.invalidateDataRange();\r\n };\r\n /**\r\n * Invalidates processed data.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Component.prototype.invalidateProcessedData = function () {\r\n this.resetProcessedRange();\r\n this.invalidateDataRange();\r\n };\r\n /**\r\n * [resetProcessedRange description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\r\n Component.prototype.resetProcessedRange = function () {\r\n this._prevEndIndex = null;\r\n this._prevStartIndex = null;\r\n };\r\n Object.defineProperty(Component.prototype, \"dataUsers\", {\r\n /**\r\n * Returns all other [[Component]] objects that are using this element's\r\n * data.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description (review)\r\n * @return [description]\r\n */\r\n get: function () {\r\n var _this = this;\r\n if (!this._dataUsers) {\r\n this._dataUsers = new List();\r\n //this._disposers.push(new ListDisposer(this._dataUsers));\r\n // TODO better way of handling this? e.g. move into another module ?\r\n this._disposers.push(new Disposer(function () {\r\n // TODO clear the list ?\r\n $iter.each(_this._dataUsers.iterator(), function (x) {\r\n x.dispose();\r\n });\r\n }));\r\n }\r\n return this._dataUsers;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Returns a clone of this element.\r\n *\r\n * @return Clone\r\n */\r\n Component.prototype.clone = function () {\r\n var component = _super.prototype.clone.call(this);\r\n component.dataFields = $utils.copyProperties(this.dataFields, {});\r\n return component;\r\n };\r\n /**\r\n * Copies all parameters from another [[Component]].\r\n *\r\n * @param source Source Component\r\n */\r\n Component.prototype.copyFrom = function (source) {\r\n _super.prototype.copyFrom.call(this, source);\r\n this.data = source.data;\r\n this.sequencedInterpolation = source.sequencedInterpolation;\r\n this.sequencedInterpolationDelay = source.sequencedInterpolationDelay;\r\n this.interpolationDuration = source.interpolationDuration;\r\n this.interpolationEasing = source.interpolationEasing;\r\n };\r\n /**\r\n * Invalidates the whole element, including all its children, causing\r\n * complete re-parsing of data and redraw.\r\n *\r\n * Use sparingly!\r\n */\r\n Component.prototype.reinit = function () {\r\n this._inited = false;\r\n this.deepInvalidate();\r\n };\r\n /**\r\n * Add an adapter for data.\r\n *\r\n * @return Exporting\r\n */\r\n Component.prototype.getExporting = function () {\r\n var _export = _super.prototype.getExporting.call(this);\r\n if (!_export.adapter.has(\"data\", this._exportData, -1, this)) {\r\n _export.adapter.add(\"data\", this._exportData, -1, this);\r\n this.events.on(\"datavalidated\", function (ev) {\r\n _export.handleDataUpdated();\r\n });\r\n }\r\n return _export;\r\n };\r\n Component.prototype._exportData = function (arg) {\r\n arg.data = this.data;\r\n return arg;\r\n };\r\n Component.prototype.setDisabled = function (value) {\r\n var changed = _super.prototype.setDisabled.call(this, value);\r\n if (changed) {\r\n this.invalidateData();\r\n }\r\n return changed;\r\n };\r\n /**\r\n * @ignore\r\n */\r\n Component.prototype.setShowOnInit = function (value) {\r\n if (value != this.getPropertyValue(\"showOnInit\")) {\r\n if (value && !this.inited && !this.hidden) {\r\n this._showOnInitDisposer2 = this.events.once(\"dataitemsvalidated\", this.hideInitially, this, false);\r\n this._disposers.push(this._showOnInitDisposer2);\r\n }\r\n else {\r\n if (this._showOnInitDisposer2) {\r\n this.removeDispose(this._showOnInitDisposer2);\r\n }\r\n }\r\n }\r\n // important order here\r\n _super.prototype.setShowOnInit.call(this, value);\r\n };\r\n Component.prototype.setBaseId = function (value) {\r\n if (value != this._baseId) {\r\n if (this.dataInvalid) {\r\n this.dataInvalid = false;\r\n registry.removeFromInvalidComponents(this);\r\n this._baseId = value;\r\n this.invalidateData();\r\n }\r\n }\r\n _super.prototype.setBaseId.call(this, value);\r\n };\r\n Object.defineProperty(Component.prototype, \"minZoomCount\", {\r\n /**\r\n * @return Min zoom count\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"minZoomCount\");\r\n },\r\n /**\r\n * Use this for [[CategoryAxis]] or [[DateAxis]].\r\n *\r\n * Allows restricting zoom in beyond certain number of categories or base\r\n * intervals.\r\n *\r\n * @default 1\r\n * @param value Min zoom count\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"minZoomCount\", value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Component.prototype, \"maxZoomCount\", {\r\n /**\r\n * @return Max zoom count\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"maxZoomCount\");\r\n },\r\n /**\r\n * Use this for [[CategoryAxis]] or [[DateAxis]].\r\n *\r\n * Limits how many categories or base intervals can be shown at the same\r\n * time.\r\n *\r\n * If there are more items in the chart, the chart will auto-zoom.\r\n *\r\n * @default 0 (no limit)\r\n * @since 4.6.2\r\n * @param value Max zoom count\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"maxZoomCount\", value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Called during the System.update method\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Component.prototype._systemCheckIfValidate = function () {\r\n if (this.dataInvalid || (this.dataProvider && this.dataProvider.dataInvalid)) {\r\n return false;\r\n }\r\n else {\r\n return true;\r\n }\r\n };\r\n /**\r\n * Adds easing functions to \"function\" fields.\r\n *\r\n * @param field Field name\r\n * @return Assign as function?\r\n */\r\n Component.prototype.asFunction = function (field) {\r\n return field == \"interpolationEasing\" || field == \"rangeChangeEasing\" || _super.prototype.asIs.call(this, field);\r\n };\r\n return Component;\r\n}(Container));\r\nexport { Component };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"Component\"] = Component;\r\n","/**\r\n * Container module\r\n * @todo Needs description\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Sprite } from \"./Sprite\";\r\nimport { SpriteState } from \"./SpriteState\";\r\nimport { List } from \"./utils/List\";\r\nimport { MultiDisposer } from \"./utils/Disposer\";\r\nimport { Dictionary, DictionaryDisposer } from \"./utils/Dictionary\";\r\nimport { getInteraction } from \"./interaction/Interaction\";\r\nimport { Rectangle } from \"./elements/Rectangle\";\r\nimport { Percent } from \"./utils/Percent\";\r\nimport { registry } from \"./Registry\";\r\nimport { InterfaceColorSet } from \"../core/utils/InterfaceColorSet\";\r\nimport * as $iter from \"./utils/Iterator\";\r\nimport * as $array from \"./utils/Array\";\r\nimport * as $math from \"./utils/Math\";\r\nimport * as $type from \"./utils/Type\";\r\nimport * as $dom from \"./utils/DOM\";\r\nimport { system } from \"./System\";\r\nimport { options } from \"./Options\";\r\n;\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Container can contain multiple sprites and arrange them in various layouts.\r\n *\r\n * @see {@link IContainerEvents} for a list of available events\r\n * @see {@link IContainerAdapters} for a list of available Adapters\r\n * @important\r\n */\r\nvar Container = /** @class */ (function (_super) {\r\n __extends(Container, _super);\r\n /**\r\n * Constructor\r\n */\r\n function Container() {\r\n var _this = \r\n // Init\r\n _super.call(this) || this;\r\n /**\r\n * Container children. (sorted by layout)\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n _this._childrenByLayout = [];\r\n /**\r\n * Container's disposers for its child elements.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n _this._childrenDisposers = new Dictionary();\r\n /**\r\n * Indicates if this container contains any focused elements, including\r\n * itself.\r\n */\r\n _this.hasFocused = false;\r\n /**\r\n * An array of references to elements the state should be set, when it is set\r\n * on this element.\r\n */\r\n _this.setStateOnSprites = [];\r\n /*\r\n * @ignore\r\n */\r\n _this.layoutInvalid = false;\r\n _this._absoluteWidth = 0;\r\n _this._absoluteHeight = 0;\r\n /**\r\n * An array of child Sprites that should be ready before this object can\r\n * fire a \"ready\" event.\r\n */\r\n _this._shouldBeReady = [];\r\n /**\r\n * Enables touch tap protection.\r\n */\r\n _this._tapToActivate = false;\r\n /**\r\n * If `tapToActivate` is used, this setting will determine how long the chart\r\n * will stay in \"active\" mode.\r\n *\r\n * @default 3000\r\n * @since 4.4.0\r\n */\r\n _this.tapTimeout = 3000;\r\n _this.className = \"Container\";\r\n _this._element = _this.paper.addGroup(\"g\");\r\n _this.group.add(_this.element);\r\n _this.setPropertyValue(\"pixelPerfect\", false);\r\n _this.setPropertyValue(\"layout\", \"absolute\");\r\n _this.setPropertyValue(\"fixedWidthGrid\", false);\r\n _this.setPropertyValue(\"verticalCenter\", \"none\");\r\n _this.setPropertyValue(\"horizontalCenter\", \"none\");\r\n _this._positionPrecision = 4;\r\n _this._disposers.push(new DictionaryDisposer(_this._childrenDisposers));\r\n _this.children.events.on(\"inserted\", _this.handleChildAdded, _this);\r\n _this.children.events.on(\"removed\", _this.handleChildRemoved, _this);\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * Handles adding of a new child into `children`. Adding new children might\r\n * affect the whole layout so it needs to be revalidated.\r\n *\r\n * @ignore Exclude from docs\r\n * @param event Event object\r\n * @todo Throw an exception on adding a disposed object. Of course it's better NOT TO add disposed objects, so that what we should focus on.\r\n */\r\n Container.prototype.handleChildAdded = function (event) {\r\n this.processChild(event.newValue);\r\n };\r\n /**\r\n * @ignore\r\n */\r\n Container.prototype.processChild = function (child) {\r\n // try solves the problem when somedy adds child directly to children\r\n try {\r\n this._childrenDisposers.insertKey(child.uid, new MultiDisposer([\r\n // it's not enough to listen to POSITION_CHANGED only, as some extra redrawals will happen.\r\n child.events.on(\"transformed\", this.handleChildTransform, this),\r\n child.events.on(\"zIndexChanged\", this.sortAndAdd, this)\r\n ]));\r\n }\r\n catch (err) {\r\n // void\r\n }\r\n if (this.element) {\r\n var group = this.element;\r\n group.add(child.group);\r\n }\r\n child.parent = this;\r\n child.paper = this.paper;\r\n this.dispatchImmediately(\"childadded\", { type: \"childadded\", newValue: child });\r\n this.invalidate();\r\n };\r\n /**\r\n * @ignore\r\n */\r\n Container.prototype.sortAndAdd = function () {\r\n this.sortChildren();\r\n this.addChildren();\r\n };\r\n /**\r\n * Handles child removal. Changing size of the child may change the\r\n * whole layout of the Container, hence layout needs to be invalidated.\r\n *\r\n * @ignore Exclude from docs\r\n * @param event Event object\r\n */\r\n Container.prototype.handleChildRemoved = function (event) {\r\n var child = event.oldValue;\r\n // TODO figure out why the key sometimes doesn't exist\r\n this._childrenDisposers.removeKey(child.uid);\r\n if (this.element) {\r\n var group = this.element;\r\n group.removeElement(child.group);\r\n }\r\n if (child.isMeasured) {\r\n this.invalidateLayout();\r\n }\r\n this.dispatchImmediately(\"childremoved\", { type: \"childremoved\", oldValue: child });\r\n };\r\n /**\r\n * Handles child transformation. Changing size of the child may change the\r\n * whole layout of the Container, hence layout needs to be invalidated.\r\n *\r\n * @ignore Exclude from docs\r\n * @param event Event object\r\n */\r\n Container.prototype.handleChildTransform = function (event) {\r\n var child = event.target;\r\n if (child.isMeasured) { // && this.layout != \"none\" && this.layout != \"absolute\") {\r\n this.invalidateLayout();\r\n }\r\n };\r\n /**\r\n * Invalidates Container's layout, causing it to be re-evaluated again.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Container.prototype.invalidateLayout = function () {\r\n if (this.layoutInvalid || this.disabled || this.isTemplate || this.layout == \"none\" || this.__disabled) {\r\n return;\r\n }\r\n this.layoutInvalid = true;\r\n registry.addToInvalidLayouts(this);\r\n system.requestFrame();\r\n };\r\n /**\r\n * Invalidates element.\r\n *\r\n * Object will be redrawn during the next update cycle.\r\n *\r\n * Please note that in most cases elements will auto-invalidate when needed. If\r\n * everything works, DO NOT use this method. Use it only if some changes do\r\n * not take otherwise.\r\n */\r\n Container.prototype.invalidate = function () {\r\n _super.prototype.invalidate.call(this);\r\n this.invalidateLayout();\r\n };\r\n /**\r\n * Invalidates the whole element, including layout AND all its child\r\n * elements.\r\n *\r\n * As this will essentially force all elements to redraw, use only if\r\n * absolutely necessary.\r\n */\r\n Container.prototype.deepInvalidate = function () {\r\n _super.prototype.invalidate.call(this);\r\n //this.sortChildren();\r\n $array.each(this._childrenByLayout, function (child) {\r\n if (child instanceof Container) {\r\n child.deepInvalidate();\r\n }\r\n else {\r\n child.invalidate();\r\n }\r\n });\r\n this.invalidateLayout();\r\n };\r\n Object.defineProperty(Container.prototype, \"children\", {\r\n /**\r\n * Returns a list of the child [[Sprite]] elements contained in this\r\n * Container.\r\n *\r\n * @return List of child elements (Sprites)\r\n */\r\n get: function () {\r\n // @todo Review if we can add all children to disposers\r\n if (!this._children) {\r\n this._children = new List();\r\n //this._disposers.push(new ListDisposer(this._children));\r\n }\r\n return this._children;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Container.prototype, \"minWidth\", {\r\n /**\r\n * @return Width (px)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"minWidth\");\r\n },\r\n /**\r\n * Minimum width (px) for the Container. A container will not\r\n * auto-shrink beyond this value, even if child elements are smaller.\r\n *\r\n * @param value Width (px)\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"minWidth\", value)) {\r\n this.invalidateLayout();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Container.prototype, \"minHeight\", {\r\n /**\r\n * @return Height (px)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"minHeight\");\r\n },\r\n /**\r\n * Minimum height (px) for the Container. A container will not\r\n * auto-shrink beyond this value, even if child elements are smaller.\r\n *\r\n * @param value Height (px)\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"minHeight\", value)) {\r\n this.invalidateLayout();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Overrides the original `removeElement` so that Container's actual element\r\n * is not removed. We do not need to remove element of a Container.\r\n *\r\n * We do this because remove element each time will fail the `getBBox`.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Container.prototype.removeElement = function () {\r\n };\r\n /**\r\n * Sorts Container's children: the ones with variable width and height are\r\n * put at the end of the list (depending on layout type), so that fixed-width\r\n * ones can be drawn first.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Container.prototype.sortChildren = function () {\r\n var _this = this;\r\n this._childrenByLayout = [];\r\n if (this.layout == \"none\" || this.layout == \"absolute\" || !this.layout) {\r\n //$iter.each(this.children.iterator(), (child) => {\r\n //\tthis._childrenByLayout.push(child);\r\n //});\r\n this._childrenByLayout = this.children.values;\r\n }\r\n else {\r\n // Assemble fixed-size and relative lists\r\n var fixed_1 = [];\r\n var relative_1 = [];\r\n $iter.each(this.children.iterator(), function (child) {\r\n if (_this.layout == \"horizontal\" || _this.layout == \"grid\") {\r\n if (!$type.isNumber(child.percentWidth)) {\r\n fixed_1.push(child);\r\n }\r\n else {\r\n relative_1.push(child);\r\n }\r\n }\r\n else if (_this.layout == \"vertical\") {\r\n if (!$type.isNumber(child.percentHeight)) {\r\n fixed_1.push(child);\r\n }\r\n else {\r\n relative_1.push(child);\r\n }\r\n }\r\n else {\r\n fixed_1.push(child);\r\n }\r\n });\r\n // Concat everything into list\r\n this._childrenByLayout = fixed_1.concat(relative_1);\r\n }\r\n this.calculateRelativeSize();\r\n };\r\n /**\r\n * Calculates relative sizes for all Container's children.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Make it protected?\r\n */\r\n Container.prototype.calculateRelativeSize = function () {\r\n var _this = this;\r\n var totalRelativeWidth = 0;\r\n var totalRelativeHeight = 0;\r\n $array.each(this._childrenByLayout, function (child) {\r\n // if child is not measured, we do not care about it at all.\r\n if (child.isMeasured) {\r\n if ($type.isNumber(child.percentWidth)) {\r\n totalRelativeWidth += child.percentWidth;\r\n }\r\n if ($type.isNumber(child.percentHeight)) {\r\n totalRelativeHeight += child.percentHeight;\r\n }\r\n }\r\n });\r\n $array.each(this._childrenByLayout, function (child) {\r\n if (child.isMeasured) {\r\n if (_this.layout == \"horizontal\") {\r\n if ($type.isNumber(child.percentWidth)) {\r\n child.relativeWidth = child.percentWidth / totalRelativeWidth;\r\n }\r\n if ($type.isNumber(child.percentHeight)) {\r\n child.relativeHeight = child.percentHeight / 100;\r\n }\r\n }\r\n if (_this.layout == \"vertical\") {\r\n if ($type.isNumber(child.percentHeight)) {\r\n child.relativeHeight = child.percentHeight / totalRelativeHeight;\r\n }\r\n if ($type.isNumber(child.percentWidth)) {\r\n child.relativeWidth = child.percentWidth / 100;\r\n }\r\n }\r\n if (_this.layout == \"grid\") {\r\n if ($type.isNumber(child.percentHeight)) {\r\n child.relativeHeight = child.percentHeight / 100;\r\n }\r\n if ($type.isNumber(child.percentWidth)) {\r\n child.relativeWidth = child.percentWidth / 100;\r\n }\r\n }\r\n }\r\n if (_this.layout == \"absolute\" || !child.isMeasured) {\r\n if ($type.isNumber(child.percentWidth)) {\r\n child.relativeWidth = child.percentWidth / 100;\r\n }\r\n if ($type.isNumber(child.percentHeight)) {\r\n child.relativeHeight = child.percentHeight / 100;\r\n }\r\n }\r\n });\r\n };\r\n /**\r\n * Adds all children to Container's SVG element.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Container.prototype.addChildren = function () {\r\n /*\r\n Need this check because a child might be assigned to parent even before element is created, for example a theme\r\n access scrollbar.thumb\r\n */\r\n if (this.element) {\r\n var zindexed = $array.copy(this.children.values); // not children by layout!\r\n var sortArray = zindexed.map(function (data, idx) {\r\n return { idx: idx, data: data };\r\n });\r\n sortArray.sort(function (a, b) {\r\n var ai = (a.data.zIndex || 0);\r\n var bi = (b.data.zIndex || 0);\r\n if (ai < bi) {\r\n return -1;\r\n }\r\n if (ai > bi) {\r\n return 1;\r\n }\r\n return a.idx - b.idx;\r\n });\r\n zindexed = sortArray.map(function (val) {\r\n return val.data;\r\n });\r\n var group_1 = this.element;\r\n // check, maybe the order is good already\r\n var isCorrect = true;\r\n if (group_1.node && group_1.node.childNodes) {\r\n for (var i = 0, len = group_1.node.childNodes.length; i < len; i++) {\r\n if (group_1.node.childNodes[i] != zindexed[i].group.node) {\r\n isCorrect = false;\r\n break;\r\n }\r\n }\r\n }\r\n if (!isCorrect) {\r\n $array.each(zindexed, function (child) {\r\n if (child.group) {\r\n group_1.add(child.group);\r\n }\r\n });\r\n if (this._background) {\r\n this.group.addToBack(this._background.group);\r\n }\r\n this.invalidateLayout();\r\n }\r\n }\r\n };\r\n /**\r\n * Creates a new element of specific type and assigns as a child to the\r\n * Container.\r\n *\r\n * @param Class type for the new element\r\n * @return New element\r\n */\r\n Container.prototype.createChild = function (classType) {\r\n var sprite = new classType();\r\n sprite.parent = this;\r\n return sprite;\r\n };\r\n /**\r\n * Removes all Container's children without actually destroying them.\r\n *\r\n * To destroy children use `disposeChildren()` instead.\r\n */\r\n Container.prototype.removeChildren = function () {\r\n // remove all children\r\n // TODO use iteration instead\r\n while (this.children.length > 0) {\r\n var child = this.children.getIndex(0);\r\n child.parent = undefined;\r\n this.children.removeValue(child);\r\n }\r\n };\r\n /**\r\n * Removes and destroys all Container's children.\r\n *\r\n * To remove children from Container without destroying them, use\r\n * `removeChildren()`.\r\n */\r\n Container.prototype.disposeChildren = function () {\r\n // TODO use iteration instead\r\n while (this.children.length > 0) {\r\n var child = this.children.getIndex(0);\r\n child.dispose();\r\n this.children.removeValue(child);\r\n }\r\n };\r\n Object.defineProperty(Container.prototype, \"background\", {\r\n /**\r\n * @return Background element\r\n */\r\n get: function () {\r\n if (!this._background) {\r\n this._background = this.createBackground();\r\n this.processBackground();\r\n }\r\n return this._background;\r\n },\r\n /**\r\n * An element to use as container background.\r\n *\r\n * @param background Background element\r\n */\r\n set: function (background) {\r\n if (this._background && this.background != background) {\r\n this.removeDispose(this._background);\r\n }\r\n if (background) {\r\n this._background = background;\r\n this._disposers.push(background);\r\n this.processBackground();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Handles the situation where parent element is resized.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Container.prototype.handleGlobalScale = function () {\r\n _super.prototype.handleGlobalScale.call(this);\r\n this.children.each(function (child) {\r\n child.handleGlobalScale();\r\n });\r\n };\r\n /**\r\n * Creates and returns a [[Rectangle]] to use as a background for Container.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Background Rectangle element\r\n */\r\n Container.prototype.createBackground = function () {\r\n return new Rectangle();\r\n };\r\n /**\r\n * Decorates background element with required properties.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Container.prototype.processBackground = function () {\r\n var background = this._background;\r\n if (background) {\r\n background.isMeasured = false;\r\n this._background.fill = new InterfaceColorSet().getFor(\"background\");\r\n background.parent = this;\r\n background.isMeasured = false;\r\n this.children.removeValue(background);\r\n this._disposers.push(background);\r\n this.group.addToBack(this._background.group);\r\n }\r\n };\r\n /**\r\n * Measures the size of container and informs its children of how much size\r\n * they can occupy, by setting their relative `maxWidth` and `maxHeight`\r\n * properties.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Container.prototype.validateLayout = function () {\r\n var _this = this;\r\n registry.removeFromInvalidLayouts(this);\r\n this.layoutInvalid = false;\r\n // prevents from drawing if topparent is 0x0\r\n /*\r\n let topParent = this.topParent;\r\n if (topParent) {\r\n if (!topParent.maxWidth || !topParent.maxHeight) {\r\n this._disposers.push(topParent.events.once(\"maxsizechanged\", this.invalidateLayout, this));\r\n }\r\n }*/\r\n this._availableWidth = this.innerWidth;\r\n this._availableHeight = this.innerHeight;\r\n var measuredWidth = 0;\r\n var measuredHeight = 0;\r\n var allValid = true;\r\n if (this.children) {\r\n this.sortChildren();\r\n // we itterate through list of children, sorted by layout priority. sprites which width non-relative width/height will go first, so we will reduce available width before proceeding to sprites with relative width/height\r\n $array.each(this._childrenByLayout, function (child) {\r\n var maxWidth;\r\n var maxHeight;\r\n if ($type.isNumber(child.relativeWidth)) {\r\n maxWidth = $math.round(_this._availableWidth * child.relativeWidth, 2);\r\n if (_this.layout == \"horizontal\") { // || this.layout == \"absolute\") {\r\n maxWidth -= child.pixelMarginRight + child.pixelMarginLeft;\r\n }\r\n }\r\n else {\r\n if (_this.layout == \"horizontal\") {\r\n if (child.invalid) {\r\n child.validate();\r\n }\r\n }\r\n }\r\n if ($type.isNumber(child.relativeHeight)) {\r\n maxHeight = $math.round(_this._availableHeight * child.relativeHeight, 2);\r\n if (_this.layout == \"vertical\") { // || this.layout == \"absolute\") {\r\n maxHeight -= child.pixelMarginTop + child.pixelMarginBottom;\r\n }\r\n }\r\n else {\r\n if (_this.layout == \"vertical\") {\r\n if (child.invalid) {\r\n child.validate();\r\n }\r\n }\r\n }\r\n // if child is valid\r\n if (child.invalid == false) {\r\n if ($type.isNumber(child.relativeWidth)) {\r\n child.maxWidth = maxWidth;\r\n }\r\n if ($type.isNumber(child.relativeHeight)) {\r\n child.maxHeight = maxHeight;\r\n }\r\n if (child.isMeasured) {\r\n // reduce available width if this is horizontal layout\r\n if (_this.layout == \"horizontal\") {\r\n if (!$type.isNumber(child.percentWidth)) {\r\n if (child.measuredWidth > 0) {\r\n _this._availableWidth -= child.measuredWidth + child.pixelMarginLeft + child.pixelMarginRight;\r\n }\r\n }\r\n }\r\n // reduce available height if this is vertical layout\r\n if (_this.layout == \"vertical\") {\r\n if (!$type.isNumber(child.percentHeight)) {\r\n if (child.measuredHeight > 0) {\r\n _this._availableHeight -= child.measuredHeight + child.pixelMarginTop + child.pixelMarginBottom;\r\n }\r\n }\r\n }\r\n var childMeasuredWidth = child.measuredWidth;\r\n var childMeasuredHeight = child.measuredHeight;\r\n if (child.align != \"none\") {\r\n childMeasuredWidth += child.pixelMarginLeft + child.pixelMarginRight;\r\n }\r\n if (child.valign != \"none\") {\r\n childMeasuredHeight += child.pixelMarginTop + child.pixelMarginBottom;\r\n }\r\n measuredWidth = Math.max(measuredWidth, childMeasuredWidth);\r\n measuredHeight = Math.max(measuredHeight, childMeasuredHeight);\r\n }\r\n }\r\n // if child is not valid\r\n else {\r\n // tell child what maximum width/ height it can occupy\r\n if (child.isMeasured) {\r\n if ($type.isNumber(child.relativeWidth)) {\r\n if (child.maxWidth != maxWidth) { // need to check this because of allValid\r\n child.maxWidth = maxWidth;\r\n allValid = false;\r\n }\r\n }\r\n if ($type.isNumber(child.relativeHeight)) {\r\n if (child.maxHeight != maxHeight) { // need to check this because of allValid\r\n child.maxHeight = maxHeight;\r\n allValid = false;\r\n }\r\n }\r\n }\r\n }\r\n });\r\n }\r\n this._absoluteWidth = measuredWidth;\r\n this._absoluteHeight = measuredHeight;\r\n // arrange after measuring, only if all children are valid already\r\n if (allValid) {\r\n this.arrange();\r\n }\r\n };\r\n /**\r\n * Arranges children according to layout specs and available space / child\r\n * sizes.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Container.prototype.arrange = function () {\r\n var _this = this;\r\n var children = this.children;\r\n /*\r\n in this method we not only arrange children but also find out the size of the container\r\n it might seem it would be easier to get container size using sprite's measure method,\r\n however it would return only actual size of the bbox. However as each child meight have\r\n margins set, we need to check each child - we do it here.\r\n\r\n This method doesn't do anything with DOM, so it's not expensive\r\n */\r\n var measuredWidth = 0;\r\n var measuredHeight = 0;\r\n //let innerWidth: number = this.innerWidth; //$math.max(this.innerWidth, this._measuredWidth - paddingLeft - paddingRight);\r\n //let innerHeight: number = this.innerHeight; //$math.max(this.innerHeight, this._measuredHeight - paddingTop - paddingBottom);\r\n // above is wrong, as if a w/h is not specified, it is 0 and alignment doesn't work at all.\r\n var innerWidth = $math.max(this.innerWidth, this._absoluteWidth);\r\n var innerHeight = $math.max(this.innerHeight, this._absoluteHeight);\r\n var left; // = 0;\r\n var right; // = innerWidth;\r\n var top; // = 0;\r\n var bottom; // = innerHeight;\r\n var paddingLeft = this.pixelPaddingLeft;\r\n var paddingRight = this.pixelPaddingRight;\r\n var paddingTop = this.pixelPaddingTop;\r\n var paddingBottom = this.pixelPaddingBottom;\r\n var nextX = 0;\r\n var nextY = 0;\r\n var row = 0;\r\n var column = 0;\r\n var columnWidth = [];\r\n var rowHeight = [];\r\n var maxCellWidth;\r\n var minCellWidth;\r\n var columnCount;\r\n var maxWidth = this.maxWidth;\r\n var maxHeight = this.maxHeight;\r\n var minWidth = this.minWidth;\r\n var minHeight = this.minHeight;\r\n var childrenCopy = $array.copy(children.values);\r\n if (this.reverseOrder) {\r\n childrenCopy.reverse();\r\n }\r\n // GRID PRECALCULATIONS\r\n if (this.layout == \"grid\") {\r\n minCellWidth = maxWidth;\r\n maxCellWidth = 1;\r\n for (var i = 0, len = childrenCopy.length; i < len; i++) {\r\n var child = childrenCopy[i];\r\n if (child.isMeasured && !child.disabled && !child.__disabled) {\r\n var childMeasuredWidth = child.measuredWidth;\r\n if (childMeasuredWidth < minCellWidth) {\r\n minCellWidth = childMeasuredWidth;\r\n }\r\n if (childMeasuredWidth > maxCellWidth) {\r\n maxCellWidth = childMeasuredWidth;\r\n }\r\n }\r\n }\r\n minCellWidth = $math.fitToRange(minCellWidth, 1, maxWidth);\r\n maxCellWidth = $math.fitToRange(maxCellWidth, 1, maxWidth);\r\n if (this.fixedWidthGrid) {\r\n columnCount = maxWidth / maxCellWidth;\r\n }\r\n else {\r\n columnCount = maxWidth / minCellWidth; // predicted number of columns, yes it is usually much more than real number, but we fix that later\r\n }\r\n columnCount = $math.max(1, Math.floor(columnCount));\r\n columnCount = $math.min(this.maxColumns, columnCount);\r\n columnWidth = this.getColumnWidth(childrenCopy, columnCount, maxCellWidth);\r\n }\r\n var contentLeft;\r\n var contentRight;\r\n var contentTop;\r\n var contentBottom;\r\n // we itterate through array of children\r\n // TODO use iterator instead\r\n for (var i = 0, len = childrenCopy.length; i < len; i++) {\r\n var child = childrenCopy[i];\r\n if (child.isMeasured && !child.disabled && !child.__disabled) {\r\n var x = undefined; //child.pixelX; // must reset\r\n var y = undefined; //child.pixelY; // must reset\r\n var childMarginLeft = child.pixelMarginLeft;\r\n var childMarginRight = child.pixelMarginRight;\r\n var childMarginTop = child.pixelMarginTop;\r\n var childMarginBottom = child.pixelMarginBottom;\r\n var childWidth = child.measuredWidth;\r\n var childHeight = child.measuredHeight;\r\n var childLeft = void 0;\r\n var childRight = void 0;\r\n var childTop = void 0;\r\n var childBottom = void 0;\r\n switch (this.layout) {\r\n case \"none\":\r\n break;\r\n // absolute layout\r\n case \"absolute\":\r\n // horizontal alignment\r\n switch (child.align) {\r\n case \"left\":\r\n x = childMarginLeft - child.maxLeft;\r\n break;\r\n case \"center\":\r\n x = (innerWidth - childWidth) / 2 - child.maxLeft;\r\n break;\r\n case \"right\":\r\n x = innerWidth - childMarginRight - child.maxRight;\r\n break;\r\n default:\r\n if (!(child.x instanceof Percent)) {\r\n x = child.pixelX;\r\n }\r\n break;\r\n }\r\n // vertical alignment\r\n switch (child.valign) {\r\n case \"top\":\r\n y = childMarginTop - child.maxTop;\r\n break;\r\n case \"middle\":\r\n y = (innerHeight - childHeight) / 2 - child.maxTop;\r\n break;\r\n case \"bottom\":\r\n y = innerHeight - childMarginBottom - child.maxBottom;\r\n break;\r\n default:\r\n if (!(child.y instanceof Percent)) {\r\n y = child.pixelY;\r\n }\r\n break;\r\n }\r\n break;\r\n // vertical layout\r\n case \"vertical\":\r\n //if ($type.isNumber(child.relativeHeight)) {\r\n //\tchildHeight = child.maxHeight;\r\n //}\r\n switch (child.align) {\r\n case \"left\":\r\n x = childMarginLeft - child.maxLeft;\r\n break;\r\n case \"center\":\r\n x = (innerWidth - childWidth) / 2 - child.maxLeft;\r\n break;\r\n case \"right\":\r\n x = innerWidth - childMarginRight - child.maxRight;\r\n break;\r\n default:\r\n x = child.pixelX;\r\n break;\r\n }\r\n y = nextY + childMarginTop - child.maxTop;\r\n nextY = y + child.maxBottom + childMarginBottom;\r\n break;\r\n // horizontal layout\r\n case \"horizontal\":\r\n //if ($type.isNumber(child.relativeHeight)) {\r\n //\tchildHeight = child.maxHeight;\r\n //}\r\n switch (child.valign) {\r\n case \"top\":\r\n y = childMarginTop - child.maxTop;\r\n break;\r\n case \"middle\":\r\n y = (innerHeight - childHeight) / 2 - child.maxTop;\r\n break;\r\n case \"bottom\":\r\n y = innerHeight - childMarginBottom - child.maxBottom;\r\n break;\r\n default:\r\n y = child.pixelY;\r\n break;\r\n }\r\n x = nextX + childMarginLeft - child.maxLeft;\r\n nextX = x + child.maxRight + childMarginRight;\r\n break;\r\n case \"grid\":\r\n x = nextX + childMarginLeft - child.maxLeft;\r\n switch (child.valign) {\r\n case \"top\":\r\n y = nextY + childMarginTop - child.maxTop;\r\n break;\r\n case \"middle\":\r\n y = nextY + (innerHeight - childHeight) / 2 - child.maxTop;\r\n break;\r\n case \"bottom\":\r\n y = nextY + innerHeight - childMarginBottom - child.maxBottom;\r\n break;\r\n default:\r\n y = nextY - child.maxTop;\r\n break;\r\n }\r\n nextX += columnWidth[column];\r\n rowHeight[row] = $math.max(rowHeight[row], childHeight);\r\n column++;\r\n var nextColumnWidth = columnWidth[column];\r\n if (!$type.isNumber(nextColumnWidth)) {\r\n nextColumnWidth = maxCellWidth;\r\n }\r\n if (nextX > $math.min(this.innerWidth, maxWidth) - nextColumnWidth + 1 && column < columnCount) {\r\n columnCount = column;\r\n nextX = 0;\r\n nextY = 0;\r\n row = 0;\r\n column = 0;\r\n columnWidth = this.getColumnWidth(childrenCopy, columnCount, maxCellWidth);\r\n rowHeight = [];\r\n i = -1;\r\n continue;\r\n }\r\n if (column >= columnCount) {\r\n column = 0;\r\n nextY += rowHeight[row];\r\n row++;\r\n nextX = 0;\r\n }\r\n break;\r\n }\r\n if (this.layout !== \"none\") {\r\n child.moveTo({ x: x, y: y }); // must use moveTo, otherwise x/y set in percent won't work\r\n childLeft = x + child.maxLeft - childMarginLeft;\r\n childRight = x + child.maxRight + childMarginRight;\r\n childTop = y + child.maxTop - childMarginTop;\r\n childBottom = y + child.maxBottom + childMarginBottom;\r\n if (childRight > right || !$type.isNumber(right)) {\r\n right = childRight;\r\n }\r\n if (childLeft < left || !$type.isNumber(left)) {\r\n left = childLeft;\r\n }\r\n if (childTop < top || !$type.isNumber(top)) {\r\n top = childTop;\r\n }\r\n if (childBottom > bottom || !$type.isNumber(bottom)) {\r\n bottom = childBottom;\r\n }\r\n if (childRight > contentRight || !$type.isNumber(contentRight)) {\r\n contentRight = childRight;\r\n }\r\n if (childLeft < contentLeft || !$type.isNumber(contentLeft)) {\r\n contentLeft = childLeft;\r\n }\r\n if (childTop < contentTop || !$type.isNumber(contentTop)) {\r\n contentTop = childTop;\r\n }\r\n if (childBottom > contentBottom || !$type.isNumber(contentBottom)) {\r\n contentBottom = contentBottom;\r\n }\r\n }\r\n }\r\n else {\r\n child.validatePosition();\r\n }\r\n }\r\n if (this.layout == \"none\") {\r\n var noneBBox = this.bbox;\r\n left = noneBBox.x;\r\n right = noneBBox.x + noneBBox.width;\r\n top = noneBBox.y;\r\n bottom = noneBBox.y + noneBBox.height;\r\n }\r\n if (!$type.isNumber(left)) {\r\n left = 0;\r\n contentLeft = 0;\r\n }\r\n if (!$type.isNumber(right)) {\r\n right = this._availableWidth;\r\n contentRight = right;\r\n }\r\n if (!$type.isNumber(top)) {\r\n top = 0;\r\n contentTop = 0;\r\n }\r\n if (!$type.isNumber(bottom)) {\r\n bottom = this._availableHeight;\r\n contentBottom = bottom;\r\n }\r\n if (!$type.isNumber(contentTop)) {\r\n contentTop = 0;\r\n }\r\n if (!$type.isNumber(contentBottom)) {\r\n contentBottom = contentTop;\r\n }\r\n if (!$type.isNumber(contentLeft)) {\r\n contentLeft = 0;\r\n }\r\n if (!$type.isNumber(contentRight)) {\r\n contentRight = contentLeft;\r\n }\r\n measuredWidth = right - left;\r\n measuredHeight = bottom - top;\r\n if ($type.isNumber(this.relativeWidth)) {\r\n measuredWidth = maxWidth - paddingLeft - paddingRight;\r\n left = 0;\r\n right = measuredWidth;\r\n }\r\n if ($type.isNumber(this.relativeHeight)) {\r\n measuredHeight = maxHeight - paddingTop - paddingBottom;\r\n top = 0;\r\n bottom = measuredHeight;\r\n }\r\n if ($type.isNumber(this._pixelWidth)) {\r\n left = 0;\r\n measuredWidth = this._pixelWidth - paddingLeft - paddingRight;\r\n }\r\n if ($type.isNumber(minWidth) && measuredWidth < minWidth) {\r\n left = 0;\r\n measuredWidth = this.minWidth - paddingLeft - paddingRight;\r\n }\r\n if ($type.isNumber(this._pixelHeight)) {\r\n top = 0;\r\n measuredHeight = this._pixelHeight - paddingTop - paddingBottom;\r\n }\r\n if ($type.isNumber(minHeight) && measuredHeight < minHeight) {\r\n top = 0;\r\n measuredHeight = minHeight - paddingTop - paddingBottom;\r\n }\r\n var measuredContentWidth = contentRight - contentLeft;\r\n var measuredContentHeight = contentBottom - contentTop;\r\n /// handle content alignment\r\n if (this.layout != \"none\" && (this.contentAlign || this.contentValign) && children.length > 0) {\r\n var dx_1;\r\n var dy_1;\r\n var mwa = measuredWidth;\r\n var mha = measuredHeight;\r\n if (mwa < measuredContentWidth) {\r\n mwa = measuredContentWidth;\r\n }\r\n if (mha < measuredContentHeight) {\r\n mha = measuredContentHeight;\r\n }\r\n if (this.contentAlign == \"center\") {\r\n dx_1 = (mwa - measuredContentWidth) / 2;\r\n }\r\n if (this.contentAlign == \"right\") {\r\n dx_1 = mwa - measuredContentWidth;\r\n }\r\n if (this.contentValign == \"middle\") {\r\n dy_1 = (mha - measuredContentHeight) / 2;\r\n }\r\n if (this.contentValign == \"bottom\") {\r\n dy_1 = mha - measuredContentHeight;\r\n }\r\n if ($type.isNumber(dx_1)) {\r\n $iter.each(children.iterator(), function (child) {\r\n var childLeft = child.maxLeft;\r\n var ddx = dx_1;\r\n if (_this.layout == \"horizontal\") {\r\n child.x = child.pixelX + ddx;\r\n }\r\n // individual grid elements can not be aligned vertically, that's why it's different from horizontal\r\n if (_this.layout == \"grid\") {\r\n child.x = child.pixelX + ddx;\r\n }\r\n if (_this.layout == \"vertical\") {\r\n ddx += child.pixelMarginLeft;\r\n if (child.align == \"none\") {\r\n child.x = ddx - childLeft;\r\n }\r\n }\r\n if (_this.layout == \"absolute\") {\r\n ddx += child.pixelMarginLeft;\r\n if (child.align == \"none\") {\r\n child.x = ddx - childLeft;\r\n }\r\n }\r\n });\r\n }\r\n if ($type.isNumber(dy_1)) {\r\n $iter.each(children.iterator(), function (child) {\r\n var childTop = child.maxTop;\r\n var ddy = dy_1;\r\n if (_this.layout == \"horizontal\") {\r\n ddy += child.pixelMarginTop;\r\n if (child.valign == \"none\") {\r\n child.y = ddy - childTop;\r\n }\r\n }\r\n // individual grid elements can not be aligned vertically, that's why it's different from horizontal\r\n if (_this.layout == \"grid\") {\r\n ddy += child.pixelMarginTop;\r\n child.y = ddy - childTop;\r\n }\r\n if (_this.layout == \"vertical\") {\r\n child.y = child.pixelY + ddy;\r\n }\r\n if (_this.layout == \"absolute\") {\r\n ddy += child.pixelMarginTop;\r\n if (child.valign == \"none\") {\r\n child.y = ddy - childTop;\r\n }\r\n }\r\n });\r\n }\r\n }\r\n var oldBBox = this.bbox;\r\n // this will mess up maxw/maxh set by container layout, we need a separate min/maxwidth for users\r\n // this prevents invalidating layout in such cases as scrolling category axis, when labels go outside bounds and results transformed event\r\n // todo: need to check if this doesn't cause other problems.\r\n //if (this.maxWidth > 0) {\r\n //measuredWidth = $math.min(measuredWidth, this.maxWidth);\r\n //measuredWidth = $math.max(measuredWidth, this.minWidth);\r\n //}\r\n //if (this.maxHeight > 0) {\r\n //measuredHeight = $math.min(measuredHeight, this.maxHeight);\r\n //measuredHeight = $math.max(measuredHeight, this.minHeight);\r\n //}\r\n measuredWidth = $math.max(measuredWidth, minWidth);\r\n measuredHeight = $math.max(measuredHeight, minHeight);\r\n this.contentWidth = measuredWidth;\r\n this.contentHeight = measuredHeight;\r\n // new\r\n measuredWidth = $math.min(measuredWidth, maxWidth);\r\n measuredHeight = $math.min(measuredHeight, maxHeight);\r\n this._bbox = { x: left, y: top, width: measuredWidth, height: measuredHeight };\r\n var prevLeft = this.maxLeft;\r\n var prevTop = this.maxTop;\r\n var prevBotttom = this.maxBottom;\r\n var prevRight = this.maxRight;\r\n this.measure();\r\n if (prevLeft != this.maxLeft || prevRight != this.maxRight || prevTop != this.maxTop || prevBotttom != this.maxBottom) {\r\n if (this.events.isEnabled(\"transformed\")) {\r\n var event_1 = {\r\n type: \"transformed\",\r\n target: this\r\n };\r\n if (oldBBox) {\r\n event_1.dummyData = oldBBox.width + \" \" + measuredWidth + \" \" + oldBBox.height + \" \" + measuredHeight;\r\n }\r\n this.events.dispatchImmediately(\"transformed\", event_1);\r\n }\r\n }\r\n this.dispatchImmediately(\"layoutvalidated\");\r\n };\r\n /**\r\n * Positions element according its center settings.\r\n *\r\n * @todo Description (review)\r\n * @ignore Exclude from docs\r\n */\r\n Container.prototype.updateCenter = function () {\r\n _super.prototype.updateCenter.call(this);\r\n this.updateBackground();\r\n };\r\n /**\r\n * Update the background to fit into specific dimensions.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Make it protected?\r\n */\r\n Container.prototype.updateBackground = function () {\r\n var background = this._background; // accessing protected, as getter creates instance if it doesn't exist\r\n if (background) {\r\n background.x = this.maxLeft;\r\n background.y = this.maxTop;\r\n background.width = this.maxRight - this.maxLeft;\r\n background.height = this.maxBottom - this.maxTop;\r\n }\r\n };\r\n /**\r\n * Returns widths of all columns in a horizontal Container layout.\r\n *\r\n * @ignore Exclude from docs\r\n * @param columnCount Number of columns\r\n * @param maxCellWidth Maximum width of one grid cell\r\n * @return An array of column widths\r\n */\r\n Container.prototype.getColumnWidth = function (children, columnCount, maxCellWidth) {\r\n var _this = this;\r\n var columnWidth = [];\r\n var column = 0;\r\n $array.each(children, function (child) {\r\n if (child.isMeasured && !child.disabled && !child.__disabled) {\r\n if (_this.fixedWidthGrid) {\r\n columnWidth[column] = maxCellWidth;\r\n }\r\n else {\r\n columnWidth[column] = $math.max(columnWidth[column], child.measuredWidth + child.pixelMarginRight + child.pixelMarginLeft);\r\n }\r\n column++;\r\n if (column == columnCount) {\r\n column = 0;\r\n }\r\n }\r\n });\r\n return columnWidth;\r\n };\r\n Object.defineProperty(Container.prototype, \"layout\", {\r\n /**\r\n * @return Layout\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"layout\");\r\n },\r\n /**\r\n * Container layout.\r\n *\r\n * Options: \"absolute\" (default), \"vertical\", \"horizontal\", \"grid\", \"none\". \"none\" is quite the same as \"absolute\" - the objects will\r\n * be positioned at their x, y coordinates, the difference is that with \"absolute\" you can still use align/valign for children and with \"none\" you can not.\r\n * Use \"none\" as much as you can as it's most cpu-saving layout.\r\n *\r\n * @default \"absolute\"\r\n * @param value Layout\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"layout\", value)) {\r\n this.invalidateLayout();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Container.prototype, \"contentValign\", {\r\n /**\r\n * @return Vertical alignment\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"contentValign\");\r\n },\r\n /**\r\n * Vertical alignment of the elements for the vertical Container.\r\n *\r\n * This is used when Container is larger than the height of all its children.\r\n *\r\n * @param value vertical alignment\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"contentValign\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Container.prototype, \"contentAlign\", {\r\n /**\r\n * @return Horizontal alignment\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"contentAlign\");\r\n },\r\n /**\r\n * Horizontal alignment of the elements for the horizontal Container.\r\n *\r\n * This is used when Container is larger than the height of all its children.\r\n *\r\n * @param value Horizontal alignment\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"contentAlign\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Container.prototype, \"fixedWidthGrid\", {\r\n /**\r\n * @return Should use fixed width grid?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"fixedWidthGrid\");\r\n },\r\n /**\r\n * Controls if the grid of the Container should use fixed width. Fixed width\r\n * grid will divide available space to all its columns/rows equally, without\r\n * adapting to actual child sizes or size requirements.\r\n *\r\n * @default false\r\n * @param value Should use fixed width grid?\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"fixedWidthGrid\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Container.prototype, \"maxColumns\", {\r\n /**\r\n * @return Should use fixed width grid?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"maxColumns\");\r\n },\r\n /**\r\n * Maximum number of columns (when using `\"grid\"` layout).\r\n *\r\n * @param value Should use fixed width grid?\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"maxColumns\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Container.prototype, \"reverseOrder\", {\r\n /**\r\n * @return Reverse children?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"reverseOrder\");\r\n },\r\n /**\r\n * If set to `true`, the children of the container will be drawn in reverse\r\n * order.\r\n *\r\n * @default false\r\n * @param value Reverse children?\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"reverseOrder\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Container.prototype, \"setStateOnChildren\", {\r\n /**\r\n * @return Set state on children\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"setStateOnChildren\");\r\n },\r\n /**\r\n * Specifies if, when state is applied on this container, the same state\r\n * should be applied to container's children as well as `background`.\r\n *\r\n * @default false\r\n * @param value Set state on children\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"setStateOnChildren\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Checks if point is within bounds of a container.\r\n *\r\n * @param point A coordinate to check\r\n * @return `true` if it fits within container\r\n */\r\n Container.prototype.fitsToBounds = function (point) {\r\n var x = point.x;\r\n var y = point.y;\r\n var deviation = 0.5; // sometimes coordinates are rounded to numbers like .999 so we add deviation here\r\n if (x >= -deviation && x <= this.pixelWidth + deviation && y >= -deviation && y <= this.pixelHeight + deviation) {\r\n return true;\r\n }\r\n else {\r\n return false;\r\n }\r\n };\r\n /**\r\n * Copies all properties from different Container, including background\r\n * clone.\r\n *\r\n * @param source Source Container to copy from\r\n */\r\n Container.prototype.copyFrom = function (source) {\r\n var _this = this;\r\n _super.prototype.copyFrom.call(this, source);\r\n this.layout = source.layout;\r\n this.setStateOnChildren = source.setStateOnChildren;\r\n if (source._background) {\r\n this.background = source._background.clone();\r\n this.background.copyFrom(source._background); // won't work without this\r\n }\r\n $iter.each(source.children.iterator(), function (child) {\r\n if (child.shouldClone) {\r\n var clonedChild = child.clone();\r\n clonedChild.parent = _this;\r\n }\r\n });\r\n };\r\n Object.defineProperty(Container.prototype, \"preloader\", {\r\n /**\r\n * @return Preloader instance\r\n */\r\n get: function () {\r\n var preloader = this._preloader;\r\n if (preloader) {\r\n return preloader;\r\n }\r\n else if (this.parent) {\r\n return this.parent.preloader;\r\n }\r\n },\r\n /**\r\n * A [[Preloader]] instance to be used when Container is busy.\r\n *\r\n * @param preloader Preloader instance\r\n */\r\n set: function (preloader) {\r\n if (this._preloader) {\r\n this.removeDispose(this._preloader);\r\n }\r\n this._preloader = preloader;\r\n if (preloader) {\r\n preloader.parent = this.tooltipContainer;\r\n this._disposers.push(preloader);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Sets [[Paper]] instance to use to draw elements.\r\n * @ignore\r\n * @param paper Paper\r\n * @return true if paper was changed, false, if it's the same\r\n */\r\n Container.prototype.setPaper = function (paper) {\r\n var _this = this;\r\n var changed = _super.prototype.setPaper.call(this, paper);\r\n if (changed) {\r\n if (this._background) {\r\n this._background.paper = paper;\r\n this._background.topParent = this.topParent;\r\n }\r\n this.children.each(function (child) {\r\n child.setPaper(paper);\r\n child.topParent = _this.topParent;\r\n });\r\n }\r\n return changed;\r\n };\r\n /**\r\n * Removes Container from the system-wide list of invalid Containers.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Container.prototype.removeFromInvalids = function () {\r\n _super.prototype.removeFromInvalids.call(this);\r\n registry.removeFromInvalidLayouts(this);\r\n };\r\n /**\r\n * Sets a [[DataItem]] to be used as data for the Container.\r\n *\r\n * @todo Description\r\n * @param dataItem DataItem\r\n */\r\n Container.prototype.setDataItem = function (dataItem) {\r\n // this place is potentially dangerous, as if we set datItem for some dummy container, all children dataItems will be overriden\r\n // the main reason for doing this is that we need a setDataItem code to be called for each sprite, otherwise property fields won't be\r\n // applied. Also, getting dataItem from parent all the time is more expensive than saving value.\r\n if (this._dataItem != dataItem) {\r\n $iter.each(this.children.iterator(), function (child) {\r\n child.dataItem = dataItem;\r\n });\r\n if (this._background) {\r\n this._background.dataItem = dataItem;\r\n }\r\n }\r\n _super.prototype.setDataItem.call(this, dataItem);\r\n };\r\n /**\r\n * Measures the element.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Container.prototype.measureElement = function () {\r\n if (this.disabled || this.isTemplate || this.layout == \"none\" || this.__disabled) {\r\n // void\r\n }\r\n else {\r\n this.validateLayout();\r\n }\r\n };\r\n Object.defineProperty(Container.prototype, \"fontFamily\", {\r\n /**\r\n * @return Font family\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"fontFamily\");\r\n },\r\n /**\r\n * Font family to be used for the text.\r\n *\r\n * Parts of the text may override this setting using in-line formatting.\r\n *\r\n * @param value Font family value\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"fontFamily\", value, true)) {\r\n this.setSVGAttribute({ \"font-family\": value });\r\n this.invalidateLabels();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Container.prototype, \"fontSize\", {\r\n /**\r\n * @return Font size\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"fontSize\");\r\n },\r\n /**\r\n * Font size to be used for the text. The size can either be numeric, in\r\n * pixels, or other measurements.\r\n *\r\n * Parts of the text may override this setting using in-line formatting.\r\n *\r\n * @param value Font size value\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"fontSize\", value, true)) {\r\n this.setSVGAttribute({ \"font-size\": value });\r\n this.invalidateLabels();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * When fontSize of fontFamily changes we need to hard-invalidate all Labels of this container to position them properly.\r\n */\r\n Container.prototype.invalidateLabels = function () {\r\n this.children.each(function (child) {\r\n // can't import Label because of Circular dependencies\r\n if (child[\"hardInvalidate\"]) {\r\n child[\"hardInvalidate\"]();\r\n // this fixes firefox and viewport issue\r\n child.events.once(\"validated\", child.handleValidate, child, false);\r\n }\r\n else if (child instanceof Container) {\r\n child.invalidateLabels();\r\n }\r\n });\r\n };\r\n Object.defineProperty(Container.prototype, \"fontWeight\", {\r\n /**\r\n * @return Font weight\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"fontWeight\");\r\n },\r\n /**\r\n * Font weight to use for text.\r\n *\r\n * Parts of the text may override this setting using in-line formatting.\r\n *\r\n * @param value Font weight\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"fontWeight\", value);\r\n this.setSVGAttribute({ \"font-weight\": value });\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Container.prototype, \"textDecoration\", {\r\n /**\r\n * @return Decoration\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"textDecoration\");\r\n },\r\n /**\r\n * A text decoration to use for text.\r\n *\r\n * Parts of the text may override this setting using in-line formatting.\r\n *\r\n * @param value Decoration\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"textDecoration\", value);\r\n this.setSVGAttribute({ \"text-decoration\": value });\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Disposes (destroys) the element and all its children.\r\n */\r\n Container.prototype.dispose = function () {\r\n if (this._background) {\r\n this._background.dispose();\r\n }\r\n this._shouldBeReady = [];\r\n this.disposeChildren();\r\n _super.prototype.dispose.call(this);\r\n };\r\n /**\r\n * Applies a [[SpriteState]] on this element.\r\n *\r\n * The first parameter can either be a name of the state or a [[SpriteState]]\r\n * instance.\r\n *\r\n * When run, this method will apply SVG properties defined in a\r\n * [[SpriteState]], but only those that are relevant to this particular\r\n * element, that is are listed in its respective `properties` array.\r\n *\r\n * @see {@link SpriteState}\r\n * @param value A state - name key or instance\r\n * @param transitionDuration Duration of the transition between current and new state\r\n * @param easing An easing function\r\n */\r\n Container.prototype.setState = function (value, transitionDuration, easing) {\r\n var stateName = value;\r\n if (value instanceof SpriteState) {\r\n stateName = value.name;\r\n }\r\n if (this.setStateOnChildren) {\r\n $iter.each(this.children.iterator(), function (child) {\r\n child.setState(stateName, transitionDuration, easing);\r\n // not good to set it in child setState\r\n if (stateName != \"active\") {\r\n child.isActive = false;\r\n }\r\n });\r\n }\r\n if (this._background) {\r\n this._background.setState(stateName);\r\n }\r\n if (this.setStateOnSprites.length) {\r\n $array.each(this.setStateOnSprites, function (item) {\r\n item.setState(stateName, transitionDuration, easing);\r\n });\r\n }\r\n return _super.prototype.setState.call(this, value, transitionDuration, easing);\r\n };\r\n // otherwise isActive won't work properly with background\r\n Container.prototype.setActive = function (value) {\r\n _super.prototype.setActive.call(this, value);\r\n if (this._background) {\r\n this._background.isActive = value;\r\n }\r\n };\r\n /**\r\n * Dispatches ready event. Dispatches when all children are ready.\r\n */\r\n Container.prototype.dispatchReady = function () {\r\n var _this = this;\r\n if (!this.isReady() && !this.isDisposed()) {\r\n var allReady_1 = true;\r\n $iter.eachContinue(this.children.iterator(), function (sprite) {\r\n if (!sprite.__disabled && !sprite.disabled && !sprite.isReady()) {\r\n allReady_1 = false;\r\n return false;\r\n }\r\n else {\r\n return true;\r\n }\r\n });\r\n $array.eachContinue(this._shouldBeReady, function (sprite) {\r\n if (!sprite.__disabled && !sprite.disabled && !sprite.isReady()) {\r\n allReady_1 = false;\r\n return false;\r\n }\r\n else {\r\n return true;\r\n }\r\n });\r\n if (allReady_1) {\r\n _super.prototype.dispatchReady.call(this);\r\n }\r\n else {\r\n registry.events.once(\"exitframe\", function () {\r\n _this.dispatchReady();\r\n system.requestFrame();\r\n }, undefined, false);\r\n }\r\n }\r\n };\r\n /**\r\n * Called during the System.update method\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Container.prototype._systemUpdate = function (skippedSprites) {\r\n this.children.each(function (child) {\r\n if (child.invalid) {\r\n if (!child._systemCheckIfValidate()) {\r\n skippedSprites.push(child);\r\n }\r\n else if (child.dataItem && child.dataItem.component && child.dataItem.component.dataInvalid) {\r\n skippedSprites.push(child);\r\n }\r\n else {\r\n child.validate();\r\n }\r\n }\r\n });\r\n _super.prototype._systemUpdate.call(this, skippedSprites);\r\n };\r\n /**\r\n * Called during the System.validatePositions method\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Container.prototype._systemValidatePositions = function () {\r\n this.children.each(function (sprite) {\r\n if (sprite.positionInvalid) {\r\n sprite.validatePosition();\r\n }\r\n });\r\n _super.prototype._systemValidatePositions.call(this);\r\n };\r\n /**\r\n * Called during the System.validateLayouts method\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Container.prototype._systemValidateLayouts = function () {\r\n if (this.layoutInvalid && !this.isDisposed()) {\r\n this.validateLayout();\r\n }\r\n };\r\n Object.defineProperty(Container.prototype, \"tapToActivate\", {\r\n /**\r\n * @return Enable touch protection?\r\n */\r\n get: function () {\r\n return this._tapToActivate;\r\n },\r\n /**\r\n * If set to `true` the chart's regular touch functionality will be suspended\r\n * so that the whole page it is located in remains scrollable, even when\r\n * swiping over the chart's body.\r\n *\r\n * User will need to tap the chart in order to activate its regular touch\r\n * functionality.\r\n *\r\n * The chart will remain \"active\" as long as user keeps interacting with the\r\n * chart. After `tapTimeout` milliseconds the chart will return to its\r\n * \"protected\" mode.\r\n *\r\n * @default false\r\n * @since 4.4.0\r\n * @param value Enable touch protection?\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/touch/} For more information.\r\n */\r\n set: function (value) {\r\n if (this._tapToActivate != value) {\r\n this.setTapToActivate(value);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Container.prototype.setTapToActivate = function (value) {\r\n var _this = this;\r\n this._tapToActivate = value;\r\n this.interactions.isTouchProtected = value;\r\n // setEventDisposer will also remove listeners if value == false\r\n if (value) {\r\n this.interactions.setEventDisposer(\"container-tapToActivate\", value, function () { return new MultiDisposer([\r\n _this.events.on(\"hit\", _this.handleTapToActivate, _this, false),\r\n _this.events.on(\"down\", _this.initTapTimeout, _this, false),\r\n _this.events.on(\"track\", _this.initTapTimeout, _this, false),\r\n //this.events.on(\"drag\", this.initTapTimeout, this, false),\r\n getInteraction().body.events.on(\"down\", function (ev) {\r\n if (!getInteraction().isLocalElement(ev.pointer, _this.paper.svg, _this.uid)) {\r\n _this.handleTapToActivateDeactivation();\r\n }\r\n }, _this, false)\r\n ]); });\r\n }\r\n getInteraction();\r\n };\r\n /**\r\n * @todo Ignore on non-touch events\r\n */\r\n Container.prototype.handleTapToActivate = function () {\r\n this.interactions.isTouchProtected = false;\r\n this.initTapTimeout();\r\n };\r\n Container.prototype.handleTapToActivateDeactivation = function () {\r\n this.interactions.isTouchProtected = true;\r\n };\r\n Container.prototype.initTapTimeout = function () {\r\n var _this = this;\r\n if (this._tapToActivateTimeout) {\r\n this._tapToActivateTimeout.dispose();\r\n }\r\n if (this.tapToActivate && !this.interactions.isTouchProtected && this.tapTimeout) {\r\n this._tapToActivateTimeout = this.setTimeout(function () {\r\n _this.handleTapToActivateDeactivation();\r\n }, this.tapTimeout);\r\n }\r\n };\r\n /**\r\n * Moves the whole chart to other HTML container.\r\n *\r\n * `htmlElement` can either be a reference to a DOM element, or an id of\r\n * such element.\r\n *\r\n * @since 4.9.24\r\n * @param htmlElement Target element\r\n */\r\n Container.prototype.moveHtmlContainer = function (htmlElement) {\r\n var newContainer = $dom.getElement(htmlElement);\r\n if (newContainer) {\r\n this.htmlContainer = newContainer;\r\n var svgDiv = this.svgContainer;\r\n svgDiv.htmlElement = newContainer;\r\n svgDiv.htmlElement.appendChild(svgDiv.SVGContainer);\r\n svgDiv.initSensor();\r\n svgDiv.measure();\r\n }\r\n else if ($type.isString(htmlElement) && htmlElement != \"\") {\r\n system.log(\"html container '\" + htmlElement + \"' not found\");\r\n //throw new Error(\"html container not found\");\r\n }\r\n };\r\n /**\r\n * @ignore\r\n * @return Has license?\r\n */\r\n Container.prototype.hasLicense = function () {\r\n if (options.commercialLicense) {\r\n return true;\r\n }\r\n for (var i = 0; i < options.licenses.length; i++) {\r\n if (options.licenses[i].match(/^CH.{5,}/i)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n };\r\n return Container;\r\n}(Sprite));\r\nexport { Container };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"Container\"] = Container;\r\n","/**\r\n * Defines functionality for \"Data Item\"\r\n *\r\n * A Data Item can be any object that can hold data. For example [[LineSeries]]\r\n * holds a number of values, that comprise a line graph. Each of those values\r\n * (data points) is a {DataItem}.\r\n *\r\n * Furthermore the [[LineSeries]] itself can be represented as a entry in the\r\n * legend. Since legend needs access to Line Series' value, a DataItem is\r\n * created for the series.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { BaseObjectEvents } from \"./Base\";\r\nimport { Adapter } from \"./utils/Adapter\";\r\nimport { Animation, AnimationDisposer } from \"./utils/Animation\";\r\nimport * as $utils from \"./utils/Utils\";\r\nimport * as $array from \"./utils/Array\";\r\n//import * as $object from \"./utils/Object\";\r\nimport * as $type from \"./utils/Type\";\r\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * DataItem represents single element in data, for example a data point in a\r\n * Serial Chart Series, e.g. a column.\r\n *\r\n * DataItem defines relationship between structured data, required for specific\r\n * chart type or task, and raw source data.\r\n *\r\n * It also implements required calculations, updates related visual elements,\r\n * etc.\r\n *\r\n * @todo Description\r\n * @important\r\n */\r\nvar DataItem = /** @class */ (function (_super) {\r\n __extends(DataItem, _super);\r\n /**\r\n * Constructor\r\n * @todo Adding events to disposers produces errors in some cases, which means that chart is using disposed Data Items which is not right\r\n */\r\n function DataItem() {\r\n var _this = _super.call(this) || this;\r\n /**\r\n * This Data Item is currently disabled.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n _this._disabled = false;\r\n /**\r\n * Indicates whether Data Item has any properties set.\r\n *\r\n * If it does not have any, the code can use this property to check whether\r\n * they need to apply costly operation of re-applying properties, whenever\r\n * Data Item-related element is redrawn, e.g. series.\r\n */\r\n _this.hasProperties = false;\r\n /**\r\n * An object containing calculated values.\r\n */\r\n _this.values = {};\r\n /**\r\n * An object container current working values.\r\n */\r\n //public readonly workingValues: { [index: string]: { [index: string]: number } } = {};\r\n /**\r\n * An object containing categories.\r\n */\r\n _this.categories = {};\r\n /**\r\n * An object containing dates.\r\n */\r\n _this.dates = {};\r\n /**\r\n * An object containing locations for the Data Item.\r\n *\r\n * A location is a position within date or category, or, in some other cases,\r\n * where there is no single point but rather some period.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/series/#Data_item_locations} for info how data item locations work\r\n */\r\n _this.locations = {};\r\n /**\r\n * Current working locations.\r\n */\r\n _this.workingLocations = {};\r\n /**\r\n * An object containing Data Item specific appearance properties in key-value\r\n * pairs.\r\n *\r\n * Sometimes a single Data Item needs to apply different properties than the\r\n * rest of the data [[Series]] it is part of. E.g. a single column,\r\n * represented by a Data Item needs to be filled with a different color than\r\n * the reset of the [[ColumnSeries]] it belongs to.\r\n *\r\n * That's where Data Item's `properties` come into play.\r\n *\r\n * Please note that you should set Data Item-specific properties using\r\n * `setProperty()` method, rather than access `properties` object directly.\r\n */\r\n _this.properties = {};\r\n /**\r\n * A list of [[Sprite]] elements that are associated with this Data Item.\r\n *\r\n * E.g. an [[Axis]] Data Item has several separate elements associated with\r\n * it, like [[AxisTick]], [[AxisLabel]], and [[Grid]].\r\n *\r\n * Data Item keeps track of all of them, so it can toggle all related visual\r\n * elements when it itself is toggled.\r\n */\r\n _this.sprites = [];\r\n /**\r\n * Identifies if this object is a \"template\" and should not be treated as\r\n * real object that is drawn or actually used in the chart.\r\n */\r\n _this.isTemplate = false;\r\n /**\r\n * The current index within the dataItems\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n _this._index = null;\r\n /**\r\n * Is Data Item currently visible?\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n _this._visible = true;\r\n /**\r\n * Is Data Item currently hidden?\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n _this._hidden = false;\r\n /**\r\n * Should this Data Item be used when calculating data ranges and scales?\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n _this._ignoreMinMax = false;\r\n /**\r\n * Some of the Data Item's data fields may contain an array of children. This\r\n * property contains an object indicating which fields hold an array, so that\r\n * they can be processed properly.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n _this.hasChildren = {};\r\n /**\r\n * Indicates whether Data Item is currently animiting from visible to hidden\r\n * state.\r\n */\r\n _this.isHiding = false;\r\n /**\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n _this._valueAnimations = {};\r\n /**\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n _this._locationAnimations = {};\r\n _this.className = \"DataItem\";\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n Object.defineProperty(DataItem.prototype, \"adapter\", {\r\n /**\r\n * Holds Adapter.\r\n */\r\n get: function () {\r\n if (!this._adapterO) {\r\n this._adapterO = new Adapter(this);\r\n }\r\n return this._adapterO;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DataItem.prototype, \"index\", {\r\n /**\r\n * Data Item's position index in Component's data.\r\n *\r\n * @return Index\r\n */\r\n get: function () {\r\n if (this.component) {\r\n if (this._index != null) {\r\n return this._index;\r\n }\r\n else {\r\n return -1;\r\n }\r\n }\r\n else {\r\n return -1;\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DataItem.prototype, \"animations\", {\r\n /**\r\n * A list of [[Animations]] objects currently mutating Data Item's values.\r\n *\r\n * @return [description]\r\n */\r\n get: function () {\r\n if (!this._animations) {\r\n this._animations = [];\r\n this._disposers.push(new AnimationDisposer(this._animations));\r\n }\r\n return this._animations;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DataItem.prototype, \"visible\", {\r\n /**\r\n * Returns `true` if this Data Item is currently visible.\r\n *\r\n * @return Visible?\r\n */\r\n get: function () {\r\n if (this._hidden) {\r\n return false;\r\n }\r\n return this._visible;\r\n },\r\n /**\r\n * Sets visibility of the Data Item.\r\n *\r\n * @param value Visible?\r\n */\r\n set: function (value) {\r\n if (value) {\r\n this.hidden = false;\r\n }\r\n if (this._visible != value) {\r\n this.setVisibility(value);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DataItem.prototype, \"hidden\", {\r\n /**\r\n * Returns `true` if this Data Item is currently hidden.\r\n *\r\n * @return Hidden?\r\n */\r\n get: function () {\r\n return this._hidden;\r\n },\r\n /**\r\n * Sets hidden flag for data item. Mostly used to initially hide data item.\r\n *\r\n * @param value Hidden?\r\n */\r\n set: function (value) {\r\n if (this._hidden != value) {\r\n this._hidden = value;\r\n if (value) {\r\n this.setVisibility(false);\r\n }\r\n else {\r\n this.setVisibility(true, true);\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DataItem.prototype, \"__disabled\", {\r\n /**\r\n * Is this Data Item currently disabled?\r\n *\r\n * @ignore Exclude from docs\r\n * @param {boolean}\r\n */\r\n get: function () {\r\n return this._disabled;\r\n },\r\n /**\r\n * Disables all Sprites associated with this Data Item.\r\n *\r\n * @ignore Exclude from docs\r\n * @param {boolean}\r\n */\r\n set: function (value) {\r\n //\tif (this._disabled != value) { // not good\r\n this._disabled = value;\r\n $array.each(this.sprites, function (sprite) {\r\n sprite.__disabled = value;\r\n });\r\n //\t}\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Sets visibility of the Data Item.\r\n *\r\n * @param value Data Item\r\n */\r\n DataItem.prototype.setVisibility = function (value, noChangeValues) {\r\n $array.each(this.sprites, function (sprite) {\r\n if (value) {\r\n sprite.visible = sprite.defaultState.properties.visible;\r\n }\r\n else {\r\n if (sprite.hiddenState) {\r\n sprite.visible = sprite.hiddenState.properties.visible;\r\n }\r\n else {\r\n sprite.visible = false;\r\n }\r\n }\r\n });\r\n this._visible = value;\r\n if (this._eventDispatcher && !this.__disabled) {\r\n if (this.events.isEnabled(\"visibilitychanged\")) {\r\n var event_1 = {\r\n type: \"visibilitychanged\",\r\n target: this,\r\n visible: value\r\n };\r\n this.events.dispatchImmediately(\"visibilitychanged\", event_1);\r\n }\r\n }\r\n };\r\n /**\r\n * Shows the Data Item and related visual elements.\r\n *\r\n * @param duration Animation duration (ms)\r\n * @param delay Delay animation (ms)\r\n * @param fields A list of fields to set values of\r\n */\r\n DataItem.prototype.show = function (duration, delay, fields) {\r\n var _this = this;\r\n if (!this.hidden) {\r\n this.setVisibility(true, true);\r\n this.isHiding = false;\r\n if (this._hideDisposer) {\r\n this.removeDispose(this._hideDisposer);\r\n }\r\n var animation_1;\r\n if (fields) {\r\n $array.each(fields, function (field) {\r\n animation_1 = _this.setWorkingValue(field, _this.values[field].value, duration, delay);\r\n });\r\n }\r\n $array.each(this.sprites, function (sprite) {\r\n var animation = sprite.show(duration);\r\n if (animation != null && !animation.isFinished()) {\r\n _this._disposers.push(animation);\r\n if (delay != null && delay > 0) {\r\n animation.delay(delay);\r\n }\r\n }\r\n });\r\n return animation_1;\r\n }\r\n };\r\n /**\r\n * Destroys this object and all related data.\r\n */\r\n DataItem.prototype.dispose = function () {\r\n _super.prototype.dispose.call(this);\r\n $array.each(this.sprites, function (sprite) {\r\n sprite.dispose();\r\n });\r\n this.sprites = [];\r\n };\r\n /**\r\n * Hides the Data Item and related visual elements.\r\n *\r\n * @param duration Animation duration (ms)\r\n * @param delay Delay animation (ms)\r\n * @param toValue A value to set to `fields` when hiding\r\n * @param fields A list of data fields to set value to `toValue`\r\n */\r\n DataItem.prototype.hide = function (duration, delay, toValue, fields) {\r\n var _this = this;\r\n this.isHiding = true;\r\n $array.each(this.sprites, function (sprite) {\r\n var animation = sprite.hide(duration);\r\n if (animation != null && !animation.isFinished()) {\r\n _this._disposers.push(animation);\r\n if (delay != null && delay > 0) {\r\n animation.delay(delay);\r\n }\r\n }\r\n });\r\n if ($type.isNumber(toValue) && fields) {\r\n var animation_2;\r\n $array.each(fields, function (field) {\r\n var anim = _this.setWorkingValue(field, toValue, duration, delay);\r\n if (anim) {\r\n animation_2 = anim;\r\n }\r\n });\r\n if (animation_2 && !animation_2.isFinished()) {\r\n this._hideDisposer = animation_2.events.on(\"animationended\", function () {\r\n _this.setVisibility(false, true);\r\n _this.isHiding = false;\r\n });\r\n this._disposers.push(this._hideDisposer);\r\n return animation_2;\r\n }\r\n else {\r\n this.isHiding = false;\r\n this.setVisibility(false, true);\r\n }\r\n }\r\n else {\r\n this.isHiding = false;\r\n this.setVisibility(false);\r\n }\r\n };\r\n /**\r\n * Returns a duration (ms) the Data Item should take to animate from one\r\n * value to another.\r\n *\r\n * If the duration is not specified via parameter, this method will try to\r\n * request a default duration from the related `Component`.\r\n *\r\n * @param duration Default duration (ms)\r\n * @return Duration (ms)\r\n */\r\n DataItem.prototype.getDuration = function (duration) {\r\n if (!$type.isNumber(duration)) {\r\n var component = this.component;\r\n if (component) {\r\n duration = component.interpolationDuration;\r\n }\r\n }\r\n if (duration != null) {\r\n if (!this._adapterO) {\r\n return duration;\r\n }\r\n else {\r\n return this._adapterO.apply(\"duration\", duration);\r\n }\r\n }\r\n };\r\n /**\r\n * Returns a numeric value for specific data field.\r\n *\r\n * If `calculated` is not set, it will return a raw value, as it is in\r\n * source data.\r\n *\r\n * If `calculated` is set, it will return a pre-calculated specific value.\r\n *\r\n * @param name Data field name\r\n * @param calculated A calculated value name\r\n * @return Value\r\n */\r\n DataItem.prototype.getValue = function (name, calculated) {\r\n if (name && this.component) {\r\n if (!calculated) {\r\n calculated = this.component.dataFields[name + \"Show\"];\r\n if (!calculated) {\r\n calculated = \"value\";\r\n }\r\n }\r\n var value = this.values[name][calculated];\r\n if (this._adapterO && this._adapterO.isEnabled(\"value\")) {\r\n return this._adapterO.apply(\"value\", {\r\n value: value,\r\n field: name\r\n }).value;\r\n }\r\n else {\r\n return value;\r\n }\r\n }\r\n };\r\n /**\r\n * Returns a current working value for a specific data field.\r\n *\r\n * The actual value may differ from the one returned by `getValue()`. The\r\n * latter returns static values from the data source.\r\n *\r\n * `getWorkingValue()` returns current value, which is usually different if\r\n * Data Item is animating from one state to another.\r\n *\r\n * @param name Data field name\r\n * @return Value\r\n */\r\n DataItem.prototype.getWorkingValue = function (name) {\r\n if (name && this.component) {\r\n var realName = this.component.dataFields[name + \"Show\"];\r\n if (!realName) {\r\n realName = \"workingValue\";\r\n }\r\n if (this._adapterO) {\r\n return this._adapterO.apply(\"workingValue\", {\r\n workingValue: this.values[name][realName],\r\n field: name\r\n }).workingValue;\r\n }\r\n else {\r\n return this.values[name][realName];\r\n }\r\n }\r\n };\r\n /**\r\n * @ignore\r\n * @return Value\r\n */\r\n DataItem.prototype.getActualWorkingValue = function (name) {\r\n return this.values[name].workingValue;\r\n };\r\n /**\r\n * Sets a numeric value for specific data field.\r\n *\r\n * @param name Data field name\r\n * @param value Value\r\n * @param calculated Calculated data field name\r\n * @param duration Duration (ms) to animate to new value to\r\n * @param delay Delay animation (ms)\r\n */\r\n DataItem.prototype.setValue = function (name, value, duration, delay) {\r\n var currentValue = this.values[name].value;\r\n var newDuration = this.getDuration(duration);\r\n value = $type.toNumber(value);\r\n if (currentValue !== value) {\r\n this.values[name].value = value;\r\n if (this._eventDispatcher && !this.__disabled) {\r\n if (this.events.isEnabled(\"valuechanged\")) {\r\n var event_2 = {\r\n type: \"valuechanged\",\r\n target: this,\r\n property: name\r\n };\r\n this.events.dispatchImmediately(\"valuechanged\", event_2);\r\n }\r\n }\r\n if (this.component) {\r\n this.component.handleDataItemValueChange(this, name);\r\n }\r\n }\r\n this.setWorkingValue(name, value, newDuration, delay);\r\n };\r\n DataItem.prototype.setCalculatedValue = function (name, value, calculated) {\r\n var currentValue = this.values[name][calculated];\r\n if (currentValue !== value && $type.isNumber(value)) {\r\n this.values[name][calculated] = value;\r\n if (this._eventDispatcher && !this.__disabled) {\r\n if (this.events.isEnabled(\"calculatedvaluechanged\")) {\r\n var event_3 = {\r\n type: \"calculatedvaluechanged\",\r\n target: this,\r\n property: name\r\n };\r\n this.events.dispatchImmediately(\"calculatedvaluechanged\", event_3);\r\n }\r\n }\r\n if (this.component) {\r\n this.component.handleDataItemCalculatedValueChange(this, name);\r\n }\r\n }\r\n };\r\n /**\r\n * Set current working numeric value for a specific data field.\r\n *\r\n * @param name Data field name\r\n * @param value Value\r\n * @param calculated Calculated data field name\r\n * @param duration Duration (ms) to animate to new value to\r\n * @param delay Delay animation (ms)\r\n * @return An [[Animation]] object used for transition to new values\r\n */\r\n DataItem.prototype.setWorkingValue = function (name, value, duration, delay) {\r\n if ($type.isNumber(this.values[name].value)) {\r\n var newDuration = this.getDuration(duration);\r\n var workingValue = this.values[name].workingValue;\r\n if (newDuration != null && newDuration > 0 && $type.isNumber(workingValue) && this.component) { // sometimes NaN is passed, so only change this to != null if all cases of NaN are handled, otherwise animation won't stop\r\n if (workingValue != value) {\r\n var animation = this.animate({ childObject: this.values[name], property: \"workingValue\", from: workingValue, to: value, dummyData: name }, newDuration, this.component.interpolationEasing);\r\n if (delay != null) {\r\n animation.delay(delay);\r\n }\r\n animation.events.on(\"animationstarted\", this.handleInterpolationProgress, this);\r\n animation.events.on(\"animationprogress\", this.handleInterpolationProgress, this);\r\n animation.events.on(\"animationended\", this.handleInterpolationProgress, this);\r\n this._valueAnimations[name] = animation;\r\n return animation;\r\n }\r\n else {\r\n var valueAnimation = this._valueAnimations[name];\r\n if (valueAnimation) {\r\n valueAnimation.stop();\r\n }\r\n this.values[name].workingValue = value;\r\n }\r\n }\r\n else {\r\n var valueAnimation = this._valueAnimations[name];\r\n if (valueAnimation) {\r\n valueAnimation.stop();\r\n }\r\n this.values[name].workingValue = value;\r\n if (this._eventDispatcher && !this.__disabled) {\r\n if (this.events.isEnabled(\"workingvaluechanged\")) {\r\n var event_4 = {\r\n type: \"workingvaluechanged\",\r\n target: this,\r\n property: name\r\n };\r\n this.events.dispatchImmediately(\"workingvaluechanged\", event_4);\r\n }\r\n }\r\n if (this.component) {\r\n this.component.handleDataItemWorkingValueChange(this, name);\r\n }\r\n }\r\n }\r\n };\r\n /**\r\n * Sets a relative location for a data field.\r\n *\r\n * A location is always relative on a 0 to 1 scale, with 0 being beginning,\r\n * 0.5 middle and 1 end.\r\n *\r\n * @todo Rewiew description\r\n * @param name Data field name\r\n * @param value Location (0-1)\r\n * @param duration Duration (ms) to animate to new value to\r\n * @param delay Delay animation (ms)\r\n */\r\n DataItem.prototype.setLocation = function (name, value, duration, delay) {\r\n var currentLocation = this.locations[name];\r\n if (currentLocation !== value) {\r\n this.locations[name] = value;\r\n if (this._eventDispatcher && !this.__disabled) {\r\n if (this.events.isEnabled(\"locationchanged\")) {\r\n var event_5 = {\r\n type: \"locationchanged\",\r\n target: this,\r\n property: name\r\n };\r\n this.events.dispatchImmediately(\"locationchanged\", event_5);\r\n }\r\n }\r\n if (this.component) {\r\n this.component.handleDataItemValueChange(this, name); // correct\r\n }\r\n this.setWorkingLocation(name, value, duration, delay);\r\n }\r\n };\r\n /**\r\n * Sets a current working location for a data field.\r\n *\r\n * @todo Rewiew description\r\n * @param name Data field name\r\n * @param value Location (0-1)\r\n * @param duration Duration (ms) to animate to new value to\r\n * @param delay Delay animation (ms)\r\n */\r\n DataItem.prototype.setWorkingLocation = function (name, value, duration, delay) {\r\n var newDuration = this.getDuration(duration);\r\n var workingLocation = this.workingLocations[name];\r\n if (newDuration != null && newDuration > 0 && $type.isNumber(workingLocation) && this.component) { // sometimes NaN is passed, so only change this to != null if all cases of NaN are handled, otherwise animation won't stop\r\n if (workingLocation != value) {\r\n var animation = this.animate({ childObject: this.workingLocations, property: name, from: workingLocation, to: value, dummyData: name }, newDuration, this.component.interpolationEasing);\r\n if (delay != null) {\r\n animation.delay(delay);\r\n }\r\n animation.events.on(\"animationstarted\", this.handleInterpolationProgress, this);\r\n animation.events.on(\"animationprogress\", this.handleInterpolationProgress, this);\r\n animation.events.on(\"animationended\", this.handleInterpolationProgress, this);\r\n this._locationAnimations[name] = animation;\r\n return animation;\r\n }\r\n else {\r\n var locationAnimation = this._locationAnimations[name];\r\n if (locationAnimation) {\r\n locationAnimation.stop();\r\n }\r\n this.workingLocations[name] = value;\r\n }\r\n }\r\n else {\r\n var locationAnimation = this._locationAnimations[name];\r\n if (locationAnimation) {\r\n locationAnimation.stop();\r\n }\r\n this.workingLocations[name] = value;\r\n if (this._eventDispatcher && !this.__disabled) {\r\n if (this.events.isEnabled(\"workinglocationchanged\")) {\r\n var event_6 = {\r\n type: \"workinglocationchanged\",\r\n target: this,\r\n property: name\r\n };\r\n this.events.dispatchImmediately(\"workinglocationchanged\", event_6);\r\n }\r\n }\r\n if (this.component) {\r\n this.component.handleDataItemWorkingLocationChange(this, name);\r\n }\r\n }\r\n };\r\n /**\r\n * Sets Date value to a data field.\r\n *\r\n * @param name Data field name\r\n * @param date Date object\r\n * @param duration Duration (ms) to animate to new value to\r\n */\r\n DataItem.prototype.setDate = function (name, date, duration) {\r\n if (!$type.isDate(date) && this.component) {\r\n date = this.component.dateFormatter.parse(date);\r\n }\r\n var currentDate = this.dates[name];\r\n if (currentDate !== date) {\r\n this.dates[name] = date;\r\n this.setValue(name, date.getTime(), duration);\r\n }\r\n };\r\n /**\r\n * Returns a Date value of the data field.\r\n *\r\n * @param name Data field name\r\n * @return Date object\r\n */\r\n DataItem.prototype.getDate = function (name) {\r\n if (this._adapterO) {\r\n return this._adapterO.apply(\"date\", {\r\n date: this.dates[name],\r\n field: name\r\n }).date;\r\n }\r\n else {\r\n return this.dates[name];\r\n }\r\n };\r\n /**\r\n * Sets a Data Item-specific visual properties to apply to related elements.\r\n *\r\n * @param name Property name\r\n * @param value Property value\r\n */\r\n DataItem.prototype.setProperty = function (name, value) {\r\n if (this.properties[name] !== value) {\r\n this.hasProperties = true;\r\n this.properties[name] = value;\r\n if (this._eventDispatcher && !this.__disabled) {\r\n if (this.events.isEnabled(\"propertychanged\")) {\r\n var event_7 = {\r\n type: \"propertychanged\",\r\n target: this,\r\n property: name,\r\n value: value\r\n };\r\n this.events.dispatchImmediately(\"propertychanged\", event_7);\r\n }\r\n }\r\n if (this.component) {\r\n this.component.handleDataItemPropertyChange(this, name);\r\n }\r\n }\r\n };\r\n /**\r\n * Sets a related category for this Data Item.\r\n *\r\n * @todo Review description\r\n * @param name Data field name\r\n * @param value Category\r\n */\r\n DataItem.prototype.setCategory = function (name, value) {\r\n if (!$type.isString(value)) {\r\n value = $type.castString(value);\r\n }\r\n if (this.categories[name] !== value) {\r\n this.categories[name] = value;\r\n }\r\n };\r\n /**\r\n * Clones the Data Item, including all related data.\r\n *\r\n * @return New Data Item clone\r\n */\r\n //public clone(cloneId?: string): this {\r\n //\tlet dataItem: this = super.clone(cloneId);\r\n //\tdataItem.copyFrom(this);\r\n //\treturn dataItem;\r\n //}\r\n /**\r\n * Copies all properties and related data from different data item.\r\n *\r\n * @param object Source data item\r\n */\r\n DataItem.prototype.copyFrom = function (source) {\r\n _super.prototype.copyFrom.call(this, source);\r\n if (source.dataContext) {\r\n this.dataContext = $utils.copy(source.dataContext, {});\r\n }\r\n $utils.copyProperties(source.locations, this.locations);\r\n /*\r\n $utils.copyProperties(source.properties, this.properties);\r\n $utils.copyProperties(source.categories, this.categories);\r\n $utils.copyProperties(source.values, this.values);\r\n $utils.copyProperties(source.dates, this.dates);\r\n\r\n $object.each(source.values, (name, value) => {\r\n this.values[name] = $object.copy(value);\r\n });*/\r\n if (source._adapterO) {\r\n this.adapter.copyFrom(source._adapterO);\r\n }\r\n //this.events.copyFrom(source.events); // because copied in Base\r\n this.component = source.component;\r\n };\r\n Object.defineProperty(DataItem.prototype, \"opacity\", {\r\n /**\r\n * Sets opacity for all Data Item's related elements (Sprites).\r\n *\r\n * @param value Opacity (0-1)\r\n */\r\n set: function (value) {\r\n $array.each(this.sprites, function (sprite) {\r\n sprite.opacity = value;\r\n });\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DataItem.prototype, \"ignoreMinMax\", {\r\n /**\r\n * Exclude from min/max calculations?\r\n * @return Exclude from min/max calculations?\r\n */\r\n get: function () {\r\n return this._ignoreMinMax;\r\n },\r\n /**\r\n * Sets whether this data point should not be included in the scale and\r\n * minimum/maximum calculations.\r\n *\r\n * E.g. some we may want to exclude a particular data point from influencing\r\n * [[ValueAxis]] scale.\r\n *\r\n * @param value Exclude from min/max calculations?\r\n */\r\n set: function (value) {\r\n this._ignoreMinMax = value;\r\n if (this._eventDispatcher && !this.__disabled) {\r\n if (this.events.isEnabled(\"propertychanged\")) {\r\n var event_8 = {\r\n type: \"propertychanged\",\r\n target: this,\r\n property: \"ignoreMinMax\",\r\n value: value\r\n };\r\n this.events.dispatchImmediately(\"propertychanged\", event_8);\r\n }\r\n }\r\n if (this.component) {\r\n this.component.handleDataItemPropertyChange(this, \"ignoreMinMax\");\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Creates and starts an [[Animation]] to interpolate (morph) Data Item's\r\n * properties and/or values.\r\n *\r\n * @see {@link Animation}\r\n * @param animationOptions Animation options\r\n * @param duration Animation duration (ms)\r\n * @param easing Easing function\r\n * @return Animation\r\n */\r\n DataItem.prototype.animate = function (animationOptions, duration, easing) {\r\n return new Animation(this, animationOptions, duration, easing).start();\r\n };\r\n /**\r\n * Handles intermediate steps when Data Item is interpolating (morphing) from\r\n * one value to another.\r\n *\r\n * @ignore Exclude from docs\r\n * @param event Event object\r\n */\r\n DataItem.prototype.handleInterpolationProgress = function (event) {\r\n var animation = event.target;\r\n // it's always only one options, no need cycle\r\n var animationOptions = animation.animationOptions[0];\r\n if (animationOptions) {\r\n if (this._eventDispatcher && !this.__disabled) {\r\n if (this.events.isEnabled(\"workingvaluechanged\")) {\r\n var event_9 = {\r\n type: \"workingvaluechanged\",\r\n target: this,\r\n property: animationOptions.dummyData\r\n };\r\n this.events.dispatchImmediately(\"workingvaluechanged\", event_9);\r\n }\r\n }\r\n if (this.component) {\r\n this.component.handleDataItemWorkingValueChange(this, animationOptions.dummyData);\r\n }\r\n }\r\n };\r\n /**\r\n * Checks whether Data Item has values set for all of the data fields,\r\n * supplied via argument.\r\n *\r\n * @ignore Exclude from docs\r\n * @param fields Field list to check\r\n * @return Has values for all fields?\r\n */\r\n DataItem.prototype.hasValue = function (fields) {\r\n // todo: what about categories?\r\n for (var i = 0, len = fields.length; i < len; i++) {\r\n var values = this.values[fields[i]];\r\n if (!values || !$type.hasValue(values.value)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n };\r\n Object.defineProperty(DataItem.prototype, \"depth\", {\r\n /**\r\n * Depth of the Data Item.\r\n *\r\n * In nested data structures, like TreeMap, this indicates the level this\r\n * data point is at, in relation to the parent Data Item.\r\n *\r\n * @return Depth\r\n */\r\n get: function () {\r\n if (!this.parent) {\r\n return 0;\r\n }\r\n else {\r\n return this.parent.depth + 1;\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DataItem.prototype, \"dataContext\", {\r\n /**\r\n * Sets to a reference to an original object from Component's data.\r\n *\r\n * @return [description]\r\n */\r\n get: function () {\r\n return this._dataContext;\r\n },\r\n /**\r\n * A reference to an original object in Component's data, that this Data Item\r\n * is derived from.\r\n *\r\n * @param value Original data object\r\n */\r\n set: function (value) {\r\n this._dataContext = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * adds a sprite to dataItem.sprites array\r\n * @ignore\r\n */\r\n DataItem.prototype.addSprite = function (sprite) {\r\n if (sprite.dataItem && sprite.dataItem != this) {\r\n $array.remove(sprite.dataItem.sprites, sprite);\r\n }\r\n if (!this.visible) {\r\n sprite.hide(0);\r\n }\r\n if (this.isHiding) {\r\n sprite.hide();\r\n }\r\n this.sprites.push(sprite);\r\n sprite.dataItem = this;\r\n };\r\n return DataItem;\r\n}(BaseObjectEvents));\r\nexport { DataItem };\r\n","/**\r\n * Global options.\r\n */\r\nexport var options = {\r\n verbose: true,\r\n commercialLicense: false,\r\n classNamePrefix: \"amcharts-\",\r\n autoSetClassName: false,\r\n minPolylineStep: 0.5,\r\n onlyShowOnViewport: false,\r\n queue: false,\r\n autoDispose: false,\r\n licenses: [],\r\n suppressErrors: false,\r\n suppressWarnings: false,\r\n animationsEnabled: true,\r\n nonce: \"\",\r\n deferredDelay: 100,\r\n disableHoverOnTransform: \"never\",\r\n pixelPerfectPrecision: 0\r\n};\r\n","import { EventDispatcher } from \"./utils/EventDispatcher\";\r\nimport { Dictionary } from \"./utils/Dictionary\";\r\nimport { cache } from \"./utils/Cache\";\r\nimport * as $type from \"./utils/Type\";\r\nimport * as $string from \"./utils/String\";\r\nimport * as $array from \"./utils/Array\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Registry is used to store miscellaneous system-wide information, like ids,\r\n * maps, themes, and registered classes.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\nvar Registry = /** @class */ (function () {\r\n function Registry() {\r\n var _this = this;\r\n /**\r\n * Event dispacther.\r\n */\r\n this.events = new EventDispatcher();\r\n /**\r\n * All currently applied themes. All new chart instances created will\r\n * automatically inherit and retain System's themes.\r\n */\r\n this.themes = [];\r\n /**\r\n * List of all loaded available themes.\r\n *\r\n * Whenever a theme loads, it registers itself in System's `loadedThemes`\r\n * collection.\r\n */\r\n this.loadedThemes = {};\r\n /**\r\n * An indeternal counter used to generate unique IDs.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n this._uidCount = 0;\r\n /**\r\n * Keeps register of class references so that they can be instnatiated using\r\n * string key.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n this.registeredClasses = {};\r\n /**\r\n * Holds all generated placeholders.\r\n */\r\n this._placeholders = {};\r\n /**\r\n * A list of invalid(ated) [[Sprite]] objects that need to be re-validated\r\n * during next cycle.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n this.invalidSprites = {};\r\n /**\r\n * Components are added to this list when their data provider changes to\r\n * a new one or data is added/removed from their data provider.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n this.invalidDatas = {};\r\n /**\r\n * Components are added to this list when values of their raw data change.\r\n * Used when we want a smooth animation from one set of values to another.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n this.invalidRawDatas = [];\r\n /**\r\n * Components are added to this list when values of their data changes\r\n * (but not data provider itself).\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n this.invalidDataItems = [];\r\n /**\r\n * Components are added to this list when their data range (selection) is\r\n * changed, e.g. zoomed.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n this.invalidDataRange = [];\r\n /**\r\n * A list of [[Sprite]] objects that have invalid(ated) positions, that need\r\n * to be recalculated.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n this.invalidPositions = {};\r\n /**\r\n * A list of [[Container]] objects with invalid(ated) layouts.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n this.invalidLayouts = {};\r\n /**\r\n * An array holding all active (non-disposed) top level elemens.\r\n *\r\n * When, for example, a new chart is created, its instance will be added to\r\n * this array, and will be removed when the chart is disposed.\r\n */\r\n this.baseSprites = [];\r\n /**\r\n * An UID-based map of base sprites (top-level charts).\r\n */\r\n this.baseSpritesByUid = {};\r\n /**\r\n * Queued charts (waiting for their turn) to initialize.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/performance/#Daisy_chaining_multiple_charts} for more information\r\n */\r\n this.queue = [];\r\n /**\r\n * An array of deferred charts that haven't been created yet.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/performance/#Deferred_daisy_chained_instantiation} for more information\r\n * @since 4.10.0\r\n */\r\n this.deferred = [];\r\n this.uid = this.getUniqueId();\r\n this.invalidSprites.noBase = [];\r\n this.invalidDatas.noBase = [];\r\n this.invalidLayouts.noBase = [];\r\n this.invalidPositions.noBase = [];\r\n // This is needed for Angular Universal SSR\r\n if (typeof addEventListener !== \"undefined\") {\r\n // This is needed to prevent charts from being cut off when printing\r\n addEventListener(\"beforeprint\", function () {\r\n $array.each(_this.baseSprites, function (sprite) {\r\n var svg = sprite.paper.svg;\r\n svg.setAttribute(\"viewBox\", \"0 0 \" + svg.clientWidth + \" \" + svg.clientHeight);\r\n });\r\n });\r\n addEventListener(\"afterprint\", function () {\r\n $array.each(_this.baseSprites, function (sprite) {\r\n var svg = sprite.paper.svg;\r\n svg.removeAttribute(\"viewBox\");\r\n });\r\n });\r\n }\r\n }\r\n /**\r\n * Generates a unique chart system-wide ID.\r\n *\r\n * @return Generated ID\r\n */\r\n Registry.prototype.getUniqueId = function () {\r\n var uid = this._uidCount;\r\n this._uidCount += 1;\r\n return \"id-\" + uid;\r\n };\r\n Object.defineProperty(Registry.prototype, \"map\", {\r\n /**\r\n * Returns a universal collection for mapping ids with objects.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Map collection\r\n */\r\n get: function () {\r\n if (!this._map) {\r\n this._map = new Dictionary();\r\n }\r\n return this._map;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Caches value in object's cache.\r\n *\r\n * @ignore Exclude from docs\r\n * @param key Key\r\n * @param value Value\r\n * @param ttl TTL in seconds\r\n */\r\n Registry.prototype.setCache = function (key, value, ttl) {\r\n cache.set(this.uid, key, value, ttl);\r\n };\r\n /**\r\n * Retrieves cached value.\r\n *\r\n * @ignore Exclude from docs\r\n * @param key Key\r\n * @param value Value to return if cache is not available\r\n * @return Value\r\n */\r\n Registry.prototype.getCache = function (key, value) {\r\n if (value === void 0) { value = undefined; }\r\n return cache.get(this.uid, key, value);\r\n };\r\n /**\r\n * Dispatches an event using own event dispatcher. Will automatically\r\n * populate event data object with event type and target (this element).\r\n * It also checks if there are any handlers registered for this sepecific\r\n * event.\r\n *\r\n * @param eventType Event type (name)\r\n * @param data Data to pass into event handler(s)\r\n */\r\n Registry.prototype.dispatch = function (eventType, data) {\r\n // @todo Implement proper type check\r\n if (this.events.isEnabled(eventType)) {\r\n if (data) {\r\n data.type = eventType;\r\n data.target = data.target || this;\r\n this.events.dispatch(eventType, {\r\n type: eventType,\r\n target: this\r\n });\r\n }\r\n else {\r\n this.events.dispatch(eventType, {\r\n type: eventType,\r\n target: this\r\n });\r\n }\r\n }\r\n };\r\n /**\r\n * Works like `dispatch`, except event is triggered immediately, without\r\n * waiting for the next frame cycle.\r\n *\r\n * @param eventType Event type (name)\r\n * @param data Data to pass into event handler(s)\r\n */\r\n Registry.prototype.dispatchImmediately = function (eventType, data) {\r\n // @todo Implement proper type check\r\n if (this.events.isEnabled(eventType)) {\r\n if (data) {\r\n data.type = eventType;\r\n data.target = data.target || this;\r\n this.events.dispatchImmediately(eventType, data);\r\n }\r\n else {\r\n this.events.dispatchImmediately(eventType, {\r\n type: eventType,\r\n target: this\r\n });\r\n }\r\n }\r\n };\r\n /**\r\n * Returns a unique placeholder suitable for the key.\r\n *\r\n * @param key Key\r\n * @return Random string to be used as placeholder\r\n */\r\n Registry.prototype.getPlaceholder = function (key) {\r\n if ($type.hasValue(this._placeholders[key])) {\r\n return this._placeholders[key];\r\n }\r\n this._placeholders[key] = \"__amcharts_\" + key + \"_\" + $string.random(8) + \"__\";\r\n return this._placeholders[key];\r\n };\r\n /**\r\n * @ignore\r\n */\r\n Registry.prototype.addToInvalidComponents = function (component) {\r\n if (component.baseId) {\r\n $array.move(this.invalidDatas[component.baseId], component);\r\n }\r\n else {\r\n $array.move(this.invalidDatas[\"noBase\"], component);\r\n }\r\n };\r\n /**\r\n * @ignore\r\n */\r\n Registry.prototype.removeFromInvalidComponents = function (component) {\r\n if (component.baseId) {\r\n $array.remove(this.invalidDatas[component.baseId], component);\r\n }\r\n $array.remove(this.invalidDatas[\"noBase\"], component);\r\n };\r\n /**\r\n * @ignore\r\n */\r\n Registry.prototype.addToInvalidSprites = function (sprite) {\r\n if (sprite.baseId) {\r\n $array.add(this.invalidSprites[sprite.baseId], sprite);\r\n }\r\n else {\r\n $array.add(this.invalidSprites[\"noBase\"], sprite);\r\n }\r\n };\r\n /**\r\n * @ignore\r\n */\r\n Registry.prototype.removeFromInvalidSprites = function (sprite) {\r\n if (sprite.baseId) {\r\n $array.remove(this.invalidSprites[sprite.baseId], sprite);\r\n }\r\n $array.remove(this.invalidSprites[\"noBase\"], sprite);\r\n };\r\n /**\r\n * @ignore\r\n */\r\n Registry.prototype.addToInvalidPositions = function (sprite) {\r\n if (sprite.baseId) {\r\n $array.add(this.invalidPositions[sprite.baseId], sprite);\r\n }\r\n else {\r\n $array.add(this.invalidPositions[\"noBase\"], sprite);\r\n }\r\n };\r\n /**\r\n * @ignore\r\n */\r\n Registry.prototype.removeFromInvalidPositions = function (sprite) {\r\n if (sprite.baseId) {\r\n $array.remove(this.invalidPositions[sprite.baseId], sprite);\r\n }\r\n $array.remove(this.invalidPositions[\"noBase\"], sprite);\r\n };\r\n /**\r\n * @ignore\r\n */\r\n Registry.prototype.addToInvalidLayouts = function (sprite) {\r\n if (sprite.baseId) {\r\n $array.add(this.invalidLayouts[sprite.baseId], sprite);\r\n }\r\n else {\r\n $array.add(this.invalidLayouts[\"noBase\"], sprite);\r\n }\r\n };\r\n /**\r\n * @ignore\r\n */\r\n Registry.prototype.removeFromInvalidLayouts = function (sprite) {\r\n if (sprite.baseId) {\r\n $array.remove(this.invalidLayouts[sprite.baseId], sprite);\r\n }\r\n $array.remove(this.invalidLayouts[\"noBase\"], sprite);\r\n };\r\n return Registry;\r\n}());\r\nexport { Registry };\r\n/**\r\n * A singleton global instance of [[Registry]].\r\n *\r\n * @ignore Exclude from docs\r\n */\r\nexport var registry = new Registry();\r\n/**\r\n * Returns `true` if object is an instance of the class. It's the same as `instanceof` except it doesn't need to import the class.\r\n *\r\n * @param object Object\r\n * @param name Class name\r\n * @return Is instance of class\r\n */\r\nexport function is(object, name) {\r\n var x = registry.registeredClasses[name];\r\n return x != null && object instanceof x;\r\n}\r\n","/**\r\n * This is the main class that encapsulates every object on the chart.\r\n *\r\n * If it's an element that is to be displayed on the screen at some point, its\r\n * class must extend [[Sprite]] class.\r\n */\r\nimport { __extends, __values } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { SpriteState } from \"./SpriteState\";\r\nimport { SpriteEventDispatcher } from \"./SpriteEvents\";\r\nexport { SpriteEventDispatcher };\r\nimport { BaseObjectEvents } from \"./Base\";\r\nimport { Adapter, globalAdapter } from \"./utils/Adapter\";\r\nimport { Dictionary, DictionaryTemplate, DictionaryDisposer } from \"./utils/Dictionary\";\r\nimport { ListDisposer, List } from \"./utils/List\";\r\nimport { MultiDisposer, Disposer, MutableValueDisposer } from \"./utils/Disposer\";\r\nimport { Animation, AnimationDisposer } from \"./utils/Animation\";\r\nimport { getGhostPaper } from \"./rendering/Paper\";\r\nimport { Container } from \"./Container\";\r\nimport { Pattern } from \"./rendering/fills/Pattern\";\r\nimport { LinearGradient } from \"./rendering/fills/LinearGradient\";\r\nimport { RadialGradient } from \"./rendering/fills/RadialGradient\";\r\nimport { Color, color, toColor } from \"./utils/Color\";\r\nimport { getInteraction } from \"./interaction/Interaction\";\r\nimport { MouseCursorStyle } from \"./interaction/Mouse\";\r\nimport { options } from \"./Options\";\r\nimport { registry } from \"./Registry\";\r\nimport { NumberFormatter } from \"./formatters/NumberFormatter\";\r\nimport { DateFormatter } from \"./formatters/DateFormatter\";\r\nimport { DurationFormatter } from \"./formatters/DurationFormatter\";\r\nimport { getTextFormatter } from \"./formatters/TextFormatter\";\r\nimport { Language } from \"./utils/Language\";\r\nimport { Export } from \"./export/Export\";\r\nimport * as $utils from \"./utils/Utils\";\r\nimport * as $math from \"./utils/Math\";\r\nimport * as $strings from \"./utils/Strings\";\r\nimport * as $array from \"./utils/Array\";\r\nimport * as $object from \"./utils/Object\";\r\nimport * as $type from \"./utils/Type\";\r\nimport * as $iter from \"./utils/Iterator\";\r\nimport { system } from \"./System\";\r\nimport { Percent, percent } from \"./utils/Percent\";\r\n/**\r\n * Defines list ofvisual properties\r\n */\r\nexport var visualProperties = [\"fill\", \"fillOpacity\", \"stroke\", \"strokeOpacity\", \"strokeWidth\", \"strokeDasharray\", \"strokeDashoffset\", \"strokeLinecap\", \"strokeLinejoin\"]; // do not add opacity here, as it is used for showing/hiding\r\n;\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Sprite represents any displayable element.\r\n *\r\n * This is the main class that encapsulates every object on the chart.\r\n *\r\n * If it's an element that is to be displayed on the screen at some point, its\r\n * class must extend [[Sprite]] class.\r\n *\r\n * [[Sprite]] class represents the a hierarchical structure. Every object that\r\n * extends [[Sprite]] can have children, that would inherit their properties,\r\n * such as language, formatters, etc.\r\n *\r\n * @see {@link SpriteState}\r\n * @see {@link ISpriteEvents} for a list of available events\r\n * @see {@link ISpriteAdapters} for a list of available Adapters\r\n *\r\n * @todo Review child elements that need to go into `_disposers`\r\n * @important\r\n */\r\nvar Sprite = /** @class */ (function (_super) {\r\n __extends(Sprite, _super);\r\n /**\r\n * Constructor:\r\n * * Creates initial node\r\n * * Sets default properties\r\n * * Creates required default states\r\n * * Inits accessibility\r\n */\r\n function Sprite() {\r\n var _this = \r\n // Init\r\n _super.call(this) || this;\r\n /**\r\n * Holds values for Sprite's properties.\r\n */\r\n _this.properties = {};\r\n /**\r\n * @ignore\r\n */\r\n _this._eventDispatcher = new SpriteEventDispatcher(_this);\r\n /**\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\r\n _this._bindings = {};\r\n /**\r\n * Holds indicator if this Sprite is a \"template\" to be used for creating\r\n * other Sprites from and should not be treated as full-fledged element.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n _this._isTemplate = false;\r\n _this._isPath = false;\r\n /**\r\n * Holds indicator whether this sprite was already initialized.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n _this._inited = false;\r\n /**\r\n * Holds indicator whether this sprite was already initialized and ready.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n _this._ready = false;\r\n /**\r\n * If `sprite.hide()` is called and we have \"hidden\" state and\r\n * `transitionDuration > 0`, we set `isHiding` flag to `true` in order to\r\n * avoid restarting animations in case `hide()` method is called multiple\r\n * times.\r\n */\r\n _this.isHiding = false;\r\n /**\r\n * If `sprite.hide()` is called, we set isHidden to true when sprite is hidden.\r\n * This was added becaus hidden state might have visibility set to true and so\r\n * there would not be possible to find out if a sprite is technically hidden or not.\r\n */\r\n _this._isHidden = false;\r\n /**\r\n * This property indicates if Sprite is currently being revealed from hidden\r\n * state. This is used to prevent multiple calls to `sprite.show()` to\r\n * restart reveal animation. (if enabled)\r\n */\r\n _this.isShowing = false;\r\n /**\r\n * Indicates if this element is a standalone instance. A \"standalone\r\n * instance\" means this is a autonomous object which maintains its own\r\n * set of controls like Preloader, Export, etc.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n _this.isStandaloneInstance = false;\r\n /**\r\n * Indicates if togglable Sprite is currently active (toggled on).\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n _this._isActive = false;\r\n /**\r\n * A Sprite element to use as a mask for this Sprite.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n _this._mask = new MutableValueDisposer();\r\n /**\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\r\n _this._positionPrecision = 3;\r\n /**\r\n * An instance of [[Language]].\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n _this._language = new MutableValueDisposer();\r\n /**\r\n * Holds [[Export]] object.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n _this._exporting = new MutableValueDisposer();\r\n /**\r\n * Should this Sprite be included when exporting?\r\n */\r\n _this._exportable = true;\r\n /**\r\n * Defines bounding box (square) for this element.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n _this._bbox = { x: 0, y: 0, width: 0, height: 0 };\r\n /**\r\n * Indicates if this element is invalid and should be re-validated (redrawn).\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n _this.invalid = false;\r\n /**\r\n * Indicates if this elements position is invalid and should be repositioned\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n _this.positionInvalid = false;\r\n /**\r\n * A collection of key/value pairs that can be used to bind specific Sprite\r\n * properties to [[DataItem]].\r\n *\r\n * For example: `fill` property can be bound to `myCustomColor` field in\r\n * DataItem. The Sprite will automatically get the value for `fill` from its\r\n * DataItem.\r\n *\r\n * Can be set for each [[SpriteState]] individually to override default\r\n * bindings.\r\n *\r\n * @see {@link SpriteState}\r\n */\r\n _this.propertyFields = {};\r\n /**\r\n * Specifies if property changes on this object should be propagated to the\r\n * objects cloned from this object.\r\n *\r\n * This setting affects property changes *after* cloning, since at the moment\r\n * of cloning all of properties from source object are copied to the clone\r\n * anyway.\r\n *\r\n * @default false\r\n */\r\n _this.applyOnClones = false;\r\n // unrotated unscaled\r\n _this._measuredWidthSelf = 0;\r\n _this._measuredHeightSelf = 0;\r\n // read only, sprite extreme coordinates\r\n /**\r\n * @ignore\r\n */\r\n _this.maxLeft = 0;\r\n /**\r\n * @ignore\r\n */\r\n _this.maxRight = 0;\r\n /**\r\n * @ignore\r\n */\r\n _this.maxTop = 0;\r\n /**\r\n * @ignore\r\n */\r\n _this.maxBottom = 0;\r\n // not rotated and not scaled\r\n /**\r\n * @ignore\r\n */\r\n _this.maxLeftSelf = 0;\r\n /**\r\n * @ignore\r\n */\r\n _this.maxRightSelf = 0;\r\n /**\r\n * @ignore\r\n */\r\n _this.maxTopSelf = 0;\r\n /**\r\n * @ignore\r\n */\r\n _this.maxBottomSelf = 0;\r\n _this._isDragged = false;\r\n _this._isResized = false;\r\n /**\r\n * @deprecated Moved to [[SpriteProperties]]\r\n */\r\n _this._disabled = false;\r\n _this._internalDisabled = false;\r\n _this._updateDisabled = false;\r\n _this._internalDefaultsApplied = false;\r\n /**\r\n * Time in milliseconds after which rollout event happens when user rolls-out of the sprite. This helps to avoid flickering in some cases.\r\n */\r\n _this.rollOutDelay = 0;\r\n /**\r\n * This flag is set to `true` for the initial sprite you create and place\r\n * to the div so that we could clear all additional\r\n * sprites/containers when this sprite is disposed.\r\n *\r\n * @ignore\r\n */\r\n _this.isBaseSprite = false;\r\n /**\r\n * Indicates whether this sprite should be cloned when cloning its parent\r\n * container. We set this to `false` in those cases when a sprite is created\r\n * by the class, so that when cloning a duplicate sprite would not appear.\r\n */\r\n _this.shouldClone = true;\r\n /**\r\n * A read-only flag which indicates if a sprite has completed its initial\r\n * animation (if `showOnInit = true`).\r\n *\r\n * In case `showOnInit = false`, `appeared` is set to `true` on init.\r\n *\r\n * @readonly\r\n */\r\n _this.appeared = false;\r\n /**\r\n * [ex description]\r\n *\r\n * @todo Description\r\n * @ignore\r\n */\r\n _this.ex = 0;\r\n /**\r\n * [ey description]\r\n *\r\n * @todo Description\r\n * @ignore\r\n */\r\n _this.ey = 0;\r\n /**\r\n * Indicates if the sprite can be moved around when resizing it with two fingers (will only work if draggable = false)\r\n * @ignore\r\n */\r\n _this.dragWhileResize = false;\r\n /**\r\n * @ignore\r\n */\r\n _this.measureFailed = false;\r\n /**\r\n * If this flag is set to true, calling show() will not reveal the sprite.\r\n *\r\n * @ignore\r\n */\r\n _this.preventShow = false;\r\n /**\r\n * When cloning a sprite, if the template has it's own tooltip assigned, this tooltip is also cloned by default.\r\n * This is not good for cpu and sometimes you might only need one single tooltip for all clones. Set this to false in order not to clone tooltip.\r\n */\r\n _this.cloneTooltip = true;\r\n _this.className = \"Sprite\";\r\n _this._disposers.push(_this._eventDispatcher);\r\n // Generate a unique ID\r\n $utils.used(_this.uid);\r\n // Create SVG group to hold everything in\r\n _this.group = _this.paper.addGroup(\"g\");\r\n // Set defaults\r\n // it is better to set defauls like this in order to save invaliation calls and events\r\n _this.setPropertyValue(\"scale\", 1);\r\n _this.setPropertyValue(\"rotation\", 0);\r\n _this.setPropertyValue(\"align\", \"none\");\r\n _this.setPropertyValue(\"valign\", \"none\");\r\n _this.setPropertyValue(\"pixelPerfect\", false);\r\n _this.setPropertyValue(\"visible\", true);\r\n _this.setPropertyValue(\"tooltipPosition\", \"fixed\");\r\n _this.setPropertyValue(\"verticalCenter\", \"none\");\r\n _this.setPropertyValue(\"horizontalCenter\", \"none\");\r\n _this.setPropertyValue(\"tooltipX\", percent(50));\r\n _this.setPropertyValue(\"tooltipX\", percent(50));\r\n _this.setPropertyValue(\"marginTop\", 0);\r\n _this.setPropertyValue(\"marginBottom\", 0);\r\n _this.setPropertyValue(\"marginLeft\", 0);\r\n _this.setPropertyValue(\"marginRight\", 0);\r\n _this.setPropertyValue(\"dx\", 0);\r\n _this.setPropertyValue(\"dy\", 0);\r\n _this.setPropertyValue(\"paddingTop\", 0);\r\n _this.setPropertyValue(\"paddingBottom\", 0);\r\n _this.setPropertyValue(\"paddingRight\", 0);\r\n _this.setPropertyValue(\"paddingLeft\", 0);\r\n _this.setPropertyValue(\"togglable\", false);\r\n _this.setPropertyValue(\"hidden\", false);\r\n _this.setPropertyValue(\"urlTarget\", \"_self\");\r\n _this.setPropertyValue(\"alwaysShowTooltip\", false);\r\n _this.setPropertyValue(\"showTooltipOn\", \"hover\");\r\n _this._prevMeasuredWidth = 0;\r\n _this._prevMeasuredHeight = 0;\r\n _this._measuredWidth = 0;\r\n _this._measuredHeight = 0;\r\n _this._isMeasured = true;\r\n // Invalidate the Sprite so that renderer knows it needs to be drawn\r\n _this.invalidate();\r\n //this.states.create(\"default\").properties.opacity = 1;\r\n // Apply the theme\r\n _this.applyTheme();\r\n //this._disposers.push(this._clickable);\r\n // Decorate adapter with events so that we can apply its settings whenever\r\n // it is modified\r\n // @todo Think what to do here. We can't just apply the adapter value to\r\n // property since not all of those are for properties. Commented out for\r\n // now.\r\n /*this.adapter.events.on(\"inserted\", (ev: any) => {\r\n (this)[ev.newValue.key] = (this)[ev.newValue.key];\r\n });\r\n this.adapter.events.on(\"removed\", (ev: any) => {\r\n (this)[ev.newValue.key] = (this)[ev.newValue.key];\r\n });*/\r\n // Add disposable dependencies to `_disposers` so they are automatically\r\n // disposed of when this object is disposed\r\n _this._disposers.push(_this.events);\r\n _this._disposers.push(_this.group);\r\n _this._disposers.push(_this._mask);\r\n _this._disposers.push(_this._language);\r\n _this._disposers.push(_this._exporting);\r\n //this._disposers.push(this._parent);\r\n //this._disposers.push(this._modal);\r\n _this._disposers.push(new Disposer(function () {\r\n $object.each(_this._bindings, function (key, value) {\r\n value.dispose();\r\n });\r\n }));\r\n _this.setPropertyValue(\"interactionsEnabled\", true);\r\n return _this;\r\n }\r\n Object.defineProperty(Sprite.prototype, \"events\", {\r\n /**\r\n * Event dispatcher.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/event-listeners/} for more info about Events\r\n */\r\n get: function () {\r\n return this._eventDispatcher;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"adapter\", {\r\n /**\r\n * Holds Adapter.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/adapters/} for more info about Adapters\r\n */\r\n get: function () {\r\n if (!this._adapterO) {\r\n this._adapterO = new Adapter(this);\r\n }\r\n return this._adapterO;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * ==========================================================================\r\n * ELEMENT VALIDATION, INIT, AND DRAWING STUFF\r\n * ==========================================================================\r\n * @hidden\r\n */\r\n /**\r\n * Applies properties from all assigned themes.\r\n *\r\n * We do this here so that we can apply class names as well.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Sprite.prototype.applyTheme = function () {\r\n _super.prototype.applyTheme.call(this);\r\n if (options.autoSetClassName) {\r\n this.setClassName();\r\n }\r\n };\r\n /**\r\n * Returns theme(s) used by this object either set explicitly on this\r\n * element, inherited from parent, or inherited from [[System]].\r\n *\r\n * @return An array of theme references\r\n */\r\n Sprite.prototype.getCurrentThemes = function () {\r\n var themes = this._themes;\r\n if (themes) {\r\n return themes;\r\n }\r\n else {\r\n var parent_1 = this._parent;\r\n if (parent_1) {\r\n return parent_1.getCurrentThemes();\r\n }\r\n else {\r\n return registry.themes;\r\n }\r\n }\r\n };\r\n /**\r\n * Called just before element's validation, this function allows setting\r\n * defaults.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Sprite.prototype.applyInternalDefaults = function () {\r\n // Nothing here, but extending classes might override this function\r\n // so that they can set their defaults\r\n this._internalDefaultsApplied = true;\r\n };\r\n /**\r\n * Invalidates element.\r\n *\r\n * Object will be redrawn during the next update cycle.\r\n *\r\n * Please note that in most cases elements will auto-invalidate when needed. If\r\n * everything works, DO NOT use this method. Use it only if some changes do\r\n * not take otherwise.\r\n */\r\n Sprite.prototype.invalidate = function () {\r\n if (this.disabled || this._isTemplate || this.__disabled) {\r\n return;\r\n }\r\n // We no longer reset this on each invalidate, so that they are applied\r\n // only once, and do not overwrite user-defined settings\r\n //this._internalDefaultsApplied = false;\r\n if (!this.invalid) {\r\n this.invalid = true;\r\n registry.addToInvalidSprites(this);\r\n system.requestFrame();\r\n }\r\n };\r\n /**\r\n * Validates element:\r\n * * Triggers events\r\n * * Redraws the element\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Sprite.prototype.validate = function () {\r\n this.dispatchImmediately(\"beforevalidated\");\r\n // prevents from drawing if topparent is 0x0\r\n /*\r\n let topParent = this.topParent;\r\n\r\n if (topParent) {\r\n if (!topParent.maxWidth || !topParent.maxHeight) {\r\n this._disposers.push(topParent.events.once(\"maxsizechanged\", this.invalidate, this));\r\n }\r\n }*/\r\n // Set internal defaults\r\n if (!this._internalDefaultsApplied) {\r\n this.applyInternalDefaults();\r\n }\r\n this.beforeDraw();\r\n this.draw();\r\n this.invalid = false;\r\n registry.removeFromInvalidSprites(this);\r\n this.afterDraw();\r\n };\r\n /**\r\n * Invalidates element's position.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Sprite.prototype.invalidatePosition = function () {\r\n if (this.disabled || this._isTemplate) {\r\n return;\r\n }\r\n if (!this.positionInvalid) {\r\n this.positionInvalid = true;\r\n registry.addToInvalidPositions(this);\r\n system.requestFrame();\r\n }\r\n };\r\n /**\r\n * Transforms the element.\r\n *\r\n * @todo Description (review)\r\n * @ignore Exclude from docs\r\n */\r\n Sprite.prototype.validatePosition = function () {\r\n var pixelX = this.pixelX;\r\n var pixelY = this.pixelY;\r\n var dx = this.dx;\r\n var dy = this.dy;\r\n var x = pixelX + dx;\r\n var y = pixelY + dy;\r\n if (this._updateDisabled) {\r\n if (this._internalDisabled) {\r\n this.group.attr({ \"display\": \"none\" });\r\n }\r\n else {\r\n if (!this.disabled) {\r\n this.removeSVGAttribute(\"display\");\r\n }\r\n }\r\n this._updateDisabled = false;\r\n }\r\n var sizeChanged = this.measure();\r\n //if (!this.invalid) {\r\n var prevGroupTransform = this.group.transformString;\r\n this.group.moveTo({ x: x, y: y });\r\n this.group.rotation = this.rotation;\r\n if (this.nonScaling) {\r\n this.group.scale = this.scale / this.globalScale;\r\n }\r\n else {\r\n this.group.scale = this.scale;\r\n }\r\n if (prevGroupTransform != this.group.transformString || sizeChanged) {\r\n // not yet sure, this is to avoid many transforms=>container layout invalidation on initial buid\r\n if (prevGroupTransform == null) {\r\n this.dispatch(\"transformed\");\r\n }\r\n else {\r\n this.dispatchImmediately(\"transformed\");\r\n }\r\n // TODO clear existing positionchanged dispatches ?\r\n this.dispatch(\"positionchanged\");\r\n if (this.showTooltipOn == \"hit\" || this.showTooltipOn == \"always\") {\r\n this.updateTooltipPosition();\r\n }\r\n }\r\n //}\r\n // it might happen that x and y changed again, so we only remove if they didn't\r\n if (pixelX + dx == x && pixelY + dy == y) {\r\n registry.removeFromInvalidPositions(this);\r\n this.positionInvalid = false;\r\n }\r\n var maskRectangle = this._maskRectangle;\r\n // todo: verify this\r\n if (maskRectangle) {\r\n this._clipElement.moveTo({ x: maskRectangle.x - pixelX, y: maskRectangle.y - pixelY });\r\n }\r\n };\r\n /**\r\n * A placeholder method that is called **before** element begins to be drawn.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Sprite.prototype.beforeDraw = function () {\r\n };\r\n /**\r\n * A placeholder method that draws the element.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Sprite.prototype.draw = function () {\r\n };\r\n /**\r\n * A placeholder method that is called **after** element finishes drawing\r\n * itself.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Sprite.prototype.afterDraw = function () {\r\n var e_1, _a;\r\n if (this.isMeasured || this.horizontalCenter !== \"none\" || this.verticalCenter !== \"none\") {\r\n this.measureElement();\r\n }\r\n //this.applyMask();\r\n if (!this._inited) {\r\n if (this._adapterO) {\r\n try {\r\n // used to be applySVGAttrbutes here, this is more efficient\r\n for (var _b = __values(this._adapterO.keys()), _c = _b.next(); !_c.done; _c = _b.next()) {\r\n var key = _c.value;\r\n switch (key) {\r\n case \"mask\":\r\n case \"fill\":\r\n case \"opacity\":\r\n case \"fillOpacity\":\r\n case \"stroke\":\r\n case \"strokeOpacity\":\r\n case \"strokeWidth\":\r\n case \"shapeRendering\":\r\n case \"strokeDasharray\":\r\n case \"strokeDashoffset\":\r\n case \"strokeLinecap\":\r\n case \"strokeLinejoin\":\r\n case \"textDecoration\":\r\n case \"fontSize\":\r\n case \"fontFamily\":\r\n case \"fontWeight\":\r\n //case \"focusable\":\r\n //case \"tabindex\":\r\n //case \"role\":\r\n this[key] = this[key];\r\n break;\r\n }\r\n }\r\n }\r\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\r\n finally {\r\n try {\r\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\r\n }\r\n finally { if (e_1) throw e_1.error; }\r\n }\r\n }\r\n this.applyFilters();\r\n this.visible = this.visible;\r\n this.interactionsEnabled = this.getPropertyValue(\"interactionsEnabled\"); // can't use .interactionsEnabled as it get's parent's\r\n this._inited = true;\r\n if (!this.showOnInit) {\r\n this.appeared = true;\r\n }\r\n if (this.hidden) {\r\n this.hide(0);\r\n }\r\n this.applyMask();\r\n this.dispatch(\"validated\");\r\n this.dispatch(\"inited\");\r\n this.dispatchReady();\r\n }\r\n else {\r\n this.dispatch(\"validated\");\r\n }\r\n if (this.showTooltipOn == \"always\") {\r\n if (this.visible && !this.disabled && !this.__disabled) {\r\n this.showTooltip();\r\n }\r\n else {\r\n this.hideTooltip(0);\r\n }\r\n }\r\n };\r\n /**\r\n * Dispatches `\"ready\"` event. Sprite dispatches it right after `\"inited\"` event.\r\n *\r\n * @ignore\r\n */\r\n Sprite.prototype.dispatchReady = function () {\r\n if (!this.isReady()) {\r\n this._ready = true;\r\n this.dispatch(\"ready\");\r\n }\r\n };\r\n /**\r\n * Triggers a re-initialization of this element.\r\n *\r\n * Will result in complete redrawing of the element.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Sprite.prototype.reinit = function () {\r\n this._inited = false;\r\n this.setState(this.defaultState);\r\n this.invalidate();\r\n };\r\n /**\r\n * Handles the situation where parent element is resized.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Sprite.prototype.handleGlobalScale = function () {\r\n this.dispatch(\"globalscalechanged\");\r\n if (this.nonScalingStroke) {\r\n this.strokeWidth = this.strokeWidth;\r\n }\r\n if (this.nonScaling) {\r\n this.validatePosition();\r\n }\r\n this.updateFilterScale();\r\n };\r\n /**\r\n * Updates filter properties which might depend on scale\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Sprite.prototype.updateFilterScale = function () {\r\n var _this = this;\r\n $iter.each(this.filters.iterator(), function (filter) {\r\n filter.scale = _this.globalScale;\r\n });\r\n };\r\n /**\r\n * Removes itself from system's invalid lists.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Sprite.prototype.removeFromInvalids = function () {\r\n registry.removeFromInvalidSprites(this);\r\n registry.removeFromInvalidPositions(this);\r\n };\r\n /**\r\n * Copies all parameters from another [[Sprite]].\r\n *\r\n * @param source Source Sprite\r\n */\r\n Sprite.prototype.copyFrom = function (source) {\r\n var _this = this;\r\n _super.prototype.copyFrom.call(this, source);\r\n this.isMeasured = source.isMeasured;\r\n this.states.copyFrom(source.states);\r\n if (source.filters.length > 0) {\r\n source.filters.each(function (filter) {\r\n _this.filters.push(filter.clone());\r\n });\r\n }\r\n if (source._adapterO) {\r\n this.adapter.copyFrom(source._adapterO);\r\n }\r\n //helps to avoid calling getter which creates instance\r\n if (source[\"_interaction\"]) {\r\n this.interactions.copyFrom(source.interactions);\r\n }\r\n if (source[\"_plugins\"]) {\r\n this.plugins.copyFrom(source.plugins);\r\n }\r\n this.configField = source.configField;\r\n this.applyOnClones = source.applyOnClones;\r\n // this.numberFormatter = source.numberFormatter; // todo: this creates loose number formatter and copies it to all clones. somehow we need to know if source had numberFormatter explicitly created and not just because a getter was called.\r\n //this.mask = source.mask; need to think about this, generally this causes a lot of problems\r\n this.disabled = source.disabled;\r\n this.virtualParent = source.virtualParent;\r\n this.exportable = source.exportable;\r\n //@todo: create tooltip if it's on source but not on this?\r\n //const tooltip = this._tooltip;\r\n //if (tooltip) {\r\n //\ttooltip.copyFrom(source.tooltip);\r\n //}\r\n if (source._tooltip) {\r\n if (this._tooltip) {\r\n this._tooltip.copyFrom(source.tooltip);\r\n }\r\n else {\r\n if (source.cloneTooltip) {\r\n this.tooltip = source.tooltip.clone();\r\n }\r\n else {\r\n this._tooltip = source.tooltip;\r\n }\r\n }\r\n }\r\n //if ((source)[\"_tooltip\"] && !this._tooltip) {\r\n //\tthis._tooltip = (source)[\"_tooltip\"];\r\n //}\r\n this._showSystemTooltip = source.showSystemTooltip;\r\n $utils.copyProperties(source.propertyFields, this.propertyFields);\r\n $utils.copyProperties(source.properties, this);\r\n if (source.fillModifier) {\r\n this.fillModifier = source.fillModifier.clone();\r\n }\r\n if (source.strokeModifier) {\r\n this.strokeModifier = source.strokeModifier.clone();\r\n }\r\n if (source.focusFilter) {\r\n this.focusFilter = source.focusFilter.clone();\r\n }\r\n };\r\n /**\r\n * Destroys this object and all related data.\r\n */\r\n Sprite.prototype.dispose = function () {\r\n if (!this.isDisposed()) {\r\n if (this.showTooltipOn == \"always\" && this.tooltip) {\r\n this.tooltip.hide();\r\n }\r\n this.dispatchImmediately(\"beforedisposed\");\r\n if (this.isBaseSprite) {\r\n if (this.htmlContainer) {\r\n while (this.htmlContainer.childNodes.length > 0) {\r\n this.htmlContainer.removeChild(this.htmlContainer.firstChild);\r\n }\r\n }\r\n this.isBaseSprite = false;\r\n }\r\n _super.prototype.dispose.call(this);\r\n // Clear adapters\r\n if (this._adapterO) {\r\n this._adapterO.clear();\r\n }\r\n if (this.applyOnClones) {\r\n if (this._clones) {\r\n for (var i = this._clones.length - 1; i >= 0; i--) {\r\n var clone = this._clones.getIndex(i);\r\n clone.dispose();\r\n }\r\n }\r\n }\r\n if (this._svgContainer) {\r\n this._svgContainer.dispose();\r\n }\r\n if (this._interactionDisposer) {\r\n this._interactionDisposer.dispose();\r\n this._interactionDisposer = undefined;\r\n }\r\n if (this._urlDisposer) {\r\n this._urlDisposer.dispose();\r\n }\r\n this.removeFromInvalids();\r\n if (this.element) {\r\n this.element.dispose();\r\n }\r\n if (this.group) {\r\n this.group.dispose();\r\n }\r\n if (this._numberFormatter) {\r\n this._numberFormatter.dispose();\r\n }\r\n if (this._focusFilter) {\r\n this._focusFilter.dispose();\r\n }\r\n var stroke = this.stroke;\r\n if (stroke && !(stroke instanceof Color) && stroke.dispose) {\r\n if (this.clonedFrom && this.clonedFrom.stroke == stroke) {\r\n // do nothing\r\n }\r\n else {\r\n stroke.dispose();\r\n }\r\n }\r\n // TODO a bit hacky\r\n var fill = this.fill;\r\n if (fill && !(fill instanceof Color) && fill.dispose) {\r\n if (this.clonedFrom && this.clonedFrom.fill == fill) {\r\n // do nothing\r\n }\r\n else {\r\n fill.dispose();\r\n }\r\n }\r\n // remove from map\r\n if ($type.hasValue(this.id)) {\r\n this.map.removeKey(this.id);\r\n }\r\n this.parent = undefined;\r\n if (this._filters) {\r\n while (this._filters.length > 0) {\r\n var filter = this._filters.getIndex(0);\r\n filter.dispose();\r\n this._filters.removeValue(filter);\r\n }\r\n }\r\n this._alwaysShowDisposers = undefined;\r\n }\r\n };\r\n Object.defineProperty(Sprite.prototype, \"isTemplate\", {\r\n /**\r\n * @ignore Exclude from docs\r\n * @return Is template?\r\n */\r\n get: function () {\r\n return this._isTemplate;\r\n },\r\n /**\r\n * Indicates if this element is a \"template\".\r\n *\r\n * Template Sprites act only as a holders for config for other \"real\"\r\n * elements to be cloned from.\r\n *\r\n * Templates are treated differently, as they are not validated, redrawn, or\r\n * otherwise are processed.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Is template?\r\n */\r\n set: function (value) {\r\n value = $type.toBoolean(value);\r\n if (this._isTemplate != value) {\r\n this._isTemplate = value;\r\n if (this instanceof Container) {\r\n $iter.each(this.children.iterator(), function (child) {\r\n child.isTemplate = value;\r\n });\r\n }\r\n if (value) {\r\n this.parent = this._parent;\r\n this.removeFromInvalids();\r\n }\r\n else {\r\n this.invalidate();\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"showSystemTooltip\", {\r\n /**\r\n * @return Show system tooltip?\r\n */\r\n get: function () {\r\n if (!$type.hasValue(this._showSystemTooltip)) {\r\n if (this.virtualParent) {\r\n return this.virtualParent.showSystemTooltip;\r\n }\r\n else if (this._parent) {\r\n return this._parent.showSystemTooltip;\r\n }\r\n else {\r\n return false;\r\n }\r\n }\r\n return this._showSystemTooltip;\r\n },\r\n /**\r\n * Indicates whether the element should attempt to construct itself in a way\r\n * so that system tooltip is shown if its `readerTitle` is set.\r\n *\r\n * @param value Show system tooltip?\r\n */\r\n set: function (value) {\r\n value = $type.toBoolean(value);\r\n if (this._showSystemTooltip != value) {\r\n this._showSystemTooltip = value;\r\n this.applyAccessibility();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"topParent\", {\r\n /**\r\n * ==========================================================================\r\n * HIERARCHY AND STRUCTURE RELATED STUFF\r\n * ==========================================================================\r\n * @hidden\r\n */\r\n /**\r\n * Sprites's top-level [[Container]].\r\n *\r\n * Please note that in most cases it won't be the chart element.\r\n *\r\n * To access base chart element, use `baseSprite` instead.\r\n *\r\n * @return Top-level ascendant\r\n */\r\n get: function () {\r\n if (this._topParent) {\r\n return this._topParent;\r\n }\r\n else {\r\n if (this._parent) {\r\n return this._parent.topParent;\r\n }\r\n }\r\n },\r\n /**\r\n * @ignore\r\n * @param value {Container} top parent of a sprite\r\n */\r\n set: function (value) {\r\n this._topParent = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"parent\", {\r\n /**\r\n * @return Parent container\r\n */\r\n get: function () {\r\n return this._parent;\r\n },\r\n /**\r\n * Elements' parent [[Container]].\r\n *\r\n * @param parent Parent container\r\n */\r\n set: function (parent) {\r\n if (this._isTemplate) {\r\n return;\r\n }\r\n // TODO is this needed ?\r\n $utils.used(this.paper);\r\n var oldParent = this._parent;\r\n if (oldParent != parent) {\r\n if (oldParent) {\r\n oldParent.children.removeValue(this);\r\n }\r\n this._parent = parent;\r\n if (parent) {\r\n this.topParent = parent.topParent;\r\n if (parent.isTemplate) {\r\n this.isTemplate = true;\r\n }\r\n this.baseId = parent.baseId;\r\n parent.children.push(this);\r\n // insert handler at Container invalidates + invalidatesLayout + adds to group\r\n if (this._tooltip && !this._tooltipContainer) {\r\n this._tooltip.parent = parent.tooltipContainer;\r\n }\r\n if (!this._dataItem) {\r\n this.dataItem = parent.dataItem;\r\n }\r\n this.handleAlwaysShowTooltip();\r\n if (this.dataItem) {\r\n // No need to apply accessibility if there's no data item\r\n // The whole reason of applying it here is to populate data\r\n // placesholders, and if tehre's no data item, it won't work anyway\r\n this.applyAccessibility();\r\n }\r\n this.dispatchImmediately(\"parentset\");\r\n }\r\n else {\r\n this.topParent = undefined;\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * @ignore\r\n */\r\n Sprite.prototype.handleAlwaysShow = function () {\r\n this.showTooltip();\r\n };\r\n /**\r\n * @ignore\r\n */\r\n Sprite.prototype.handleAlwaysShowTooltip = function () {\r\n var sprite = this;\r\n var oldDisposers = this._alwaysShowDisposers;\r\n if (oldDisposers) {\r\n $array.each(oldDisposers, function (oldDisposer) {\r\n oldDisposer.dispose();\r\n });\r\n }\r\n this._alwaysShowDisposers = [];\r\n if (this.showTooltipOn == \"always\") {\r\n while (sprite != undefined) {\r\n var disposer = sprite.events.on(\"visibilitychanged\", this.handleAlwaysShow, this, false);\r\n this.addDisposer(disposer);\r\n this._alwaysShowDisposers.push(disposer);\r\n sprite = sprite.parent;\r\n }\r\n }\r\n };\r\n Object.defineProperty(Sprite.prototype, \"virtualParent\", {\r\n /**\r\n * @return Virtual parent\r\n */\r\n get: function () {\r\n return this._virtualParent;\r\n },\r\n /**\r\n * Element's \"virtual\" parent.\r\n *\r\n * This is required in ordere to maintain proper inheritance (like\r\n * formatters).\r\n *\r\n * Sometimes an element is a \"logical\" parent, even though it's not a direct\r\n * ascendant.\r\n *\r\n * Example: a bullet is not a child of the axis, but it would make sense\r\n * for it to inherit series' formatters.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Virtual parent\r\n */\r\n set: function (value) {\r\n this._virtualParent = value;\r\n if (this.dataItem) {\r\n // No need to apply accessibility if there's no data item\r\n // The whole reason of applying it here is to populate data\r\n // placesholders, and if tehre's no data item, it won't work anyway\r\n this.applyAccessibility();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Moves `` to correct place in DOM.\r\n *\r\n * Some elements are initially created in \"ghost\" container. When moving\r\n * those into proper place in DOM, their respective `` need to be moved\r\n * as well.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Sprite.prototype.appendDefs = function () {\r\n if (this.filterElement) {\r\n this.paper.appendDef(this.filterElement);\r\n }\r\n var fill = this.fill;\r\n if (fill && fill.element) {\r\n this.paper.appendDef(fill.element);\r\n }\r\n var stroke = this.stroke;\r\n if (stroke && stroke.element) {\r\n this.paper.appendDef(stroke.element);\r\n }\r\n if (this.fillModifier && this.fill instanceof Color) {\r\n var fill_1 = this.fillModifier.modify(this.fill);\r\n if (fill_1 && fill_1.element) {\r\n this.paper.appendDef(fill_1.element);\r\n }\r\n }\r\n if (this.strokeModifier && this.stroke instanceof Color) {\r\n var stroke_1 = this.strokeModifier.modify(this.stroke);\r\n if (stroke_1 && stroke_1.element) {\r\n this.paper.appendDef(stroke_1.element);\r\n }\r\n }\r\n if (this._clipPath) {\r\n this.paper.appendDef(this._clipPath);\r\n }\r\n if (this._exportable === false) {\r\n this.exportable = false;\r\n }\r\n };\r\n Object.defineProperty(Sprite.prototype, \"map\", {\r\n /**\r\n * Returns a [[Dictionary]] which maps object ids with their respective\r\n * objects.\r\n *\r\n * Can be used to retrieve any object by id, e.g.:\r\n *\r\n * ```TypeScript\r\n * console.log(mySprite.map.getKey(\"myid\"));\r\n * ```\r\n * ```JavaScript\r\n * console.log(mySprite.map.getKey(\"myid\"));\r\n * ```\r\n *\r\n * @return Map collection\r\n */\r\n get: function () {\r\n var top = this.topParent;\r\n if (top) {\r\n return top.map;\r\n }\r\n else if (!this._map) {\r\n this._map = new Dictionary();\r\n }\r\n return this._map;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"delayedMap\", {\r\n /**\r\n * @ignore\r\n * @return Map collection\r\n */\r\n get: function () {\r\n var top = this.topParent;\r\n if (top) {\r\n return top.delayedMap;\r\n }\r\n else if (!this._delayedMap) {\r\n this._delayedMap = new Dictionary();\r\n }\r\n return this._delayedMap;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"id\", {\r\n /**\r\n * @return ID\r\n */\r\n get: function () {\r\n return this._id;\r\n },\r\n /**\r\n * Element's user-defined ID.\r\n *\r\n * Will throw an Error if there already is an object with the same ID.\r\n *\r\n * Please note that above check will be performed withing the scope of the\r\n * current chart instance. It will not do checks across other chart instances\r\n * or in globally in DOM.\r\n *\r\n * Make sure the IDs are unique.\r\n *\r\n * @param value ID\r\n */\r\n set: function (value) {\r\n if (this._id != value) {\r\n this._id = value;\r\n if (this.map.hasKey(value)) {\r\n throw Error(\"Duplicate id (\" + value + \") used on multiple objects.\");\r\n }\r\n else {\r\n this.map.setKey(value, this);\r\n }\r\n if (options.autoSetClassName) {\r\n this.setClassName();\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"dom\", {\r\n /**\r\n * ==========================================================================\r\n * ELEMENT AND DOM TREE MANIPULATION AND MEASURING\r\n * ==========================================================================\r\n * @hidden\r\n */\r\n /**\r\n * Returns DOM element reference associated with this element.\r\n *\r\n * @readonly\r\n * @return DOM element\r\n */\r\n get: function () {\r\n return this.group.node;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"paper\", {\r\n /**\r\n * @ignore Exclude from docs\r\n * @return Paper\r\n */\r\n get: function () {\r\n if (this._paper) {\r\n return this._paper;\r\n }\r\n else {\r\n var parent_2 = this._parent;\r\n if (parent_2) {\r\n return parent_2.paper;\r\n }\r\n }\r\n return getGhostPaper();\r\n },\r\n /**\r\n * A [[Paper]] instance to place elements on.\r\n *\r\n * If there's no Paper set for this element, it goes up the ascendant tree\r\n * until it finds one.\r\n *\r\n * This method is used by important `addChild()` method, so it's essential\r\n * to have a [[Paper]] instance.\r\n *\r\n * If this element has a separate `htmlContainer` set, it will have a\r\n * [[Paper]] instance itself.\r\n *\r\n * @ignore Exclude from docs\r\n * @param paper Paper\r\n */\r\n set: function (paper) {\r\n this.setPaper(paper);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Sets [[Paper]] instance to use to draw elements.\r\n * @ignore\r\n * @param paper Paper\r\n * @return true if paper was changed, false, if it's the same\r\n */\r\n Sprite.prototype.setPaper = function (paper) {\r\n var oldPaper = this._paper;\r\n if (oldPaper != paper) {\r\n this._paper = paper;\r\n this.appendDefs();\r\n return true;\r\n }\r\n return false;\r\n };\r\n Object.defineProperty(Sprite.prototype, \"htmlContainer\", {\r\n /**\r\n * @return HTML element\r\n */\r\n get: function () {\r\n if (this._htmlContainer) {\r\n return this._htmlContainer;\r\n }\r\n else {\r\n var parent_3 = this._parent;\r\n if (parent_3) {\r\n return parent_3.htmlContainer;\r\n }\r\n }\r\n },\r\n /**\r\n * An HTML element to be used when placing wrapper element (`
`)\r\n * for the whole chart.\r\n *\r\n * This is the same for **all** elements within the same chart.\r\n *\r\n * @param htmlContainer HTML element\r\n */\r\n set: function (htmlContainer) {\r\n this._htmlContainer = htmlContainer;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"titleElement\", {\r\n /**\r\n * Creates (if not yet created) and returns element's `` element.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Title element\r\n */\r\n get: function () {\r\n if (!this._titleElement) {\r\n this._titleElement = this.paper.add(\"title\");\r\n this.group.add(this._titleElement);\r\n }\r\n return this._titleElement;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"descriptionElement\", {\r\n /**\r\n * Creates (if not yet created) and returns element's `<desc>` element.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Desc element\r\n */\r\n get: function () {\r\n if (!this._descriptionElement) {\r\n this._descriptionElement = this.paper.add(\"desc\");\r\n this.group.add(this._descriptionElement);\r\n }\r\n return this._descriptionElement;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"filters\", {\r\n /**\r\n * Returns list of SVG filters (effects) applied to element. If the filter\r\n * list is not yet initilized, creates and returns an empty one.\r\n * Note, not all filters combine well with one another. We recommend using one filter per sprite.\r\n *\r\n * @return List of filters\r\n */\r\n get: function () {\r\n if (!this._filters) {\r\n this._filters = new List();\r\n // TODO only add certain events ?\r\n this._disposers.push(this._filters.events.onAll(this.applyFilters, this));\r\n this._disposers.push(new ListDisposer(this._filters));\r\n }\r\n return this._filters;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Sets required SVG attributes. Must be called every time an element is\r\n * redrawn so that attributes are (re)applied.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Sprite.prototype.setSVGAttributes = function () {\r\n this.fill = this.fill;\r\n this.opacity = this.opacity;\r\n this.fillOpacity = this.fillOpacity;\r\n this.stroke = this.stroke;\r\n this.strokeOpacity = this.strokeOpacity;\r\n this.shapeRendering = this.shapeRendering;\r\n this.strokeDasharray = this.strokeDasharray;\r\n this.strokeDashoffset = this.strokeDashoffset;\r\n this.strokeLinecap = this.strokeLinecap;\r\n this.strokeLinejoin = this.strokeLinejoin;\r\n this.focusable = this.focusable;\r\n this.tabindex = this.tabindex;\r\n this.role = this.role;\r\n };\r\n /**\r\n * Sets an attribute directly on an SVG element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param attribute Attribute object\r\n */\r\n Sprite.prototype.setSVGAttribute = function (attribute) {\r\n this.group.attr(attribute);\r\n };\r\n /**\r\n * Removes an attribute directly from SVG element.\r\n *\r\n * @param attribute Attribute key to remove\r\n */\r\n Sprite.prototype.removeSVGAttribute = function (attribute) {\r\n this.group.removeAttr(attribute);\r\n };\r\n /**\r\n * Sets `class` attribute of the elements SVG node.\r\n *\r\n * Uses `am4core.options.classNamePrefix`.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Sprite.prototype.setClassName = function () {\r\n var className = this.className;\r\n var classNamePrefix = options.classNamePrefix;\r\n if (this.element) {\r\n this.element.addClass(classNamePrefix + className);\r\n }\r\n this.group.addClass(classNamePrefix + className + \"-group\");\r\n if ($type.hasValue(this.id)) {\r\n this.group.addClass(classNamePrefix + this.id);\r\n }\r\n if (this.userClassName) {\r\n this.group.addClass(this.userClassName);\r\n }\r\n };\r\n /**\r\n * Adds an `id` attribute the the element and returns the id.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Element's ID\r\n */\r\n Sprite.prototype.uidAttr = function () {\r\n this.setSVGAttribute({ \"id\": this.uid });\r\n return this.uid;\r\n };\r\n /**\r\n * [updateClipPath description]\r\n *\r\n * @todo Description\r\n */\r\n Sprite.prototype.updateClipPath = function () {\r\n var element = this._clipElement;\r\n if (element) {\r\n element.moveTo({ x: this.mask.pixelX, y: this.mask.pixelY });\r\n }\r\n };\r\n /**\r\n * @ignore\r\n */\r\n Sprite.prototype.createClipPath = function () {\r\n if (!this._clipPath) {\r\n this._clipPath = this.paper.addGroup(\"clipPath\");\r\n this.paper.appendDef(this._clipPath);\r\n this._disposers.push(this._clipPath);\r\n var id = registry.getUniqueId();\r\n this._clipPath.attr({ \"id\": id });\r\n this.group.attr({ \"clip-path\": \"url(\\\"\" + $utils.getBaseURI() + id + \"\\\")\" });\r\n }\r\n };\r\n /**\r\n * Applies the mask Sprite.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Sprite.prototype.applyMask = function () {\r\n var mask = this.mask;\r\n if (this._clipPath && mask) {\r\n // Container\r\n if (mask instanceof Container) {\r\n this._clipElement.attr({ \"width\": $math.max(0, mask.pixelWidth), \"height\": $math.max(0, mask.pixelHeight) });\r\n var point = $utils.spritePointToSprite({ x: mask.pixelX, y: mask.pixelY }, mask.parent, this);\r\n this._clipPath.x = point.x;\r\n this._clipPath.y = point.y;\r\n }\r\n // Sprite\r\n else {\r\n if (mask.element && mask.element != this._clipElement) {\r\n this._clipElement = mask.element;\r\n this._clipPath.add(this._clipElement);\r\n }\r\n this._clipPath.scale = mask.scale;\r\n this._clipPath.x = mask.pixelX;\r\n this._clipPath.y = mask.pixelY;\r\n this._clipPath.rotation = mask.rotation;\r\n }\r\n }\r\n };\r\n /**\r\n * Applies filters to the element.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Sprite.prototype.applyFilters = function () {\r\n var _this = this;\r\n // we create a separate filter for each sprite as otherwise it would be impossible to animate filter.\r\n // svg doesn't support multiple filters applied to one element, so we put all the primitives to one filterElement of a sprite.\r\n if (this._filters && this._filters.length > 0) {\r\n var width_1 = 100;\r\n var height_1 = 100;\r\n if (!this.filterElement) {\r\n this.filterElement = this.paper.addGroup(\"filter\");\r\n this._disposers.push(this.filterElement);\r\n }\r\n else {\r\n this.filterElement.removeChildNodes();\r\n }\r\n this.paper.appendDef(this.filterElement);\r\n var id = \"filter-\" + this.uid;\r\n this.filterElement.attr({ \"id\": id });\r\n $iter.each(this.filters.iterator(), function (filter) {\r\n filter.sprite = _this;\r\n filter.paper = _this.paper;\r\n _this.filterElement.attr({ filterUnits: filter.filterUnits });\r\n filter.appendPrimitives(_this.filterElement);\r\n if (filter.width > width_1) {\r\n width_1 = filter.width;\r\n }\r\n if (filter.height > height_1) {\r\n height_1 = filter.height;\r\n }\r\n filter.scale = _this.globalScale;\r\n });\r\n var w = width_1 + \"%\";\r\n var h = height_1 + \"%\";\r\n /* temporarily removed as it is breaking tooltips on Safari @todo come back to this\r\n if (this._measuredHeight <= 1) {\r\n h = height + \"\";\r\n }\r\n\r\n if (this._measuredWidth <= 1) {\r\n h = width + \"\";\r\n }*/\r\n this.filterElement.attr({ \"width\": w, \"height\": h, \"x\": -(width_1 - 100) / 2 + \"%\", \"y\": -(height_1 - 100) / 2 + \"%\" });\r\n this.group.attr({ \"filter\": \"url(\\\"\" + $utils.getBaseURI() + id + \"\\\")\" });\r\n }\r\n else if (this.filterElement) {\r\n this.group.removeAttr(\"filter\");\r\n this.filterElement.removeChildNodes();\r\n }\r\n };\r\n /**\r\n * [removeClipPath description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\r\n Sprite.prototype.removeClipPath = function () {\r\n if (this._clipPath) {\r\n //this._clipPath.dispose();\r\n this.removeDispose(this._clipPath);\r\n this._clipPath = undefined;\r\n }\r\n };\r\n /**\r\n * [setElement description]\r\n *\r\n * @ignore\r\n * @todo Description\r\n * @param element [description]\r\n */\r\n Sprite.prototype.setElement = function (element) {\r\n this.element = element;\r\n this.setSVGAttributes();\r\n this.applyAccessibility();\r\n };\r\n Object.defineProperty(Sprite.prototype, \"element\", {\r\n /**\r\n * @return Element\r\n */\r\n get: function () {\r\n return this._element;\r\n },\r\n /**\r\n * The main element for this Sprite, usually an SVG `<g>`.\r\n *\r\n * All other sub-elements are created in it.\r\n *\r\n * @param element Element\r\n */\r\n set: function (element) {\r\n // Destroy previous element if there was one before\r\n this.removeElement();\r\n // Set new element\r\n this._element = element;\r\n // Add element to group\r\n // Since we are adding Element to group, which is already in the\r\n // `.disposers` it will be removed automatically when Sprite is disposed\r\n // of\r\n this.group.add(element);\r\n if (element.node instanceof SVGPathElement) {\r\n this._isPath = true;\r\n }\r\n // This is needed if someone is setting element not in draw method but\r\n // from outside\r\n if (!this.invalid) {\r\n this.validate();\r\n }\r\n if (options.autoSetClassName) {\r\n this.setClassName();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"svgContainer\", {\r\n /**\r\n * HTML container (`<div>`) which is used to place chart's `<svg>` element\r\n * in.\r\n *\r\n * @return Container for chart elements\r\n */\r\n get: function () {\r\n if (this._svgContainer) {\r\n return this._svgContainer;\r\n }\r\n else if (this._parent) {\r\n return this._parent.svgContainer;\r\n }\r\n },\r\n /**\r\n * Sets HTML container to add SVG and other chart elements to.\r\n *\r\n * @param svgContainer Container for chart elements\r\n */\r\n set: function (svgContainer) {\r\n this._svgContainer = svgContainer;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Measures main element.\r\n *\r\n * Saves measurements into private `_bbox` property.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Sprite.prototype.measureElement = function () {\r\n if (this.element) {\r\n if (this.definedBBox) {\r\n this._bbox = this.definedBBox;\r\n }\r\n else {\r\n var svgBBox = this.element.getBBox();\r\n this._bbox = { x: svgBBox.x, y: svgBBox.y, width: svgBBox.width, height: svgBBox.height };\r\n }\r\n }\r\n };\r\n /**\r\n * Positions element according its center settings.\r\n *\r\n * @todo Description (review)\r\n * @ignore Exclude from docs\r\n */\r\n Sprite.prototype.updateCenter = function () {\r\n if (this.element) {\r\n var prevElementTransform = this.element.transformString;\r\n var bbox = this.bbox;\r\n var ex = 0;\r\n var ey = 0;\r\n var elementX = bbox.x;\r\n var elementY = bbox.y;\r\n var elementWidth = bbox.width;\r\n var elementHeigth = bbox.height;\r\n var pixelPaddingLeft = this.pixelPaddingLeft;\r\n var pixelPaddingRight = this.pixelPaddingRight;\r\n var pixelPaddingTop = this.pixelPaddingTop;\r\n var pixelPaddingBottom = this.pixelPaddingBottom;\r\n // add padding to the measured size\r\n var measuredWidth = $math.max(elementWidth + pixelPaddingLeft + pixelPaddingRight, this.pixelWidth);\r\n var measuredHeight = $math.max(elementHeigth + pixelPaddingTop + pixelPaddingBottom, this.pixelHeight);\r\n // extremes\r\n var left = bbox.x;\r\n var right = bbox.x + measuredWidth;\r\n var top_1 = bbox.y;\r\n var bottom = bbox.y + measuredHeight;\r\n var horizontalCenter = this.horizontalCenter;\r\n var verticalCenter = this.verticalCenter;\r\n switch (horizontalCenter) {\r\n case \"none\":\r\n ex = elementX + pixelPaddingLeft;\r\n break;\r\n case \"left\":\r\n ex = pixelPaddingLeft;\r\n break;\r\n case \"middle\":\r\n ex = pixelPaddingLeft - (elementWidth + pixelPaddingRight + pixelPaddingLeft) / 2;\r\n break;\r\n case \"right\":\r\n ex = -pixelPaddingRight - elementWidth;\r\n break;\r\n }\r\n switch (verticalCenter) {\r\n case \"none\":\r\n ey = elementY + pixelPaddingTop;\r\n break;\r\n case \"top\":\r\n ey = pixelPaddingTop;\r\n break;\r\n case \"middle\":\r\n ey = pixelPaddingTop - (elementHeigth + pixelPaddingBottom + pixelPaddingTop) / 2;\r\n break;\r\n case \"bottom\":\r\n ey = -pixelPaddingBottom - elementHeigth;\r\n break;\r\n }\r\n this._measuredHeight = measuredHeight;\r\n this._measuredWidth = measuredWidth;\r\n var x = $math.round(ex - elementX, this._positionPrecision, true);\r\n var y = $math.round(ey - elementY, this._positionPrecision, true);\r\n this.ex = x - pixelPaddingLeft;\r\n this.ey = y - pixelPaddingTop;\r\n this.maxLeft = left + x - pixelPaddingLeft;\r\n this.maxRight = right + x - pixelPaddingLeft;\r\n this.maxTop = top_1 + y - pixelPaddingTop;\r\n this.maxBottom = bottom + y - pixelPaddingTop;\r\n if (this.pixelPerfect && options.pixelPerfectPrecision == 0) {\r\n x -= 0.5;\r\n y -= 0.5;\r\n }\r\n this.element.moveTo({ x: x, y: y });\r\n if (prevElementTransform != this.element.transformString) {\r\n this.dispatchImmediately(\"transformed\");\r\n }\r\n }\r\n };\r\n /**\r\n * Measures the whole element.\r\n *\r\n * Returns `true` if the size has changed from the last measurement.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Did the size changed from the last measurement?\r\n */\r\n Sprite.prototype.measure = function () {\r\n this.updateCenter();\r\n var measuredWidth = this._measuredWidth;\r\n var measuredHeight = this._measuredHeight;\r\n // extremes\r\n var left = this.maxLeft;\r\n var right = this.maxRight;\r\n var top = this.maxTop;\r\n var bottom = this.maxBottom;\r\n // non-parent wise size\r\n this._measuredWidthSelf = measuredWidth;\r\n this._measuredHeightSelf = measuredHeight;\r\n var positionPrecision = this._positionPrecision;\r\n this.maxLeftSelf = this.maxLeft;\r\n this.maxRightSelf = this.maxRight;\r\n this.maxTopSelf = this.maxTop;\r\n this.maxBottomSelf = this.maxBottom;\r\n // if a sprite is rotated or scaled, calculate measured size after transformations\r\n if (this.rotation !== 0 || this.scale !== 1 || this.nonScaling) {\r\n // not good to handleGlobalScale here.\r\n if (this.nonScalingStroke) {\r\n this.strokeWidth = this.strokeWidth;\r\n }\r\n var svg = this.paper.svg;\r\n var matrix = svg.createSVGMatrix();\r\n var rotation = this.rotation;\r\n var scale = this.scale;\r\n if (this.nonScaling) {\r\n scale = this.scale / this.globalScale;\r\n }\r\n matrix.a = $math.cos(rotation) * scale;\r\n matrix.c = -$math.sin(rotation) * scale;\r\n matrix.e = 0;\r\n matrix.b = $math.sin(rotation) * scale;\r\n matrix.d = $math.cos(rotation) * scale;\r\n matrix.f = 0;\r\n var p1 = svg.createSVGPoint();\r\n p1.x = left;\r\n p1.y = top;\r\n var p2 = svg.createSVGPoint();\r\n p2.x = right;\r\n p2.y = top;\r\n var p3 = svg.createSVGPoint();\r\n p3.x = right;\r\n p3.y = bottom;\r\n var p4 = svg.createSVGPoint();\r\n p4.x = left;\r\n p4.y = bottom;\r\n var pt1 = p1.matrixTransform(matrix);\r\n var pt2 = p2.matrixTransform(matrix);\r\n var pt3 = p3.matrixTransform(matrix);\r\n var pt4 = p4.matrixTransform(matrix);\r\n left = Math.min(pt1.x, pt2.x, pt3.x, pt4.x);\r\n right = Math.max(pt1.x, pt2.x, pt3.x, pt4.x);\r\n top = Math.min(pt1.y, pt2.y, pt3.y, pt4.y);\r\n bottom = Math.max(pt1.y, pt2.y, pt3.y, pt4.y);\r\n measuredWidth = right - left;\r\n measuredHeight = bottom - top;\r\n this.maxLeft = $math.round(left, positionPrecision, true);\r\n this.maxRight = $math.round(right, positionPrecision, true);\r\n this.maxTop = $math.round(top, positionPrecision, true);\r\n this.maxBottom = $math.round(bottom, positionPrecision, true);\r\n }\r\n this._measuredWidth = $math.round(measuredWidth, positionPrecision, true);\r\n this._measuredHeight = $math.round(measuredHeight, positionPrecision, true);\r\n // dispatch event\r\n if (this._measuredWidth != this._prevMeasuredWidth || this._measuredHeight != this._prevMeasuredHeight) {\r\n this._prevMeasuredHeight = this._measuredHeight;\r\n this._prevMeasuredWidth = this._measuredWidth;\r\n // TODO clear existing sizechanged dispatches ?\r\n this.dispatch(\"sizechanged\");\r\n if ((this.isHover || this.showTooltipOn == \"hit\" || this.showTooltipOn == \"always\") && this.tooltip && this.tooltip.visible && ($type.hasValue(this.tooltipText) || $type.hasValue(this.tooltipHTML))) {\r\n this.updateTooltipPosition();\r\n }\r\n return true;\r\n }\r\n return false;\r\n };\r\n /**\r\n * Insert this element before sibling element.\r\n *\r\n * @param sprite Target element\r\n * @return This element\r\n */\r\n Sprite.prototype.insertBefore = function (sprite) {\r\n var parent = this._parent;\r\n if (parent) {\r\n var index = parent.children.indexOf(sprite);\r\n if (index !== -1) {\r\n parent.children.moveValue(this, index);\r\n parent.sortChildren();\r\n }\r\n }\r\n return this;\r\n };\r\n /**\r\n * Insert this element after sibling element.\r\n *\r\n * @param sprite Target element\r\n * @return This element\r\n */\r\n Sprite.prototype.insertAfter = function (sprite) {\r\n var parent = this._parent;\r\n if (parent) {\r\n var index = parent.children.indexOf(sprite);\r\n if (index !== -1) {\r\n parent.children.moveValue(this, index + 1);\r\n parent.sortChildren();\r\n }\r\n }\r\n return this;\r\n };\r\n /**\r\n * Removes the main SVG element.\r\n *\r\n * This does not destroy the whole Sprite element. To do that use\r\n * `dispose()` instead.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Sprite.prototype.removeElement = function () {\r\n // remove visual element\r\n if (this._element) {\r\n this.removeDispose(this._element);\r\n this._element = undefined;\r\n }\r\n };\r\n /**\r\n * Returns relative (percent) value of the X coordindate within this element.\r\n *\r\n * A relative value is a hundredth of a percent. So 100% would result in a 1\r\n * as relative value.\r\n *\r\n * @param value Absolute or relative X coordinate\r\n * @return Relative value\r\n */\r\n Sprite.prototype.getRelativeX = function (value) {\r\n if (value instanceof Percent) {\r\n return value.value;\r\n }\r\n else if (this._parent) {\r\n return value / this._parent.innerWidth;\r\n }\r\n return 0;\r\n };\r\n /**\r\n * Returns relative (percent) value of the Y coordindate within this element.\r\n *\r\n * A relative value is a hundredth of a percent. So 100% would result in a 1\r\n * as relative value.\r\n *\r\n * @param value Absolute or relative Y coordinate\r\n * @return Relative value\r\n */\r\n Sprite.prototype.getRelativeY = function (value) {\r\n if (value instanceof Percent) {\r\n return value.value;\r\n }\r\n else if (this._parent) {\r\n return value / this._parent.innerHeight;\r\n }\r\n return 0;\r\n };\r\n /**\r\n * Returns an X coordinate in pixel within the element.\r\n *\r\n * If number is passed in as parameter, the same number will be returned\r\n * back.\r\n *\r\n * If [[Percent]] is passed in, it will be recalculated to pixels.\r\n *\r\n * @param value Absolute or relative X coordinate\r\n * @return X coordinate in pixels\r\n */\r\n Sprite.prototype.getPixelX = function (value) {\r\n // we don't use $utils.valueToRelative as this would mean that we should access parent.innerWidth\r\n // all the time and this would result chain of the same actions and will slow down the system a lot\r\n var pixel = 0;\r\n if ($type.isNumber(value)) {\r\n pixel = value;\r\n }\r\n else if (value instanceof Percent) {\r\n var relative = value.value;\r\n if (this._parent) {\r\n pixel = $math.round(this._parent.innerWidth * relative, this._positionPrecision, true);\r\n }\r\n }\r\n return pixel;\r\n };\r\n /**\r\n * Returns an Y coordinate in pixel within the element.\r\n *\r\n * If number is passed in as parameter, the same number will be returned\r\n * back.\r\n *\r\n * If [[Percent]] is passed in, it will be recalculated to pixels.\r\n *\r\n * @param value Absolute or relative Y coordinate\r\n * @return Y coordinate in pixels\r\n */\r\n Sprite.prototype.getPixelY = function (value) {\r\n // we don't use $utils.valueToRelative as this would mean that we should access parent.innerWidth\r\n // all the time and this would result chain of the same actions and will slow down the system a lot\r\n var pixel = 0;\r\n if ($type.isNumber(value)) {\r\n pixel = value;\r\n }\r\n else if (value instanceof Percent) {\r\n var relative = value.value;\r\n if (this._parent) {\r\n pixel = $math.round(this._parent.innerHeight * relative, this._positionPrecision, true);\r\n }\r\n }\r\n return pixel;\r\n };\r\n /**\r\n * Moves the element to a specified coordinates.\r\n *\r\n * Using this method is preferred method of moving element, as it saves some\r\n * CPU processing power over setting `x` and `y` properties separately.\r\n *\r\n * The method respects element's center settings. The element will be\r\n * positioned so that `point` coordinates come in whatever \"center\" of the\r\n * element is, as set in `horizontalCenter` and `verticalCenter`.\r\n *\r\n * Besides moving the element, you can also at the same time scale and\r\n * rotate the element.\r\n *\r\n * @param point New coordinates\r\n * @param rotation New rotation\r\n * @param scale New Scale\r\n */\r\n Sprite.prototype.moveTo = function (point, rotation, scale, isDragged) {\r\n if (this.isDragged && !isDragged) {\r\n return;\r\n }\r\n if (point) {\r\n if ($type.isNumber(point.x)) {\r\n this.setPropertyValue(\"x\", $math.round(point.x, this._positionPrecision, true));\r\n }\r\n if ($type.isNumber(point.y)) {\r\n this.setPropertyValue(\"y\", $math.round(point.y, this._positionPrecision, true));\r\n }\r\n }\r\n if ($type.isNumber(rotation)) {\r\n this.rotation = rotation;\r\n }\r\n if ($type.isNumber(scale)) {\r\n this.scale = scale;\r\n }\r\n // must leave this\r\n this.invalidatePosition();\r\n };\r\n Object.defineProperty(Sprite.prototype, \"mask\", {\r\n /**\r\n * Returns [[Sprite]] element currently used as mask for this element.\r\n *\r\n * @ignore Exclude from docs\r\n * @return A [[Sprite]] to use as mask\r\n */\r\n get: function () {\r\n if (!this._adapterO) {\r\n return this._mask.get();\r\n }\r\n else {\r\n return this._adapterO.apply(\"mask\", this._mask.get());\r\n }\r\n },\r\n /**\r\n * Sets another [[Sprite]] element as this elements mask.\r\n *\r\n * @ignore Exclude from docs\r\n * @param mask A [[Sprite]] to use as mask\r\n */\r\n set: function (mask) {\r\n var _this = this;\r\n if (this._mask.get() !== mask) {\r\n // this is good\r\n if (mask) {\r\n this.createClipPath();\r\n if (!(mask instanceof Container)) {\r\n mask.isMeasured = false;\r\n if (mask.element) {\r\n this._clipElement = mask.element;\r\n }\r\n }\r\n else {\r\n this._clipElement = this.paper.add(\"rect\");\r\n }\r\n if (this._clipElement) {\r\n this._clipPath.add(this._clipElement);\r\n }\r\n this._mask.set(mask, new MultiDisposer([\r\n //mask.addEventListener(SpriteEvent.TRANSFORMED, this.applyMask, false, this);\r\n mask.events.on(\"maxsizechanged\", function () { if (_this.inited) {\r\n _this.applyMask();\r\n } }, undefined, false),\r\n mask.events.on(\"validated\", this.applyMask, this, false),\r\n mask.events.on(\"positionchanged\", this.applyMask, this, false)\r\n ]));\r\n this.applyMask();\r\n }\r\n else {\r\n this._mask.reset();\r\n this.group.removeAttr(\"clip-path\");\r\n this.removeClipPath();\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"maskRectangle\", {\r\n /**\r\n * @ignore Exclude from docs\r\n * @return Mask Rectangle\r\n */\r\n get: function () {\r\n return this._maskRectangle;\r\n },\r\n // you can set IRectangle as a mask instead o a sprite. Note, the changes of the object won't be monitored\r\n /**\r\n * Instead of creating a [[Sprite]] for mask, you can just use a\r\n * [[Rectangle]] by setting this accessor.\r\n *\r\n * Please note that the element will not monitor any changes to the mask\r\n * rectangle.\r\n *\r\n * @ignore Exclude from docs\r\n * @param rect Mask Rectangle\r\n */\r\n set: function (rect) {\r\n if (rect) {\r\n this.createClipPath();\r\n if (!this._clipElement) {\r\n this._clipElement = this.paper.add(\"rect\");\r\n this._clipPath.add(this._clipElement);\r\n }\r\n this._clipElement.attr({ \"width\": rect.width, \"height\": rect.height });\r\n }\r\n else {\r\n this.removeClipPath();\r\n this._clipElement = undefined;\r\n }\r\n this._maskRectangle = rect;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"isMeasured\", {\r\n /**\r\n * @ignore Exclude from docs\r\n * @return Was element already measured?\r\n */\r\n get: function () {\r\n return this._isMeasured;\r\n },\r\n /**\r\n * Indicates if this element was already measured.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Was element already measured?\r\n */\r\n set: function (value) {\r\n value = $type.toBoolean(value);\r\n if (!value) {\r\n this._measuredWidth = 0;\r\n this._measuredHeight = 0;\r\n //this._pixelHeight = 0;\r\n //this._pixelWidth = 0;\r\n }\r\n if (this._isMeasured != value) {\r\n this._isMeasured = value;\r\n this.invalidatePosition();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Checks if the this element has any of its parts overlapping with another\r\n * element.\r\n *\r\n * @todo Description (review)\r\n * @param sprite Second element to test again\r\n * @return Overlapping?\r\n */\r\n Sprite.prototype.hitTest = function (sprite) {\r\n // validate, otherwise we will not know measuredWidth and measuredHeight\r\n if (this.invalid) {\r\n this.validate();\r\n }\r\n if (sprite.invalid) {\r\n sprite.validate();\r\n }\r\n var ax1 = this.pixelX + this.maxLeft;\r\n var ay1 = this.pixelY + this.maxTop;\r\n var ax2 = ax1 + this.maxRight;\r\n var ay2 = ay1 + this.maxBottom;\r\n var bx1 = sprite.pixelX + sprite.maxLeft;\r\n var by1 = sprite.pixelY + sprite.maxTop;\r\n var bx2 = bx1 + sprite.maxRight;\r\n var by2 = by1 + sprite.maxBottom;\r\n return !(bx1 > ax2 || bx2 < ax1 || by1 > ay2 || by2 < ay1);\r\n };\r\n Object.defineProperty(Sprite.prototype, \"inited\", {\r\n /**\r\n * ==========================================================================\r\n * STATE-RELATED\r\n * ==========================================================================\r\n * @hidden\r\n */\r\n /**\r\n * Returns `true` if Sprite has already finished initializing.\r\n *\r\n * @return Initialized?\r\n */\r\n get: function () {\r\n return this._inited;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Returns `true` if Sprite has already finished initializing and is ready.\r\n *\r\n * If this object is a [[Container]] it will wait for all of its children\r\n * are ready before becoming ready itself and firing a `\"ready\"` event.\r\n *\r\n * @return is ready?\r\n */\r\n Sprite.prototype.isReady = function () {\r\n return this._ready;\r\n };\r\n Object.defineProperty(Sprite.prototype, \"states\", {\r\n /**\r\n * Returns a collection of element's available [[SpriteState]] entries.\r\n *\r\n * @see {@link SpriteState}\r\n * @return States\r\n */\r\n get: function () {\r\n if (!this._states) {\r\n var state = new SpriteState();\r\n // works\r\n this._states = new DictionaryTemplate(state);\r\n // TODO what about removeKey ?\r\n this._disposers.push(this._states.events.on(\"insertKey\", this.processState, this, false));\r\n this._disposers.push(this._states.events.on(\"setKey\", this.processState, this, false));\r\n this._disposers.push(new DictionaryDisposer(this._states));\r\n this._disposers.push(state);\r\n }\r\n return this._states;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"hiddenState\", {\r\n /**\r\n * Returns a [[SpriteState]] object for \"hidden\" state.\r\n *\r\n * This is a shortcut to `this.states.getKey(\"hidden\")`.\r\n *\r\n * @return Hidden state\r\n */\r\n get: function () {\r\n if (!this.states.getKey(\"hidden\")) {\r\n var hiddenState = this.states.create(\"hidden\");\r\n hiddenState.properties.opacity = 0;\r\n hiddenState.properties.visible = false;\r\n }\r\n return this.states.getKey(\"hidden\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"defaultState\", {\r\n /**\r\n * Returns a [[SpriteState]] object for \"default\" state.\r\n *\r\n * This is a shortcut to `this.states.getKey(\"default\")`.\r\n *\r\n * @return Hidden state\r\n */\r\n get: function () {\r\n if (!this.states.getKey(\"default\")) {\r\n var defaultState = this.states.create(\"default\");\r\n defaultState.properties.opacity = 1;\r\n }\r\n return this.states.getKey(\"default\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Checks if some key states are defined and updates Sprite properties\r\n * accordingly.\r\n *\r\n * For example if there's a state \"down\" defined for Sprite, we automatically\r\n * make it \"clickable\".\r\n *\r\n * @ignore Exclude from docs\r\n * @param event An event which caused state list update\r\n */\r\n Sprite.prototype.processState = function (event) {\r\n var state = event.newValue;\r\n state.sprite = this;\r\n state.name = event.key;\r\n if (this.states.hasKey(\"hover\") || (this.showTooltipOn == \"hover\" && ($type.hasValue(this.tooltipHTML) || $type.hasValue(this.tooltipText)))) {\r\n this.hoverable = true;\r\n }\r\n if (this.states.hasKey(\"down\") || (this.showTooltipOn == \"hover\" && ($type.hasValue(this.tooltipHTML) || $type.hasValue(this.tooltipText)))) {\r\n this.clickable = true;\r\n }\r\n if (this.states.hasKey(\"focus\")) {\r\n this.focusable = true;\r\n }\r\n // Propagate the new state to clones\r\n if (this.applyOnClones) {\r\n var clones = this.clones.values;\r\n var length_1 = clones.length;\r\n for (var i = 0; i < length_1; ++i) {\r\n var clone = clones[i];\r\n if (!clone.isDisposed()) {\r\n clone.states.setKey(state.name, state);\r\n }\r\n }\r\n }\r\n };\r\n Object.defineProperty(Sprite.prototype, \"animations\", {\r\n /**\r\n * Returns a list elements's animations currently being played.\r\n *\r\n * If the list has not been initialized it is created.\r\n *\r\n * @return List of animations\r\n */\r\n get: function () {\r\n if (!this._animations) {\r\n this._animations = [];\r\n this._disposers.push(new AnimationDisposer(this._animations));\r\n }\r\n return this._animations;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Converts element's local coordinates to the coordinates within the main\r\n * chart container.\r\n *\r\n * @param point Local point\r\n * @return Global point\r\n */\r\n Sprite.prototype.getSvgPoint = function (point) {\r\n try {\r\n // Calculate SVG point\r\n var bbox = this.htmlContainer.getBoundingClientRect();\r\n return {\r\n \"x\": point.x - bbox.left,\r\n \"y\": point.y - bbox.top\r\n };\r\n }\r\n catch (e) {\r\n return point;\r\n }\r\n };\r\n /**\r\n * Creates and starts an [[Animation]] with given `animationOptions`.\r\n *\r\n * @see {@link Animation} for additional information about available options\r\n * @param animationOptions Animation options\r\n * @param duration Duration in milliseconds\r\n * @param easing Easing function\r\n * @return Animation instance\r\n */\r\n Sprite.prototype.animate = function (animationOptions, duration, easing) {\r\n return new Animation(this, animationOptions, duration, easing).start();\r\n };\r\n /**\r\n * Applies a [[SpriteState]] on this element.\r\n *\r\n * The first parameter can either be a name state or a [[SpriteState]]\r\n * instance.\r\n *\r\n * When run, this method will apply SVG properties defined in a\r\n * [[SpriteState]], but only those that are relevant to this particular\r\n * element, i.e. are in the `properties` array.\r\n *\r\n * @see {@link SpriteState}\r\n * @param value A state - name key or instance\r\n * @param transitionDuration Duration of the transition between current and new state\r\n * @param easing An easing function\r\n */\r\n Sprite.prototype.setState = function (value, transitionDuration, easing) {\r\n var state;\r\n if (value instanceof SpriteState) {\r\n this.states.setKey(value.name, value);\r\n state = value;\r\n }\r\n else {\r\n state = this.states.getKey(value);\r\n if (!state) {\r\n return;\r\n }\r\n }\r\n // stop previous transition\r\n // not good - foe expample, we are animating to some \"active\" state and in them middle \"hover\" state happens. then \"active\" stat won't be applied\r\n //if (this._transition) {\r\n //this._transition.stop();\r\n //}\r\n if (state.name == \"hover\") {\r\n if (this.isHidden) {\r\n return;\r\n }\r\n this.isHover = true;\r\n }\r\n if (state.name == \"hidden\") {\r\n this.isHiding = true;\r\n }\r\n else {\r\n if (!this.visible) {\r\n this.setVisibility(state.properties.visible || this.defaultState.properties.visible);\r\n }\r\n }\r\n if (state.name == \"active\") {\r\n this.isActive = true;\r\n }\r\n // we do not set isActive = false here if it's not active, but container does that if setStateOnChildren = true\r\n if (!$type.isNumber(transitionDuration)) {\r\n transitionDuration = state.transitionDuration;\r\n }\r\n if (!$type.hasValue(easing)) {\r\n easing = state.transitionEasing;\r\n }\r\n return this.transitTo(state, transitionDuration, easing);\r\n };\r\n /**\r\n * Applies proper state based on the condition of the element. A condition is\r\n * deducted in this order:\r\n * * \"hover\" if Sprite has currently any pointers over it\r\n * * \"down\" if Sprite has any pointers (touch or mouse) currently pressed over it\r\n * * \"focus\" if Sprite has currently got focus (accessibility)\r\n * * \"hidden\" if Sprite is currently hidden\r\n *\r\n * Returns an [[Animation]] object, which is handling gradual transition from\r\n * current values of properties, to the new target state(s).\r\n *\r\n * @param duration Duration for the animation (ms)\r\n * @return [[Animation]] object which is handling the transition\r\n */\r\n Sprite.prototype.applyCurrentState = function (duration) {\r\n //if (!this.isHidden) { // this was done for hover state not to take effect if \"hidden\" is actually visible, need to think about it.\r\n var animation = this.setState(this.defaultState, duration);\r\n if (this.isHover) {\r\n animation = this.setState(\"hover\", duration);\r\n }\r\n if (this.isDown && this.interactions.downPointers.length) {\r\n animation = this.setState(\"down\", duration);\r\n }\r\n this.isFocused = this.isFocused;\r\n if (this.isActive) {\r\n animation = this.setState(\"active\", duration);\r\n if (this.isHover && this.states.hasKey(\"hoverActive\")) {\r\n animation = this.setState(\"hoverActive\", duration);\r\n }\r\n }\r\n return animation;\r\n //}\r\n };\r\n /**\r\n * Starts an [[Animation]] of the properties to specific values as they are\r\n * set in `state`.\r\n *\r\n * @ignore Exclude from docs\r\n * @param state Target State\r\n * @param duration Duration in milliseconds\r\n * @param easing Easing function\r\n * @return Transition Animation\r\n */\r\n Sprite.prototype.transitTo = function (state, duration, easing) {\r\n var _this = this;\r\n // Init\r\n var options = [], propValues = state.allValues, transition;\r\n // todo: do this for numeric/color properties only?\r\n // @todo use state.getPropertyValue instead\r\n $object.each(propValues, function (propertyName, finalValue) {\r\n var currentValue = _this[propertyName];\r\n // save current value to default state. this solves a big problem where values must be set both on sprite and default state\r\n if (finalValue != currentValue && _this.defaultState.properties[propertyName] == undefined) {\r\n _this.defaultState.properties[propertyName] = currentValue;\r\n }\r\n //if (finalValue != currentValue && $type.hasValue(finalValue)) {\r\n if (finalValue != \"__unset\") {\r\n var option = { from: currentValue, to: finalValue, property: propertyName };\r\n options.push(option);\r\n }\r\n });\r\n if (options.length > 0) {\r\n transition = this.animate(options, duration, easing);\r\n if (transition && !transition.isFinished()) {\r\n // TODO should this use events.once ?\r\n // TODO push onto _disposers array ?\r\n this._disposers.push(transition.events.on(\"animationended\", function () {\r\n _this.dispatchImmediately(\"transitionended\");\r\n }));\r\n }\r\n else {\r\n this.dispatchImmediately(\"transitionended\");\r\n }\r\n }\r\n // apply filters if set\r\n if (state.filters.length > 0) {\r\n var newFilters_1 = [];\r\n // check for the same filters\r\n $iter.each(state.filters.iterator(), function (stateFilter) {\r\n var newFilter = stateFilter.clone();\r\n newFilters_1.push(newFilter);\r\n var animationOptions = [];\r\n $iter.each(_this.filters.iterator(), function (currentFilter) {\r\n // if we have the same filters\r\n if (currentFilter.className == newFilter.className) {\r\n if (!$iter.contains(_this.defaultState.filters.iterator(), function (x) { return x.className === newFilter.className; })) {\r\n _this.defaultState.filters.push(currentFilter);\r\n }\r\n $object.each(newFilter.properties, function (propertyName, newValue) {\r\n var currentValue = currentFilter.properties[propertyName];\r\n // if values are not the same, push to animation options array\r\n if (currentValue != newValue) {\r\n animationOptions.push({ property: propertyName, from: currentValue, to: newValue });\r\n }\r\n });\r\n }\r\n });\r\n // animate to new value\r\n newFilter.animate(animationOptions, duration, easing);\r\n });\r\n this.filters.clear();\r\n this.filters.pushAll(newFilters_1);\r\n }\r\n return transition;\r\n };\r\n /**\r\n * Returns `true` if Sprite is currently transiting from one state/value to\r\n * another.\r\n *\r\n * @return Is in transition?\r\n */\r\n Sprite.prototype.isInTransition = function () {\r\n return this.animations.length > 0;\r\n };\r\n Object.defineProperty(Sprite.prototype, \"isHover\", {\r\n /**\r\n * @return Is hovered?\r\n */\r\n get: function () {\r\n if (this.isInteractive()) {\r\n return this.interactions.isHover;\r\n }\r\n return false;\r\n },\r\n /**\r\n * Indicates if this element has a mouse pointer currently hovering\r\n * over it, or if it has any touch pointers pressed on it.\r\n *\r\n * You can force element to be \"hovered\" manually, by setting this property\r\n * to `true`.\r\n *\r\n * @param value Is hovered?\r\n */\r\n set: function (value) {\r\n value = $type.toBoolean(value);\r\n if (value !== this.isHover) {\r\n if (this.isInteractive()) {\r\n this.interactions.isHover = value;\r\n if (value) {\r\n this.handleOver();\r\n }\r\n else {\r\n this.interactions.isRealHover = false;\r\n this.handleOut();\r\n }\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"isDragged\", {\r\n /**\r\n * Returns indicator if this element is being dragged at the moment.\r\n *\r\n * @return Is dragged?\r\n */\r\n get: function () {\r\n return this._isDragged;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"isResized\", {\r\n /**\r\n * Returns indicator if this element is being resized at the moment.\r\n *\r\n * @return Is resized?\r\n */\r\n get: function () {\r\n return this._isResized;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"isDown\", {\r\n /**\r\n * @return Is down?\r\n */\r\n get: function () {\r\n if (this.isInteractive()) {\r\n return this.interactions.isDown;\r\n }\r\n return false;\r\n },\r\n /**\r\n * Indicates if this element has any pointers (mouse or touch) pressing down\r\n * on it.\r\n *\r\n * @param value Is down?\r\n */\r\n set: function (value) {\r\n value = $type.toBoolean(value);\r\n if (this.isInteractive() && this.isDown != value) {\r\n this.interactions.isDown = value;\r\n if (value) {\r\n this.handleDown();\r\n }\r\n else {\r\n this.handleUp();\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"isFocused\", {\r\n /**\r\n * @return Is focused?\r\n */\r\n get: function () {\r\n if (this.isInteractive()) {\r\n return this.interactions.isFocused;\r\n }\r\n return false;\r\n },\r\n /**\r\n * Indicates if this element is focused (possibly by tab navigation).\r\n *\r\n * @param value Is focused?\r\n */\r\n set: function (value) {\r\n value = $type.toBoolean(value);\r\n if (this.focusable && this.isFocused != value) {\r\n if (this.isInteractive()) {\r\n this.interactions.isFocused = value;\r\n if (value === true) {\r\n this.handleFocus();\r\n }\r\n else {\r\n this.handleBlur();\r\n }\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"isActive\", {\r\n /**\r\n * @return Is active?\r\n */\r\n get: function () {\r\n return this._isActive;\r\n },\r\n /**\r\n * Indicates if this element is currently active (toggled on) or not\r\n * (toggled off).\r\n *\r\n * @param value Is active?\r\n */\r\n set: function (value) {\r\n this.setActive(value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Sprite.prototype.setActive = function (value) {\r\n value = $type.toBoolean(value);\r\n if (this._isActive !== value) {\r\n this._isActive = value;\r\n if (value && this.states.hasKey(\"active\")) {\r\n this.setState(\"active\");\r\n if (this.isHover && this.states.hasKey(\"hoverActive\")) {\r\n this.setState(\"hoverActive\");\r\n }\r\n }\r\n else {\r\n this.applyCurrentState();\r\n }\r\n this.dispatchImmediately(\"toggled\");\r\n }\r\n };\r\n Object.defineProperty(Sprite.prototype, \"disabled\", {\r\n /**\r\n * @return Disabled?\r\n */\r\n get: function () {\r\n //if(this._internalDisabled){\r\n //\treturn true;\r\n //}\r\n var current = this.getPropertyValue(\"disabled\");\r\n if ($type.hasValue(current)) {\r\n return current;\r\n }\r\n else {\r\n if (this.virtualParent) {\r\n return this.virtualParent.disabled;\r\n }\r\n if (this._parent) {\r\n return this._parent.disabled;\r\n }\r\n }\r\n return false;\r\n },\r\n /**\r\n * Controls if element is disabled.\r\n *\r\n * A disabled element is hidden, and is removed from any processing, layout\r\n * calculations, and generally treated as if it does not exist.\r\n *\r\n * The element itself is not destroyed, though. Setting this back to `false`,\r\n * will \"resurrect\" the element.\r\n *\r\n * @param value Disabled?\r\n */\r\n set: function (value) {\r\n this.setDisabled(value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Sprite.prototype.setDisabled = function (value) {\r\n value = $type.toBoolean(value);\r\n var current = this.getPropertyValue(\"disabled\");\r\n if (current != value) {\r\n this.setPropertyValue(\"disabled\", value, true);\r\n if (value) {\r\n this.parent = this._parent;\r\n this.removeFromInvalids();\r\n this.group.attr({ \"display\": \"none\" });\r\n this.dispatch(\"disabled\");\r\n }\r\n else {\r\n if (this._parent) {\r\n var group = this._parent.element;\r\n if (!group.hasChild(this.group)) {\r\n group.add(this.group);\r\n }\r\n }\r\n if (this instanceof Container) {\r\n this.deepInvalidate();\r\n if (this._background) {\r\n this._background.invalidate();\r\n }\r\n }\r\n else {\r\n this.invalidate();\r\n }\r\n if (!this.__disabled) {\r\n this.removeSVGAttribute(\"display\");\r\n }\r\n this.dispatch(\"enabled\");\r\n }\r\n this.dispatch(\"transformed\");\r\n system.requestFrame();\r\n return true;\r\n }\r\n return false;\r\n };\r\n Object.defineProperty(Sprite.prototype, \"__disabled\", {\r\n /**\r\n * @ignore\r\n * @return Disabled?\r\n */\r\n get: function () {\r\n return this._internalDisabled;\r\n },\r\n /**\r\n * Internal disable method.\r\n *\r\n * Do not use it for disabling elements. Use `disabled` accessor instead.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Disabled?\r\n */\r\n set: function (value) {\r\n if (this._internalDisabled != value) {\r\n this._internalDisabled = value;\r\n this._updateDisabled = true;\r\n this.invalidatePosition(); // better use this instead of invalidate()\r\n if (!value) {\r\n this.invalidate();\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"numberFormatter\", {\r\n /**\r\n * @return A [[NumberFormatter]] instance to be used\r\n */\r\n get: function () {\r\n if (this._numberFormatter) {\r\n return this._numberFormatter;\r\n }\r\n else if (this.virtualParent) {\r\n return this.virtualParent.numberFormatter;\r\n }\r\n else if (this._parent) {\r\n return this._parent.numberFormatter;\r\n }\r\n this._numberFormatter = new NumberFormatter();\r\n this._numberFormatter.language = this.language;\r\n return this.numberFormatter;\r\n },\r\n /**\r\n * ==========================================================================\r\n * FORMATTERS AND OTHER EXTERNAL HELPERS\r\n * ==========================================================================\r\n * @hidden\r\n */\r\n /**\r\n * A [[NumberFormatter]] instance.\r\n *\r\n * This is used to format numbers.\r\n *\r\n * ```TypeScript\r\n * chart.numberFormatter.numberFormat = \"#,###.#####\";\r\n * ```\r\n * ```JavaScript\r\n * chart.numberFormatter.numberFormat = \"#,###.#####\";\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"numberFormatter\": {\r\n * \"numberFormat\": \"#,###.#####\"\r\n * }\r\n * }\r\n * ```\r\n *\r\n * You can set a separate instance of formatter for each\r\n * individual element. However that would be unnecessary overhead as\r\n * all elements would automatically inherit formatter from their parents,\r\n * all the way up to the chart itself.\r\n *\r\n *\r\n * @see {@link NumberFormatter} for more info on formatting numbers\r\n * @param value An instance of NumberFormatter\r\n */\r\n set: function (value) {\r\n this._numberFormatter = value;\r\n this._numberFormatter.language = this.language;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"dateFormatter\", {\r\n /**\r\n * @return An instance of DateFormatter\r\n */\r\n get: function () {\r\n if (this._dateFormatter) {\r\n return this._dateFormatter;\r\n }\r\n else if (this.virtualParent) {\r\n return this.virtualParent.dateFormatter;\r\n }\r\n else if (this._parent) {\r\n return this._parent.dateFormatter;\r\n }\r\n this._dateFormatter = new DateFormatter();\r\n this._dateFormatter.language = this.language;\r\n return this.dateFormatter;\r\n },\r\n /**\r\n * A [[DateFormatter]] instance.\r\n *\r\n * This is used to format dates, e.g. on a date axes, balloons, etc.\r\n *\r\n * ```TypeScript\r\n * chart.dateFormatter.dateFormat = \"yyyy-MM-dd\";\r\n * ```\r\n * ```JavaScript\r\n * chart.dateFormatter.dateFormat = \"yyyy-MM-dd\";\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"dateFormatter\": {\r\n * \"dateFormat\": \"yyyy-MM-dd\"\r\n * }\r\n * }\r\n * ```\r\n *\r\n * You can set a separate instance of formatter for each\r\n * individual element. However that would be unnecessary overhead as\r\n * all elements would automatically inherit formatter from their parents,\r\n * all the way up to the chart itself.\r\n *\r\n * @see {@link DateFormatter} for more info on dates formatting\r\n * @param value An instance of DateFormatter\r\n */\r\n set: function (value) {\r\n this._dateFormatter = value;\r\n this._dateFormatter.language = this.language;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"durationFormatter\", {\r\n /**\r\n * @return An instance of DurationFormatter\r\n */\r\n get: function () {\r\n if (this._durationFormatter) {\r\n return this._durationFormatter;\r\n }\r\n else if (this.virtualParent) {\r\n return this.virtualParent.durationFormatter;\r\n }\r\n else if (this._parent) {\r\n return this._parent.durationFormatter;\r\n }\r\n this._durationFormatter = new DurationFormatter();\r\n this._durationFormatter.language = this.language;\r\n return this.durationFormatter;\r\n },\r\n /**\r\n * A [[DurationFormatter]] instance.\r\n *\r\n * This is used to format numbers as durations, e.g. on a value axes.\r\n *\r\n * You can set a separate instance of formatter for each\r\n * individual element. However that would be unnecessary overhead as\r\n * all elements would automatically inherit formatter from their parents,\r\n * all the way up to the chart itself.\r\n *\r\n * @see {@link DurationFormatter} for more info on durations\r\n * @param value An instance of DurationFormatter\r\n */\r\n set: function (value) {\r\n this._durationFormatter = value;\r\n this._durationFormatter.language = this.language;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"language\", {\r\n /**\r\n * @return An instance of Language\r\n */\r\n get: function () {\r\n var language = this._language.get();\r\n if (language) {\r\n return language;\r\n }\r\n else if (this.virtualParent) {\r\n return this.virtualParent.language;\r\n }\r\n else if (this._parent) {\r\n return this._parent.language;\r\n }\r\n language = new Language();\r\n this.language = language;\r\n return language;\r\n },\r\n /**\r\n * A [[Language]] instance to use for translations.\r\n *\r\n * Normally it is enough to set language for the top-most element - chart.\r\n *\r\n * All other element child elements will automatically re-use that language\r\n * object.\r\n *\r\n * @param value An instance of Language\r\n */\r\n set: function (value) {\r\n var _this = this;\r\n if (this._language.get() !== value) {\r\n this._language.set(value, value.events.on(\"localechanged\", function (ev) {\r\n if (_this._numberFormatter) {\r\n _this._numberFormatter.language = _this.language;\r\n }\r\n if (_this._dateFormatter) {\r\n _this._dateFormatter.language = _this.language;\r\n }\r\n if (_this._durationFormatter) {\r\n _this._durationFormatter.language = _this.language;\r\n }\r\n if (_this._exporting.get()) {\r\n var exporting = _this._exporting.get();\r\n exporting.numberFormatter.language = _this.language;\r\n exporting.dateFormatter.language = _this.language;\r\n exporting.durationFormatter.language = _this.language;\r\n exporting.language = _this.language;\r\n }\r\n if (_this instanceof Container) {\r\n _this.deepInvalidate();\r\n }\r\n }));\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * ==========================================================================\r\n * DATA-RELATED STUFF\r\n * ==========================================================================\r\n * @hidden\r\n */\r\n /**\r\n * Parses the string for meta tags `{tag}` and replaces them with a real\r\n * value. Supports straight up tags referring to the field in data, i.e.\r\n * `{value}` or tags with additional formatting info. E.g.:\r\n *\r\n * ```Text\r\n * {myfield.formatDate(\"yyyy-MM-dd\")}\r\n * {myfield.formatDate()}\r\n * {myfield.formatNumber(\"#,####.00\")}\r\n * {myfield.formatNumber()}\r\n * {myField.formatDuration(\"mm:ss\")}\r\n * ```\r\n *\r\n * Etc.\r\n *\r\n * This method Will automatically detect and use proper formatter for the\r\n * value.\r\n *\r\n * The source value will be looked up in various places: (in order)\r\n * * Sprite's own `dataItem`\r\n * * Sprite's properties\r\n * * Parent's `dataItem`\r\n * * Parent's properties\r\n *\r\n * @ignore Exclude from docs\r\n * @param string A string to format\r\n * @param dataItem DataItem\r\n * @return Formatted string\r\n */\r\n Sprite.prototype.populateString = function (string, dataItem) {\r\n if ($type.hasValue(string)) {\r\n string = $type.castString(string);\r\n string = getTextFormatter().escape(string);\r\n var tags = string.match(/\\{([^}]+)\\}/g);\r\n var i = void 0;\r\n if (tags) {\r\n for (i = 0; i < tags.length; i++) {\r\n var tag = tags[i].replace(/\\{([^}]+)\\}/, \"$1\");\r\n var value = this.getTagValue(tag, \"\", dataItem);\r\n if (!$type.hasValue(value)) {\r\n value = \"\";\r\n }\r\n string = string.split(tags[i]).join(value);\r\n }\r\n }\r\n string = getTextFormatter().unescape(string);\r\n }\r\n else {\r\n string = \"\";\r\n }\r\n if (!this._adapterO) {\r\n return string;\r\n }\r\n else {\r\n return this._adapterO.apply(\"populateString\", string);\r\n }\r\n };\r\n /**\r\n * Gets the value from data item and formats it according to specified format.\r\n *\r\n * If `format` is specified, it will use its contents to choose formatter for\r\n * the value. Otherwise it will select formatter accordingly to actual value\r\n * type.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Ability to force certain formatter on known numeric and date values\r\n * @see {@link NumberFormatter}\r\n * @see {@link DateFormatter}\r\n * @see {@link DurationFormatter}\r\n * @param tagName Tag name to replace\r\n * @param format Format to use\r\n * @param dataItem DataItem\r\n * @return Formatted value\r\n */\r\n Sprite.prototype.getTagValue = function (tagName, format, dataItem) {\r\n var value;\r\n if (!$type.hasValue(dataItem)) {\r\n dataItem = this.dataItem;\r\n }\r\n // Parse parts\r\n var parts = [];\r\n var reg = /([^.]+)\\(([^)]*)\\)|([^.]+)/g;\r\n ;\r\n var matches;\r\n while (true) {\r\n matches = reg.exec(tagName);\r\n if (matches === null) {\r\n break;\r\n }\r\n if (matches[3]) {\r\n // Simple property\r\n parts.push({\r\n prop: matches[3]\r\n });\r\n }\r\n else {\r\n // Method\r\n // Parse parameters\r\n var params = [];\r\n if ($utils.trim(matches[2]) != \"\") {\r\n var reg2 = /'([^']*)'|\"([^\"]*)\"|([0-9\\-]+)/g;\r\n var matches2 = void 0;\r\n while (true) {\r\n matches2 = reg2.exec(matches[2]);\r\n if (matches2 === null) {\r\n break;\r\n }\r\n params.push(matches2[1] || matches2[2] || matches2[3]);\r\n }\r\n }\r\n parts.push({\r\n method: matches[1],\r\n params: params\r\n });\r\n }\r\n }\r\n // Check if we can retrieve the value from data item\r\n if (dataItem) {\r\n // Check values\r\n value = this.getTagValueFromObject(parts, dataItem.values);\r\n // Check properties\r\n if (!$type.hasValue(value) || $type.isObject(value)) { // isObject helps to solve problem with date axis, as for example dateX will get dateX from values object and won't get to the dateX date.\r\n value = this.getTagValueFromObject(parts, dataItem);\r\n }\r\n // Check data context\r\n var dataContext = dataItem.dataContext;\r\n if (!$type.hasValue(value) && dataContext) {\r\n value = this.getTagValueFromObject(parts, dataItem.dataContext);\r\n // Maybe it's a literal dot-separated name of the key in dataContext?\r\n if (!$type.hasValue(value)) {\r\n value = this.getTagValueFromObject([{\r\n prop: tagName\r\n }], dataContext);\r\n }\r\n // scond data context level sometimes exist (tree map)\r\n if (!$type.hasValue(value) && dataContext.dataContext) {\r\n value = this.getTagValueFromObject(parts, dataContext.dataContext);\r\n }\r\n }\r\n // Check component's data item\r\n if (!$type.hasValue(value) && dataItem.component && dataItem.component.dataItem !== dataItem) {\r\n value = dataItem.component.getTagValue(tagName, format);\r\n }\r\n }\r\n // Check sprite's properties\r\n if (!$type.hasValue(value)) {\r\n value = this.getTagValueFromObject(parts, this.populateStringFrom || this);\r\n }\r\n // Finally, check the parent\r\n if (!$type.hasValue(value) && this._parent) {\r\n value = this._parent.getTagValue(tagName, format);\r\n }\r\n return value;\r\n };\r\n /**\r\n * Tries to retrieve values from properties of any object, then applies\r\n * proper formatting to it.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description (improve)\r\n * @param parts Properties ant methods to access\r\n * @param object Source object\r\n * @param format A specific format to apply\r\n * @return Formatted value\r\n */\r\n Sprite.prototype.getTagValueFromObject = function (parts, object, format) {\r\n var current = object;\r\n var formatApplied = false;\r\n for (var i = 0, len = parts.length; i < len; i++) {\r\n var part = parts[i];\r\n if (part.prop) {\r\n // Regular property\r\n current = current[part.prop];\r\n if (!$type.hasValue(current)) {\r\n // Not set, return undefined\r\n return;\r\n }\r\n }\r\n else {\r\n // Method\r\n switch (part.method) {\r\n case \"formatNumber\":\r\n var numberValue = $utils.anyToNumber(current);\r\n if ($type.hasValue(numberValue)) {\r\n current = this.numberFormatter.format(numberValue, format || part.params[0] || undefined);\r\n formatApplied = true;\r\n }\r\n break;\r\n case \"formatDate\":\r\n var dateValue = void 0;\r\n if ($type.isString(current)) {\r\n dateValue = this.dateFormatter.parse(current);\r\n }\r\n else {\r\n dateValue = $utils.anyToDate(current);\r\n }\r\n if (!$type.isDate(dateValue) || $type.isNaN(dateValue.getTime())) {\r\n // Was not able to get date out of value, quitting and letting\r\n // calling method try another value\r\n return;\r\n }\r\n if ($type.hasValue(dateValue)) {\r\n current = this.dateFormatter.format(dateValue, format || part.params[0] || undefined);\r\n formatApplied = true;\r\n }\r\n break;\r\n case \"formatDuration\":\r\n var durationValue = $utils.anyToNumber(current);\r\n if ($type.hasValue(durationValue)) {\r\n current = this.durationFormatter.format(durationValue, format || part.params[0] || undefined, part.params[1] || undefined);\r\n formatApplied = true;\r\n }\r\n break;\r\n case \"urlEncode\":\r\n case \"encodeURIComponent\":\r\n current = encodeURIComponent(current);\r\n break;\r\n default:\r\n if (current[part.method]) {\r\n current[part.method].apply(this, part.params);\r\n }\r\n break;\r\n }\r\n }\r\n }\r\n // Apply default format if it wasn't applied explicitly\r\n if (!formatApplied) {\r\n var formatParts = [{\r\n method: \"\",\r\n params: format\r\n }];\r\n if (!$type.hasValue(format)) {\r\n // Format is not set\r\n // Determine from the type of the value\r\n if ($type.isNumber(current)) {\r\n formatParts[0].method = \"formatNumber\";\r\n formatParts[0].params = \"\";\r\n }\r\n else if ($type.isDate(current)) {\r\n formatParts[0].method = \"formatDate\";\r\n formatParts[0].params = \"\";\r\n }\r\n }\r\n else {\r\n // Format set\r\n // Try to determine formatter based on the format\r\n var formatterType = $utils.getFormat(format);\r\n // format\r\n if (formatterType === $strings.NUMBER) {\r\n formatParts[0].method = \"formatNumber\";\r\n }\r\n else if (formatterType === $strings.DATE) {\r\n formatParts[0].method = \"formatDate\";\r\n }\r\n else if (formatterType === $strings.DURATION) {\r\n formatParts[0].method = \"formatDuration\";\r\n }\r\n }\r\n // Apply format\r\n if (formatParts[0].method) {\r\n current = this.getTagValueFromObject(formatParts, current);\r\n }\r\n }\r\n return current;\r\n };\r\n Object.defineProperty(Sprite.prototype, \"dataItem\", {\r\n /**\r\n * @return [[DataItem]]\r\n */\r\n get: function () {\r\n if (!this._dataItem) {\r\n if (this.virtualParent) {\r\n return this.virtualParent.dataItem;\r\n }\r\n if (this._parent) {\r\n return this._parent.dataItem;\r\n }\r\n }\r\n return this._dataItem;\r\n },\r\n /**\r\n * A [[DataItem]] to use as element's data source.\r\n *\r\n * @todo Review type\r\n * @param dataItem DataItem\r\n */\r\n set: function (dataItem) {\r\n //an not use this[\"_dataItem\"] here, as we return parent data item if this sprite doesn't have one.\r\n // @todo:think about it\r\n this.setDataItem(dataItem);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Sets currently used [[DataItem]].\r\n *\r\n * If the element has also `configField` set, it will also look for any\r\n * config in DataItem's data context to apply to this element.\r\n *\r\n * @param dataItem DataItem\r\n */\r\n Sprite.prototype.setDataItem = function (dataItem) {\r\n var _this = this;\r\n if (this._dataItem != dataItem) {\r\n this._dataItem = dataItem;\r\n if (dataItem) {\r\n if (this.configField) {\r\n var dataContext_1 = dataItem.dataContext;\r\n if (dataContext_1) {\r\n this.config = dataContext_1[this.configField];\r\n if (!this.config && dataContext_1.dataContext) {\r\n this.config = dataContext_1.dataContext[this.configField];\r\n }\r\n }\r\n }\r\n var dataContext_2 = dataItem.dataContext;\r\n if (dataContext_2) {\r\n var dataContext2_1 = dataContext_2.dataContext;\r\n $object.each(this.propertyFields, function (propertyName, fieldValue) {\r\n if ($type.hasValue(dataContext_2[fieldValue])) {\r\n var anyThis = _this;\r\n anyThis[propertyName] = dataContext_2[fieldValue];\r\n }\r\n else {\r\n if (dataContext2_1) {\r\n var value = dataContext2_1[fieldValue];\r\n if ($type.hasValue(value)) {\r\n var anyThis = _this;\r\n anyThis[propertyName] = value;\r\n }\r\n }\r\n }\r\n });\r\n }\r\n }\r\n this.invalidate();\r\n }\r\n };\r\n /**\r\n * ==========================================================================\r\n * PROPERTY UTILITIES\r\n * ==========================================================================\r\n * @hidden\r\n */\r\n /**\r\n * Returns element's property value.\r\n *\r\n * Will check if there are any bindings with [[DataItem]].\r\n *\r\n * Will also apply any adapters bound to `propertyName`.\r\n *\r\n * @param propertyName Property name\r\n * @return Property value\r\n */\r\n Sprite.prototype.getPropertyValue = function (propertyName) {\r\n var propValue = this.properties[propertyName];\r\n // Apply adapter\r\n if (!this._isTemplate) {\r\n if (this._adapterO) {\r\n propValue = this._adapterO.apply(propertyName, propValue);\r\n }\r\n propValue = globalAdapter.applyAll(this, propertyName, propValue);\r\n }\r\n return propValue;\r\n };\r\n Sprite.prototype.setColorProperty = function (property, value, invalidate) {\r\n var currentValue = this.properties[property];\r\n if (value instanceof Color && currentValue instanceof Color && value.toString() == currentValue.toString()) {\r\n return false;\r\n }\r\n else {\r\n return this.setPropertyValue(property, value, invalidate);\r\n }\r\n };\r\n Sprite.prototype.setPercentProperty = function (property, value, invalidate, transform, precision, floor) {\r\n value = $type.toNumberOrPercent(value);\r\n if ($type.isNumber(value)) {\r\n if ($type.isNumber(precision)) {\r\n value = $math.round(value, precision, floor);\r\n }\r\n return this.setPropertyValue(property, value, invalidate, transform);\r\n }\r\n else {\r\n var currentValue = this.properties[property];\r\n if (value instanceof Percent && currentValue instanceof Percent && value.value == currentValue.value) {\r\n return false;\r\n }\r\n else {\r\n return this.setPropertyValue(property, value, invalidate, transform);\r\n }\r\n }\r\n };\r\n /**\r\n * Sets elements's property value. Will also propagate the same property value\r\n * on all element's clones.\r\n *\r\n * @param property Property\r\n * @param value Value\r\n * @param invalidate Should the sprite be invalidated, cause it's re-rendering\r\n * @param transform Re-apply positioning of the element\r\n * @return Did the value change? It will return `true` if the new value and the old value of the property are not the same\r\n * @todo Review propagation to clones. Right now we simply check if clone is disposed before setting the same property on it. It's better to remove from clone list altogether.\r\n */\r\n Sprite.prototype.setPropertyValue = function (property, value, invalidate, transform) {\r\n if (this.properties[property] !== value && !this.isDisposed()) {\r\n this.properties[property] = value;\r\n if (this.events.isEnabled(\"propertychanged\")) {\r\n var event_1 = {\r\n type: \"propertychanged\",\r\n target: this,\r\n property: property\r\n };\r\n this.events.dispatchImmediately(\"propertychanged\", event_1);\r\n }\r\n if (invalidate) {\r\n this.invalidate();\r\n }\r\n if (transform) {\r\n this.invalidatePosition();\r\n }\r\n if (this.applyOnClones) {\r\n var clones = this.clones.values;\r\n var length_2 = clones.length;\r\n for (var i = 0; i < length_2; ++i) {\r\n var clone = clones[i];\r\n if (!clone.isDisposed()) {\r\n //(<Sprite>clone).setPropertyValue(<any>property, value, invalidate, transform);\r\n clone[property] = value;\r\n }\r\n }\r\n }\r\n return true;\r\n }\r\n return false;\r\n };\r\n Sprite.prototype.bind = function (property, source, bindToProperty, modifier) {\r\n var _this = this;\r\n if (bindToProperty === void 0) { bindToProperty = property; }\r\n if ($type.hasValue(this._bindings[property])) {\r\n this._bindings[property].dispose();\r\n }\r\n // set current value\r\n this[property] = source[bindToProperty];\r\n //source.addEventListener(AMEvent.PROPERTY_CHANGED, this.handleBindings, false, this);\r\n this._bindings[property] = source.events.on(\"propertychanged\", function (event) {\r\n if (event.property === bindToProperty) {\r\n var value = source[bindToProperty];\r\n if (modifier) {\r\n value = modifier(value);\r\n }\r\n // TODO clonesById\r\n _this[property] = value;\r\n }\r\n });\r\n };\r\n /**\r\n * Sets up and obeserver function to monitor changes in particular property\r\n * or properties.\r\n *\r\n * @ignore Exclude from docs\r\n * @param property Element's property name\r\n * @param listener Handler function\r\n * @param context Context for handler function\r\n * @returns Event Disposer\r\n */\r\n Sprite.prototype.observe = function (property, listener, context, shouldClone) {\r\n var _this = this;\r\n return new MultiDisposer($array.map($array.toArray(property), function (prop) {\r\n return _this.events.on(\"propertychanged\", function (e) {\r\n if (e.property === prop) {\r\n listener.call(context, e);\r\n }\r\n }, context, shouldClone);\r\n }));\r\n };\r\n /**\r\n * ==========================================================================\r\n * ACCESSIBILITY-RELATED PROPERTIES\r\n * ==========================================================================\r\n * @hidden\r\n */\r\n /**\r\n * Applies accessibility to the SVG element.\r\n *\r\n * Adds `<title>` and `<description>` elements as well as `aria-labelledby`\r\n * and `role` properties.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Sprite.prototype.applyAccessibility = function () {\r\n // Check if we need to add label and description\r\n var title = this.readerTitle, description = this.readerDescription, role = this.role, hidden = this.readerHidden, checked = this.readerChecked, controls = this.readerControls, live = this.readerLive, orientation = this.readerOrientation, valueNow = this.readerValueNow, valueText = this.readerValueText;\r\n // Init label/describe ids\r\n var labelledByIds = [];\r\n var describedByIds = [];\r\n var labelledBy = this.readerLabelledBy;\r\n if (labelledBy) {\r\n labelledByIds.push(labelledBy);\r\n }\r\n var describedBy = this.readerDescribedBy;\r\n if (describedBy) {\r\n describedByIds.push(describedBy);\r\n }\r\n // Add arial-label attribute if present\r\n // If not readerTitle and labelledBy is set we will use <title> element\r\n // instead of aria-label\r\n // TODO: should we check agains this.showSystemTooltip?\r\n if (title) {\r\n if (labelledByIds.length || this.showSystemTooltip) {\r\n var titleElement = this.titleElement;\r\n var titleId = this.uid + \"-title\";\r\n if (titleElement.node.textContent != title) {\r\n titleElement.node.textContent = title;\r\n titleElement.attr({ id: titleId });\r\n }\r\n labelledByIds.push(titleId);\r\n }\r\n else {\r\n if (this._titleElement) {\r\n this.group.removeElement(this._titleElement);\r\n this._titleElement = undefined;\r\n }\r\n this.setSVGAttribute({\r\n \"aria-label\": title\r\n });\r\n }\r\n }\r\n else {\r\n this.removeSVGAttribute(\"aria-label\");\r\n if (this._titleElement) {\r\n this.group.removeElement(this._titleElement);\r\n this._titleElement = undefined;\r\n }\r\n }\r\n // Add description\r\n if (description) {\r\n var descriptionElement = this.descriptionElement;\r\n var descriptionId = this.uid + \"-description\";\r\n if (descriptionElement.node.textContent != description) {\r\n descriptionElement.node.textContent = description;\r\n descriptionElement.attr({ id: descriptionId });\r\n }\r\n describedByIds.push(descriptionId);\r\n }\r\n else if (this._descriptionElement) {\r\n this.group.removeElement(this._descriptionElement);\r\n this._descriptionElement = undefined;\r\n }\r\n // Add label and described properties\r\n if (labelledByIds.length) {\r\n this.setSVGAttribute({ \"aria-labelledby\": labelledByIds.join(\" \") });\r\n }\r\n else {\r\n this.removeSVGAttribute(\"aria-labelledby\");\r\n }\r\n if (describedByIds.length) {\r\n this.setSVGAttribute({ \"aria-describedby\": describedByIds.join(\" \") });\r\n }\r\n else {\r\n this.removeSVGAttribute(\"aria-describedby\");\r\n }\r\n // Apply role\r\n if (role) {\r\n this.setSVGAttribute({ \"role\": role });\r\n }\r\n else {\r\n this.removeSVGAttribute(\"role\");\r\n }\r\n // Apply aria-hidden\r\n if (hidden) {\r\n this.setSVGAttribute({ \"aria-hidden\": \"true\" });\r\n }\r\n else {\r\n this.removeSVGAttribute(\"aria-hidden\");\r\n }\r\n // Apply aria-checked\r\n if (checked) {\r\n this.setSVGAttribute({ \"aria-checked\": \"true\" });\r\n }\r\n else if (checked === false) {\r\n this.setSVGAttribute({ \"aria-checked\": \"false\" });\r\n }\r\n else {\r\n this.removeSVGAttribute(\"aria-checked\");\r\n }\r\n // Apply aria-controls\r\n if (controls) {\r\n this.setSVGAttribute({ \"aria-controls\": controls });\r\n }\r\n else {\r\n this.removeSVGAttribute(\"aria-controls\");\r\n }\r\n // Apply aria-live\r\n if (live) {\r\n this.setSVGAttribute({ \"aria-live\": live });\r\n }\r\n else {\r\n this.removeSVGAttribute(\"aria-live\");\r\n }\r\n // Apply aria-orientation\r\n if (orientation) {\r\n this.setSVGAttribute({ \"aria-orientation\": orientation });\r\n }\r\n else {\r\n this.removeSVGAttribute(\"aria-orientation\");\r\n }\r\n // Apply aria-valuenow\r\n if (valueNow) {\r\n this.setSVGAttribute({ \"aria-valuenow\": valueNow });\r\n }\r\n else {\r\n this.removeSVGAttribute(\"aria-valuenow\");\r\n }\r\n // Apply aria-valuetext\r\n if (valueText) {\r\n this.setSVGAttribute({ \"aria-valuetext\": valueText });\r\n }\r\n else {\r\n this.removeSVGAttribute(\"aria-valuetext\");\r\n }\r\n };\r\n Object.defineProperty(Sprite.prototype, \"readerTitle\", {\r\n /**\r\n * @return Title\r\n */\r\n get: function () {\r\n var title = this.getPropertyValue(\"readerTitle\");\r\n if ($type.hasValue(title) && this.dataItem) {\r\n return this.populateString(title);\r\n }\r\n return title;\r\n },\r\n /**\r\n * Screen reader title of the element.\r\n *\r\n * @param value Title\r\n */\r\n set: function (value) {\r\n value = $type.toText(value);\r\n if (this.setPropertyValue(\"readerTitle\", value)) {\r\n this.applyAccessibility();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"readerDescription\", {\r\n /**\r\n * @return Description\r\n */\r\n get: function () {\r\n var description = this.getPropertyValue(\"readerDescription\");\r\n if ($type.hasValue(description) && this.dataItem) {\r\n return this.populateString(description);\r\n }\r\n return this.getPropertyValue(\"readerDescription\");\r\n },\r\n /**\r\n * Screen reader description of the element.\r\n *\r\n * @param value Description\r\n */\r\n set: function (value) {\r\n value = $type.toText(value);\r\n if (this.setPropertyValue(\"readerDescription\", value)) {\r\n this.applyAccessibility();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"role\", {\r\n /**\r\n * @return Role\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"role\");\r\n },\r\n /**\r\n * A WAI-ARIA role for the element.\r\n *\r\n * @see {@link https://www.w3.org/TR/wai-aria-1.1/#role_definitions} for more information on WAI-ARIA roles\r\n * @param value Role\r\n */\r\n set: function (value) {\r\n value = $type.toText(value);\r\n if (this.setPropertyValue(\"role\", value)) {\r\n this.applyAccessibility();\r\n if (value == \"slider\") {\r\n this.setSVGAttribute({ \"aria-valuemin\": \"0\" });\r\n this.setSVGAttribute({ \"aria-valuemax\": \"100\" });\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"readerHidden\", {\r\n /**\r\n * @return Hidden?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"readerHidden\");\r\n },\r\n /**\r\n * Controls if element should be hidden from screen readers.\r\n *\r\n * @see {@link https://www.w3.org/TR/wai-aria-1.1/#aria-hidden} for more information\r\n * @param value Hidden?\r\n */\r\n set: function (value) {\r\n value = $type.toBoolean(value);\r\n if (this.setPropertyValue(\"readerHidden\", value)) {\r\n this.applyAccessibility();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"readerChecked\", {\r\n /**\r\n * @ignore Exclude from docs\r\n * @return Checked?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"readerChecked\");\r\n },\r\n /**\r\n * Controls if element is currently marked as \"checked\".\r\n *\r\n * @ignore Exclude from docs\r\n * @see {@link https://www.w3.org/TR/wai-aria-1.1/#aria-checked} for more information\r\n * @param value Checked?\r\n */\r\n set: function (value) {\r\n value = $type.toBoolean(value);\r\n if (this.setPropertyValue(\"readerChecked\", value)) {\r\n this.applyAccessibility();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"readerControls\", {\r\n /**\r\n * @ignore Exclude from docs\r\n * @return Setting value\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"readerControls\");\r\n },\r\n /**\r\n * A `uid` of an element this element controls.\r\n *\r\n * @ignore Exclude from docs\r\n * @see {@link https://www.w3.org/TR/wai-aria-1.1/#aria-controls} for more information\r\n * @param value Setting value\r\n */\r\n set: function (value) {\r\n value = $type.toText(value);\r\n if (this.setPropertyValue(\"readerControls\", value)) {\r\n this.applyAccessibility();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"readerLive\", {\r\n /**\r\n * @ignore Exclude from docs\r\n * @return Setting value\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"readerLive\");\r\n },\r\n /**\r\n * Controls accessibility setting \"aria-live\" for the element.\r\n *\r\n * @ignore Exclude from docs\r\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions} for more information\r\n * @param value Setting value\r\n */\r\n set: function (value) {\r\n value = $type.toText(value);\r\n if (this.setPropertyValue(\"readerLive\", value)) {\r\n this.applyAccessibility();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"readerLabelledBy\", {\r\n /**\r\n * @ignore Exclude from docs\r\n * @return Target element\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"readerLabelledBy\");\r\n },\r\n /**\r\n * A `uid` of an element that describes this element.\r\n *\r\n * @ignore Exclude from docs\r\n * @see {@link https://www.w3.org/TR/wai-aria-1.1/#aria-labelledby} for more information\r\n * @param value Target element\r\n */\r\n set: function (value) {\r\n value = $type.toText(value);\r\n if (this.setPropertyValue(\"readerLabelledBy\", value)) {\r\n this.applyAccessibility();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"readerDescribedBy\", {\r\n /**\r\n * @ignore Exclude from docs\r\n * @return Target element\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"readerDescribedBy\");\r\n },\r\n /**\r\n * A `uid` of an element that describes this element.\r\n *\r\n * @ignore Exclude from docs\r\n * @see {@link https://www.w3.org/TR/wai-aria-1.1/#aria-describedby} for more information\r\n * @param value Target element\r\n */\r\n set: function (value) {\r\n value = $type.toText(value);\r\n if (this.setPropertyValue(\"readerDescribedBy\", value)) {\r\n this.applyAccessibility();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"readerOrientation\", {\r\n /**\r\n * @return Orientation\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"readerOrientation\");\r\n },\r\n /**\r\n * Orientation of the element.\r\n *\r\n * @since 4.7.16\r\n * @param value Orientation\r\n */\r\n set: function (value) {\r\n value = $type.toText(value);\r\n if (this.setPropertyValue(\"readerOrientation\", value)) {\r\n this.applyAccessibility();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"readerValueNow\", {\r\n /**\r\n * @return Current value\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"readerValueNow\");\r\n },\r\n /**\r\n * Current value of the element.\r\n *\r\n * @since 4.7.16\r\n * @param value Current value\r\n */\r\n set: function (value) {\r\n value = $type.toText(value);\r\n if (this.setPropertyValue(\"readerValueNow\", value)) {\r\n this.applyAccessibility();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"readerValueText\", {\r\n /**\r\n * @return Current value (text)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"readerValueText\");\r\n },\r\n /**\r\n * Text representation of the current value of the element.\r\n *\r\n * @since 4.7.16\r\n * @param value Current value (text)\r\n */\r\n set: function (value) {\r\n value = $type.toText(value);\r\n if (this.setPropertyValue(\"readerValueText\", value)) {\r\n this.applyAccessibility();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"keyboardOptions\", {\r\n /**\r\n * ==========================================================================\r\n * USER INTERACTIONS\r\n * ==========================================================================\r\n * @hidden\r\n */\r\n /**\r\n * Returns elements keyboard options.\r\n *\r\n * @return Keyboard options\r\n */\r\n get: function () {\r\n if (!this.interactions.keyboardOptions) {\r\n if (this.virtualParent) {\r\n return this.virtualParent.keyboardOptions;\r\n }\r\n if (this._parent) {\r\n return this._parent.keyboardOptions;\r\n }\r\n }\r\n return this.interactions.keyboardOptions;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"mouseOptions\", {\r\n /**\r\n * Mouse options.\r\n *\r\n * Enables controlling options related to the mouse, for example sensitivity\r\n * of its mouse wheel.\r\n *\r\n * E.g. the below will reduce chart's wheel-zoom speed to half its default\r\n * speed:\r\n *\r\n * ```TypeScript\r\n * chart.plotContainer.mouseOptions.sensitivity = 0.5;\r\n * ```\r\n * ```JavaScript\r\n * chart.plotContainer.mouseOptions.sensitivity = 0.5;\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"plotContainer\": {\r\n * \"mouseOptions\": {\r\n * \"sensitivity\": 0.5\r\n * }\r\n * }\r\n * }\r\n * ```\r\n *\r\n * @return Mouse options\r\n */\r\n get: function () {\r\n if (!this.interactions.mouseOptions) {\r\n if (this.virtualParent) {\r\n return this.virtualParent.mouseOptions;\r\n }\r\n if (this._parent) {\r\n return this._parent.mouseOptions;\r\n }\r\n }\r\n return this.interactions.mouseOptions;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"interactions\", {\r\n /**\r\n * Returns (creates if necessary) an [[InteractionObject]] associated with\r\n * this element.\r\n *\r\n * [[InteractionObject]] is used to attach all kinds of user-interactions to\r\n * the element, e.g. click/touch, dragging, hovering, and similar events.\r\n *\r\n * @return Interaction object\r\n */\r\n get: function () {\r\n if (!this._interaction) {\r\n var interaction = getInteraction().getInteraction(this.dom);\r\n this._interaction = interaction;\r\n this._interaction.clickable = this.clickable;\r\n this._interaction.hoverable = this.hoverable;\r\n this._interaction.trackable = this.trackable;\r\n this._interaction.draggable = this.draggable;\r\n this._interaction.swipeable = this.swipeable;\r\n this._interaction.resizable = this.resizable;\r\n this._interaction.wheelable = this.wheelable;\r\n this._interaction.contextMenuDisabled = this.contextMenuDisabled;\r\n this._interaction.inert = this.inert;\r\n this._interaction.sprite = this;\r\n this._disposers.push(this._interaction);\r\n }\r\n return this._interaction;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Returns true if interactions object was created. Mostly used just to avoid creating interactions object if not needed.\r\n * @return Is Sprite interactive?\r\n */\r\n Sprite.prototype.isInteractive = function () {\r\n if (this._interaction) {\r\n return true;\r\n }\r\n else {\r\n return false;\r\n }\r\n };\r\n Object.defineProperty(Sprite.prototype, \"focusable\", {\r\n /**\r\n * @return Can element be focused?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"focusable\");\r\n },\r\n /**\r\n * ==========================================================================\r\n * ELEMENT FOCUS-RELATED STUFF\r\n * ==========================================================================\r\n * @hidden\r\n */\r\n /**\r\n * Controls if the element can gain focus.\r\n *\r\n * Focusable element will be selectable via TAB key.\r\n *\r\n * Please note, clicking it with a mouse or touching will not add focus to\r\n * it.\r\n *\r\n * Focused element will show a system-specific highlight, which might ruin\r\n * the overal look. This is why we don't focus element on click/touch.\r\n *\r\n * A default setting varies for different elements. By default all elements\r\n * are not focusable, except certain items like buttons, legend items, etc.\r\n *\r\n * @default undefined (auto)\r\n * @param value Can element be focused?\r\n */\r\n set: function (value) {\r\n var _this = this;\r\n value = $type.toBoolean(value);\r\n if (this.setPropertyValue(\"focusable\", value)) {\r\n if (!value && !this.isInteractive()) {\r\n }\r\n else {\r\n this.interactions.focusable = value;\r\n if (value) {\r\n this.setSVGAttribute({ \"focusable\": value });\r\n if (!$type.hasValue(this._tabindex)) {\r\n this.tabindex = 0;\r\n }\r\n }\r\n else {\r\n this.removeSVGAttribute(\"focusable\");\r\n this.tabindex = undefined;\r\n }\r\n // Set focus events that would apply \"focus\" state\r\n // setEventDisposer will also remove listeners if value == false\r\n this.interactions.setEventDisposer(\"sprite-focusable\", value, function () { return new MultiDisposer([\r\n _this.events.on(\"blur\", _this.handleBlur, _this, false),\r\n _this.events.on(\"focus\", _this.handleFocus, _this, false)\r\n ]); });\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Applies filters (if set) when element gains focus.\r\n *\r\n * @ignore Exclude from docs\r\n * @param ev Original event\r\n */\r\n Sprite.prototype.handleFocus = function (ev) {\r\n if (this.focusable) {\r\n if (this.topParent) {\r\n this.topParent.hasFocused = true;\r\n this.topParent.focusedElement = this;\r\n }\r\n if (this.focusFilter) {\r\n // Any `filters` manipulation will trigger `applyFilters()` so we don't\r\n // need to call it here\r\n this.filters.push(this.focusFilter);\r\n }\r\n if (this.hoverOnFocus) {\r\n // Trigger a hover event as well\r\n this.isHover = true;\r\n this.handleOver();\r\n }\r\n }\r\n };\r\n /**\r\n * Removes focus filter (if set) when elementloses focus.\r\n *\r\n * @ignore Exclude from docs\r\n * @param ev Original event\r\n */\r\n Sprite.prototype.handleBlur = function (ev) {\r\n if (this.focusable) {\r\n if (this.topParent) {\r\n this.topParent.hasFocused = false;\r\n this.topParent.focusedElement = undefined;\r\n }\r\n if (this.focusFilter) {\r\n // Any `filters` manipulation will trigger `applyFilters()` so we don't\r\n // need to call it here\r\n this.filters.removeValue(this.focusFilter);\r\n }\r\n if (this.hoverOnFocus) {\r\n // Trigger a out event as well\r\n this.isHover = false;\r\n this.handleOut();\r\n }\r\n }\r\n };\r\n Object.defineProperty(Sprite.prototype, \"focusFilter\", {\r\n /**\r\n * A reference to a [[Filter]] to apply to element when it gains focus.\r\n *\r\n * Normally, browsers will draw a default ugly square around focused element,\r\n * which totally makes sense because its purpose is to help identify active\r\n * element for visually impaired people.\r\n *\r\n * However, if you would rather apply a filter, so you can modify how focused\r\n * element looks like, use `focusFilter`.\r\n *\r\n * Simply set it to an anstance of [[FocusFilter]], or any other filter\r\n * object.\r\n *\r\n * ```TypeScript\r\n * chart.focusFilter = new am4core.FocusFilter();\r\n * ```\r\n * ```JavaScript\r\n * chart.focusFilter = new am4core.FocusFilter();\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"focusFilter\": {\r\n * \"type\": \"FocusFilter\"\r\n * },\r\n * // ...\r\n * }\r\n * ```\r\n *\r\n * @see {@link Filter}\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/accessibility/} more about accessibility\r\n * @see {@link https://www.amcharts.com/docs/v4/tutorials/changing-appearance-of-focused-items/} cusomizing focus appearance\r\n * @ignore Exclude from docs\r\n * @return Focused element filter\r\n */\r\n get: function () {\r\n /*if (!this._focusFilter) {\r\n this._focusFilter = new FocusFilter();\r\n this._disposers.push(this._focusFilter);\r\n }*/\r\n //return this._focusFilter;\r\n var focusFilter = this._focusFilter;\r\n if (focusFilter) {\r\n return focusFilter;\r\n }\r\n if (this.virtualParent) {\r\n return this.virtualParent.focusFilter;\r\n }\r\n else if (this._parent) {\r\n return this._parent.focusFilter;\r\n }\r\n //this._focusFilter = new FocusFilter();\r\n //this._disposers.push(this._focusFilter);\r\n },\r\n /**\r\n * @see {@link Filter}\r\n * @ignore Exclude from docs\r\n * @todo This is still experimental, don't use it\r\n */\r\n set: function (value) {\r\n this._focusFilter = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"hoverOnFocus\", {\r\n /**\r\n * @return Trigger hover on focus?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"hoverOnFocus\");\r\n },\r\n /**\r\n * If set to `true`, this element will also trigger `\"over\"` event with all\r\n * the related consequences, like \"hover\" state being applied and tooltip\r\n * being shown.\r\n *\r\n * Useful as an accessibility feature to display rollover tooltips on items\r\n * selected via keyboard.\r\n *\r\n * @param value Trigger hover on focus?\r\n * @default false\r\n */\r\n set: function (value) {\r\n if (value !== this.hoverOnFocus) {\r\n this.setPropertyValue(\"hoverOnFocus\", value);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"tabindex\", {\r\n /**\r\n * @return TAB index\r\n */\r\n get: function () {\r\n var index = this._tabindex;\r\n if (index != null) {\r\n return index;\r\n }\r\n else if (this.virtualParent) {\r\n return this.virtualParent.tabindex;\r\n }\r\n else if (this._parent) {\r\n return this._parent.tabindex;\r\n }\r\n },\r\n /**\r\n * Sets or returns TAB index.\r\n *\r\n * Tab index maintains the order in which focusable elements gain focus when\r\n * TAB key is pressed.\r\n *\r\n * Please note, tab index is not local to the chart. It affects the whole\r\n * of the page, including non-SVG elements. Maintain extreme causion when\r\n * setting tab indexes, as it affects the user experience for the whole\r\n * web page.\r\n *\r\n * @param value TAB index\r\n */\r\n set: function (value) {\r\n value = $type.toNumber(value);\r\n if (this.setPropertyValue(\"tabindex\", value) && $type.isNumber(value)) {\r\n this.interactions.tabindex = value;\r\n this.setSVGAttribute({ \"tabindex\": value });\r\n this._tabindex = value;\r\n this.focusable = true;\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"inertiaOptions\", {\r\n /**\r\n * ==========================================================================\r\n * DRAGGING AND RELATED STUFF\r\n * ==========================================================================\r\n * @hidden\r\n */\r\n /**\r\n * Returns element's options to be used for inertia. This setting is\r\n * inheritable, meaning that if not set directly, it will search in all its\r\n * ascendants until very top.\r\n *\r\n * Inertia is used only if element's `inert` is set to `true`.\r\n *\r\n * \"Inert\" element, when dragged and released, will carry the momentum of the\r\n * movement, and will continue moving in the same drag direction, gradually\r\n * reducing in speed until finally stops.\r\n *\r\n * Check [[IInertiaOptions]] for how you tweak inertia animations.\r\n *\r\n * @return Inertia options\r\n */\r\n get: function () {\r\n if (!this.interactions.inertiaOptions) {\r\n if (this._parent) {\r\n return this._parent.inertiaOptions;\r\n }\r\n }\r\n return this.interactions.inertiaOptions;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"draggable\", {\r\n /**\r\n * @return `true` if element can be dragged\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"draggable\");\r\n },\r\n /**\r\n * Controls if the element is draggable.\r\n *\r\n * @param value `true` if element can be dragged\r\n */\r\n set: function (value) {\r\n var _this = this;\r\n value = $type.toBoolean(value);\r\n if (this.setPropertyValue(\"draggable\", value)) {\r\n if (!value && !this.isInteractive()) {\r\n }\r\n else {\r\n this.applyCursorStyle();\r\n this.interactions.draggable = value;\r\n //interaction.processDraggable(this);\r\n // Add events\r\n // @todo Maybe attach to InteractionObject's multidisposer so that\r\n // sprites events get disposed together with them?\r\n // this.interactions.disposers.getItem(\"movable\")\r\n // setEventDisposer will also remove listeners if value == false\r\n this.interactions.setEventDisposer(\"sprite-draggable\", value, function () { return new MultiDisposer([\r\n _this.events.on(\"down\", _this.handleDown, _this, false),\r\n _this.events.on(\"dragstart\", _this.handleDragStart, _this, false),\r\n _this.events.on(\"drag\", _this.handleDragMove, _this, false),\r\n _this.events.on(\"dragstop\", _this.handleDragStop, _this, false)\r\n ]); });\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Executes when dragged element is being started to drag.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Sprite.prototype.handleDragStart = function (ev) {\r\n if (!this.interactions.isTouchProtected || !ev.touch) {\r\n this.interactions.originalPosition = {\r\n x: this.pixelX,\r\n y: this.pixelY\r\n };\r\n this._isDragged = true;\r\n this.hideTooltip(0);\r\n }\r\n };\r\n /**\r\n * Tell this element to start being dragged. This is useful if you want to\r\n * drag items by interactions performed not directly on the target element.\r\n *\r\n * Parameter `pointer` is highly recommended. By passing in the Pointer you\r\n * will ensure that movement is tracked for the pointer that you want. If not\r\n * supplied, the system will try to determine the most logical pointer.\r\n *\r\n * However this may fail if you have more than one pointer active, which\r\n * might happen if you have several objects being dragged on a touch device.\r\n *\r\n * @ignore Exclude from docs\r\n * @param pointer Pointer to use for movement\r\n */\r\n Sprite.prototype.dragStart = function (pointer) {\r\n //this.dragStop(pointer);\r\n //this.draggable = true;\r\n this._isDragged = true;\r\n getInteraction().dragStart(this.interactions, pointer);\r\n };\r\n /**\r\n * Executes when dragged element is being dropped.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Sprite.prototype.handleDragStop = function (ev) {\r\n if (!this.interactions.isTouchProtected || !ev.touch) {\r\n this._isDragged = false;\r\n this.showTooltip();\r\n this.interactions.originalPosition = undefined;\r\n }\r\n };\r\n /**\r\n * Stops manually initiated dragging of the element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param pointer Pointer to use as a reference\r\n */\r\n Sprite.prototype.dragStop = function (pointer, cancelled) {\r\n //this.draggable = false;\r\n this._isDragged = false;\r\n getInteraction().dragStop(this.interactions, pointer, cancelled);\r\n //this.handleDragStop();\r\n };\r\n /**\r\n * Executes when {Sprite} is being dragged.\r\n *\r\n * @ignore Exclude from docs\r\n * @param ev Event object\r\n * @todo Implement parent position offset calculation\r\n */\r\n Sprite.prototype.handleDragMove = function (ev) {\r\n if (!this.interactions.isTouchProtected || !ev.touch) {\r\n var point = this.interactions.originalPosition;\r\n if (point && this._isDragged) {\r\n var globalScale = this._parent.globalScale * this.svgContainer.cssScale;\r\n this.moveTo({ x: point.x + ev.shift.x / globalScale, y: point.y + ev.shift.y / globalScale }, undefined, undefined, true);\r\n }\r\n this.dispatchImmediately(\"dragged\", ev);\r\n }\r\n };\r\n Object.defineProperty(Sprite.prototype, \"inert\", {\r\n /**\r\n * @return `true` if element should use inertia when animated\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"inert\");\r\n },\r\n /**\r\n * Controls if the element should use inertia when interacted with.\r\n *\r\n * \"Inert\" element, when dragged and released, will carry the momentum of the\r\n * movement, and will continue moving in the same drag direction, gradually\r\n * reducing in speed until finally stops.\r\n *\r\n * @default false\r\n * @param value `true` if element should use inertia when animated\r\n */\r\n set: function (value) {\r\n value = $type.toBoolean(value);\r\n if (this.setPropertyValue(\"inert\", value)) {\r\n if (!value && !this.isInteractive()) {\r\n // void\r\n }\r\n else {\r\n this.interactions.inert = value;\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"hoverOptions\", {\r\n /**\r\n * ==========================================================================\r\n * HOVERING\r\n * ==========================================================================\r\n * @hidden\r\n */\r\n /**\r\n * Returns Sprite's hover options.\r\n *\r\n * @see {@link IHoverOptions} for available options.\r\n * @return Options\r\n */\r\n get: function () {\r\n if (!this.interactions.hoverOptions) {\r\n if (this.virtualParent) {\r\n return this.virtualParent.hoverOptions;\r\n }\r\n if (this._parent) {\r\n return this._parent.hoverOptions;\r\n }\r\n }\r\n return this.interactions.hoverOptions;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"hoverable\", {\r\n /**\r\n * @return `true` if element is hoverable\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"hoverable\");\r\n },\r\n /**\r\n * Controls if the element is hoverable (hover events are registered).\r\n *\r\n * Use `over` and `out` events, to watch for those respective actions.\r\n *\r\n * @default false\r\n * @param value `true` if element can be hovered\r\n */\r\n set: function (value) {\r\n var _this = this;\r\n value = $type.toBoolean(value);\r\n if (this.setPropertyValue(\"hoverable\", value)) {\r\n if (!value && !this.isInteractive()) {\r\n // void\r\n }\r\n else {\r\n this.applyCursorStyle();\r\n this.interactions.hoverable = value;\r\n // setEventDisposer will also remove listeners if value == false\r\n this.interactions.setEventDisposer(\"sprite-hoverable\", value, function () { return new MultiDisposer([\r\n _this.events.on(\"over\", _this.handleOver, _this, false),\r\n _this.events.on(\"out\", _this.handleOut, _this, false),\r\n ]); });\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Handles tasks when element becomes hovered:\r\n * * Shows [[Tooltip]] if applicable\r\n * * Applies \"hover\" state\r\n *\r\n * @ignore Exclude from docs\r\n * @param ev Event object\r\n */\r\n Sprite.prototype.handleOver = function (ev) {\r\n if (this._outTimeout) {\r\n this._outTimeout.dispose();\r\n }\r\n if (this.isHover) {\r\n if (this.states.hasKey(\"hover\")) {\r\n //this.setState(\"hover\");\r\n // This will check `isHover` and will set \"hover\" state\r\n if (!this.isHidden) {\r\n this.applyCurrentState();\r\n }\r\n }\r\n var point = void 0;\r\n if (ev && ev.pointer) {\r\n point = $utils.documentPointToSvg(ev.pointer.point, this.svgContainer.SVGContainer, this.svgContainer.cssScale);\r\n }\r\n if (this.showTooltipOn == \"hover\") {\r\n this.showTooltip(point);\r\n }\r\n }\r\n else {\r\n if (this.showTooltipOn == \"hover\") {\r\n this.hideTooltip();\r\n }\r\n if (!this.isHidden && this.states.hasKey(\"hover\")) {\r\n this.applyCurrentState();\r\n }\r\n }\r\n };\r\n /**\r\n * Handles tasks when element loses hover:\r\n *\r\n * * Hides [[Tooltip]]\r\n * * Applies default state\r\n *\r\n * @ignore Exclude from docs\r\n * @param ev [description]\r\n */\r\n Sprite.prototype.handleOut = function (ev) {\r\n var _this = this;\r\n if (this.tooltip && this.tooltip.targetSprite == this && this.tooltip.keepTargetHover) {\r\n this._outTimeout = this.setTimeout(function () {\r\n if (!_this.tooltip.isHover) {\r\n if (_this.tooltip.targetSprite == _this) {\r\n _this.hideTooltip();\r\n }\r\n _this._outTimeout = _this.setTimeout(_this.handleOutReal.bind(_this), _this.rollOutDelay);\r\n }\r\n }, 10);\r\n return;\r\n }\r\n if (this.showTooltipOn == \"hover\") {\r\n this.hideTooltip();\r\n }\r\n this._outTimeout = this.setTimeout(this.handleOutReal.bind(this), this.rollOutDelay);\r\n };\r\n /**\r\n * [handleOutReal description]\r\n *\r\n * @ignore\r\n * @todo description\r\n */\r\n Sprite.prototype.handleOutReal = function () {\r\n if (!this.isHidden && !this.isHiding && this.states.hasKey(\"hover\")) {\r\n this.applyCurrentState();\r\n }\r\n };\r\n Object.defineProperty(Sprite.prototype, \"hitOptions\", {\r\n /**\r\n * ==========================================================================\r\n * CLICKING/TAPPING AND TOGGLING STUFF\r\n * ==========================================================================\r\n * @hidden\r\n */\r\n /**\r\n * Returns Sprite's click (hit) options.\r\n *\r\n * Click (hit) options control things like double-click, timeouts, etc.\r\n *\r\n * @see {@link IHitOptions} for available options.\r\n * @return Options\r\n */\r\n get: function () {\r\n if (!this.interactions.hitOptions) {\r\n if (this.virtualParent) {\r\n return this.virtualParent.hitOptions;\r\n }\r\n if (this._parent) {\r\n return this._parent.hitOptions;\r\n }\r\n }\r\n return this.interactions.hitOptions;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Prepares element's after `down` event.\r\n *\r\n * @ignore Exclude from docs\r\n * @param ev Event\r\n */\r\n Sprite.prototype.handleDown = function (ev) {\r\n if (this.interactions.downPointers.length === 1) {\r\n this.interactions.originalPosition = {\r\n x: this.pixelX,\r\n y: this.pixelY\r\n };\r\n this.interactions.originalAngle = this.rotation;\r\n this.interactions.originalScale = this.scale;\r\n if (this.states.hasKey(\"down\")) {\r\n this.setState(\"down\");\r\n }\r\n }\r\n };\r\n /**\r\n * Prepares element's after `up` event.\r\n *\r\n * @ignore Exclude from docs\r\n * @param ev Event\r\n */\r\n Sprite.prototype.handleUp = function (ev) {\r\n var _this = this;\r\n /*if (!this.isDown) {\r\n this.interactions.originalPosition = null;\r\n this.interactions.originalAngle = null;\r\n this.interactions.originalScale = null;\r\n }*/\r\n this._isResized = false;\r\n if (this.states.hasKey(\"down\")) {\r\n this.applyCurrentState();\r\n }\r\n if (this.showTooltipOn == \"hit\") {\r\n this.updateTooltipPosition(ev.pointer ? ev.pointer.point : undefined);\r\n this._disposers.push(registry.events.once(\"exitframe\", function () {\r\n _this.showTooltip();\r\n }));\r\n this._disposers.push(getInteraction().body.events.once(\"down\", function (ev) {\r\n _this.hideTooltip();\r\n }));\r\n }\r\n };\r\n Object.defineProperty(Sprite.prototype, \"clickable\", {\r\n /**\r\n * @return {boolean}\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"clickable\");\r\n },\r\n /**\r\n * Indicates if the element is clickable.\r\n *\r\n * Some type of the elements, like buttons are clickable by default.\r\n *\r\n * Most of the elements are not clickable by default.\r\n *\r\n * Use `hit`, `doublehit`, `up`, `down`, `toggled` events to watch for\r\n * respective click/touch actions.\r\n *\r\n * @param value `true` if element can be clicked\r\n */\r\n set: function (value) {\r\n var _this = this;\r\n value = $type.toBoolean(value);\r\n if (this.setPropertyValue(\"clickable\", value)) {\r\n if (!value && !this.isInteractive()) {\r\n // void\r\n }\r\n else {\r\n this.applyCursorStyle();\r\n this.interactions.clickable = value;\r\n // setEventDisposer will also remove listeners if value == false\r\n this.interactions.setEventDisposer(\"sprite-clickable\", value, function () { return new MultiDisposer([\r\n _this.events.on(\"down\", _this.handleDown, _this, false),\r\n _this.events.on(\"up\", _this.handleUp, _this, false)\r\n ]); });\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"togglable\", {\r\n /**\r\n * @return Is togglable?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"togglable\");\r\n },\r\n /**\r\n * Indicates if element can be toggled on and off by subsequent clicks/taps.\r\n *\r\n * Togglable element will alternate its `isActive` property between `true`\r\n * and `false` with each click.\r\n *\r\n * @param value Is togglable?\r\n */\r\n set: function (value) {\r\n var _this = this;\r\n value = $type.toBoolean(value);\r\n if (this.setPropertyValue(\"togglable\", value)) {\r\n if (!value && !this.isInteractive()) {\r\n // void\r\n }\r\n else {\r\n // setEventDisposer will also remove listeners if value == false\r\n this.interactions.setEventDisposer(\"sprite-togglable\", value, function () { return _this.events.on(\"hit\", _this.handleToggle, _this, false); });\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Handles toggling of the element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param ev Event\r\n */\r\n Sprite.prototype.handleToggle = function (ev) {\r\n this.isActive = !this.isActive;\r\n };\r\n Object.defineProperty(Sprite.prototype, \"contextMenuDisabled\", {\r\n /**\r\n * @return Context menu disabled?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"contextMenuDisabled\");\r\n },\r\n /**\r\n * Should element prevent context menu to be displayed, e.g. when\r\n * right-clicked?\r\n *\r\n * @default false\r\n * @param value Context menu disabled?\r\n */\r\n set: function (value) {\r\n value = $type.toBoolean(value);\r\n if (this.setPropertyValue(\"contextMenuDisabled\", value)) {\r\n this.interactions.contextMenuDisabled = value;\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"url\", {\r\n /**\r\n * @return URL\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"url\");\r\n },\r\n /**\r\n * Click-through URL for this element.\r\n *\r\n * If set, clicking/tapping this element will open the new URL in a target\r\n * window/tab as set by `urlTarget`.\r\n *\r\n * Please note that URL will be parsed by data placeholders in curly\r\n * brackets, to be populated from data. E.g.:\r\n *\r\n * ```TypeScript\r\n * series.columns.template.url = \"https://www.google.com/search?q={category.urlEncode()}\";\r\n * ```\r\n * ```JavaScript\r\n * series.columns.template.url = \"https://www.google.com/search?q={category.urlEncode()}\";\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"series\": [{\r\n * // ...\r\n * \"columns\": {\r\n * \"url\": \"https://www.google.com/search?q={category.urlEncode()}\"\r\n * }\r\n * }]\r\n * }\r\n * ```\r\n *\r\n * @param value URL\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"url\", value)) {\r\n if (this._urlDisposer) {\r\n this._urlDisposer.dispose();\r\n }\r\n // If URL is not empty, set up events\r\n if ($utils.isNotEmpty(value)) {\r\n this._urlDisposer = this.events.on(\"hit\", this.urlHandler, this, false);\r\n // Set other required parameters\r\n this.clickable = true;\r\n this.cursorOverStyle = MouseCursorStyle.pointer;\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"baseId\", {\r\n /**\r\n * [baseId description]\r\n *\r\n * @ignore\r\n * @return [description]\r\n */\r\n get: function () {\r\n if (!this._baseId && this._parent) {\r\n this.baseId = this._parent.baseId;\r\n }\r\n return this._baseId;\r\n },\r\n /**\r\n * [baseId description]\r\n *\r\n * @ignore\r\n * @param value [description]\r\n */\r\n set: function (value) {\r\n this.setBaseId(value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Sprite.prototype.setBaseId = function (value) {\r\n if (value != this._baseId) {\r\n if (this.invalid) {\r\n this.invalid = false;\r\n registry.removeFromInvalidSprites(this);\r\n this.invalidate();\r\n }\r\n this._baseId = value;\r\n }\r\n };\r\n Object.defineProperty(Sprite.prototype, \"baseSprite\", {\r\n /**\r\n * Returns the mail chart object that this element belongs to.\r\n *\r\n * In most cases it will mean the chart object.\r\n *\r\n * Can be used to retrieve chart object in various events and adapters.\r\n *\r\n * ```TypeScript\r\n * chart.seriesContainer.events.on(\"hit\", function(ev) {\r\n * console.log(ev.target.baseSprite);\r\n * });\r\n * ```\r\n * ```JavaScript\r\n * chart.seriesContainer.events.on(\"hit\", function(ev) {\r\n * console.log(ev.target.baseSprite);\r\n * });\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"seriesContainer\": {\r\n * \"events\": {\r\n * \"hit\": function(ev) {\r\n * console.log(ev.target.baseSprite);\r\n * }\r\n * }\r\n * }\r\n * }\r\n * ```\r\n *\r\n * @readonly\r\n * @return Base chart object\r\n */\r\n get: function () {\r\n if (this.isBaseSprite) {\r\n return this;\r\n }\r\n else if (this._parent) {\r\n return this._parent.baseSprite;\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"urlTarget\", {\r\n /**\r\n * @return URL target\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"urlTarget\");\r\n },\r\n /**\r\n * Target to use for URL clicks:\r\n *\r\n * * _blank\r\n * * _self (default)\r\n * * _parent\r\n * * _top\r\n * * Name of the window/frame\r\n *\r\n * Ignored if `url` is not set.\r\n *\r\n * @param value URL target\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"urlTarget\", value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Handles URL transition on element click.\r\n *\r\n * @ignore Exclude from docs\r\n * @param ev An event object\r\n */\r\n Sprite.prototype.urlHandler = function (ev) {\r\n // Is URL set?\r\n if ($utils.isNotEmpty(this.url)) {\r\n // Proceed to the URL\r\n var url = this.populateString(this.url);\r\n if (this.urlTarget === \"_self\") {\r\n window.location.href = url;\r\n }\r\n else {\r\n window.open(url, this.urlTarget);\r\n }\r\n }\r\n };\r\n Object.defineProperty(Sprite.prototype, \"swipeOptions\", {\r\n /**\r\n * ==========================================================================\r\n * SWIPING GESTURE TRACKING\r\n * ==========================================================================\r\n * @hidden\r\n */\r\n /**\r\n * Returns element's swipe gesture options.\r\n *\r\n * @return Swipe gesture options\r\n */\r\n get: function () {\r\n if (!this.interactions.swipeOptions) {\r\n if (this.virtualParent) {\r\n return this.virtualParent.swipeOptions;\r\n }\r\n if (this._parent) {\r\n return this._parent.swipeOptions;\r\n }\r\n }\r\n return this.interactions.swipeOptions;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"swipeable\", {\r\n /**\r\n * @return Element swipable?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"swipeable\");\r\n },\r\n /**\r\n * Controls if element is swipeable.\r\n *\r\n * Swipable element will invoke `swipe`, `swipeleft` and `swiperight` events,\r\n * when quick horizontal drag action is performed with either mouse or touch.\r\n *\r\n * Please note that combining swipe and drag is possible, however will incur\r\n * a slight but noticeable delay in drag start.\r\n *\r\n * @param value Element swipable?\r\n */\r\n set: function (value) {\r\n value = $type.toBoolean(value);\r\n if (this.setPropertyValue(\"swipeable\", value)) {\r\n this.applyCursorStyle();\r\n if (!value && !this.isInteractive()) {\r\n // void\r\n }\r\n else {\r\n this.interactions.swipeable = value;\r\n }\r\n //interaction.processSwipeable(this);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"trackable\", {\r\n /**\r\n * @return Track cursor movement over element?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"trackable\");\r\n },\r\n /**\r\n * ==========================================================================\r\n * POINTER TRACKING\r\n * ==========================================================================\r\n * @hidden\r\n */\r\n /**\r\n * Indicates if the element is trackable (mouse position over it is reported to\r\n * event listeners).\r\n *\r\n * Will invoke `track` events whenever pointer (cursor) changes position\r\n * while over element.\r\n *\r\n * Please note, touch devices will also invoke `track` events when touch\r\n * point is moved while holding down on a trackable element.\r\n *\r\n * @param value Track cursor movement over element?\r\n */\r\n set: function (value) {\r\n value = $type.toBoolean(value);\r\n if (this.setPropertyValue(\"trackable\", value)) {\r\n if (!value && !this.isInteractive()) {\r\n // void\r\n }\r\n else {\r\n this.applyCursorStyle();\r\n this.interactions.trackable = value;\r\n }\r\n //interaction.processTrackable(this);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"wheelable\", {\r\n /**\r\n * @return Mouse wheel events enabled?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"wheelable\");\r\n },\r\n /**\r\n * ==========================================================================\r\n * MOUSE-WHEEL RELATED\r\n * ==========================================================================\r\n * @hidden\r\n */\r\n /**\r\n * Indicates if the element can be interacted with mouse wheel.\r\n *\r\n * Will invoke `wheel`, `wheelup`, `wheeldown`, `wheelleft`, and `wheelright`\r\n * events when using mouse wheel over the element.\r\n *\r\n * @param value Mouse wheel events enabled?\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"wheelable\", value)) {\r\n if (!value && !this.isInteractive()) {\r\n // void\r\n }\r\n else {\r\n this.applyCursorStyle();\r\n this.interactions.wheelable = value;\r\n }\r\n //interaction.processWheelable(this);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"resizable\", {\r\n /**\r\n * @return Element resizable?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"resizable\");\r\n },\r\n /**\r\n * ==========================================================================\r\n * RESIZE\r\n * ==========================================================================\r\n * @hidden\r\n */\r\n /**\r\n * Indicates if this element is resizable.\r\n *\r\n * Enabling resize will turn on various interactions on the element. Their\r\n * actual functionality will depend on other properties.\r\n *\r\n * If the element also `draggable`, resize will only happen with two points\r\n * of contact on a touch device.\r\n *\r\n * If the element is not draggable, resize can be performed with just one\r\n * point of contact, touch or mouse.\r\n *\r\n * Will invoke `resize` event every time the size of the element changes.\r\n *\r\n * @param value Element resizable?\r\n */\r\n set: function (value) {\r\n var _this = this;\r\n value = $type.toBoolean(value);\r\n if (this.setPropertyValue(\"resizable\", value)) {\r\n if (!value && !this.isInteractive()) {\r\n // void\r\n }\r\n else {\r\n this.applyCursorStyle();\r\n this.interactions.resizable = value;\r\n // setEventDisposer will also remove listeners if value == false\r\n this.interactions.setEventDisposer(\"sprite-resizable\", value, function () { return new MultiDisposer([\r\n _this.events.on(\"down\", _this.handleDown, _this, false),\r\n _this.events.on(\"resize\", _this.handleResize, _this, false)\r\n ]); });\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Handles resize intermediate step.\r\n *\r\n * By default this method resizes actual element. Each element, can override\r\n * this method to implement their own resize logic.\r\n *\r\n * @ignore Exclude from docs\r\n * @param ev Event object\r\n */\r\n Sprite.prototype.handleResize = function (ev) {\r\n if (!this.interactions.isTouchProtected || !ev.touch) {\r\n this._isResized = true;\r\n this.scale = this.interactions.originalScale * ev.scale;\r\n this.validatePosition();\r\n /*center: (io.draggable\r\n ? $math.getMidPoint(point1, point2)\r\n : {\r\n \"x\": io.originalPosition.x,\r\n \"y\": io.originalPosition.y\r\n })*/\r\n //this.moveTo(this.originalPosition.x + ev.shift.x, this.originalPosition.y + ev.shift.y);\r\n if (this.draggable || this.dragWhileResize) {\r\n this._isDragged = false;\r\n var svgPoint1 = $utils.documentPointToSvg(ev.point1, this.htmlContainer, this.svgContainer.cssScale);\r\n var svgPoint2 = $utils.documentPointToSvg(ev.point2, this.htmlContainer, this.svgContainer.cssScale);\r\n var svgMidPoint = $math.getMidPoint(svgPoint1, svgPoint2);\r\n var parentPoint1 = $utils.documentPointToSprite(ev.startPoint1, this._parent);\r\n var parentPoint2 = $utils.documentPointToSprite(ev.startPoint2, this._parent);\r\n var originalPosition = this.interactions.originalPosition;\r\n var originalScale = this.interactions.originalScale;\r\n if (originalPosition) {\r\n var spritePoint1 = { x: (parentPoint1.x - originalPosition.x) / originalScale, y: (parentPoint1.y - originalPosition.y) / originalScale };\r\n var spritePoint2 = { x: (parentPoint2.x - originalPosition.x) / originalScale, y: (parentPoint2.y - originalPosition.y) / originalScale };\r\n var spriteMidPoint = $math.getMidPoint(spritePoint1, spritePoint2);\r\n var parentPoint = $utils.svgPointToSprite(svgMidPoint, this._parent);\r\n this.moveTo({ x: parentPoint.x - spriteMidPoint.x * this.scale, y: parentPoint.y - spriteMidPoint.y * this.scale }, undefined, undefined, true);\r\n }\r\n }\r\n }\r\n };\r\n Object.defineProperty(Sprite.prototype, \"cursorOptions\", {\r\n /**\r\n * ==========================================================================\r\n * MOUSE-RELATED\r\n * ==========================================================================\r\n * @hidden\r\n */\r\n /**\r\n * Returns element's cursor options.\r\n *\r\n * Cursor options usually define cursor style for various states of the\r\n * hovered element.\r\n *\r\n * Elements inherit `cursorOptions` from their parents if they don't have\r\n * them set explicitly.\r\n *\r\n * @see {@link ICursorOptions} for a list of available options\r\n * @return Cursor options\r\n */\r\n get: function () {\r\n if (!this.interactions.cursorOptions) {\r\n if (this.virtualParent) {\r\n return this.virtualParent.cursorOptions;\r\n }\r\n if (this._parent) {\r\n return this._parent.cursorOptions;\r\n }\r\n }\r\n return this.interactions.cursorOptions;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"cursorOverStyle\", {\r\n /**\r\n * A shortcut to setting mouse cursor on hover.\r\n *\r\n * Example:\r\n *\r\n * ```TypeScript\r\n * series.slices.template.cursorOverStyle = am4core.MouseCursorStyle.pointer;\r\n * ```\r\n * ```JavaScript\r\n * series.slices.template.cursorOverStyle = am4core.MouseCursorStyle.pointer;\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"series\": {\r\n * // ...\r\n * \"slices\": {\r\n * \"cursorOverStyle\": \"pointer\"\r\n * }\r\n * }\r\n * }\r\n * ```\r\n *\r\n * @param style An array of styles to apply onhover\r\n */\r\n set: function (style) {\r\n if (!this.cursorOptions.overStyle) {\r\n this.interactions.cursorOptions = {\r\n defaultStyle: this.cursorOptions.defaultStyle\r\n };\r\n }\r\n this.cursorOptions.overStyle = style;\r\n getInteraction().applyCursorOverStyle(this.interactions);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"cursorDownStyle\", {\r\n /**\r\n * A shortcut to setting mouse cursor when button is pressed down.\r\n *\r\n * Example:\r\n *\r\n * ```TypeScript\r\n * series.slices.template.cursorDownStyle = am4core.MouseCursorStyle.grabbing;\r\n * ```\r\n * ```JavaScript\r\n * series.slices.template.cursorDownStyle = am4core.MouseCursorStyle.grabbing;\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"series\": {\r\n * // ...\r\n * \"slices\": {\r\n * \"cursorDownStyle\": \"grabbing\"\r\n * }\r\n * }\r\n * }\r\n * ```\r\n *\r\n * @param style An array of styles to apply onhover\r\n */\r\n set: function (style) {\r\n this.cursorOptions.downStyle = style;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Applies default cursor styles for interactable elements.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Determine if this is necessary. Maybe let's not apply any cursor styles by default\r\n */\r\n Sprite.prototype.applyCursorStyle = function () {\r\n // Draggable styles\r\n /*if (this.draggable) {\r\n\r\n if (!$type.hasValue(this.cursorOptions.overStyle)) {\r\n this.cursorOptions.overStyle = MouseCursorStyle.grab;\r\n }\r\n\r\n if (!$type.hasValue(this.cursorOptions.downStyle)) {\r\n this.cursorOptions.downStyle = MouseCursorStyle.grabbing;\r\n }\r\n }*/\r\n };\r\n Object.defineProperty(Sprite.prototype, \"interactionsEnabled\", {\r\n /**\r\n * @return Is interaction enabled for this element?\r\n */\r\n get: function () {\r\n var value = this.getPropertyValue(\"interactionsEnabled\");\r\n if (value === false) {\r\n return false;\r\n }\r\n if (this.virtualParent) {\r\n return this.virtualParent.interactionsEnabled;\r\n }\r\n if (this._parent) {\r\n return this._parent.interactionsEnabled;\r\n }\r\n return true;\r\n },\r\n /**\r\n * Setting this to `false` will effectively disable all interactivity on the\r\n * element.\r\n *\r\n * @param value Is interaction enabled for this element?\r\n */\r\n set: function (value) {\r\n value = $type.toBoolean(value);\r\n if (this.setPropertyValue(\"interactionsEnabled\", value)) {\r\n var pointerEvents = null; // must be null, not \"null\"!\r\n if (!value) {\r\n pointerEvents = \"none\";\r\n }\r\n else {\r\n // this is for IE\r\n this.group.node.style.pointerEvents = \"\";\r\n }\r\n this.group.node.style.pointerEvents = pointerEvents;\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"exporting\", {\r\n /**\r\n * @return Export instance\r\n */\r\n get: function () {\r\n return this.getExporting();\r\n },\r\n /**\r\n * ==========================================================================\r\n * EXPORT-RELATED STUFF\r\n * ==========================================================================\r\n * @hidden\r\n */\r\n /**\r\n * An [[Export]] instance.\r\n *\r\n * Used to access API of the chart export functionality.\r\n *\r\n * If `exporting` is not set, the element inherits [[Export]] instance from\r\n * its parents.\r\n *\r\n * Upon request, if no parent has such instance, a new one is created, using\r\n * default settings, what in most cases is just enough.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/exporting/} for more info about exporting\r\n * @param exp Export\r\n */\r\n set: function (exp) {\r\n this._exporting.set(exp, exp);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * This is here as a method so that inheriting classes could override it.\r\n *\r\n * @return Export instance\r\n */\r\n Sprite.prototype.getExporting = function () {\r\n var _export = this._exporting.get();\r\n if (_export) {\r\n return _export;\r\n }\r\n else {\r\n if (this.isStandaloneInstance || !this._parent) {\r\n _export = new Export(this.svgContainer.SVGContainer);\r\n _export.sprite = this;\r\n _export.language = this.language;\r\n _export.numberFormatter = this.numberFormatter;\r\n _export.dateFormatter = this.dateFormatter;\r\n _export.durationFormatter = this.durationFormatter;\r\n this._exporting.set(_export, _export);\r\n }\r\n else {\r\n return this._parent.exporting;\r\n }\r\n }\r\n return _export;\r\n };\r\n Object.defineProperty(Sprite.prototype, \"exportable\", {\r\n /**\r\n * @return Export?\r\n */\r\n get: function () {\r\n return this._exportable;\r\n /*const svgContainer = this.svgContainer;\r\n return !svgContainer || $array.indexOf(svgContainer.nonExportableSprites, this) == -1;*/\r\n },\r\n /**\r\n * If set to `false` this element will be omitted when exporting the chart\r\n * to an image.\r\n *\r\n * @default true\r\n * @param value Export?\r\n */\r\n set: function (value) {\r\n var svgContainer = this.svgContainer;\r\n this._exportable = value;\r\n if (svgContainer) {\r\n if (value) {\r\n $array.remove(svgContainer.nonExportableSprites, this);\r\n }\r\n else if ($array.indexOf(svgContainer.nonExportableSprites, this) == -1) {\r\n svgContainer.nonExportableSprites.push(this);\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * ==========================================================================\r\n * MODAL/POPUP RELATED STUFF\r\n * ==========================================================================\r\n * @hidden\r\n */\r\n /**\r\n * Private method to be used for \"classPrefix\" adapter for modals/popups.\r\n *\r\n * @param value Prefix\r\n */\r\n Sprite.prototype.modalPrefix = function (value) {\r\n value = options.classNamePrefix + value;\r\n return value;\r\n };\r\n Object.defineProperty(Sprite.prototype, \"modal\", {\r\n /**\r\n * Returns a [[Modal]] instance, associated with this chart.\r\n * (elements top parent)\r\n *\r\n * Accessing modal does not make it appear. To make a modal appear, use\r\n * `showModal()` method.\r\n *\r\n * @see {@link Modal} for more information about using Modal windows\r\n * @return Modal instance\r\n */\r\n get: function () {\r\n var svgContainer = this.svgContainer;\r\n if (svgContainer) {\r\n var modal = svgContainer.modal;\r\n if (!modal.adapter.has(\"classPrefix\", this.modalPrefix)) {\r\n modal.adapter.add(\"classPrefix\", this.modalPrefix);\r\n }\r\n return modal;\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Opens a modal window with specific content (`text` parameter) and,\r\n * optionally, `title`.\r\n *\r\n * The `text` parameter can contain HTML content.\r\n *\r\n * @see {@link Modal} for more information about using Modal windows\r\n * @param text Modal contents\r\n * @param title Title for the modal window\r\n */\r\n Sprite.prototype.openModal = function (text, title) {\r\n var svgContainer = this.svgContainer;\r\n if (svgContainer) {\r\n return svgContainer.openModal(text, title);\r\n }\r\n };\r\n /**\r\n * Hides modal window if there is one currently open.\r\n */\r\n Sprite.prototype.closeModal = function () {\r\n var svgContainer = this.svgContainer;\r\n if (svgContainer) {\r\n svgContainer.closeModal();\r\n }\r\n };\r\n Object.defineProperty(Sprite.prototype, \"popups\", {\r\n /**\r\n * A list of popups for this chart.\r\n *\r\n * @return Popups\r\n */\r\n get: function () {\r\n var svgContainer = this.svgContainer;\r\n if (svgContainer) {\r\n var popups = svgContainer.popups;\r\n popups.template.sprite = this;\r\n if (!popups.template.adapter.has(\"classPrefix\", this.modalPrefix)) {\r\n popups.template.adapter.add(\"classPrefix\", this.modalPrefix);\r\n }\r\n return popups;\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Creates, opens, and returns a new [[Popup]] window.\r\n *\r\n * `text` can be any valid HTML.\r\n *\r\n * `title` is currently not supported.\r\n *\r\n * @param text Popup contents\r\n * @param title Popup title\r\n * @return Popup instance\r\n */\r\n Sprite.prototype.openPopup = function (text, title) {\r\n var svgContainer = this.svgContainer;\r\n if (svgContainer) {\r\n return svgContainer.openPopup(text, title);\r\n }\r\n };\r\n /**\r\n * Closes all currently open popup windows\r\n */\r\n Sprite.prototype.closeAllPopups = function () {\r\n var svgContainer = this.svgContainer;\r\n if (svgContainer) {\r\n svgContainer.closeAllPopups();\r\n }\r\n };\r\n Object.defineProperty(Sprite.prototype, \"x\", {\r\n /**\r\n * @return X coordinate\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"x\");\r\n },\r\n /**\r\n * ==========================================================================\r\n * POSITIONAL PROPERTIES AND RELATED STUFF\r\n * ==========================================================================\r\n * @hidden\r\n */\r\n /**\r\n * Element's absolute or relative X coordinate.\r\n *\r\n * If setting both X and Y, please consider using `moveTo()` method instead,\r\n * as it will be faster to set both coordinates at once.\r\n *\r\n * @param value X coordinate\r\n */\r\n set: function (value) {\r\n if (!this.isDragged) {\r\n this.setPercentProperty(\"x\", value, false, true, this._positionPrecision, true);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"pixelX\", {\r\n /**\r\n * Returns element's current absolute X coordinate in pixels.\r\n *\r\n * @readonly\r\n * @return X coordinate (px)\r\n */\r\n get: function () {\r\n var value = $math.fitToRange(this.getPixelX(this.x), this.minX, this.maxX);\r\n if (!this._adapterO) {\r\n return value;\r\n }\r\n else {\r\n return this._adapterO.apply(\"pixelX\", value);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"relativeX\", {\r\n /**\r\n * Returns element's current relative X coordinate in [[Percent]].\r\n *\r\n * @return X coordinate ([[Percent]])\r\n */\r\n get: function () {\r\n if (!this._adapterO) {\r\n return this.getRelativeX(this.x);\r\n }\r\n else {\r\n return this._adapterO.apply(\"relativeX\", this.getRelativeX(this.x));\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"minX\", {\r\n /**\r\n * @ignore Exclude from docs\r\n * @return Min X (px)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"minX\");\r\n },\r\n /**\r\n * The smallest allowable absolute X coordinate for this element.\r\n *\r\n * This is used to contain element movement within certain boundaries.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Min X (px)\r\n */\r\n set: function (value) {\r\n if ($type.isNumber(value)) {\r\n value = $math.round(value, this._positionPrecision, true);\r\n this.setPropertyValue(\"minX\", value, false, true);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"maxX\", {\r\n /**\r\n * @ignore Exclude from docs\r\n * @return Max X (px)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"maxX\");\r\n },\r\n /**\r\n * The biggest allowable absolute X coordinate for this element.\r\n *\r\n * This is used to contain element movement within certain boundaries.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Max X (px)\r\n */\r\n set: function (value) {\r\n if ($type.isNumber(value)) {\r\n value = $math.round(value, this._positionPrecision, true);\r\n this.setPropertyValue(\"maxX\", value, false, true);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"y\", {\r\n /**\r\n * @return Y coordinate\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"y\");\r\n },\r\n /**\r\n * Element's absolute or relative Y coordinate.\r\n *\r\n * If setting both X and Y, please consider using `moveTo()` method instead,\r\n * as it will be faster to set both coordinates at once.\r\n *\r\n * @param value Y coordinate\r\n */\r\n set: function (value) {\r\n if (!this.isDragged) {\r\n this.setPercentProperty(\"y\", value, false, true, this._positionPrecision, true);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"pixelY\", {\r\n /**\r\n * Returns element's current absolute Y coordinate in pixels.\r\n *\r\n * @readonly\r\n * @return Y coordinate (px)\r\n */\r\n get: function () {\r\n var value = $math.fitToRange(this.getPixelY(this.y), this.minY, this.maxY);\r\n if (!this._adapterO) {\r\n return value;\r\n }\r\n else {\r\n return this._adapterO.apply(\"pixelY\", value);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"relativeY\", {\r\n /**\r\n * Returns element's current relative Y coordinate in [[Percent]].\r\n *\r\n * @readonly\r\n * @return Y coordinate ([[Percent]])\r\n */\r\n get: function () {\r\n if (!this._adapterO) {\r\n return this.getRelativeX(this.y);\r\n }\r\n else {\r\n return this._adapterO.apply(\"relativeY\", this.getRelativeX(this.y));\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"minY\", {\r\n /**\r\n * @ignore Exclude from docs\r\n * @return Min Y (px)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"minY\");\r\n },\r\n /**\r\n * The smallest allowable absolute Y coordinate for this element.\r\n *\r\n * This is used to contain element movement within certain boundaries.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Min Y (px)\r\n */\r\n set: function (value) {\r\n if ($type.isNumber(value)) {\r\n value = $math.round(value, this._positionPrecision, true);\r\n this.setPropertyValue(\"minY\", value, false, true);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"maxY\", {\r\n /**\r\n * @ignore Exclude from docs\r\n * @return Max Y (px)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"maxY\");\r\n },\r\n /**\r\n * The biggest allowable absolute Y coordinate for this element.\r\n *\r\n * This is used to contain element movement within certain boundaries.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Max Y (px)\r\n */\r\n set: function (value) {\r\n if ($type.isNumber(value)) {\r\n value = $math.round(value, this._positionPrecision, true);\r\n this.setPropertyValue(\"maxY\", value, false, true);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"dx\", {\r\n /**\r\n * @return Horizontal offset (px)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"dx\");\r\n },\r\n /**\r\n * A horizontal offset for the element in pixels.\r\n *\r\n * Can be negative value for offset to the left.\r\n *\r\n * @param value Horizontal offset (px)\r\n */\r\n set: function (value) {\r\n if ($type.isNumber(value)) {\r\n value = $math.round(value, this._positionPrecision, true);\r\n this.setPropertyValue(\"dx\", value, false, true);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"dy\", {\r\n /**\r\n * @return Vertical offset (px)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"dy\");\r\n },\r\n /**\r\n * A vertical offset for the element in pixels.\r\n *\r\n * Can be negative value for offset upwards.\r\n *\r\n * @param value Vertical offset (px)\r\n */\r\n set: function (value) {\r\n if ($type.isNumber(value)) {\r\n value = $math.round(value, this._positionPrecision, true);\r\n this.setPropertyValue(\"dy\", value, false, true);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"rotation\", {\r\n /**\r\n * @return Rotation (0-360)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"rotation\");\r\n },\r\n /**\r\n * Rotation of the element in degrees. (0-360)\r\n *\r\n * Note: For convenience purposes, negative values (for counter-clockwise\r\n * rotation) and values exceeding 360 can also be used.\r\n *\r\n * @param value Rotation (0-360)\r\n */\r\n set: function (value) {\r\n value = $type.toNumber(value);\r\n if (!$type.isNumber(value)) {\r\n value = 0;\r\n }\r\n this.setPropertyValue(\"rotation\", value, false, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"align\", {\r\n /**\r\n * @return Horizontal align\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"align\");\r\n },\r\n /**\r\n * Controls horizontal alignment of the element.\r\n *\r\n * This is used by parent [[Container]] when layouting its children.\r\n *\r\n * @param value Horizontal align\r\n */\r\n set: function (value) {\r\n value = $type.toText(value);\r\n if (this.setPropertyValue(\"align\", value)) {\r\n if (this._parent) {\r\n this._parent.invalidateLayout();\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"valign\", {\r\n /**\r\n * @return Vertical align\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"valign\");\r\n },\r\n /**\r\n * Controls vertical alignment of the element.\r\n *\r\n * This is used by parent [[Container]] when layouting its children.\r\n *\r\n * @param value Vertical align\r\n */\r\n set: function (value) {\r\n value = $type.toText(value);\r\n if (this.setPropertyValue(\"valign\", value)) {\r\n if (this._parent) {\r\n this._parent.invalidateLayout();\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"horizontalCenter\", {\r\n /**\r\n * @return Horizontal center\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"horizontalCenter\");\r\n },\r\n /**\r\n * Controls which part of the element to treat as a horizontal center.\r\n *\r\n * The setting will be used when positioning, resizing and rotating the\r\n * element.\r\n *\r\n * @param value Horizontal center\r\n */\r\n set: function (value) {\r\n value = $type.toText(value);\r\n if (this.setPropertyValue(\"horizontalCenter\", value)) {\r\n this.updateCenter();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"verticalCenter\", {\r\n /**\r\n * @return Vertical center\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"verticalCenter\");\r\n },\r\n /**\r\n * Controls which part of the element to treat as a vertical center.\r\n *\r\n * The setting will be used when positioning, resizing and rotating the\r\n * element.\r\n *\r\n * @param value Vertical center\r\n */\r\n set: function (value) {\r\n value = $type.toText(value);\r\n if (this.setPropertyValue(\"verticalCenter\", value)) {\r\n this.updateCenter();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"maxWidth\", {\r\n /**\r\n * @return Maximum width (px)\r\n */\r\n get: function () {\r\n var maxWidth = this.getPropertyValue(\"maxWidth\");\r\n if (!$type.isNumber(maxWidth)) {\r\n if (this._parent) {\r\n var parentWidth = this._parent.maxWidth;\r\n if (this._parent.layout != \"absolute\" && this.align != \"none\" && this.align != undefined) {\r\n parentWidth = parentWidth - this.pixelMarginLeft - this.pixelMarginRight;\r\n }\r\n return parentWidth;\r\n }\r\n }\r\n return maxWidth;\r\n },\r\n /**\r\n * ==========================================================================\r\n * DIMENSIONAL PROPERTIES AND RELATED STUFF\r\n * ==========================================================================\r\n * @hidden\r\n */\r\n /**\r\n * Maximum allowed width for the element in pixels.\r\n *\r\n * @param value Maximum width (px)\r\n */\r\n set: function (value) {\r\n this.setMaxWidth(value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Sprite.prototype.setMaxWidth = function (value) {\r\n var prevWidth = this.maxWidth;\r\n var prevHeight = this.maxHeight;\r\n if (this.setPropertyValue(\"maxWidth\", value)) {\r\n if ($type.isNumber(this.relativeWidth)) {\r\n this.invalidate();\r\n }\r\n var event_2 = {\r\n type: \"maxsizechanged\",\r\n target: this,\r\n previousWidth: prevWidth,\r\n previousHeight: prevHeight\r\n };\r\n this.dispatchImmediately(\"maxsizechanged\", event_2);\r\n }\r\n };\r\n Object.defineProperty(Sprite.prototype, \"maxHeight\", {\r\n /**\r\n * @return Maximum height (px)\r\n */\r\n get: function () {\r\n var maxHeight = this.getPropertyValue(\"maxHeight\");\r\n if (!$type.isNumber(maxHeight)) {\r\n if (this._parent) {\r\n var parentHeight = this._parent.maxHeight;\r\n if (this._parent.layout != \"absolute\" && this.valign != \"none\" && this.valign != undefined) {\r\n parentHeight = parentHeight - this.pixelMarginTop - this.pixelMarginBottom;\r\n }\r\n return parentHeight;\r\n }\r\n }\r\n return maxHeight;\r\n },\r\n /**\r\n * Maximum allowed height for the element in pixels.\r\n *\r\n * @param value Maximum height (px)\r\n */\r\n set: function (value) {\r\n this.setMaxHeight(value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Sprite.prototype.setMaxHeight = function (value) {\r\n var prevWidth = this.maxWidth;\r\n var prevHeight = this.maxHeight;\r\n if (this.setPropertyValue(\"maxHeight\", value)) {\r\n if ($type.isNumber(this.relativeHeight)) {\r\n this.invalidate();\r\n }\r\n var event_3 = {\r\n type: \"maxsizechanged\",\r\n target: this,\r\n previousWidth: prevWidth,\r\n previousHeight: prevHeight\r\n };\r\n this.dispatchImmediately(\"maxsizechanged\", event_3);\r\n }\r\n };\r\n Object.defineProperty(Sprite.prototype, \"minWidth\", {\r\n /**\r\n * @return Minimum width (px)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"minWidth\");\r\n },\r\n /**\r\n * Minimum width of the element in pixels.\r\n *\r\n * Set to `undefined` to remove the limit.\r\n *\r\n * @param value Minimum width (px)\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"minWidth\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"minHeight\", {\r\n /**\r\n * @return Minimum height (px)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"minHeight\");\r\n },\r\n /**\r\n * Minimum height for the element in pixels.\r\n *\r\n * Set to `undefined` to remove the limit.\r\n *\r\n * @param value Minimum height (px)\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"minHeight\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"width\", {\r\n /**\r\n * @return Width (absolute or relative)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"width\");\r\n },\r\n /**\r\n * Element's absolute or relative width.\r\n *\r\n * The width can either be absolute, set in numeric pixels, or relative, set\r\n * in [[Percent]].\r\n *\r\n * Relative width will be calculated using closest measured ancestor\r\n * [[Container]].\r\n *\r\n * NOTE: `width` is an accessor, which allows setting width in pixels or\r\n * percent. It is a sort of a \"shortcut\" for the users. Actual renderer does\r\n * not ever use it. It uses either `pixelWidth` or `percentWidth`, so if\r\n * you need to add an adapter for width add it for either of the two\r\n * properties - whichever suits your requirements.\r\n *\r\n * @param value Width (numeric in pixels or relative)\r\n */\r\n set: function (value) {\r\n var changed = this.setPercentProperty(\"width\", value, true, false, this._positionPrecision, true);\r\n if (changed) {\r\n this.percentWidth = undefined;\r\n this.relativeWidth = undefined;\r\n if (value instanceof Percent) {\r\n this.percentWidth = value.percent;\r\n if ($type.isNumber(this._pixelWidth)) {\r\n this.maxWidth = undefined;\r\n }\r\n this._pixelWidth = undefined;\r\n }\r\n else {\r\n this._pixelWidth = Number(value);\r\n //this._measuredWidth = this._pixelWidth;\r\n this.maxWidth = this._pixelWidth;\r\n }\r\n this.invalidatePosition();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"height\", {\r\n /**\r\n * @return height (absolute or relative)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"height\");\r\n },\r\n /**\r\n * Element's absolute or relative height.\r\n *\r\n * The height can either be absolute, set in numeric pixels, or relative, set\r\n * in [[Percent]].\r\n *\r\n * Relative height will be calculated using closest measured ancestor\r\n * [[Container]].\r\n *\r\n * NOTE: `height` is an accessor, which allows setting height in pixels or\r\n * percent. It is a sort of a \"shortcut\" for the users. Actual renderer does\r\n * not ever use it. It uses either `pixelHeight` or `percentHeight`, so if\r\n * you need to add an adapter for height add it for either of the two\r\n * properties - whichever suits your requirements.\r\n *\r\n * @param value Height (numeric in pixels or relative)\r\n */\r\n set: function (value) {\r\n var changed = this.setPercentProperty(\"height\", value, true, false, this._positionPrecision, true);\r\n if (changed) {\r\n this.percentHeight = undefined;\r\n this._relativeHeight = undefined;\r\n if (value instanceof Percent) {\r\n this.percentHeight = value.percent;\r\n if ($type.isNumber(this._pixelHeight)) {\r\n this.maxHeight = undefined;\r\n }\r\n this._pixelHeight = undefined;\r\n }\r\n else {\r\n this._pixelHeight = Number(value);\r\n //this._measuredHeight = this._pixelHeight;\r\n this.maxHeight = this._pixelHeight; // yes, we reset maxWidth\r\n }\r\n this.invalidatePosition();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"pixelWidth\", {\r\n /**\r\n * Returns element's width in pixels, if width was set. For actual width use measuredWidth property.\r\n *\r\n * @readonly\r\n * @return Width (px)\r\n */\r\n get: function () {\r\n var width;\r\n if ($type.isNumber(this.percentWidth)) {\r\n width = this.maxWidth;\r\n }\r\n else if ($type.isNumber(this._pixelWidth)) {\r\n width = this._pixelWidth;\r\n }\r\n else {\r\n width = 0;\r\n }\r\n var minWidth = this.minWidth;\r\n if (minWidth != null && width < minWidth) {\r\n width = minWidth;\r\n }\r\n var value = $math.round(width, this._positionPrecision, true);\r\n if (!this._adapterO) {\r\n return value;\r\n }\r\n else {\r\n return this._adapterO.apply(\"pixelWidth\", value);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"pixelHeight\", {\r\n /**\r\n * Returns element's height in pixels. For actual height use measuredHeight property.\r\n *\r\n * @readonly\r\n * @return Height (px)\r\n */\r\n get: function () {\r\n var height;\r\n if ($type.isNumber(this.percentHeight)) {\r\n height = this.maxHeight;\r\n }\r\n else if ($type.isNumber(this._pixelHeight)) {\r\n height = this._pixelHeight;\r\n }\r\n else {\r\n height = 0; //this._measuredHeightSelf;\r\n }\r\n var minHeight = this.minHeight;\r\n if (minHeight != null && height < minHeight) {\r\n height = minHeight;\r\n }\r\n var value = $math.round(height, this._positionPrecision, true);\r\n if (!this._adapterO) {\r\n return value;\r\n }\r\n else {\r\n return this._adapterO.apply(\"pixelHeight\", value);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"relativeWidth\", {\r\n /**\r\n * @return Relative width\r\n * @ignore\r\n */\r\n get: function () {\r\n var relativeWidth = this._relativeWidth;\r\n if ($type.isNumber(relativeWidth)) {\r\n if (!this._adapterO) {\r\n return relativeWidth;\r\n }\r\n else {\r\n return this._adapterO.apply(\"relativeWidth\", relativeWidth);\r\n }\r\n }\r\n },\r\n /**\r\n * Element's relative width in [[Percent]].\r\n * @ignore\r\n *\r\n * @param value Relative width\r\n */\r\n set: function (value) {\r\n if (this._relativeWidth != value) {\r\n this._relativeWidth = value;\r\n //\t\t\tthis.invalidate();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"relativeHeight\", {\r\n /**\r\n * @return Relative height\r\n * @ignore\r\n */\r\n get: function () {\r\n var relativeHeight = this._relativeHeight;\r\n if ($type.isNumber(relativeHeight)) {\r\n if (!this._adapterO) {\r\n return relativeHeight;\r\n }\r\n else {\r\n return this._adapterO.apply(\"relativeHeight\", relativeHeight);\r\n }\r\n }\r\n },\r\n /**\r\n * Element's relative height in [[Percent]].\r\n *\r\n * @param value Relative height\r\n * @ignore\r\n */\r\n set: function (value) {\r\n if (this._relativeHeight != value) {\r\n this._relativeHeight = value;\r\n //\t\t\tthis.invalidate();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"measuredWidth\", {\r\n /**\r\n * Returns element's measured width in pixels.\r\n *\r\n * A measured width is actual width of contents plus `paddingRight` and* `paddingLeft`, relative to sprite parent, meaning that\r\n * rotation and scale is taken into account.\r\n *\r\n * @readonly\r\n * @return Width (px)\r\n */\r\n get: function () {\r\n if (this.disabled || this.__disabled) {\r\n return 0;\r\n }\r\n if (!this._adapterO) {\r\n return this._measuredWidth;\r\n }\r\n else {\r\n return this._adapterO.apply(\"measuredWidth\", this._measuredWidth);\r\n }\r\n // it's not good to fit to min/max range as then rotations and scale won't be taken into account\r\n //return this.adapter.apply(\"measuredWidth\", $math.fitToRange(this._measuredWidth, this.minWidth, this.maxWidth));\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"measuredHeight\", {\r\n /**\r\n * Returns elements's measured height in pixels.\r\n *\r\n * A measured height is actual height of contents plus `paddingTop` and `paddingBottom`, relative to sprite parent, meaning that\r\n * rotation and scale taken into account.\r\n *\r\n * @readonly\r\n * @return Height (px)\r\n */\r\n get: function () {\r\n if (this.disabled || this.__disabled) {\r\n return 0;\r\n }\r\n // it's not good to fit to min/max range as then rotations and scale won't be taken into account\r\n //return this.adapter.apply(\"measuredHeight\", $math.fitToRange(this._measuredHeight, this.minHeight, this.maxHeight));\r\n if (!this._adapterO) {\r\n return this._measuredHeight;\r\n }\r\n else {\r\n return this._adapterO.apply(\"measuredHeight\", this._measuredHeight);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"outerWidth\", {\r\n /**\r\n * Returns element's measured width plus its left and right margins in\r\n * pixels.\r\n *\r\n * @readonly\r\n * @return Outer width (px)\r\n */\r\n get: function () {\r\n var value = this.pixelWidth + this.pixelMarginRight + this.pixelMarginLeft;\r\n if (!this._adapterO) {\r\n return value;\r\n }\r\n else {\r\n return this._adapterO.apply(\"outerWidth\", value);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"outerHeight\", {\r\n /**\r\n * Returns element's measured height plus its top and bottom margins in\r\n * pixels.\r\n *\r\n * @readonly\r\n * @return Outer height (px)\r\n */\r\n get: function () {\r\n var value = this.pixelHeight + this.pixelMarginTop + this.pixelMarginBottom;\r\n if (!this._adapterO) {\r\n return value;\r\n }\r\n else {\r\n return this._adapterO.apply(\"outerHeight\", value);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"innerWidth\", {\r\n /**\r\n * Returns element's measured inner width in pixels.\r\n *\r\n * Inner width is actual available space for content, e.g. element's width\r\n * minus horizontal padding.\r\n *\r\n * @readonly\r\n * @return Inner width (px)\r\n */\r\n get: function () {\r\n var value = Math.max(0, this.pixelWidth - this.pixelPaddingRight - this.pixelPaddingLeft);\r\n if (!this._adapterO) {\r\n return value;\r\n }\r\n else {\r\n return this._adapterO.apply(\"innerWidth\", value);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"innerHeight\", {\r\n /**\r\n * Returns element's measured inner height in pixels.\r\n *\r\n * Inner height is actual available space for content, e.g. element's height\r\n * minus vertical padding.\r\n *\r\n * @readonly\r\n * @return Inner height (px)\r\n */\r\n get: function () {\r\n var value = Math.max(0, this.pixelHeight - this.pixelPaddingTop - this.pixelPaddingBottom);\r\n if (!this._adapterO) {\r\n return value;\r\n }\r\n else {\r\n return this._adapterO.apply(\"innerHeight\", value);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"globalScale\", {\r\n /**\r\n * Returns element's current \"global\" scale.\r\n *\r\n * Scale values accumulate over hierarchy of elements.\r\n *\r\n * E.g. if a [[Container]] has `scale = 2` and it's child has a `scale = 2`,\r\n * the child's `globalScale` will be 4. (a multitude of `2 x 2`)\r\n *\r\n * @readonly\r\n * @return Global scale\r\n */\r\n get: function () {\r\n var scale = this.scale;\r\n if (this._parent) {\r\n scale = scale * this._parent.globalScale;\r\n }\r\n if (!this._adapterO) {\r\n return scale;\r\n }\r\n else {\r\n return this._adapterO.apply(\"globalScale\", scale);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"scale\", {\r\n /**\r\n * @return Scale (0-1)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"scale\");\r\n },\r\n /**\r\n * Scale of the element.\r\n *\r\n * The scale is set from 0 (element reduced to nothing) to 1 (default size).\r\n * * 2 will mean element is increased twice.\r\n * * 0.5 - reduced by 50%.\r\n *\r\n * Etc.\r\n *\r\n * @param value Scale (0-1)\r\n */\r\n set: function (value) {\r\n value = $type.toNumber(value);\r\n if (value < 0) {\r\n value = 0;\r\n }\r\n if (value != this.getPropertyValue(\"scale\")) {\r\n this.setPropertyValue(\"scale\", value, false, true);\r\n this.handleGlobalScale();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Sets all four margins for the element at once.\r\n *\r\n * Margins are set in pixels.\r\n *\r\n * @param top Top margin\r\n * @param right Right margin\r\n * @param bottom Bottom margin\r\n * @param left Left margin\r\n * @return Current element\r\n */\r\n Sprite.prototype.margin = function (top, right, bottom, left) {\r\n this.marginTop = top;\r\n this.marginRight = right;\r\n this.marginBottom = bottom;\r\n this.marginLeft = left;\r\n return this;\r\n };\r\n Object.defineProperty(Sprite.prototype, \"marginLeft\", {\r\n /**\r\n * @return Margin value\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"marginLeft\");\r\n },\r\n /**\r\n * Left margin - absolute (px) or relative ([[Percent]]).\r\n *\r\n * @param value Margin value\r\n */\r\n set: function (value) {\r\n this.setPercentProperty(\"marginLeft\", value, true, true, this._positionPrecision, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"marginRight\", {\r\n /**\r\n * @return Margin value\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"marginRight\");\r\n },\r\n /**\r\n * Right margin - absolute (px) or relative ([[Percent]]).\r\n *\r\n * @param value Margin value\r\n */\r\n set: function (value) {\r\n this.setPercentProperty(\"marginRight\", value, true, true, this._positionPrecision, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"marginTop\", {\r\n /**\r\n * @return Margin value\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"marginTop\");\r\n },\r\n /**\r\n * Top margin - absolute (px) or relative ([[Percent]]).\r\n *\r\n * @param value Margin value\r\n */\r\n set: function (value) {\r\n this.setPercentProperty(\"marginTop\", value, true, true, this._positionPrecision, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"marginBottom\", {\r\n /**\r\n * @return Margin value\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"marginBottom\");\r\n },\r\n /**\r\n * Bottom margin - absolute (px) or relative ([[Percent]]).\r\n *\r\n * @param value Margin value\r\n */\r\n set: function (value) {\r\n this.setPercentProperty(\"marginBottom\", value, true, true, this._positionPrecision, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"pixelMarginRight\", {\r\n /**\r\n * Returns current right margin in pixels.\r\n *\r\n * @readonly\r\n * @return Right margin (px)\r\n */\r\n get: function () {\r\n var value = this.getPixelX(this.marginRight);\r\n if (!this._adapterO) {\r\n return value;\r\n }\r\n else {\r\n return this._adapterO.apply(\"pixelMarginRight\", value);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"relativeMarginRight\", {\r\n /**\r\n * Returns current relative right margin.\r\n *\r\n * @readonly\r\n * @return Relative right margin\r\n */\r\n get: function () {\r\n // @todo Maybe use [[Percent]]?\r\n var value = this.getRelativeX(this.marginRight);\r\n if (!this._adapterO) {\r\n return value;\r\n }\r\n else {\r\n return this._adapterO.apply(\"relativeMarginRight\", value);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"pixelMarginLeft\", {\r\n /**\r\n * Returns current left margin in pixels.\r\n *\r\n * @readonly\r\n * @return Left margin (px)\r\n */\r\n get: function () {\r\n var value = this.getPixelX(this.marginLeft);\r\n if (!this._adapterO) {\r\n return value;\r\n }\r\n else {\r\n return this._adapterO.apply(\"pixelMarginLeft\", value);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"relativeMarginLeft\", {\r\n /**\r\n * Returns current relative left margin.\r\n *\r\n * @readonly\r\n * @return Relative left margin\r\n */\r\n get: function () {\r\n //@todo Maybe use [[Percent]]?\r\n var value = this.getRelativeX(this.marginLeft);\r\n if (!this._adapterO) {\r\n return value;\r\n }\r\n else {\r\n return this._adapterO.apply(\"relativeMarginLeft\", value);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"pixelMarginTop\", {\r\n /**\r\n * Returns current top margin in pixels.\r\n *\r\n * @readonly\r\n * @return Top margin (px)\r\n */\r\n get: function () {\r\n var value = this.getPixelY(this.marginTop);\r\n if (!this._adapterO) {\r\n return value;\r\n }\r\n else {\r\n return this._adapterO.apply(\"pixelMarginTop\", value);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"relativeMarginTop\", {\r\n /**\r\n * Returns current relative top margin.\r\n *\r\n * @readonly\r\n * @return Relative top margin\r\n */\r\n get: function () {\r\n // @todo Maybe use [[Percent]]?\r\n var value = this.getRelativeY(this.marginTop);\r\n if (!this._adapterO) {\r\n return value;\r\n }\r\n else {\r\n return this._adapterO.apply(\"relativeMarginTop\", value);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"pixelMarginBottom\", {\r\n /**\r\n * Returns current bottom margin in pixels.\r\n *\r\n * @readonly\r\n * @return Bottom margin (px)\r\n */\r\n get: function () {\r\n var value = this.getPixelY(this.marginBottom);\r\n if (!this._adapterO) {\r\n return value;\r\n }\r\n else {\r\n return this._adapterO.apply(\"pixelMarginBottom\", value);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"relativeMarginBottom\", {\r\n /**\r\n * Returns current relative bottom margin.\r\n *\r\n * @readonly\r\n * @return Relative bottom margin\r\n */\r\n get: function () {\r\n // @todo Maybe use [[Percent]]?\r\n var value = this.getRelativeY(this.marginBottom);\r\n if (!this._adapterO) {\r\n return value;\r\n }\r\n else {\r\n return this._adapterO.apply(\"relativeMarginBottom\", value);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Sets padding for the element in pixels.\r\n *\r\n * @param top Top padding (px)\r\n * @param right Right padding (px)\r\n * @param bottom Bottom padding (px)\r\n * @param left Left padding (px)\r\n * @return Element\r\n */\r\n Sprite.prototype.padding = function (top, right, bottom, left) {\r\n this.paddingTop = top;\r\n this.paddingRight = right;\r\n this.paddingBottom = bottom;\r\n this.paddingLeft = left;\r\n return this;\r\n };\r\n Object.defineProperty(Sprite.prototype, \"paddingLeft\", {\r\n /**\r\n * @return Padding value\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"paddingLeft\");\r\n },\r\n /**\r\n * Left padding - absolute (px) or relative ([[Percent]]).\r\n *\r\n * @param value Padding value\r\n */\r\n set: function (value) {\r\n this.setPercentProperty(\"paddingLeft\", value, true, true, this._positionPrecision, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"paddingRight\", {\r\n /**\r\n * @return Padding value\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"paddingRight\");\r\n },\r\n /**\r\n * Right padding - absolute (px) or relative ([[Percent]]).\r\n *\r\n * @param value Padding value\r\n */\r\n set: function (value) {\r\n this.setPercentProperty(\"paddingRight\", value, true, true, this._positionPrecision, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"paddingTop\", {\r\n /**\r\n * @return Padding value\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"paddingTop\");\r\n },\r\n /**\r\n * Top padding - absolute (px) or relative ([[Percent]]).\r\n *\r\n * @param value Padding value\r\n */\r\n set: function (value) {\r\n this.setPercentProperty(\"paddingTop\", value, true, true, this._positionPrecision, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"paddingBottom\", {\r\n /**\r\n * @return Padding value\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"paddingBottom\");\r\n },\r\n /**\r\n * Bottom padding - absolute (px) or relative ([[Percent]]).\r\n *\r\n * @param value Padding value\r\n */\r\n set: function (value) {\r\n this.setPercentProperty(\"paddingBottom\", value, true, true, this._positionPrecision, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"pixelPaddingRight\", {\r\n /**\r\n * Returns current right padding in pixels.\r\n *\r\n * @readonly\r\n * @return Right padding (px)\r\n */\r\n get: function () {\r\n return this.getPixelX(this.paddingRight);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"relativePaddingRight\", {\r\n /**\r\n * Returns current relative right padding.\r\n *\r\n * @readonly\r\n * @return Relative right padding\r\n */\r\n get: function () {\r\n // @todo Maybe use [[Percent]]?\r\n return this.getRelativeX(this.paddingRight);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"pixelPaddingLeft\", {\r\n /**\r\n * Returns current left padding in pixels.\r\n *\r\n * @readonly\r\n * @return Left padding (px)\r\n */\r\n get: function () {\r\n return this.getPixelX(this.paddingLeft);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"relativePaddingLeft\", {\r\n /**\r\n * Returns current relative left padding.\r\n *\r\n * @readonly\r\n * @return Relative left padding\r\n */\r\n get: function () {\r\n // @todo Maybe use [[Percent]]?\r\n return this.getRelativeX(this.paddingLeft);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"pixelPaddingTop\", {\r\n /**\r\n * Returns current top padding in pixels.\r\n *\r\n * @readonly\r\n * @return Top padding (px)\r\n */\r\n get: function () {\r\n return this.getPixelY(this.paddingTop);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"relativePaddingTop\", {\r\n /**\r\n * Returns current relative top padding.\r\n *\r\n * @readonly\r\n * @return Relative top padding\r\n */\r\n get: function () {\r\n // @todo Maybe use [[Percent]]?\r\n return this.getRelativeY(this.paddingTop);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"pixelPaddingBottom\", {\r\n /**\r\n * Returns current bottom padding in pixels.\r\n *\r\n * @readonly\r\n * @return Bottom padding (px)\r\n */\r\n get: function () {\r\n return this.getPixelY(this.paddingBottom);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"relativePaddingBottom\", {\r\n /**\r\n * Returns current relative bottom padding.\r\n *\r\n * @readonly\r\n * @return Relative bottom padding\r\n */\r\n get: function () {\r\n // @todo Maybe use [[Percent]]?\r\n return this.getRelativeY(this.paddingBottom);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"path\", {\r\n /**\r\n * @return Path of a Sprite element\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"path\");\r\n },\r\n /**\r\n * ==========================================================================\r\n * APPEARANCE-RELATED PROPERTIES AND RELATED STUFF\r\n * ==========================================================================\r\n * @hidden\r\n */\r\n /**\r\n * Path of Sprite element\r\n */\r\n set: function (value) {\r\n this.setPath(value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * @ignore\r\n */\r\n Sprite.prototype.setPath = function (value) {\r\n if (this.setPropertyValue(\"path\", value)) {\r\n if (this._adapterO) {\r\n value = this._adapterO.apply(\"path\", value);\r\n }\r\n if (!this._isPath) {\r\n if (!this.element || (this.element.node && !(this.element.node instanceof SVGPathElement))) {\r\n this.element = this.paper.add(\"path\");\r\n }\r\n this._isPath = true;\r\n }\r\n if ($type.hasValue(value)) {\r\n this.element.attr({ \"d\": value });\r\n }\r\n else {\r\n this.element.removeAttr(\"d\");\r\n }\r\n this.invalidatePosition();\r\n // otherwise is 0x0\r\n if (!this.inited) {\r\n this.events.once(\"inited\", this.validatePosition, this, false);\r\n }\r\n return true;\r\n }\r\n return false;\r\n };\r\n Object.defineProperty(Sprite.prototype, \"fillModifier\", {\r\n /**\r\n * @return Fill color modifier\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"fillModifier\");\r\n },\r\n /**\r\n * [[ColorModifier]] that can be used to modify color and pattern of the\r\n * element's fill, e.g. create gradients.\r\n *\r\n * @param value Fill color modifiier\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"fillModifier\", value)) {\r\n this.setFill(this.fill);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"strokeModifier\", {\r\n /**\r\n * @return Stroke color modifier\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"strokeModifier\");\r\n },\r\n /**\r\n * [[ColorModifier]] that can be used to modify color and pattern of the\r\n * element's stroke (outline), e.g. create gradients.\r\n *\r\n * @param value Stroke color modifier\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"strokeModifier\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"fillOpacity\", {\r\n /**\r\n * @return Opacity (0-9)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"fillOpacity\");\r\n },\r\n /**\r\n * Element's fill opacity.\r\n *\r\n * Opacity ranges from 0 (fully transparent) to 1 (fully opaque).\r\n *\r\n * @param value Opacity (0-1)\r\n */\r\n set: function (value) {\r\n value = $math.toNumberRange(value, 0, 1);\r\n if (this.setPropertyValue(\"fillOpacity\", value)) {\r\n this.setSVGAttribute({ \"fill-opacity\": value });\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"fill\", {\r\n /**\r\n * @return Fill\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"fill\");\r\n },\r\n /**\r\n * Element's fill color or pattern.\r\n *\r\n * @param value Fill\r\n */\r\n set: function (value) {\r\n this.setFill(value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Sets actual `fill` property on the SVG element, including applicable color\r\n * modifiers.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Fill\r\n */\r\n Sprite.prototype.setFill = function (value) {\r\n if (!$type.isObject(value) || \"r\" in value) {\r\n value = toColor(value);\r\n }\r\n if (this.setColorProperty(\"fill\", value) || this.fillModifier) {\r\n // this can not go into next if, as value is turned to Gradient\r\n if (value instanceof Color) {\r\n if (this.fillModifier) {\r\n value = this.fillModifier.modify(value);\r\n }\r\n }\r\n this.realFill = value;\r\n // todo: review this place when some Color type will be added\r\n if (value instanceof Color) {\r\n this.setSVGAttribute({ \"fill\": value.toString() });\r\n }\r\n else if (!$type.hasValue(value)) {\r\n this.removeSVGAttribute(\"fill\");\r\n }\r\n else if (value instanceof Pattern || value instanceof LinearGradient || value instanceof RadialGradient) {\r\n var fill = value;\r\n fill.paper = this.paper;\r\n this.setSVGAttribute({ \"fill\": \"url(\\\"\" + $utils.getBaseURI() + fill.id + \"\\\")\" });\r\n }\r\n }\r\n };\r\n Object.defineProperty(Sprite.prototype, \"opacity\", {\r\n /**\r\n * @return Opacity (0-1)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"opacity\");\r\n },\r\n /**\r\n * Element's opacity.\r\n *\r\n * Opacity setting can range from 0 (fully transparent) to 1 (fully opaque).\r\n *\r\n * ATTENTION: It is highly not recommended to use `opacity` directly on the\r\n * element. The charts use `opacity` to hide/show elements, so your setting\r\n * might be lost if element is hidden and then later shown.\r\n *\r\n * Instead use methods `hide()` and `show()` to completely toggle off and on\r\n * the element.\r\n *\r\n * Or, use properties `fillOpacity` and `strokeOpacity`, if you need to make\r\n * the element semi-transparent.\r\n *\r\n * @param value Opacity (0-1)\r\n */\r\n set: function (value) {\r\n value = $math.toNumberRange(value, 0, 1);\r\n if (this.setPropertyValue(\"opacity\", value)) {\r\n this.setSVGAttribute({ \"opacity\": value });\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"stroke\", {\r\n /**\r\n * @return Stroke setting\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"stroke\");\r\n },\r\n /**\r\n * Element's stroke (outline) color or pattern.\r\n *\r\n * @param value Stroke setting\r\n */\r\n set: function (value) {\r\n this.setStroke(value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Sets actual `stroke` property on the SVG element, including applicable\r\n * color modifiers.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Stroke setting\r\n */\r\n Sprite.prototype.setStroke = function (value) {\r\n if (!$type.isObject(value) || \"r\" in value) {\r\n value = toColor(value);\r\n }\r\n if (this.setColorProperty(\"stroke\", value) || this.strokeModifier) {\r\n // this can not go into next if, as value is turned to Gradient\r\n if (value instanceof Color) {\r\n if (this.strokeModifier) {\r\n value = this.strokeModifier.modify(value);\r\n }\r\n }\r\n this.realStroke = value;\r\n if (value instanceof Color) {\r\n if (value.hex == \"none\") {\r\n this.removeSVGAttribute(\"stroke\");\r\n }\r\n else {\r\n this.setSVGAttribute({ \"stroke\": value.toString() });\r\n }\r\n }\r\n else if (!$type.hasValue(value)) {\r\n this.removeSVGAttribute(\"stroke\");\r\n }\r\n else if (value instanceof Pattern || value instanceof LinearGradient || value instanceof RadialGradient) {\r\n var stroke = value;\r\n stroke.paper = this.paper;\r\n this.setSVGAttribute({ \"stroke\": \"url(\\\"\" + $utils.getBaseURI() + stroke.id + \"\\\")\" });\r\n }\r\n }\r\n };\r\n Object.defineProperty(Sprite.prototype, \"strokeOpacity\", {\r\n /**\r\n * @return Opacity (0-1)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"strokeOpacity\");\r\n },\r\n /**\r\n * Stroke (outline) opacity.\r\n *\r\n * The values may range from 0 (fully transparent) to 1 (fully opaque).\r\n *\r\n * @param value Opacity (0-1)\r\n */\r\n set: function (value) {\r\n value = $math.toNumberRange(value, 0, 1);\r\n if (this.setPropertyValue(\"strokeOpacity\", value)) {\r\n this.setSVGAttribute({ \"stroke-opacity\": value });\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"nonScalingStroke\", {\r\n /**\r\n * @return Do not scale stroke (outline)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"nonScalingStroke\");\r\n },\r\n /**\r\n * Controls if the element's stroke (outline) should remain keep constant\r\n * thicnkess and do not scale when the whole element is resized.\r\n *\r\n * @param value Do not scale stroke (outline)\r\n */\r\n set: function (value) {\r\n value = $type.toBoolean(value);\r\n if (this.setPropertyValue(\"nonScalingStroke\", value)) {\r\n this.strokeWidth = this.strokeWidth;\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"nonScaling\", {\r\n /**\r\n * @return Is element scaleable?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"nonScaling\");\r\n },\r\n /**\r\n * Controls if element should keep constant size and not scale even if there is\r\n * space available, or it does not fit.\r\n *\r\n * @param value Is element scaleable?\r\n */\r\n set: function (value) {\r\n // @todo Description (review)\r\n value = $type.toBoolean(value);\r\n this.setPropertyValue(\"nonScaling\", value, false, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"strokeWidth\", {\r\n /**\r\n * @return Thickness (px)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"strokeWidth\");\r\n },\r\n /**\r\n * Stroke (outline) thickness in pixels.\r\n *\r\n * @param value Thickness (px)\r\n */\r\n set: function (value) {\r\n value = $type.toNumber(value);\r\n this.setPropertyValue(\"strokeWidth\", value, true);\r\n if (this.nonScalingStroke) {\r\n if (!$type.isNumber(value)) {\r\n value = 1;\r\n }\r\n value = value / this.globalScale;\r\n }\r\n this.setSVGAttribute({ \"stroke-width\": value });\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"strokeDasharray\", {\r\n /**\r\n * @return `stroke-dasharray`\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"strokeDasharray\");\r\n },\r\n /**\r\n * A `stroke-dasharray` for the stroke (outline).\r\n *\r\n * \"Dasharray\" allows setting rules to make lines dashed, dotted, etc.\r\n *\r\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-dasharray} for more info on `stroke-dasharray`\r\n * @param value `stroke-dasharray`\r\n */\r\n set: function (value) {\r\n value = $type.toText(value);\r\n if (this.setPropertyValue(\"strokeDasharray\", value)) {\r\n this.setSVGAttribute({ \"stroke-dasharray\": value });\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"strokeDashoffset\", {\r\n /**\r\n * @return `stroke-dashoffset`\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"strokeDashoffset\");\r\n },\r\n /**\r\n * A `stroke-dashoffset` for the stroke (outline).\r\n *\r\n * \"Dashoffset\" allows setting the start position of the dashes if\r\n * `strokeDasharray` is used.\r\n *\r\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-dashoffset} for more info on `stroke-dashoffset`\r\n * @param value `stroke-dashoffset`\r\n */\r\n set: function (value) {\r\n value = $type.toNumber(value);\r\n if (this.setPropertyValue(\"strokeDashoffset\", value)) {\r\n this.setSVGAttribute({ \"stroke-dashoffset\": value });\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"strokeLinecap\", {\r\n /**\r\n * @return `stroke-linecap`\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"strokeLinecap\");\r\n },\r\n /**\r\n * A `stroke-linecap` to indicate how line ends are drawn.\r\n *\r\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Fills_and_Strokes#Stroke} for more info on `stroke-linecap`\r\n * @param value `stroke-linecap`\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"strokeLinecap\", value)) {\r\n this.setSVGAttribute({ \"stroke-linecap\": value });\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"strokeLinejoin\", {\r\n /**\r\n * @return `stroke-linejoin`\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"strokeLinejoin\");\r\n },\r\n /**\r\n * A `stroke-linejoin` to indicate how line ends are drawn.\r\n *\r\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Fills_and_Strokes#Stroke} for more info on `stroke-linejoin`\r\n * @param value `stroke-linejoin`\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"strokeLinejoin\", value)) {\r\n this.setSVGAttribute({ \"stroke-linejoin\": value });\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"shapeRendering\", {\r\n /**\r\n * @return 'shape-rendering' value\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"shapeRendering\");\r\n },\r\n /**\r\n * An SVG-specific `shape-rendering` value.\r\n *\r\n * `shape-rendering` controls how vector graphics are drawn and rendered.\r\n *\r\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/shape-rendering} for more information about `shape-rendering`\r\n * @default \"auto\"\r\n * @param value 'shape-rendering' value\r\n */\r\n set: function (value) {\r\n value = $type.toText(value);\r\n if (this.setPropertyValue(\"shapeRendering\", value)) {\r\n this.setSVGAttribute({ \"shape-rendering\": value });\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"pixelPerfect\", {\r\n /**\r\n * @return Use pixel perfect?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"pixelPerfect\");\r\n },\r\n /**\r\n * Controls if SVG vectors should be drawn with \"pixel\" precision, producing\r\n * perfectly crisp lines on retina displays.\r\n *\r\n * Setting this to `true` might improve visual quality, but may have a\r\n * negative effect on performance.\r\n *\r\n * Different elements use different default setting for `pixelPerfect`.\r\n *\r\n * We recommend leaving this at their default settings, unless there's a\r\n * specific need.\r\n *\r\n * @param value Use pixel perfect?\r\n */\r\n set: function (value) {\r\n value = $type.toBoolean(value);\r\n if (value) {\r\n this._positionPrecision = options.pixelPerfectPrecision;\r\n }\r\n else {\r\n this._positionPrecision = 3;\r\n }\r\n this.setPropertyValue(\"pixelPerfect\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"rtl\", {\r\n /**\r\n * @return RTL?\r\n */\r\n get: function () {\r\n if ($type.hasValue(this._rtl)) {\r\n return this._rtl;\r\n }\r\n else if (this._topParent) {\r\n return this._topParent.rtl;\r\n }\r\n //this.rtl = false;\r\n return false;\r\n },\r\n /**\r\n * An RTL (right-to-left) setting.\r\n *\r\n * RTL may affect alignment, text, and other visual properties.\r\n *\r\n * If you set this on a top-level chart object, it will be used for all\r\n * child elements, e.g. labels, unless they have their own `rtl` setting\r\n * set directly on them.\r\n *\r\n * @param value `true` for to use RTL\r\n */\r\n set: function (value) {\r\n value = $type.toBoolean(value);\r\n if (this.isBaseSprite) {\r\n this.topParent.rtl = value;\r\n }\r\n this._rtl = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * ==========================================================================\r\n * VISIBILITY AND ORDER PROPERTIES AND RELATED STUFF\r\n * ==========================================================================\r\n * @hidden\r\n */\r\n /**\r\n * Reveals hidden element.\r\n *\r\n * Has no effect if element is already visible.\r\n *\r\n * If `duration` is not specified, it will use default.\r\n *\r\n * @param duration Fade in duration (ms)\r\n * @return Animation object if such object was created\r\n */\r\n Sprite.prototype.show = function (duration) {\r\n return this.showReal(duration);\r\n };\r\n /**\r\n * Performs actual operations to reveal this element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param duration Fade in duration (ms)\r\n * @return Fade in duration (ms)\r\n */\r\n Sprite.prototype.showReal = function (duration) {\r\n var _this = this;\r\n if (this.preventShow) {\r\n return;\r\n }\r\n var transition;\r\n var properties = this.defaultState.properties;\r\n if (!this.disabled && (this.isHidden || !this.visible || this.isHiding || (properties.opacity != null && this.opacity < properties.opacity && !this.isShowing)) && !this.isDisposed()) {\r\n // helps to avoid flicker, as show might change opacity or visibility but item might be at invalid state/position\r\n if (this.invalid) {\r\n this.validate();\r\n }\r\n if (this.positionInvalid) {\r\n this.validatePosition();\r\n }\r\n if (!$type.isNumber(duration)) {\r\n duration = this.defaultState.transitionDuration;\r\n }\r\n if (this._hideAnimation) {\r\n this._hideAnimation.kill();\r\n this._hideAnimation = undefined;\r\n }\r\n // Cancel hide handler just in case it was there\r\n if (this._showHideDisposer) {\r\n this.removeDispose(this._showHideDisposer);\r\n }\r\n this._isHidden = false;\r\n this.isHiding = false;\r\n this.isShowing = true;\r\n // Apply current state\r\n transition = this.applyCurrentState(duration);\r\n if (transition && !transition.isFinished()) {\r\n this._showHideDisposer = transition.events.on(\"animationended\", function () {\r\n _this.isShowing = false;\r\n });\r\n this._disposers.push(this._showHideDisposer);\r\n }\r\n else {\r\n this.isShowing = false;\r\n }\r\n // Make it visible\r\n var visible = this.defaultState.properties.visible;\r\n if (!$type.hasValue(visible)) {\r\n visible = true;\r\n }\r\n this.visible = visible;\r\n // Unhide from screen readers\r\n this.readerHidden = false;\r\n // Dispatch \"show\" event\r\n this.dispatchImmediately(\"shown\");\r\n }\r\n return transition;\r\n };\r\n /**\r\n * Initiates hiding of Sprite.\r\n * When called it will fade out the the Sprite to transparency, then make it\r\n * invisible.\r\n * @param duration Duration in millisecons\r\n */\r\n /**\r\n * Hides the element, by applying `hidden` state.\r\n *\r\n * Has no effect if element is already hidden.\r\n *\r\n * If `duration` is not specified, it will use default.\r\n *\r\n * While element is fading out, its `isHiding` property will resolve to\r\n * `true`.\r\n *\r\n * When element is hidden, its `visible` property will resolve to `false`.\r\n *\r\n * @param duration Fade out duration (ms)\r\n * @return hide Animation object if such object was created\r\n */\r\n Sprite.prototype.hide = function (duration) {\r\n return this.hideReal(duration);\r\n };\r\n /**\r\n * Hides actual SVG elements and handles hiding animations.\r\n *\r\n * @param duration Fade out duration (ms)\r\n * @return Fade out duration (ms)\r\n * @ignore\r\n */\r\n Sprite.prototype.hideReal = function (duration) {\r\n var _this = this;\r\n var transition;\r\n if (!this.isHiding && this.visible && !this.isDisposed()) {\r\n // added to solve 51375\r\n if (this.tooltip && this.tooltip.currentSprite == this) {\r\n this.hideTooltip(0);\r\n }\r\n if (this._hideAnimation) {\r\n this._hideAnimation.kill();\r\n this._hideAnimation = undefined;\r\n }\r\n this.isShowing = false;\r\n // Cancel hide handler just in case it was there\r\n if (this._showHideDisposer) {\r\n this.removeDispose(this._showHideDisposer);\r\n }\r\n // Get state\r\n var hiddenState_1 = this.hiddenState;\r\n // Transition to \"hidden\" state, provided Sprite has one set\r\n if (hiddenState_1) {\r\n // Yes, we have a \"hidden\" state\r\n // `setState` will return an `Animation` object which we can set\r\n // events on\r\n transition = this.setState(hiddenState_1, duration, undefined);\r\n if (transition && !transition.isFinished()) {\r\n this._hideAnimation = transition;\r\n this._showHideDisposer = transition.events.on(\"animationended\", function () {\r\n _this.isHiding = false;\r\n _this._isHidden = true;\r\n if (hiddenState_1.properties.visible == false) {\r\n _this.visible = false;\r\n }\r\n }, this);\r\n this._disposers.push(this._showHideDisposer);\r\n // Thrown everything into `_disposers` just in case Sprite gets\r\n // destroyed in the meantime\r\n this._disposers.push(transition);\r\n }\r\n else {\r\n this.isHiding = false;\r\n this._isHidden = true;\r\n }\r\n }\r\n else {\r\n // No hidden state, let's just set `visible` and call it a day\r\n this.visible = false;\r\n this.isHiding = false;\r\n this._isHidden = true;\r\n }\r\n // Hide from screen readers\r\n this.readerHidden = true;\r\n // Dispach \"hidden\" event\r\n this.dispatchImmediately(\"hidden\");\r\n this.invalidate(); // hide it at once to avoid flickers // validate() causes SO\r\n }\r\n if (!$type.isNumber(duration)) {\r\n duration = this.hiddenState.transitionDuration;\r\n }\r\n return transition;\r\n };\r\n Object.defineProperty(Sprite.prototype, \"visible\", {\r\n /**\r\n * @return Visible?\r\n */\r\n get: function () {\r\n return this.getVisibility();\r\n },\r\n /**\r\n * Indicates if element is current visible (`true`) or hidden (`false`).\r\n *\r\n * @param value Visible?\r\n */\r\n set: function (value) {\r\n value = $type.toBoolean(value);\r\n this.setVisibility(value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Returns visibility value\r\n * @ignore\r\n */\r\n Sprite.prototype.getVisibility = function () {\r\n var value = this.getPropertyValue(\"visible\");\r\n if (!$type.hasValue(value)) {\r\n value = true;\r\n }\r\n return value;\r\n };\r\n /**\r\n * Sets `visibility` property:\r\n *\r\n * * `true` - visible\r\n * * `false` - hidden\r\n *\r\n * @param value true - visible, false - hidden\r\n * @return Current visibility\r\n */\r\n Sprite.prototype.setVisibility = function (value) {\r\n if (this.setPropertyValue(\"visible\", value)) {\r\n if (value) {\r\n this.group.removeAttr(\"visibility\");\r\n }\r\n else {\r\n this.group.attr({ \"visibility\": \"hidden\" });\r\n }\r\n //this.invalidatePosition();\r\n if (this.events.isEnabled(\"visibilitychanged\")) {\r\n var event_4 = {\r\n type: \"visibilitychanged\",\r\n target: this,\r\n visible: value\r\n };\r\n this.events.dispatchImmediately(\"visibilitychanged\", event_4);\r\n }\r\n }\r\n };\r\n Object.defineProperty(Sprite.prototype, \"zIndex\", {\r\n /**\r\n * @return zIndex\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"zIndex\");\r\n },\r\n /**\r\n * A \"zIndex\" of the element.\r\n *\r\n * \"zIndex\" determines the order of how elements are placed over each other.\r\n *\r\n * Higher \"zIndex\" will mean the element will be draw on top of elements\r\n * with lower \"zIndexes\".\r\n *\r\n * @param value zIndex\r\n */\r\n set: function (value) {\r\n value = $type.toNumber(value);\r\n if (this.setPropertyValue(\"zIndex\", value)) {\r\n this.dispatch(\"zIndexChanged\");\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Moves the element to the very top in element order, so that it appears\r\n * in front of other elements.\r\n */\r\n Sprite.prototype.toFront = function () {\r\n var parent = this._parent;\r\n if (parent && parent.children.indexOf(this) != parent.children.length - 1) {\r\n parent.children.moveValue(this, parent.children.length - 1);\r\n this.dispatch(\"zIndexChanged\");\r\n }\r\n };\r\n /**\r\n * Moves the element to the very bottom in the element order, so that it\r\n * appears behind other elements.\r\n */\r\n Sprite.prototype.toBack = function () {\r\n var parent = this._parent;\r\n if (parent && parent.children.indexOf(this) != 0) {\r\n parent.children.moveValue(this, 0);\r\n this.dispatch(\"zIndexChanged\");\r\n }\r\n };\r\n Object.defineProperty(Sprite.prototype, \"userClassName\", {\r\n /**\r\n * @return Class name\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"userClassName\");\r\n },\r\n /**\r\n * A custom class name to set on the element.\r\n *\r\n * If set, the value will be added to element's `class` attribute.\r\n *\r\n * @since 4.9.11\r\n * @param value Class name\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"userClassName\", value)) {\r\n if (!value && this.userClassName) {\r\n this.group.removeClass(this.userClassName);\r\n }\r\n this.setClassName();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"tooltip\", {\r\n /**\r\n * @return Tooltip\r\n */\r\n get: function () {\r\n if (this._tooltip) {\r\n return this._tooltip;\r\n }\r\n else if (this.virtualParent) {\r\n return this.virtualParent.tooltip;\r\n }\r\n else if (this._parent) {\r\n return this._parent.tooltip;\r\n }\r\n },\r\n /**\r\n * ==========================================================================\r\n * TOOLTIP-RELATED PROPERTIES STUFF\r\n * ==========================================================================\r\n * @hidden\r\n */\r\n /**\r\n * A [[Tooltip]] object to be used when displayed rollover information for\r\n * the element.\r\n *\r\n * @param tooltip Tooltip\r\n */\r\n set: function (tooltip) {\r\n if (this._tooltip) {\r\n //this._tooltip.dispose();\r\n this.removeDispose(this._tooltip);\r\n }\r\n this._tooltip = tooltip;\r\n if (tooltip) {\r\n tooltip.parent = this.tooltipContainer;\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"tooltipDataItem\", {\r\n /**\r\n * @return Tooltip data item\r\n */\r\n get: function () {\r\n var tooltipDataItem = this._tooltipDataItem;\r\n if (tooltipDataItem) {\r\n return tooltipDataItem;\r\n }\r\n else {\r\n return this.dataItem;\r\n }\r\n },\r\n /**\r\n * A [[DataItem]] to use when populating content for the element's\r\n * [[Tooltip]].\r\n *\r\n * @see {@link Tooltip}\r\n * @see {@link DataItem}\r\n * @param value Tooltip data item\r\n */\r\n set: function (value) {\r\n // important: do not dispose tooltip dataItem, as it is some actual data item from data!\r\n this._tooltipDataItem = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"tooltipColorSource\", {\r\n /**\r\n * @return Tooltip color source\r\n */\r\n get: function () {\r\n return this._tooltipColorSource;\r\n },\r\n /**\r\n * A [[Sprite]] or sprite template to use when getting colors for tooltip. If a template is set,\r\n * tooltip will look for a clone in tooltipDataItem.sprites. If no clone is found, then template colors will be used.\r\n *\r\n * @see {@link Tooltip}\r\n * @see {@link Sprite}\r\n * @param sprite Sprite\r\n */\r\n set: function (sprite) {\r\n this._tooltipColorSource = sprite;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Shows the element's [[Tooltip]].\r\n *\r\n * A tooltip will be populated using text templates in either `tooltipHTML` or\r\n * `tooltipText` as well as data in `tooltipDataItem`.\r\n *\r\n * @see {@link Tooltip}\r\n * @param optional point (sprite-related) to which tooltip must point.\r\n * @return returns true if the tooltip was shown and false if it wasn't (no text was found)\r\n */\r\n Sprite.prototype.showTooltip = function (point) {\r\n if (this.showTooltipOn == \"always\" && !this._tooltip && this.tooltip) {\r\n this._tooltip = this.tooltip.clone();\r\n }\r\n if (!point && this.tooltipPosition == \"pointer\" && this.isHover) {\r\n point = $utils.documentPointToSvg(getInteraction().lastPointer.point, this.svgContainer.SVGContainer, this.svgContainer.cssScale);\r\n }\r\n // do not show if hidden\r\n var sprite = this;\r\n while (sprite != undefined) {\r\n if (!sprite.visible || sprite.disabled || sprite.__disabled) {\r\n if (this._tooltip && this._tooltip.visible) {\r\n this._tooltip.hide(0);\r\n }\r\n return;\r\n }\r\n sprite = sprite.parent;\r\n }\r\n if ($type.hasValue(this.tooltipText) || $type.hasValue(this.tooltipHTML)) {\r\n var tooltip = this.tooltip;\r\n var tooltipDataItem = this.tooltipDataItem;\r\n if (tooltip) {\r\n tooltip.targetSprite = this;\r\n var colorSource_1 = this;\r\n var tooltipColorSource_1 = this.tooltipColorSource;\r\n if ((tooltip.getStrokeFromObject || tooltip.getFillFromObject) && tooltipColorSource_1) {\r\n if (tooltipColorSource_1.isTemplate) {\r\n if (tooltipDataItem) {\r\n $array.eachContinue(tooltipDataItem.sprites, function (sprite) {\r\n if (sprite.clonedFrom == tooltipColorSource_1) {\r\n colorSource_1 = sprite;\r\n return false;\r\n }\r\n return true;\r\n });\r\n }\r\n }\r\n else {\r\n colorSource_1 = tooltipColorSource_1;\r\n }\r\n }\r\n if (tooltip.getStrokeFromObject) {\r\n var stroke = this.stroke;\r\n var source = colorSource_1;\r\n while (source.parent != undefined) {\r\n stroke = source.stroke;\r\n if (stroke == undefined) {\r\n source = source.parent;\r\n }\r\n if (stroke != undefined) {\r\n break;\r\n }\r\n }\r\n if (stroke instanceof Color) {\r\n tooltip.background.animate({ property: \"stroke\", to: stroke }, tooltip.animationDuration);\r\n }\r\n else {\r\n tooltip.background.stroke = stroke;\r\n }\r\n }\r\n // Set data item\r\n tooltip.dataItem = tooltipDataItem;\r\n tooltip.label.populateStringFrom = this;\r\n if (tooltip.getFillFromObject) {\r\n var fill = this.fill;\r\n var source = colorSource_1;\r\n while (source.parent != undefined) {\r\n fill = source.fill;\r\n if (fill == undefined || (fill instanceof Color && fill.rgb == undefined)) {\r\n source = source.parent;\r\n }\r\n else if (fill != undefined) {\r\n break;\r\n }\r\n }\r\n if (fill == undefined) {\r\n fill = color(\"#000000\");\r\n }\r\n if (fill instanceof Color) {\r\n if (!tooltip.visible) {\r\n tooltip.background.fill = fill;\r\n }\r\n else {\r\n tooltip.background.animate({ property: \"fill\", to: fill }, tooltip.animationDuration);\r\n }\r\n }\r\n else {\r\n tooltip.background.fill = fill;\r\n }\r\n if (tooltip.autoTextColor && fill instanceof Color) {\r\n tooltip.label.fill = fill.alternative;\r\n }\r\n }\r\n // Apply tooltip text\r\n var text = \"\";\r\n if (this.tooltipHTML) {\r\n tooltip.html = this.tooltipHTML;\r\n text = this.tooltipHTML;\r\n }\r\n if (this.tooltipText) {\r\n tooltip.text = this.tooltipText;\r\n text = this.tooltipText;\r\n }\r\n if (this.updateTooltipPosition(point)) {\r\n // Set accessibility option\r\n tooltip.readerDescribedBy = this.uidAttr();\r\n // make label to render to be able to check currentText\r\n if (tooltip.label.invalid) {\r\n tooltip.label.validate();\r\n }\r\n if (text != undefined && text != \"\" && tooltip.label.currentText != \"\") {\r\n //@todo: think of how to solve this better\r\n if (tooltip && !tooltip.parent) {\r\n tooltip.parent = this.tooltipContainer;\r\n }\r\n // Reveal tooltip\r\n // showing it in 1 ms helps to avoid strange flickering in IE\r\n var duration = tooltip.defaultState.transitionDuration;\r\n if (duration <= 0) {\r\n duration = 1;\r\n }\r\n tooltip.show(duration);\r\n tooltip.currentSprite = this;\r\n return true;\r\n }\r\n else {\r\n this.hideTooltip(0);\r\n }\r\n }\r\n else {\r\n this.hideTooltip(0);\r\n }\r\n }\r\n }\r\n return false;\r\n };\r\n /**\r\n * @ignore\r\n */\r\n Sprite.prototype.updateTooltipPosition = function (point) {\r\n var _this = this;\r\n if (this.tooltipPosition == \"pointer\") {\r\n if (this._interactionDisposer) {\r\n this._interactionDisposer.dispose();\r\n }\r\n this._interactionDisposer = getInteraction().body.events.on(\"track\", function (ev) {\r\n return _this.pointTooltipTo($utils.documentPointToSvg(ev.point, _this.svgContainer.SVGContainer, _this.svgContainer.cssScale), true);\r\n });\r\n if (point) {\r\n return this.pointTooltipTo(point, true);\r\n }\r\n }\r\n else {\r\n // Point to the X/Y of this Sprite\r\n var globalPoint = $utils.spritePointToSvg({\r\n \"x\": this.getTooltipX(),\r\n \"y\": this.getTooltipY()\r\n }, this);\r\n return this.pointTooltipTo(globalPoint);\r\n }\r\n };\r\n /**\r\n * Sets the point the [[Tooltip]] should point to.\r\n *\r\n * @param point Coordinates to point to\r\n * @param instantly Move instantly without animation\r\n */\r\n Sprite.prototype.pointTooltipTo = function (point, instantly) {\r\n var tooltip = this.tooltip;\r\n if (tooltip && this.topParent) {\r\n if (tooltip.showInViewport) {\r\n tooltip.pointTo(point, instantly);\r\n return true;\r\n }\r\n if ($math.isInRectangle(point, { x: 0, y: 0, width: this.topParent.maxWidth, height: this.topParent.maxHeight })) {\r\n tooltip.pointTo(point, instantly);\r\n return true;\r\n }\r\n }\r\n return false;\r\n };\r\n /**\r\n * Hides element's [[Tooltip]].\r\n *\r\n * @see {@link Tooltip}\r\n */\r\n Sprite.prototype.hideTooltip = function (duration) {\r\n if (this.showTooltipOn == \"always\") {\r\n return;\r\n }\r\n var tooltip = this.tooltip;\r\n if (tooltip) {\r\n if (tooltip.targetSprite == this) {\r\n tooltip.targetSprite = undefined;\r\n }\r\n tooltip.hide(duration);\r\n if (this._interactionDisposer) {\r\n this._interactionDisposer.dispose();\r\n this._interactionDisposer = undefined;\r\n }\r\n }\r\n };\r\n Object.defineProperty(Sprite.prototype, \"tooltipHTML\", {\r\n /**\r\n * @return Tooltip HTML content template\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"tooltipHTML\");\r\n },\r\n /**\r\n * An HTML template to be used to populate [[Tooltip]] contents.\r\n *\r\n * If element has `tooltipDataItem` or `dataItem` set, this will be parsed\r\n * for any data values to be replaced with the values from respective data\r\n * items.\r\n *\r\n * @param value Tooltip HTML content template\r\n */\r\n set: function (value) {\r\n value = $type.toText(value);\r\n this.hoverable = true;\r\n if (this.setPropertyValue(\"tooltipHTML\", value)) {\r\n if (this.tooltip) {\r\n if (this.tooltip.visible) {\r\n this.showTooltip();\r\n }\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"tooltipText\", {\r\n /**\r\n * @return Tooltip content template\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"tooltipText\");\r\n },\r\n /**\r\n * A text template to be used to populate Tooltip's contents.\r\n *\r\n * If element has `tooltipDataItem` or `dataItem` set, this will be parsed\r\n * for any data values to be replaced with the values from respective data\r\n * items.\r\n *\r\n * This template will also be parsed for any special formatting tags.\r\n *\r\n * @param value Tooltip content template\r\n * @see {@link TextFormatter}\r\n */\r\n set: function (value) {\r\n value = $type.toText(value);\r\n if (value) {\r\n this.hoverable = true;\r\n }\r\n if (this.setPropertyValue(\"tooltipText\", value)) {\r\n if (this.tooltip) {\r\n if (this.tooltip.visible) {\r\n this.showTooltip();\r\n }\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"tooltipContainer\", {\r\n /**\r\n * @ignore Exclude from docs\r\n * @return Container\r\n */\r\n get: function () {\r\n if (this._tooltipContainer) {\r\n return this._tooltipContainer;\r\n }\r\n else if (this._parent) {\r\n return this._parent.tooltipContainer;\r\n }\r\n },\r\n /**\r\n * A container reference that should be used to place element's\r\n * [[Tooltip]] in.\r\n *\r\n * Will use parent's container if does not have one set.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Container\r\n * @todo Dispose of the old _tooltipContainer ?\r\n */\r\n set: function (value) {\r\n this._tooltipContainer = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"tooltipX\", {\r\n /**\r\n * @return Tooltip X (px)\r\n */\r\n get: function () {\r\n return this.getTooltipX();\r\n },\r\n /**\r\n * X coordinate the [[Tooltip]] should be shown at.\r\n *\r\n * @param value Tooltip X (px)\r\n */\r\n set: function (value) {\r\n if (this.setPercentProperty(\"tooltipX\", value) && this.tooltip) {\r\n this.tooltip.invalidate();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"alwaysShowTooltip\", {\r\n /**\r\n * @return Always show tooltip?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"showTooltipOn\") == \"always\";\r\n },\r\n /**\r\n * DEPRECATION NOTICE: This setting is deprecated in favor of a more flexible\r\n * setting: `showTooltipOn`. Please use `showTooltipOn = \"always\"` instead.\r\n *\r\n * Indicates if this element should display a tooltip permanently.\r\n *\r\n * Useful, if you want to show permanent tooltips on some items.\r\n *\r\n * @default false\r\n * @since 4.5.4\r\n * @deprecated Use `showTooltipOn = \"always\"` instead\r\n * @param value Always show tooltip?\r\n */\r\n set: function (value) {\r\n value = $type.toBoolean(value);\r\n if (value) {\r\n this.showTooltipOn = \"always\";\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"showTooltipOn\", {\r\n /**\r\n * @return When to show tooltip\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"showTooltipOn\");\r\n },\r\n /**\r\n * Indicates when tooltip needs to be shown on this element:\r\n *\r\n * * `\"hover\"` (default) - Tooltip will be shown when element is hovered on.\r\n * * `\"hit\"` - Tooltip will be shown when element is clicked/tapped. Tooltip will be hidden when clicked/tapped anywhere else.\r\n * * `\"always\"` - Tooltip will be shown on the element permanently.\r\n *\r\n * For example, if you would like to show tooltips on all of the columns of\r\n * a [[ColumnSeries]]:\r\n *\r\n * ```TypeScript\r\n * series.columns.template.showTooltipOn = \"always\";\r\n * ```\r\n * ```JavaScript\r\n * series.columns.template.showTooltipOn = \"always\";\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"series\": [{\r\n * // ...\r\n * \"columns\": {\r\n * \"showTooltipOn\": \"always\"\r\n * }\r\n * }]\r\n * }\r\n * ```\r\n *\r\n * It can even be set to display on a selected columns via `propertyFields`:\r\n *\r\n * ```TypeScript\r\n * series.columns.template.propertyFields.showTooltipOn = \"tooltip\";\r\n * ```\r\n * ```JavaScript\r\n * series.columns.template.propertyFields.showTooltipOn = \"tooltip\";\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"series\": [{\r\n * // ...\r\n * \"columns\": {\r\n * \"propertyFields\": {\r\n * \"showTooltipOn\": \"tooltip\"\r\n * }\r\n * }\r\n * }]\r\n * }\r\n * ```\r\n *\r\n * @default \"hover\"\r\n * @since 4.7.9\r\n * @param value When to show tooltip\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"showTooltipOn\", value)) {\r\n if (value == \"hit\") {\r\n this.clickable = true;\r\n }\r\n if (this.tooltip) {\r\n if (value == \"always\") {\r\n this.showTooltip();\r\n }\r\n else {\r\n this.handleAlwaysShowTooltip();\r\n }\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"tooltipPosition\", {\r\n /**\r\n * Position\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"tooltipPosition\");\r\n },\r\n /**\r\n * Specifies if [[Tooltip]] should follow the mouse or touch pointer or stay\r\n * at the fixed position.\r\n *\r\n * @param value Position\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"tooltipPosition\", value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"tooltipY\", {\r\n /**\r\n * @return Tooltip Y (px)\r\n */\r\n get: function () {\r\n return this.getTooltipY();\r\n },\r\n /**\r\n * Y coordinate the [[Tooltip]] should be shown at.\r\n *\r\n * @param value Tooltip Y (px)\r\n */\r\n set: function (value) {\r\n if (this.setPercentProperty(\"tooltipY\", value) && this.tooltip) {\r\n this.tooltip.invalidate();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Returns Tooltip X coordinate if it's set, or middle of the element.\r\n *\r\n * @ignore Exclude from docs\r\n * @return X (px)\r\n */\r\n Sprite.prototype.getTooltipX = function () {\r\n var x = this.getPropertyValue(\"tooltipX\");\r\n if (!$type.hasValue(x)) {\r\n x = percent(50);\r\n }\r\n var value;\r\n if ($type.isNumber(x)) {\r\n value = x;\r\n }\r\n if (x instanceof Percent) {\r\n value = this.maxLeftSelf + this._measuredWidthSelf * x.value - this.pixelPaddingLeft - this.ex; // overflow is know only for measured items, so this is not always good\r\n }\r\n if (!$type.isNumber(value)) {\r\n value = 0;\r\n }\r\n return value;\r\n };\r\n /**\r\n * Returns Tooltip Y coordinate if it's set, or middle of the element.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Y (px)\r\n */\r\n Sprite.prototype.getTooltipY = function () {\r\n var y = this.getPropertyValue(\"tooltipY\");\r\n if (!$type.hasValue(y)) {\r\n y = percent(50);\r\n }\r\n var value;\r\n if ($type.isNumber(y)) {\r\n value = y;\r\n }\r\n if (y instanceof Percent) {\r\n value = this.maxTopSelf + this._measuredHeightSelf * y.value - this.pixelPaddingTop - this.ey; // overflow is know only for measured items, so this is not always good\r\n }\r\n if (!$type.isNumber(value)) {\r\n value = 0;\r\n }\r\n return value;\r\n };\r\n /**\r\n * Displays a modal or console message with error, and halts any further\r\n * processing of this item.\r\n *\r\n * @ignore Exclude from docs\r\n * @param e Error\r\n * @todo Implement from applying further actions to this item\r\n */\r\n Sprite.prototype.raiseCriticalError = function (e, closable) {\r\n if (this.svgContainer) {\r\n if (!this._adapterO) {\r\n this.modal.content = e.message;\r\n }\r\n else {\r\n this.modal.content = this._adapterO.apply(\"criticalError\", e).message;\r\n }\r\n if (!closable) {\r\n this.disabled = true;\r\n }\r\n else {\r\n this.modal.closable = true;\r\n }\r\n if (!options.suppressErrors) {\r\n this.modal.open();\r\n }\r\n }\r\n if (options.verbose) {\r\n console.log(e);\r\n }\r\n };\r\n /**\r\n * Processes JSON-based config before it is applied to the object.\r\n *\r\n * @ignore Exclude from docs\r\n * @param config Config\r\n */\r\n Sprite.prototype.processConfig = function (config) {\r\n if (config) {\r\n // Tooltip color source\r\n if ($type.hasValue(config.tooltipColorSource) && $type.isString(config.tooltipColorSource) && this.map.hasKey(config.tooltipColorSource)) {\r\n config.tooltipColorSource = this.map.getKey(config.tooltipColorSource);\r\n }\r\n // Cursor styles\r\n if ($type.hasValue(config.cursorOverStyle) && $type.isString(config.cursorOverStyle)) {\r\n config.cursorOverStyle = this.getCursorStyle(config.cursorOverStyle);\r\n }\r\n if ($type.hasValue(config.cursorDowntyle) && $type.isString(config.cursorDowntyle)) {\r\n config.cursorDowntyle = this.getCursorStyle(config.cursorDowntyle);\r\n }\r\n if ($type.hasValue(config.cursorOptions)) {\r\n if ($type.hasValue(config.cursorOptions.overStyle) && $type.isString(config.cursorOptions.overStyle)) {\r\n config.cursorOptions.overStyle = this.getCursorStyle(config.cursorOptions.overStyle);\r\n }\r\n if ($type.hasValue(config.cursorOptions.downStyle) && $type.isString(config.cursorOptions.downStyle)) {\r\n config.cursorOptions.downStyle = this.getCursorStyle(config.cursorOptions.downStyle);\r\n }\r\n }\r\n }\r\n _super.prototype.processConfig.call(this, config);\r\n this.processDelayedMap();\r\n };\r\n /**\r\n * Converts string name of the cursor into actual [[MouseCursorStyle]].\r\n *\r\n * @param style Cursor type\r\n * @return Cursor definition\r\n */\r\n Sprite.prototype.getCursorStyle = function (style) {\r\n switch (style) {\r\n case \"grab\":\r\n return MouseCursorStyle.grab;\r\n case \"grabbing\":\r\n return MouseCursorStyle.grabbing;\r\n case \"pointer\":\r\n return MouseCursorStyle.pointer;\r\n case \"horizontalResize\":\r\n return MouseCursorStyle.horizontalResize;\r\n case \"verticalResize\":\r\n return MouseCursorStyle.verticalResize;\r\n default:\r\n return MouseCursorStyle.default;\r\n }\r\n };\r\n /**\r\n * This function is used to sort element's JSON config properties, so that\r\n * some properties that absolutely need to be processed last, can be put at\r\n * the end.\r\n *\r\n * @ignore Exclude from docs\r\n * @param a Element 1\r\n * @param b Element 2\r\n * @return Sorting number\r\n */\r\n Sprite.prototype.configOrder = function (a, b) {\r\n if (a == b) {\r\n return 0;\r\n }\r\n // Must come last\r\n else if (a == \"tooltipColorSource\") {\r\n return 1;\r\n }\r\n else if (b == \"tooltipColorSource\") {\r\n return -1;\r\n }\r\n else {\r\n return _super.prototype.configOrder.call(this, a, b);\r\n }\r\n };\r\n Object.defineProperty(Sprite.prototype, \"isHidden\", {\r\n /**\r\n * If `sprite.hide()` is called, we set isHidden to true when sprite is hidden.\r\n * This was added becaus hidden state might have visibility set to true and so\r\n * there would not be possible to find out if a sprite is technically hidden or not.\r\n */\r\n get: function () {\r\n if (this._isHidden) {\r\n return this._isHidden;\r\n }\r\n else if (this._parent) {\r\n return this._parent.isHidden;\r\n }\r\n return false;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"showOnInit\", {\r\n /**\r\n * @return Show on init?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"showOnInit\");\r\n },\r\n /**\r\n * If this is set to `true`, Sprite, when inited will be instantly hidden\r\n * (\"hidden\" state applied) and then shown (\"default\" state applied).\r\n *\r\n * If your \"default\" state's `transitionDuration > 0` this will result in\r\n * initial animation from \"hidden\" state to \"default\" state.\r\n *\r\n * If you need a Sprite which has `showOnInit = true` not to be shown\r\n * initially, set `sprite.hidden = true`. Setting `sprite.visible = false`\r\n * will not prevent the animation and the sprite will be shown.\r\n *\r\n * @param value show on init?\r\n */\r\n set: function (value) {\r\n value = $type.toBoolean(value);\r\n this.setShowOnInit(value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * @ignore\r\n */\r\n Sprite.prototype.setShowOnInit = function (value) {\r\n if (this.setPropertyValue(\"showOnInit\", value)) {\r\n if (!this.isTemplate) {\r\n if (value && !this.inited && !this.hidden) {\r\n this._showOnInitDisposer = new MultiDisposer([\r\n registry.events.once(\"enterframe\", this.hideInitially, this),\r\n this.events.once(\"beforevalidated\", this.hideInitially, this, false),\r\n this.events.on(\"inited\", this.appear, this, false)\r\n ]);\r\n this._disposers.push(this._showOnInitDisposer);\r\n }\r\n else {\r\n if (this._showOnInitDisposer) {\r\n this._showOnInitDisposer.dispose();\r\n }\r\n }\r\n }\r\n }\r\n };\r\n /**\r\n * @ignore\r\n */\r\n Sprite.prototype.hideInitially = function () {\r\n if (!this.isDisposed()) {\r\n this.appeared = false;\r\n //if (!this.hidden && !this._isHidden) { // not good for series, as on enterframe it doesn't have data items yet.\r\n if (!this.inited) {\r\n this.hide(0);\r\n }\r\n }\r\n };\r\n /**\r\n * Hides the chart instantly and then shows it. If defaultState.transitionDuration > 0, this will result an animation in which properties of hidden state will animate to properties of visible state.\r\n */\r\n Sprite.prototype.appear = function () {\r\n var _this = this;\r\n this.appeared = false;\r\n if (!this.hidden && !this.isHidden) {\r\n this.hide(0);\r\n }\r\n if (!this.hidden) {\r\n var animation = this.show();\r\n if (animation && !animation.isFinished()) {\r\n this.addDisposer(animation.events.on(\"animationended\", function () {\r\n _this.appeared = true;\r\n _this.dispatch(\"appeared\");\r\n }));\r\n }\r\n else {\r\n this.appeared = true;\r\n this.dispatch(\"appeared\");\r\n }\r\n }\r\n else {\r\n this.appeared = true;\r\n this.dispatch(\"appeared\");\r\n }\r\n };\r\n Object.defineProperty(Sprite.prototype, \"hidden\", {\r\n /**\r\n * @return Is initially hidden?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"hidden\");\r\n },\r\n /**\r\n * If a sprite has `showOnInit = true`, it will animate from \"hidden\" to\r\n * \"default\" state when initialized. To prevent this but keep\r\n * `showOnInit = true`, you can set `sprite.hidden = true`.\r\n *\r\n * @param value initially hidden?\r\n */\r\n set: function (value) {\r\n value = $type.toBoolean(value);\r\n this.setPropertyValue(\"hidden\", value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"bbox\", {\r\n /**\r\n * Returns bounding box (square) for this element.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n get: function () {\r\n if (this.definedBBox) {\r\n return this.definedBBox;\r\n }\r\n return this._bbox;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Sprite.prototype, \"plugins\", {\r\n /**\r\n * A list of plugins (objects that implement [[IPlugin]] interface) attached\r\n * to this object.\r\n *\r\n * @since 4.2.2\r\n * @return List of plugins\r\n */\r\n get: function () {\r\n var _this = this;\r\n if (!this._plugins) {\r\n this._plugins = new List();\r\n this._disposers.push(this._plugins.events.on(\"inserted\", function (ev) {\r\n ev.newValue.target = _this;\r\n ev.newValue.init();\r\n }));\r\n this._disposers.push(new ListDisposer(this._plugins));\r\n }\r\n return this._plugins;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Called during the System.update method\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Sprite.prototype._systemUpdate = function (skippedSprites) {\r\n this.validate();\r\n };\r\n /**\r\n * Called during the System.update method\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Sprite.prototype._systemCheckIfValidate = function () {\r\n return true;\r\n };\r\n /**\r\n * Called during the System.validatePositions method\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Sprite.prototype._systemValidatePositions = function () {\r\n this.validatePosition();\r\n };\r\n /**\r\n * Called during the System.validateLayouts method\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Sprite.prototype._systemValidateLayouts = function () {\r\n };\r\n return Sprite;\r\n}(BaseObjectEvents));\r\nexport { Sprite };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"Sprite\"] = Sprite;\r\n","import { __extends } from \"tslib\";\r\nimport { Dictionary } from \"./utils/Dictionary\";\r\nimport { TargetedEventDispatcher } from \"./utils/EventDispatcher\";\r\nimport { MultiDisposer, CounterDisposer } from \"./utils/Disposer\";\r\nimport * as $utils from \"./utils/Utils\";\r\nimport * as $object from \"./utils/Object\";\r\n/**\r\n * An [[EventDispatcher]] for [[Sprite]].\r\n *\r\n * @important\r\n */\r\nvar SpriteEventDispatcher = /** @class */ (function (_super) {\r\n __extends(SpriteEventDispatcher, _super);\r\n function SpriteEventDispatcher() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n /**\r\n * [_interactionEvents description]\r\n *\r\n * @todo Description\r\n */\r\n _this._interactionEvents = new Dictionary();\r\n return _this;\r\n }\r\n /**\r\n * [_dispatchSpriteEvent description]\r\n *\r\n * @todo Description\r\n */\r\n SpriteEventDispatcher.prototype._dispatchSpriteEvent = function (ev) {\r\n if (this.target.disabled || this.target.isTemplate) {\r\n return;\r\n }\r\n // TODO remove this <any> later\r\n if (this.target.events.isEnabled(ev.type)) {\r\n var imev = $object.merge(ev, {\r\n target: this.target\r\n });\r\n this.target.events.dispatchImmediately(imev.type, imev);\r\n }\r\n };\r\n /**\r\n * [_dispatchSpritePointEvent description]\r\n *\r\n * @todo Description\r\n */\r\n SpriteEventDispatcher.prototype._dispatchSpritePointEvent = function (ev) {\r\n if (this.target.disabled || this.target.isTemplate) {\r\n return;\r\n }\r\n // TODO remove this <any> later\r\n if (this.target.events.isEnabled(ev.type)) {\r\n var imev = $object.merge(ev, {\r\n target: this.target,\r\n spritePoint: ev.point ? $utils.documentPointToSprite(ev.point, this.target) : undefined,\r\n svgPoint: this.target.getSvgPoint(ev.point)\r\n });\r\n this.target.events.dispatchImmediately(imev.type, imev);\r\n }\r\n };\r\n /**\r\n * [_addInteractionObjectEvent description]\r\n *\r\n * @todo Description\r\n */\r\n SpriteEventDispatcher.prototype._addInteractionObjectEvent = function (type, callback, context, shouldClone) {\r\n var _this = this;\r\n var key = shouldClone + \"-\" + type;\r\n var counter = this._interactionEvents.insertKeyIfEmpty(key, function () {\r\n var disposer = _this.target.interactions.events.on(type, callback, context, shouldClone);\r\n return new CounterDisposer(function () {\r\n _this._interactionEvents.removeKey(key);\r\n disposer.dispose();\r\n });\r\n });\r\n return counter.increment();\r\n };\r\n /**\r\n * [_on description]\r\n *\r\n * @todo Description\r\n */\r\n SpriteEventDispatcher.prototype._on = function (once, type, callback, context, shouldClone, dispatch) {\r\n var info = _super.prototype._on.call(this, once, type, callback, context, shouldClone, dispatch);\r\n var disposers = [info.disposer];\r\n /**\r\n * Catching Sprite-related events, converting them to [[SpriteEvent]] and\r\n * triggering them on sprite\r\n */\r\n switch (type) {\r\n case \"hit\":\r\n case \"track\":\r\n case \"doublehit\":\r\n case \"wheel\":\r\n case \"wheelup\":\r\n case \"wheeldown\":\r\n case \"wheelleft\":\r\n case \"wheelright\":\r\n disposers.push(this._addInteractionObjectEvent(type, this._dispatchSpritePointEvent, this, shouldClone));\r\n break;\r\n case \"rightclick\":\r\n case \"down\":\r\n //case \"hold\":\r\n case \"up\":\r\n case \"drag\":\r\n case \"dragged\":\r\n case \"dragstart\":\r\n case \"dragstop\":\r\n case \"over\":\r\n case \"out\":\r\n case \"swipe\":\r\n case \"swipeleft\":\r\n case \"swiperight\":\r\n case \"resize\":\r\n //case \"rotate\":\r\n case \"focus\":\r\n case \"blur\":\r\n case \"toggled\":\r\n disposers.push(this._addInteractionObjectEvent(type, this._dispatchSpriteEvent, this, shouldClone));\r\n break;\r\n }\r\n /**\r\n * Set functional properties based on events. For example if we add a\r\n * \"drag\" event handler, we want to make the Sprite draggable, even if we\r\n * don't explicitly set \"draggable\"\r\n */\r\n switch (type) {\r\n case \"hit\":\r\n case \"doublehit\":\r\n case \"rightclick\":\r\n case \"down\":\r\n case \"up\":\r\n this.target.clickable = true;\r\n break;\r\n case \"toggled\":\r\n this.target.togglable = true;\r\n break;\r\n case \"drag\":\r\n case \"dragstart\":\r\n case \"dragstop\":\r\n this.target.draggable = true;\r\n break;\r\n case \"track\":\r\n this.target.trackable = true;\r\n break;\r\n case \"resize\":\r\n this.target.resizable = true;\r\n break;\r\n case \"swipe\":\r\n case \"swipeleft\":\r\n case \"swiperight\":\r\n this.target.swipeable = true;\r\n break;\r\n case \"wheel\":\r\n case \"wheelup\":\r\n case \"wheeldown\":\r\n case \"wheelleft\":\r\n case \"wheelright\":\r\n this.target.wheelable = true;\r\n break;\r\n case \"over\":\r\n this.target.hoverable = true;\r\n case \"out\":\r\n this.target.hoverable = true;\r\n break;\r\n case \"focus\":\r\n case \"blur\":\r\n this.target.focusable = true;\r\n break;\r\n }\r\n info.disposer = new MultiDisposer(disposers);\r\n return info;\r\n };\r\n return SpriteEventDispatcher;\r\n}(TargetedEventDispatcher));\r\nexport { SpriteEventDispatcher };\r\n","/**\r\n * Module contains functionality related to [[Sprite]] states.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { BaseObject } from \"./Base\";\r\nimport { registry } from \"./Registry\";\r\nimport { Adapter } from \"./utils/Adapter\";\r\nimport { List, ListDisposer } from \"./utils/List\";\r\nimport { toColor } from \"./utils/Color\";\r\nimport { percent } from \"./utils/Percent\";\r\nimport * as $utils from \"./utils/Utils\";\r\nimport * as $ease from \"./utils/Ease\";\r\nimport * as $object from \"./utils/Object\";\r\nimport * as $type from \"./utils/Type\";\r\n/**\r\n * Defines a state for [[Sprite]].\r\n *\r\n * A \"state\" is a special object that has all the same properties as the\r\n * [[Sprite]] of the same type, and which can be used to quickly apply a set\r\n * of property values. (set state)\r\n *\r\n * When [[Sprite]] (or any object that extends Sprite) is created it creates a\r\n * \"default\" state. You can modify the \"default\" state so that when the Sprite\r\n * returns to default state certain properties are added.\r\n *\r\n * Default state can be accessed using Sprite's `defaultState` getter.\r\n *\r\n * ```TypeScript\r\n * sprite.defaultState.properties.fillOpacity = 0.5;\r\n * ```\r\n * ```JavaScript\r\n * sprite.defaultState.properties.fillOpacity = 0.5;\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"defaultState\": {\r\n * \"properties\": {\r\n * \"fillOpacity\": 0.5\r\n * }\r\n * }\r\n * }\r\n * ```\r\n *\r\n * If Sprite is \"hoverable\", it automatically adds a \"hover\" state, which is\r\n * applied when it has a cursor over it.\r\n *\r\n * ```TypeScript\r\n * let hoverstate = sprite.states.create(\"hover\");\r\n * hoverstate.properties.fillOpacity = 1;\r\n * ```\r\n * ```JavaScript\r\n * var hoverstate = sprite.states.create(\"hover\");\r\n * hoverstate.properties.fillOpacity = 1;\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"states\": {\r\n * \"hover\": {\r\n * \"properties\": {\r\n * \"fillOpacity\": 0.5\r\n * }\r\n * }\r\n * }\r\n * }\r\n * ```\r\n *\r\n * The above will automatically apply \"hover\" state when the Sprite is hovered,\r\n * thus will set its `fillOpacity` property to 1, and will reset it to 0.5 when\r\n * it's no longer hovered.\r\n *\r\n * Every object that inherits from [[Sprite]] can and will add their own\r\n * properties to the available list.\r\n *\r\n * User can create their own states, and apply them as needed:\r\n *\r\n * ```TypeScript\r\n * let myCustomState = sprite.states.create(\"mystate\");\r\n * myCustomState.properties.fillOpacity = 0.5;\r\n * myCustomState.properties.strokeOpacity = 0.8;\r\n * sprite.setState(\"mystate\");\r\n * ```\r\n * ```JavaScript\r\n * var myCustomState = sprite.states.create(\"mystate\");\r\n * myCustomState.properties.fillOpacity = 0.5;\r\n * myCustomState.properties.strokeOpacity = 0.8;\r\n * sprite.setState(\"mystate\");\r\n * ```\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/states/}\r\n * @important\r\n */\r\nvar SpriteState = /** @class */ (function (_super) {\r\n __extends(SpriteState, _super);\r\n /**\r\n * Constructor\r\n */\r\n function SpriteState() {\r\n var _this = \r\n // Init\r\n _super.call(this) || this;\r\n /**\r\n * Duration of the transition to this state. 0 means instantenous transition.\r\n * Any number means the [[Sprite]] will transit smoothly to this state,\r\n * animating all animatable properties.\r\n *\r\n * @default 0\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/animations/} for more info about animations\r\n */\r\n _this.transitionDuration = 0;\r\n /**\r\n * Easing function to use when transitioning to this state.\r\n *\r\n * @default cubicOut\r\n * @see {@link Ease}\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/animations/} for more info about animations\r\n */\r\n _this.transitionEasing = $ease.cubicOut;\r\n /**\r\n * Collection of properties and their values that should be applied to [[Sprite]]\r\n * when switching to this State.\r\n *\r\n * The property values set on a [[SpriteState]] will override the ones set\r\n * directly on a [[Sprite]].\r\n */\r\n _this.properties = {};\r\n /**\r\n * A collection of key/value pairs that can be used to bind specific Sprite\r\n * properties to [[DataItem]].\r\n *\r\n * For example: `fill` property can be bound to `myCustomColor` field in\r\n * DataItem. The Sprite will automatically get the value for `fill` from its\r\n * DataItem.\r\n *\r\n * SpriteState-specific binding will override binding set directly on\r\n * [[Sprite]]. I.e. you can make Sprite use different fill color on hover by\r\n * adding a `fill` binding to a different DataItem key for Sprite's \"hover\"\r\n * state object.\r\n *\r\n * @see {@link Sprite}\r\n */\r\n _this.propertyFields = {};\r\n //public propertyFields: Dictionary<keyof this[\"_properties\"], string> = new Dictionary<keyof this[\"_properties\"], string>();;\r\n /**\r\n * A list of [[Filter]] elements to be applied to the relative [[Sprite]]\r\n * when switching to this State.\r\n *\r\n * @param {List}\r\n */\r\n _this.filters = new List();\r\n /**\r\n * Identifies if this object is a \"template\" and should not be treated as\r\n * real object that is drawn or actually used in the chart.\r\n */\r\n _this.isTemplate = false;\r\n _this.className = \"SpriteState\";\r\n // Make filter list disposable\r\n _this._disposers.push(new ListDisposer(_this.filters));\r\n // Apply theme\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n Object.defineProperty(SpriteState.prototype, \"adapter\", {\r\n /**\r\n * Holds Adapter.\r\n */\r\n get: function () {\r\n var _this = this;\r\n if (!this._adapterO) {\r\n this._adapterO = new Adapter(this);\r\n // Decorate adapter with events so that we can apply its settings whenever\r\n // it is modified\r\n this._adapterO.events.on(\"inserted\", function (ev) {\r\n _this[ev.newValue.key] = _this[ev.newValue.key];\r\n }, undefined, false);\r\n this._adapterO.events.on(\"removed\", function (ev) {\r\n _this[ev.newValue.key] = _this[ev.newValue.key];\r\n }, undefined, false);\r\n }\r\n return this._adapterO;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Returns [[Sprite]] element's property value.\r\n *\r\n * Will check if there are any bindings with [[DataItem]] and if there are\r\n * any method callbacks set up for the specific property.\r\n *\r\n * @param propertyName Property name\r\n * @return Property value\r\n */\r\n SpriteState.prototype.getPropertyValue = function (propertyName) {\r\n var propValue = this.properties[propertyName];\r\n var sprite = this.sprite;\r\n if (sprite) {\r\n var fieldName = this.propertyFields[propertyName];\r\n if ($type.hasValue(fieldName)) {\r\n if (sprite.dataItem) {\r\n propValue = sprite.dataItem.dataContext[fieldName];\r\n }\r\n if (propValue == undefined) {\r\n propValue = \"__unset\";\r\n }\r\n }\r\n // Apply adapters\r\n // If the value itself is undefined, we're going to pass in Sprite's\r\n // value to adapters\r\n // @todo get rid of <any>\r\n if (!$type.hasValue(propValue)) {\r\n var spriteValue = sprite.getPropertyValue(propertyName);\r\n if (this._adapterO) {\r\n propValue = this._adapterO.apply(propertyName, spriteValue);\r\n }\r\n else {\r\n propValue = spriteValue;\r\n }\r\n if (propValue == spriteValue) {\r\n propValue = undefined;\r\n }\r\n }\r\n else {\r\n if (this._adapterO) {\r\n propValue = this._adapterO.apply(propertyName, propValue);\r\n }\r\n }\r\n /*let method = this.propertyMethods.getKey(propertyName);\r\n if (method) {\r\n propValue = method(sprite, propertyName);\r\n }*/\r\n }\r\n return propValue;\r\n };\r\n /**\r\n * Copies all property and style values from another [[SpriteState]] object.\r\n *\r\n * @param source Source [[SpriteState]]\r\n */\r\n SpriteState.prototype.copyFrom = function (source) {\r\n if (source && source != this) {\r\n this.transitionDuration = source.transitionDuration;\r\n this.transitionEasing = source.transitionEasing;\r\n $utils.copyProperties(source.properties, this.properties);\r\n $utils.copyProperties(source.propertyFields, this.propertyFields);\r\n this.filters.copyFrom(source.filters);\r\n if (source._adapterO) {\r\n this.adapter.copyFrom(source._adapterO);\r\n }\r\n }\r\n };\r\n Object.defineProperty(SpriteState.prototype, \"allValues\", {\r\n /**\r\n * Returns all values that should be applied by the SpriteState.\r\n *\r\n * It takes adapters into account.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Properties\r\n * @todo Add adapter values\r\n * @todo proper type this[\"_properties\"]\r\n */\r\n get: function () {\r\n var _this = this;\r\n // Init return value\r\n var res = {};\r\n // Apply adapters to all values\r\n $object.each(this.properties, function (prop, value) {\r\n res[prop] = _this.getPropertyValue(prop);\r\n });\r\n // Cycle through all adapters and add values for missing properties\r\n if (this._adapterO) {\r\n var keys = this._adapterO.keys();\r\n $object.each(keys, function (_x, prop) {\r\n var value = _this.getPropertyValue(prop);\r\n res[prop] = value;\r\n });\r\n }\r\n // Cycle through all property fileds and add values for missing properties\r\n var propertyFields = this.propertyFields;\r\n $object.each(propertyFields, function (prop) {\r\n var value = _this.getPropertyValue(prop);\r\n res[prop] = value;\r\n });\r\n return res;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Resets the State to initial state - no values or Filters applied.\r\n */\r\n SpriteState.prototype.reset = function () {\r\n this.properties = {};\r\n this.filters.clear();\r\n };\r\n /**\r\n * Processes JSON-based config before it is applied to the object.\r\n *\r\n * @ignore Exclude from docs\r\n * @param config Config\r\n */\r\n SpriteState.prototype.processConfig = function (config) {\r\n if ($type.hasValue(config) && $type.hasValue(config[\"properties\"])) {\r\n $object.each(config[\"properties\"], function (key, value) {\r\n if ($type.isString(value)) {\r\n if (value.match(/^[0-9.\\-]+\\%$/)) {\r\n config[\"properties\"][key] = percent($type.toNumber(value));\r\n }\r\n else if (value.match(/^\\#[0-9abcdef]{3,}$/i)) {\r\n config[\"properties\"][key] = toColor(value);\r\n }\r\n }\r\n });\r\n }\r\n _super.prototype.processConfig.call(this, config);\r\n };\r\n /**\r\n * Adds easing functions to \"function\" fields.\r\n *\r\n * @param field Field name\r\n * @return Assign as function?\r\n */\r\n SpriteState.prototype.asFunction = function (field) {\r\n return field == \"transitionEasing\" || _super.prototype.asIs.call(this, field);\r\n };\r\n return SpriteState;\r\n}(BaseObject));\r\nexport { SpriteState };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"SpriteState\"] = SpriteState;\r\n","/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { registry, is } from \"./Registry\";\r\nimport { Container } from \"./Container\";\r\nimport { raf } from \"./utils/AsyncPending\";\r\nimport { triggerIdle } from \"./utils/AsyncPending\";\r\nimport * as $array from \"./utils/Array\";\r\nimport * as $object from \"./utils/Object\";\r\nimport * as $log from \"./utils/Log\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * The main class that handles system-wide tasks, like caching, heartbeats, etc.\r\n * @important\r\n */\r\nvar System = /** @class */ (function () {\r\n /**\r\n * Performs initialization of the System object.\r\n *\r\n * Called when the first [[Sprite]] object is created.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n function System() {\r\n /**\r\n * A flag indicating if the system is on pause.\r\n */\r\n this._isPaused = false;\r\n /**\r\n * Holds the list of currently playing animations.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n this.animations = [];\r\n /**\r\n * Unique ID of the object.\r\n */\r\n this.uid = registry.getUniqueId();\r\n /**\r\n * @todo Description\r\n * @todo Needed?\r\n * @ignore Exclude from docs\r\n */\r\n this.dummyCounter = 0;\r\n this._frameRequested = false;\r\n this.updateStepDuration = 45;\r\n this.time = Date.now();\r\n }\r\n /**\r\n * Reports time elapsed since timer was reset.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Needed?\r\n * @param msg Message to report in console\r\n * @param reset Reset time counter\r\n */\r\n System.prototype.reportTime = function (msg, reset) {\r\n if (this.dummyCounter < 6) {\r\n //console.log(Date.now() - this.time, msg, this.dummyCounter2);\r\n }\r\n if (reset) {\r\n this.time = Date.now();\r\n }\r\n };\r\n /**\r\n * Performs \"heartbeat\" operations `frameRate` number of times per second.\r\n *\r\n * When the chart element is invalidated, it is not immediately redrawn.\r\n *\r\n * Instead it waits for the next `update()` cycle to be re-validated.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Maybe should be private?\r\n */\r\n System.prototype.update = function () {\r\n var _this = this;\r\n if (this._isPaused) {\r\n return;\r\n }\r\n this._frameRequested = false;\r\n var time = Date.now();\r\n registry.dispatchImmediately(\"enterframe\");\r\n //this.validateLayouts();\r\n //this.validatePositions();\r\n /*\r\n for (let key in registry.invalidLayouts) {\r\n this.validateLayouts(key);\r\n }\r\n for (let key in registry.invalidPositions) {\r\n this.validatePositions(key);\r\n }\r\n */\r\n var skippedComponents = [];\r\n // data objects first - do all calculations\r\n // only data is parsed in chunks, thats why we do for loop instead of a while like with other invalid items.\r\n // important to go backwards, as items are removed!\r\n // TODO use iterator instead\r\n for (var key in registry.invalidDatas) {\r\n if ($object.hasKey(registry.invalidDatas, key)) {\r\n var invalidData = registry.invalidDatas[key];\r\n while (invalidData.length > 0) {\r\n var component = invalidData[0];\r\n var dataProvider = component.dataProvider;\r\n if (!component.isDisposed()) {\r\n if (dataProvider && dataProvider.dataInvalid) {\r\n try {\r\n dataProvider.validateData();\r\n if (dataProvider.dataValidationProgress < 1) {\r\n break;\r\n }\r\n }\r\n catch (e) {\r\n $array.remove(invalidData, dataProvider);\r\n dataProvider.raiseCriticalError(e);\r\n }\r\n }\r\n else {\r\n try {\r\n component.validateData();\r\n if (component.dataValidationProgress < 1) {\r\n break;\r\n }\r\n }\r\n catch (e) {\r\n $array.remove(invalidData, component);\r\n component.raiseCriticalError(e);\r\n }\r\n }\r\n }\r\n else {\r\n $array.remove(invalidData, component);\r\n }\r\n }\r\n if (Date.now() - time > this.updateStepDuration) {\r\n break;\r\n }\r\n }\r\n }\r\n while (registry.invalidRawDatas.length > 0) {\r\n var component = registry.invalidRawDatas[0];\r\n if (!component.isDisposed()) {\r\n try {\r\n component.validateRawData();\r\n }\r\n catch (e) {\r\n $array.remove(registry.invalidRawDatas, component);\r\n component.raiseCriticalError(e);\r\n }\r\n }\r\n else {\r\n $array.remove(registry.invalidRawDatas, component);\r\n }\r\n }\r\n // TODO use iterator instead\r\n while (registry.invalidDataItems.length > 0) {\r\n var component = registry.invalidDataItems[0];\r\n var dataProvider = component.dataProvider;\r\n // this is needed to avoid partial value validation when data is parsed in chunks\r\n if (component.isDisposed() || component.dataInvalid || (dataProvider && dataProvider.dataInvalid)) {\r\n // void\r\n }\r\n else {\r\n try {\r\n component.validateDataItems();\r\n }\r\n catch (e) {\r\n $array.remove(registry.invalidDataItems, component);\r\n component.raiseCriticalError(e);\r\n }\r\n }\r\n // this might seem too much, as validateValues removes from invalidDataItems aswell, but just to be sure (in case validateData is overriden and no super is called)\r\n $array.remove(registry.invalidDataItems, component);\r\n }\r\n // TODO use iterator instead\r\n while (registry.invalidDataRange.length > 0) {\r\n var component = registry.invalidDataRange[0];\r\n var dataProvider = component.dataProvider;\r\n if (component.isDisposed() || component.dataInvalid || (dataProvider && dataProvider.dataInvalid)) {\r\n // void\r\n }\r\n else {\r\n try {\r\n component.validateDataRange();\r\n if (!component.skipRangeEvent) {\r\n component.dispatchImmediately(\"datarangechanged\");\r\n }\r\n component.skipRangeEvent = false;\r\n }\r\n catch (e) {\r\n $array.remove(registry.invalidDataRange, component);\r\n component.raiseCriticalError(e);\r\n }\r\n }\r\n // this might seem too much, as validateDataRange removes from invalidDataRange aswell, but just to be sure (in case validateData is overriden and no super is called)\r\n $array.remove(registry.invalidDataRange, component);\r\n }\r\n var skippedSprites = [];\r\n // display objects later\r\n // TODO use iterator instead\r\n $object.each(registry.invalidLayouts, function (key) {\r\n _this.validateLayouts(key);\r\n });\r\n $object.each(registry.invalidPositions, function (key) {\r\n _this.validatePositions(key);\r\n });\r\n var hasSkipped = false;\r\n time = Date.now();\r\n $object.each(registry.invalidSprites, function (key, invalidSprites) {\r\n var count = 0;\r\n while (invalidSprites.length > 0) {\r\n _this.validateLayouts(key);\r\n _this.validatePositions(key);\r\n count++;\r\n if (count == 5) {\r\n if (Date.now() - time > _this.updateStepDuration) {\r\n break;\r\n }\r\n count = 0;\r\n }\r\n var sprite = invalidSprites[invalidSprites.length - 1];\r\n // we need to check this, as validateLayout might validate sprite\r\n if (sprite && !sprite.isDisposed()) {\r\n if (!sprite._systemCheckIfValidate()) {\r\n // void\r\n skippedSprites.push(sprite);\r\n }\r\n else {\r\n if (!_this.checkIfValidate2(sprite)) {\r\n // void\r\n skippedSprites.push(sprite);\r\n }\r\n else {\r\n try {\r\n sprite._systemUpdate(skippedSprites);\r\n }\r\n catch (e) {\r\n sprite.invalid = false;\r\n $array.remove(invalidSprites, sprite);\r\n sprite.raiseCriticalError(e);\r\n }\r\n }\r\n }\r\n // this might seem too much, but it's ok\r\n sprite.invalid = false;\r\n }\r\n $array.remove(invalidSprites, sprite);\r\n }\r\n registry.invalidSprites[key] = registry.invalidSprites[key].concat(skippedSprites);\r\n });\r\n $object.each(registry.invalidSprites, function (key, value) {\r\n if (value.length > 0) {\r\n hasSkipped = true;\r\n }\r\n });\r\n $object.each(registry.invalidDatas, function (key, value) {\r\n if (value.length > 0) {\r\n hasSkipped = true;\r\n }\r\n });\r\n // TODO make this more efficient\r\n // TODO don't copy the array\r\n $array.each($array.copy(this.animations), function (x) {\r\n x.update();\r\n });\r\n //if(!hasSkipped){\r\n $object.each(registry.invalidLayouts, function (key) {\r\n _this.validateLayouts(key);\r\n });\r\n $object.each(registry.invalidPositions, function (key) {\r\n _this.validatePositions(key);\r\n });\r\n //}\r\n triggerIdle();\r\n $object.each(registry.invalidLayouts, function (key) {\r\n _this.validateLayouts(key);\r\n });\r\n $object.each(registry.invalidPositions, function (key) {\r\n _this.validatePositions(key);\r\n });\r\n registry.dispatchImmediately(\"exitframe\");\r\n if (hasSkipped || this.animations.length > 0 || skippedComponents.length > 0) {\r\n this.requestFrame();\r\n }\r\n if (this.updateStepDuration < 200) {\r\n var all0_1 = true;\r\n $object.each(registry.invalidDatas, function (key, value) {\r\n if (value.length > 0) {\r\n all0_1 = false;\r\n }\r\n });\r\n $object.each(registry.invalidSprites, function (key, value) {\r\n if (value.length > 0) {\r\n all0_1 = false;\r\n }\r\n });\r\n if (all0_1) {\r\n this.updateStepDuration = 200;\r\n }\r\n }\r\n };\r\n System.prototype.checkIfValidate2 = function (sprite) {\r\n if (sprite.dataItem && sprite.dataItem.component && sprite.dataItem.component.dataInvalid && !sprite.dataItem.component.isTemplate) {\r\n return false;\r\n }\r\n else {\r\n return true;\r\n }\r\n };\r\n /**\r\n * Requests new animation frame\r\n */\r\n System.prototype.requestFrame = function () {\r\n var _this = this;\r\n if (!this._frameRequested) {\r\n raf(function () {\r\n _this.update();\r\n });\r\n this._frameRequested = true;\r\n }\r\n };\r\n /**\r\n * Call this method if you update data or config of a chart that is in\r\n * hidden container, after revealing the container, so that labels and\r\n * possibly other elements can correctly arrange themselves.\r\n *\r\n * @since 4.7.10\r\n * @param container Target container\r\n */\r\n System.prototype.softInvalidate = function (container) {\r\n var _this = this;\r\n container.children.each(function (child) {\r\n if (child instanceof Container) {\r\n _this.softInvalidate(child);\r\n }\r\n if (child.measureFailed) {\r\n if (is(child, \"Label\")) {\r\n child.hardInvalidate();\r\n }\r\n else {\r\n child.invalidate();\r\n }\r\n child.measureFailed = false;\r\n }\r\n });\r\n };\r\n /**\r\n * Triggers position re-validation on all [[Sprite]] elements that have\r\n * invalid(ated) positions.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Maybe should be private?\r\n */\r\n System.prototype.validatePositions = function (id) {\r\n // invalid positions\r\n // TODO use iterator instead\r\n var invalidPositions = registry.invalidPositions[id];\r\n while (invalidPositions.length > 0) {\r\n var sprite = invalidPositions[invalidPositions.length - 1];\r\n if (!sprite.isDisposed()) {\r\n try {\r\n sprite._systemValidatePositions();\r\n }\r\n catch (e) {\r\n sprite.positionInvalid = false;\r\n $array.remove(invalidPositions, sprite);\r\n sprite.raiseCriticalError(e);\r\n }\r\n }\r\n else {\r\n $array.remove(invalidPositions, sprite);\r\n }\r\n }\r\n };\r\n /**\r\n * Triggers position re-validation on all [[Container]] elements that have\r\n * invalid(ated) layouts.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Maybe should be private?\r\n */\r\n System.prototype.validateLayouts = function (id) {\r\n // invalid positions\r\n // TODO use iterator instead\r\n var invalidLayouts = registry.invalidLayouts[id];\r\n while (invalidLayouts.length > 0) {\r\n var container = invalidLayouts[invalidLayouts.length - 1];\r\n if (!container.isDisposed()) {\r\n try {\r\n container.children.each(function (sprite) {\r\n sprite._systemValidateLayouts();\r\n });\r\n container.validateLayout();\r\n }\r\n catch (e) {\r\n container.layoutInvalid = false;\r\n $array.remove(invalidLayouts, container);\r\n container.raiseCriticalError(e);\r\n }\r\n }\r\n else {\r\n $array.remove(invalidLayouts, container);\r\n }\r\n }\r\n };\r\n /**\r\n * Outputs string to console if `verbose` is `true`.\r\n *\r\n * @param value Message to output to console\r\n */\r\n System.prototype.log = function (value) {\r\n $log.log(value);\r\n };\r\n Object.defineProperty(System.prototype, \"isPaused\", {\r\n /**\r\n * @return Is system on pause?\r\n */\r\n get: function () {\r\n return this._isPaused;\r\n },\r\n /**\r\n * Pauses all the processes of all the amCharts objects on the page\r\n *\r\n * @return is paused?\r\n */\r\n set: function (value) {\r\n this._isPaused = value;\r\n if (!value) {\r\n this._frameRequested = false;\r\n this.requestFrame();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * amCharts Version.\r\n *\r\n * This follows npm's semver specification.\r\n *\r\n * @see {@link https://docs.npmjs.com/misc/semver}\r\n */\r\n System.VERSION = \"4.10.33\";\r\n return System;\r\n}());\r\nexport { System };\r\n/**\r\n * A singleton global instance of [[System]].\r\n *\r\n * All code should use this, rather than instantiating their\r\n * own System objects.\r\n */\r\nexport var system = new System();\r\n","/**\r\n * CSV parser.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { DataParser } from \"./DataParser\";\r\nimport * as $type from \"../utils/Type\";\r\nimport * as $array from \"../utils/Array\";\r\n/**\r\n * Define possible separators.\r\n */\r\nvar separators = [\",\", \";\", \"\\t\"];\r\n/**\r\n * A parser for CSV format.\r\n *\r\n * @important\r\n */\r\nvar CSVParser = /** @class */ (function (_super) {\r\n __extends(CSVParser, _super);\r\n function CSVParser() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n /**\r\n * Content-type suitable for CSV format.\r\n */\r\n _this.contentType = \"text/csv\";\r\n /**\r\n * Parser options.\r\n *\r\n * @see {@link ICSVOptions} for description of each option\r\n */\r\n _this.options = {\r\n delimiter: \"\",\r\n reverse: false,\r\n skipRows: 0,\r\n skipEmpty: true,\r\n useColumnNames: false\r\n };\r\n return _this;\r\n }\r\n /**\r\n * Tests if the format is CSV.\r\n *\r\n * @param data Source data\r\n * @return Is it CSV?\r\n */\r\n CSVParser.isCSV = function (data) {\r\n return CSVParser.getDelimiterFromData(data) ? true : false;\r\n };\r\n /**\r\n * Tries to determine a column separator.\r\n *\r\n * @param data Source data\r\n * @return Separator\r\n */\r\n CSVParser.getDelimiterFromData = function (data) {\r\n // We're going to take first few lines of the CSV with different\r\n // possible separators and check if it results in same number of columns.\r\n // If it does, we're going to assume it's a CSV\r\n var lines = data.split(\"\\n\");\r\n var len = lines.length;\r\n var separator;\r\n $array.each(separators, function (sep) {\r\n var columns = 0, lineColums = 0;\r\n // TODO replace with iterators\r\n for (var i = 0; i < len; ++i) {\r\n // Get number of columns in a line\r\n columns = lines[i].split(sep).length;\r\n if (columns > 1) {\r\n // More than one column - possible candidate\r\n if (lineColums === 0) {\r\n // First line\r\n lineColums = columns;\r\n }\r\n else if (columns != lineColums) {\r\n // Incorrect number of columns, give up on this separator\r\n lineColums = 0;\r\n break;\r\n }\r\n }\r\n else {\r\n // Not this separator\r\n // Not point in continuing\r\n lineColums = 0;\r\n break;\r\n }\r\n }\r\n // Check if we have a winner\r\n if (lineColums) {\r\n separator = sep;\r\n }\r\n });\r\n return separator;\r\n };\r\n /**\r\n * Parses and returns data.\r\n *\r\n * @param data Unparsed data\r\n * @return Parsed data\r\n */\r\n CSVParser.prototype.parse = function (csv) {\r\n // Check if we have delimiter set\r\n if (!this.options.delimiter) {\r\n this.options.delimiter = CSVParser.getDelimiterFromData(csv);\r\n }\r\n // Get CSV data as array\r\n var data = this.CSVToArray(csv, this.options.delimiter);\r\n // Do we need to cast some fields to numbers?\r\n var empty = $type.hasValue(this.options.emptyAs);\r\n var numbers = this.parsableNumbers;\r\n var dates = this.parsableDates;\r\n // Init resuling array\r\n var res = [], cols = [], col, i;\r\n // Skip rows\r\n for (i = 0; i < this.options.skipRows; i++) {\r\n data.shift();\r\n }\r\n // First row holds column names?\r\n if (this.options.useColumnNames) {\r\n cols = data.shift();\r\n // Normalize column names\r\n for (var x = 0; x < cols.length; x++) {\r\n // trim\r\n col = $type.hasValue(cols[x]) ? cols[x].replace(/^\\s+|\\s+$/gm, \"\") : \"\";\r\n // Check for empty\r\n if (\"\" === col) {\r\n col = \"col\" + x;\r\n }\r\n cols[x] = col;\r\n }\r\n }\r\n // Iterate through the result set\r\n var row;\r\n while (true) {\r\n row = this.options.reverse ? data.pop() : data.shift();\r\n if (!row) {\r\n break;\r\n }\r\n if (this.options.skipEmpty && row.length === 1 && row[0] === \"\") {\r\n continue;\r\n }\r\n var dataPoint = {};\r\n for (i = 0; i < row.length; i++) {\r\n col = undefined === cols[i] ? \"col\" + i : cols[i];\r\n dataPoint[col] = row[i] === \"\" ? this.options.emptyAs : row[i];\r\n // Convert\r\n if (empty) {\r\n dataPoint[col] = this.maybeToEmpty(dataPoint[col]);\r\n }\r\n if (numbers) {\r\n dataPoint[col] = this.maybeToNumber(col, dataPoint[col]);\r\n }\r\n if (dates) {\r\n dataPoint[col] = this.maybeToDate(col, dataPoint[col]);\r\n }\r\n }\r\n res.push(dataPoint);\r\n }\r\n return res;\r\n };\r\n /**\r\n * Converts CSV into array.\r\n *\r\n * The functionality of this function is taken from here:\r\n * http://www.bennadel.com/blog/1504-ask-ben-parsing-csv-strings-with-javascript-exec-regular-expression-command.htm\r\n *\r\n * @param data Source data\r\n * @param delimiter Column delimiter\r\n * @return Parsed array\r\n */\r\n CSVParser.prototype.CSVToArray = function (data, delimiter) {\r\n // Check to see if the delimiter is defined. If not,\r\n // then default to comma.\r\n delimiter = (delimiter || ',');\r\n // Create a regular expression to parse the CSV values.\r\n var objPattern = new RegExp((\r\n // Delimiters.\r\n \"(\\\\\" + delimiter + \"|\\\\r?\\\\n|\\\\r|^)\" +\r\n // Quoted fields.\r\n \"(?:\\\"([^\\\"]*(?:\\\"\\\"[^\\\"]*)*)\\\"|\" +\r\n // Standard fields.\r\n \"([^\\\"\\\\\" + delimiter + \"\\\\r\\\\n]*))\"), \"gi\");\r\n // Create an array to hold our data. Give the array\r\n // a default empty first row.\r\n var arrData = [\r\n []\r\n ];\r\n // Create an array to hold our individual pattern\r\n // matching groups.\r\n var arrMatches = null;\r\n // Keep looping over the regular expression matches\r\n // until we can no longer find a match.\r\n while (true) {\r\n arrMatches = objPattern.exec(data);\r\n if (!arrMatches) {\r\n break;\r\n }\r\n // Get the delimiter that was found.\r\n var strMatchedDelimiter = arrMatches[1];\r\n // Check to see if the given delimiter has a length\r\n // (is not the start of string) and if it matches\r\n // field delimiter. If id does not, then we know\r\n // that this delimiter is a row delimiter.\r\n if (strMatchedDelimiter.length &&\r\n (strMatchedDelimiter !== delimiter)) {\r\n // Since we have reached a new row of data,\r\n // add an empty row to our data array.\r\n arrData.push([]);\r\n }\r\n // Now that we have our delimiter out of the way,\r\n // let's check to see which kind of value we\r\n // captured (quoted or unquoted).\r\n var strMatchedValue = void 0;\r\n if (arrMatches[2]) {\r\n // We found a quoted value. When we capture\r\n // this value, unescape any double quotes.\r\n strMatchedValue = arrMatches[2].replace(new RegExp(\"\\\"\\\"\", \"g\"), \"\\\"\");\r\n }\r\n else {\r\n // We found a non-quoted value.\r\n strMatchedValue = arrMatches[3];\r\n }\r\n // Now that we have our value string, let's add\r\n // it to the data array.\r\n arrData[arrData.length - 1].push(strMatchedValue);\r\n }\r\n // Return the parsed data.\r\n return (arrData);\r\n };\r\n return CSVParser;\r\n}(DataParser));\r\nexport { CSVParser };\r\n","/**\r\n * Data Loader is responsible for loading and parsing external data\r\n */\r\nimport { CSVParser } from \"./CSVParser\";\r\nimport { JSONParser } from \"./JSONParser\";\r\nimport { Adapter } from \"../utils/Adapter\";\r\nimport * as $net from \"../utils/Net\";\r\nimport * as $array from \"../utils/Array\";\r\n;\r\n/**\r\n * Data Loader is responsible for loading and parsing external data.\r\n *\r\n * There is just one instance of DataLoader per system. Unless you have a\r\n * speicific reason, do not instantiate additional instances.\r\n *\r\n * The global instance of Data Loader is accessible via:\r\n *\r\n * ```TypeScript\r\n * am4core.dataLoader;\r\n * ```\r\n * ```JavaScript\r\n * am4core.dataLoader;\r\n * ```\r\n *\r\n * A loading of specific data source is done via [[DataSource]].\r\n *\r\n Please refer to [[DataSource]] for information how to use it.\r\n *\r\n * @see {@link IDataLoaderAdapters} for a list of available Adapters\r\n */\r\nvar DataLoader = /** @class */ (function () {\r\n function DataLoader() {\r\n /**\r\n * Adapter.\r\n */\r\n this.adapter = new Adapter(this);\r\n }\r\n /**\r\n * Loads a supplied [[DataSource]] or an array of data sources, then calls\r\n * their respective `parse` methods.\r\n *\r\n * @param source A single data source or an array of multiple of data sources\r\n */\r\n DataLoader.prototype.load = function (source) {\r\n var sources = Array.isArray(source) ? source : [source];\r\n // Add each Source to the list to be loaded simultaneously\r\n var promises = $array.map(sources, function (x) {\r\n // Dispatch events\r\n x.dispatchImmediately(\"started\");\r\n x.dispatchImmediately(\"loadstarted\");\r\n return $net.load(x.url, x, x.requestOptions);\r\n });\r\n // Run all promises in parallel\r\n Promise.all(promises).then(function (res) {\r\n // Process each loaded source\r\n $array.each(res, function (result) {\r\n // Get Source\r\n var source = result.target;\r\n // Dispatch events\r\n source.dispatchImmediately(\"loadended\");\r\n if (result.error) {\r\n if (source.events.isEnabled(\"error\")) {\r\n source.events.dispatchImmediately(\"error\", {\r\n type: \"error\",\r\n code: result.xhr.status,\r\n message: source.language.translate(\"Unable to load file: %1\", null, source.url),\r\n target: source\r\n });\r\n }\r\n }\r\n else {\r\n // Initiate parsing of the loaded data\r\n source.processData(result.response, result.type);\r\n }\r\n source.dispatchImmediately(\"ended\");\r\n });\r\n }).catch(function (res) {\r\n if (res.target) {\r\n res.target.dispatchImmediately(\"loadended\");\r\n if (res.target.events.isEnabled(\"error\")) {\r\n res.target.events.dispatchImmediately(\"error\", {\r\n type: \"error\",\r\n code: res.xhr.status,\r\n message: res.target.language.translate(\"Unable to load file: %1\", null, res.target.url),\r\n target: res.target\r\n });\r\n }\r\n res.target.dispatchImmediately(\"ended\");\r\n }\r\n });\r\n };\r\n /**\r\n * Instantiates a [[DataParser]] object based on the data type.\r\n * Built-in parser types are as follows:\r\n *\r\n * * \"csv\" or \"text/csv\"\r\n * * \"json\" or \"application/json\"\r\n *\r\n * @param contentType A format type\r\n * @return A parser object\r\n */\r\n DataLoader.prototype.getParserByType = function (contentType) {\r\n // Let some plugin decide\r\n var parser = this.adapter.apply(\"getParserByType\", {\r\n parser: null,\r\n type: contentType\r\n }).parser;\r\n if (parser) {\r\n return parser;\r\n }\r\n if (contentType == \"csv\" || contentType == \"text/csv\" || contentType == \"application/vnd.ms-excel\") {\r\n return new CSVParser();\r\n }\r\n if (contentType == \"json\" || contentType == \"application/json\") {\r\n return new JSONParser();\r\n }\r\n return;\r\n };\r\n /**\r\n * Tries to determine a parser out of content type and/or actual data.\r\n *\r\n * @param data Data\r\n * @param contentType Content-type\r\n * @return Parser instance\r\n */\r\n DataLoader.prototype.getParserByData = function (data, contentType) {\r\n // Let some plugin decide\r\n var parser = this.adapter.apply(\"getParserByData\", {\r\n parser: null,\r\n data: data,\r\n type: contentType\r\n }).parser;\r\n // Check if we have parser from outside code\r\n if (!parser) {\r\n // No, let's try to figure it out\r\n parser = this.getParserByType(contentType);\r\n if (parser) {\r\n // We're able to figure out parser by content-type\r\n return parser;\r\n }\r\n else if (JSONParser.isJSON(data)) {\r\n return this.getParserByType(\"json\");\r\n }\r\n else if (CSVParser.isCSV(data)) {\r\n return this.getParserByType(\"csv\");\r\n }\r\n }\r\n return parser;\r\n };\r\n return DataLoader;\r\n}());\r\nexport { DataLoader };\r\n/**\r\n * Create instance of Data Loader\r\n */\r\nexport var dataLoader = new DataLoader();\r\n","/**\r\n * Data parser module.\r\n */\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { DateFormatter } from \"../formatters/DateFormatter\";\r\nimport * as $utils from \"../utils/Utils\";\r\nimport * as $type from \"../utils/Type\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Base class for the data parsers.\r\n */\r\nvar DataParser = /** @class */ (function () {\r\n function DataParser() {\r\n }\r\n /**\r\n * A \"placeholder\" function for real parsers to override.\r\n *\r\n * @ignore Exclude from docs\r\n * @param data Source data\r\n * @return Parsed data (empty)\r\n */\r\n DataParser.prototype.parse = function (data) {\r\n return [];\r\n };\r\n ;\r\n Object.defineProperty(DataParser.prototype, \"parsableNumbers\", {\r\n /**\r\n * Checks if there are any numeric fields that need to be converted to\r\n * numbers.\r\n *\r\n * @return Numeric fields?\r\n */\r\n get: function () {\r\n return this.options.numberFields && (this.options.numberFields.length > 0);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Converts a value to 'number' if it is in `numberFields`.\r\n *\r\n * @param field Field name\r\n * @param value Value\r\n * @return Parsed or original value\r\n */\r\n DataParser.prototype.maybeToNumber = function (field, value) {\r\n if (this.options.numberFields.indexOf(field) !== -1) {\r\n return $utils.anyToNumber(value);\r\n }\r\n return value;\r\n };\r\n Object.defineProperty(DataParser.prototype, \"parsableDates\", {\r\n /**\r\n * Checks if there are any date fields that need to be converted to `Date`\r\n * objects.\r\n *\r\n * @return Date fields?\r\n */\r\n get: function () {\r\n return this.options.dateFields && (this.options.dateFields.length > 0);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Converts a value to `Date` if it is in `dateFields`.\r\n *\r\n * @param field Field name\r\n * @param value Value\r\n * @return Parsed or original value\r\n */\r\n DataParser.prototype.maybeToDate = function (field, value) {\r\n if (this.options.dateFields.indexOf(field) !== -1) {\r\n return this.options.dateFormatter.parse(value, this.dateFormat);\r\n }\r\n return value;\r\n };\r\n /**\r\n * Replaces empty value with something else.\r\n *\r\n * @param value Source value\r\n * @return Source value or replacement\r\n */\r\n DataParser.prototype.maybeToEmpty = function (value) {\r\n if ((!$type.hasValue(value) || value == \"\") && $type.hasValue(this.options.emptyAs)) {\r\n return this.options.emptyAs;\r\n }\r\n return value;\r\n };\r\n Object.defineProperty(DataParser.prototype, \"dateFormatter\", {\r\n /**\r\n * [[DateFormatter]] object for date parsing.\r\n *\r\n * If there was not [[DateFormatter]] supplied in parser options, a new one\r\n * is created.\r\n *\r\n * @return Date formatter\r\n * @see {@link DateFormatter}\r\n */\r\n get: function () {\r\n if (!this.options.dateFormatter) {\r\n this.options.dateFormatter = new DateFormatter;\r\n if (this.options.dateFormat) {\r\n this.options.dateFormat = this.options.dateFormat;\r\n }\r\n }\r\n return this.options.dateFormatter;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DataParser.prototype, \"dateFormat\", {\r\n /**\r\n * A date format to use when parsing dates.\r\n *\r\n * @return Date format\r\n * @see {@link DateFormatter}\r\n */\r\n get: function () {\r\n return this.options.dateFormat || this.dateFormatter.inputDateFormat;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return DataParser;\r\n}());\r\nexport { DataParser };\r\n","import { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { dataLoader } from \"./DataLoader\";\r\nimport { JSONParser } from \"./JSONParser\";\r\nimport { CSVParser } from \"./CSVParser\";\r\nimport { BaseObjectEvents } from \"../Base\";\r\nimport { Adapter } from \"../utils/Adapter\";\r\nimport { Language } from \"../utils/Language\";\r\nimport { DateFormatter } from \"../formatters/DateFormatter\";\r\nimport { registry } from \"../Registry\";\r\nimport * as $type from \"../utils/Type\";\r\nimport * as $object from \"../utils/Object\";\r\n;\r\n;\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Represents a single data source - external file with all of its settings,\r\n * such as format, data parsing, etc.\r\n *\r\n * ```TypeScript\r\n * chart.dataSource.url = \"http://www.myweb.com/data.json\";\r\n * chart.dataSource.parser = am4core.JSONParser;\r\n * ```\r\n * ```JavaScript\r\n * chart.dataSource.url = \"http://www.myweb.com/data.json\";\r\n * chart.dataSource.parser = am4core.JSONParser;\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"dataSource\": {\r\n * \"url\": \"http://www.myweb.com/data.json\",\r\n * \"parser\": \"JSONParser\"\r\n * },\r\n * // ...\r\n * }\r\n * ```\r\n *\r\n * @see {@link IDataSourceEvents} for a list of available events\r\n * @see {@link IDataSourceAdapters} for a list of available Adapters\r\n */\r\nvar DataSource = /** @class */ (function (_super) {\r\n __extends(DataSource, _super);\r\n /**\r\n * Constructor\r\n */\r\n function DataSource(url, parser) {\r\n var _this = \r\n // Init\r\n _super.call(this) || this;\r\n /**\r\n * Adapter.\r\n */\r\n _this.adapter = new Adapter(_this);\r\n /**\r\n * Custom options for HTTP(S) request.\r\n */\r\n _this._requestOptions = {};\r\n /**\r\n * If set to `true`, any subsequent data loads will be considered incremental\r\n * (containing only new data points that are supposed to be added to existing\r\n * data).\r\n *\r\n * NOTE: this setting works only with element's `data` property. It won't\r\n * work with any other externally-loadable data property.\r\n *\r\n * @default false\r\n */\r\n _this._incremental = false;\r\n /**\r\n * A collection of key/value pairs to attach to a data source URL when making\r\n * an incremental request.\r\n */\r\n _this._incrementalParams = {};\r\n /**\r\n * This setting is used only when `incremental = true`. If set to `true`,\r\n * it will try to retain the same number of data items across each load.\r\n *\r\n * E.g. if incremental load yeilded 5 new records, then 5 items from the\r\n * beginning of data will be removed so that we end up with the same number\r\n * of data items.\r\n *\r\n * @default false\r\n */\r\n _this._keepCount = false;\r\n /**\r\n * If set to `true`, each subsequent load will be treated as an update to\r\n * currently loaded data, meaning that it will try to update values on\r\n * existing data items, not overwrite the whole data.\r\n *\r\n * This will work faster than complete update, and also will animate the\r\n * values to their new positions.\r\n *\r\n * Data sources across loads must contain the same number of data items.\r\n *\r\n * Loader will not truncate the data set if loaded data has fewer data items,\r\n * and if it is longer, the excess data items will be ignored.\r\n *\r\n * @default false\r\n * @since 4.5.5\r\n */\r\n _this._updateCurrentData = false;\r\n /**\r\n * Will show loading indicator when loading files.\r\n */\r\n _this.showPreloader = true;\r\n _this.className = \"DataSource\";\r\n // Set defaults\r\n if (url) {\r\n _this.url = url;\r\n }\r\n // Set parser\r\n if (parser) {\r\n if (typeof parser == \"string\") {\r\n _this.parser = dataLoader.getParserByType(parser);\r\n }\r\n else {\r\n _this.parser = parser;\r\n }\r\n }\r\n return _this;\r\n }\r\n /**\r\n * Processes the loaded data.\r\n *\r\n * @ignore Exclude from docs\r\n * @param data Raw (unparsed) data\r\n * @param contentType Content type of the loaded data (optional)\r\n */\r\n DataSource.prototype.processData = function (data, contentType) {\r\n // Parsing started\r\n this.dispatchImmediately(\"parsestarted\");\r\n // Check if parser is set\r\n if (!this.parser) {\r\n // Try to resolve from data\r\n this.parser = dataLoader.getParserByData(data, contentType);\r\n if (!this.parser) {\r\n // We have a problem - nobody knows what to do with the data\r\n // Raise error\r\n if (this.events.isEnabled(\"parseerror\")) {\r\n var event_1 = {\r\n type: \"parseerror\",\r\n message: this.language.translate(\"No parser available for file: %1\", null, this.url),\r\n target: this\r\n };\r\n this.events.dispatchImmediately(\"parseerror\", event_1);\r\n }\r\n this.dispatchImmediately(\"parseended\");\r\n return;\r\n }\r\n }\r\n // Apply options adapters\r\n this.parser.options = this.adapter.apply(\"parserOptions\", this.parser.options);\r\n this.parser.options.dateFields = this.adapter.apply(\"dateFields\", this.parser.options.dateFields || []);\r\n this.parser.options.numberFields = this.adapter.apply(\"numberFields\", this.parser.options.numberFields || []);\r\n // Check if we need to pass in date formatter\r\n if (this.parser.options.dateFields && !this.parser.options.dateFormatter) {\r\n this.parser.options.dateFormatter = this.dateFormatter;\r\n }\r\n // Parse\r\n this.data = this.adapter.apply(\"parsedData\", this.parser.parse(this.adapter.apply(\"unparsedData\", data)));\r\n // Check for parsing errors\r\n if (!$type.hasValue(this.data) && this.events.isEnabled(\"parseerror\")) {\r\n var event_2 = {\r\n type: \"parseerror\",\r\n message: this.language.translate(\"Error parsing file: %1\", null, this.url),\r\n target: this\r\n };\r\n this.events.dispatchImmediately(\"parseerror\", event_2);\r\n }\r\n // Wrap up\r\n this.dispatchImmediately(\"parseended\");\r\n if ($type.hasValue(this.data)) {\r\n this.dispatchImmediately(\"done\", {\r\n \"data\": this.data\r\n });\r\n }\r\n // The component is responsible for updating its own data vtriggered via\r\n // events.\r\n // Update last data load\r\n this.lastLoad = new Date();\r\n };\r\n Object.defineProperty(DataSource.prototype, \"url\", {\r\n /**\r\n * @return URL\r\n */\r\n get: function () {\r\n // Get URL\r\n var url = this.disableCache\r\n ? this.timestampUrl(this._url)\r\n : this._url;\r\n // Add incremental params\r\n if (this.incremental && this.component.data.length) {\r\n url = this.addUrlParams(url, this.incrementalParams);\r\n }\r\n return this.adapter.apply(\"url\", url);\r\n },\r\n /**\r\n * URL of the data source.\r\n *\r\n * @param value URL\r\n */\r\n set: function (value) {\r\n this._url = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DataSource.prototype, \"requestOptions\", {\r\n /**\r\n * @return Options\r\n */\r\n get: function () {\r\n return this.adapter.apply(\"requestOptions\", this._requestOptions);\r\n },\r\n /**\r\n * Custom options for HTTP(S) request.\r\n *\r\n * At this moment the only option supported is: `requestHeaders`, which holds\r\n * an array of objects for custom request headers, e.g.:\r\n *\r\n * ```TypeScript\r\n * chart.dataSource.requestOptions.requestHeaders = [{\r\n * \"key\": \"x-access-token\",\r\n * \"value\": \"123456789\"\r\n * }];\r\n * ``````JavaScript\r\n * chart.dataSource.requestOptions.requestHeaders = [{\r\n * \"key\": \"x-access-token\",\r\n * \"value\": \"123456789\"\r\n * }];\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"dataSource\": {\r\n * // ...\r\n * \"requestOptions\": {\r\n * \"requestHeaders\": [{\r\n * \"key\": \"x-access-token\",\r\n * \"value\": \"123456789\"\r\n * }]\r\n * }\r\n * }\r\n * }\r\n * ```\r\n *\r\n * NOTE: setting this options on an-already loaded DataSource will not\r\n * trigger a reload.\r\n *\r\n * @param value Options\r\n */\r\n set: function (value) {\r\n this._requestOptions = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DataSource.prototype, \"parser\", {\r\n /**\r\n * @return Data parser\r\n */\r\n get: function () {\r\n if (!this._parser) {\r\n this._parser = new JSONParser();\r\n }\r\n return this.adapter.apply(\"parser\", this._parser);\r\n },\r\n /**\r\n * A parser to be used to parse data.\r\n *\r\n * ```TypeScript\r\n * chart.dataSource.url = \"http://www.myweb.com/data.json\";\r\n * chart.dataSource.parser = am4core.JSONParser;\r\n * ```\r\n * ```JavaScript\r\n * chart.dataSource.url = \"http://www.myweb.com/data.json\";\r\n * chart.dataSource.parser = am4core.JSONParser;\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"dataSource\": {\r\n * \"url\": \"http://www.myweb.com/data.json\",\r\n * \"parser\": {\r\n * \"type\": \"JSONParser\"\r\n * }\r\n * },\r\n * // ...\r\n * }\r\n * ```\r\n *\r\n * @default JSONParser\r\n * @param value Data parser\r\n */\r\n set: function (value) {\r\n this._parser = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DataSource.prototype, \"reloadFrequency\", {\r\n /**\r\n * @return Reload frequency (ms)\r\n */\r\n get: function () {\r\n return this.adapter.apply(\"reloadTimeout\", this._reloadFrequency);\r\n },\r\n /**\r\n * Data source reload frequency.\r\n *\r\n * If set, it will reload the same URL every X milliseconds.\r\n *\r\n * @param value Reload frequency (ms)\r\n */\r\n set: function (value) {\r\n var _this = this;\r\n if (this._reloadFrequency != value) {\r\n this._reloadFrequency = value;\r\n // Should we schedule a reload?\r\n if (value) {\r\n if (!$type.hasValue(this._reloadDisposer)) {\r\n this._reloadDisposer = this.events.on(\"ended\", function (ev) {\r\n _this._reloadTimeout = setTimeout(function () {\r\n _this.load();\r\n }, _this.reloadFrequency);\r\n });\r\n }\r\n }\r\n else if ($type.hasValue(this._reloadDisposer)) {\r\n this._reloadDisposer.dispose();\r\n this._reloadDisposer = undefined;\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DataSource.prototype, \"incremental\", {\r\n /**\r\n * @return Incremental load?\r\n */\r\n get: function () {\r\n return this.adapter.apply(\"incremental\", this._incremental);\r\n },\r\n /**\r\n * Should subsequent reloads be treated as incremental?\r\n *\r\n * Incremental loads will assume that they contain only new data items\r\n * since the last load.\r\n *\r\n * If `incremental = false` the loader will replace all of the target's\r\n * data with each load.\r\n *\r\n * This setting does not have any effect trhe first time data is loaded.\r\n *\r\n * NOTE: this setting works only with element's `data` property. It won't\r\n * work with any other externally-loadable data property.\r\n *\r\n * @default false\r\n * @param Incremental load?\r\n */\r\n set: function (value) {\r\n this._incremental = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DataSource.prototype, \"incrementalParams\", {\r\n /**\r\n * @return Incremental request parameters\r\n */\r\n get: function () {\r\n return this.adapter.apply(\"incrementalParams\", this._incrementalParams);\r\n },\r\n /**\r\n * An object consisting of key/value pairs to apply to an URL when data\r\n * source is making an incremental request.\r\n *\r\n * @param value Incremental request parameters\r\n */\r\n set: function (value) {\r\n this._incrementalParams = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DataSource.prototype, \"keepCount\", {\r\n /**\r\n * @return keepCount load?\r\n */\r\n get: function () {\r\n return this.adapter.apply(\"keepCount\", this._keepCount);\r\n },\r\n /**\r\n * This setting is used only when `incremental = true`. If set to `true`,\r\n * it will try to retain the same number of data items across each load.\r\n *\r\n * E.g. if incremental load yeilded 5 new records, then 5 items from the\r\n * beginning of data will be removed so that we end up with the same number\r\n * of data items.\r\n *\r\n * @default false\r\n * @param Keep record count?\r\n */\r\n set: function (value) {\r\n this._keepCount = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DataSource.prototype, \"updateCurrentData\", {\r\n /**\r\n * @return Update current data?\r\n */\r\n get: function () {\r\n return this.adapter.apply(\"updateCurrentData\", this._updateCurrentData);\r\n },\r\n /**\r\n * If set to `true`, each subsequent load will be treated as an update to\r\n * currently loaded data, meaning that it will try to update values on\r\n * existing data items, not overwrite the whole data.\r\n *\r\n * This will work faster than complete update, and also will animate the\r\n * values to their new positions.\r\n *\r\n * Data sources across loads must contain the same number of data items.\r\n *\r\n * Loader will not truncate the data set if loaded data has fewer data items,\r\n * and if it is longer, the excess data items will be ignored.\r\n *\r\n * NOTE: this setting is ignored if `incremental = true`.\r\n *\r\n * @default false\r\n * @since 2.5.5\r\n * @param Update current data?\r\n */\r\n set: function (value) {\r\n this._updateCurrentData = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DataSource.prototype, \"language\", {\r\n /**\r\n * @return A [[Language]] instance to be used\r\n */\r\n get: function () {\r\n if (this._language) {\r\n return this._language;\r\n }\r\n else if (this.component) {\r\n this._language = this.component.language;\r\n return this._language;\r\n }\r\n this.language = new Language();\r\n return this.language;\r\n },\r\n /**\r\n * Language instance to use.\r\n *\r\n * Will inherit and use chart's language, if not set.\r\n *\r\n * @param value An instance of Language\r\n */\r\n set: function (value) {\r\n this._language = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DataSource.prototype, \"dateFormatter\", {\r\n /**\r\n * @return A [[DateFormatter]] instance to be used\r\n */\r\n get: function () {\r\n if (this._dateFormatter) {\r\n return this._dateFormatter;\r\n }\r\n else if (this.component) {\r\n this._dateFormatter = this.component.dateFormatter;\r\n return this._dateFormatter;\r\n }\r\n this.dateFormatter = new DateFormatter();\r\n return this.dateFormatter;\r\n },\r\n /**\r\n * A [[DateFormatter]] to use when parsing dates from string formats.\r\n *\r\n * Will inherit and use chart's DateFormatter if not ser.\r\n *\r\n * @param value An instance of [[DateFormatter]]\r\n */\r\n set: function (value) {\r\n this._dateFormatter = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Adds current timestamp to the URL.\r\n *\r\n * @param url Source URL\r\n * @return Timestamped URL\r\n */\r\n DataSource.prototype.timestampUrl = function (url) {\r\n var tstamp = new Date().getTime().toString();\r\n var params = {};\r\n params[tstamp] = \"\";\r\n return this.addUrlParams(url, params);\r\n };\r\n /**\r\n * Disposes of this object.\r\n */\r\n DataSource.prototype.dispose = function () {\r\n _super.prototype.dispose.call(this);\r\n if (this._reloadTimeout) {\r\n clearTimeout(this._reloadTimeout);\r\n }\r\n if ($type.hasValue(this._reloadDisposer)) {\r\n this._reloadDisposer.dispose();\r\n this._reloadDisposer = undefined;\r\n }\r\n };\r\n /**\r\n * Initiate the load.\r\n *\r\n * All loading in JavaScript is asynchronous. This function will trigger the\r\n * load and will exit immediately.\r\n *\r\n * Use DataSource's events to watch for loaded data and errors.\r\n */\r\n DataSource.prototype.load = function () {\r\n if (this.url) {\r\n if (this._reloadTimeout) {\r\n clearTimeout(this._reloadTimeout);\r\n }\r\n dataLoader.load(this);\r\n }\r\n };\r\n /**\r\n * Adds parameters to `url` as query strings. Will take care of proper\r\n * separators.\r\n *\r\n * @param url Source URL\r\n * @param params Parameters\r\n * @return New URL\r\n */\r\n DataSource.prototype.addUrlParams = function (url, params) {\r\n var join = url.match(/\\?/) ? \"&\" : \"?\";\r\n var add = [];\r\n $object.each(params, function (key, value) {\r\n if (value != \"\") {\r\n add.push(key + \"=\" + encodeURIComponent(value));\r\n }\r\n else {\r\n add.push(key);\r\n }\r\n });\r\n if (add.length) {\r\n return url + join + add.join(\"&\");\r\n }\r\n return url;\r\n };\r\n /**\r\n * Processes JSON-based config before it is applied to the object.\r\n *\r\n * @ignore Exclude from docs\r\n * @param config Config\r\n */\r\n DataSource.prototype.processConfig = function (config) {\r\n registry.registeredClasses[\"json\"] = JSONParser;\r\n registry.registeredClasses[\"JSONParser\"] = JSONParser;\r\n registry.registeredClasses[\"csv\"] = CSVParser;\r\n registry.registeredClasses[\"CSVParser\"] = CSVParser;\r\n _super.prototype.processConfig.call(this, config);\r\n };\r\n return DataSource;\r\n}(BaseObjectEvents));\r\nexport { DataSource };\r\n","/**\r\n * JSON parser.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { DataParser } from \"./DataParser\";\r\nimport * as $object from \"../utils/Object\";\r\nimport * as $type from \"../utils/Type\";\r\n/**\r\n * A parser for JSON.\r\n *\r\n * @important\r\n */\r\nvar JSONParser = /** @class */ (function (_super) {\r\n __extends(JSONParser, _super);\r\n function JSONParser() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n /**\r\n * Content-type suitable for JSON format.\r\n */\r\n _this.contentType = \"application/json\";\r\n /**\r\n * Parser options.\r\n *\r\n * @see {@link IJSONOptions} for description of each option\r\n */\r\n _this.options = {};\r\n return _this;\r\n }\r\n /**\r\n * Tests if the data is valid JSON.\r\n *\r\n * @param data Source data\r\n * @return Is it JSON?\r\n */\r\n JSONParser.isJSON = function (data) {\r\n try {\r\n // Try parsing JSON\r\n JSON.parse(data);\r\n // If we got to this point it means it's a valid JSON\r\n return true;\r\n }\r\n catch (e) {\r\n return false;\r\n }\r\n };\r\n /**\r\n * Parses and returns data.\r\n *\r\n * @param data Unparsed data\r\n * @return Parsed data\r\n */\r\n JSONParser.prototype.parse = function (data) {\r\n var _this = this;\r\n // Init return\r\n var res;\r\n // Try parsing\r\n try {\r\n if ($type.hasValue(JSON)) {\r\n res = JSON.parse(data);\r\n }\r\n }\r\n catch (e) {\r\n return undefined;\r\n }\r\n // Do we need to cast some fields to numbers or dates?\r\n var empty = $type.hasValue(this.options.emptyAs);\r\n var numbers = this.parsableNumbers;\r\n var dates = this.parsableDates;\r\n if (Array.isArray(res) && (numbers || dates || empty)) {\r\n var _loop_1 = function (i, len) {\r\n var row = res[i];\r\n $object.each(row, function (key, value) {\r\n if (empty) {\r\n row[key] = _this.maybeToEmpty(row[key]);\r\n }\r\n if (numbers) {\r\n row[key] = _this.maybeToNumber(key, row[key]);\r\n }\r\n if (dates) {\r\n row[key] = _this.maybeToDate(key, row[key]);\r\n }\r\n });\r\n };\r\n // Iterate through the data and check if it needs to be converted\r\n for (var i = 0, len = res.length; i < len; i++) {\r\n _loop_1(i, len);\r\n }\r\n }\r\n // Convert to array\r\n //return Array.isArray(res) ? res : [res];\r\n return res;\r\n };\r\n return JSONParser;\r\n}(DataParser));\r\nexport { JSONParser };\r\n","/**\r\n */\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { color } from \"../utils/Color\";\r\n/**\r\n * Defines a class that holds default properties for new SVG elements\r\n */\r\nvar SVGDefaults = /** @class */ (function () {\r\n function SVGDefaults() {\r\n }\r\n SVGDefaults.opacity = 1;\r\n SVGDefaults.strokeOpacity = 1;\r\n SVGDefaults.strokeWidth = 1;\r\n SVGDefaults.fillOpacity = 1;\r\n SVGDefaults.fill = color(\"#000000\");\r\n SVGDefaults.stroke = color(\"#000000\");\r\n SVGDefaults.focusable = undefined;\r\n SVGDefaults.tabindex = 0;\r\n return SVGDefaults;\r\n}());\r\nexport { SVGDefaults };\r\n","/**\r\n * Functionality for drawing simple buttons.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Container } from \"../Container\";\r\nimport { Label } from \"./Label\";\r\nimport { RoundedRectangle } from \"../elements/RoundedRectangle\";\r\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\r\nimport { registry } from \"../Registry\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Button class is capable of drawing a simple rectangular button with\r\n * optionally rounded corners and an icon in it.\r\n *\r\n * @see {@link IButtonEvents} for a list of available events\r\n * @see {@link IButtonAdapters} for a list of available Adapters\r\n */\r\nvar Button = /** @class */ (function (_super) {\r\n __extends(Button, _super);\r\n /**\r\n * Constructor\r\n */\r\n function Button() {\r\n var _this = \r\n // Init\r\n _super.call(this) || this;\r\n _this.className = \"Button\";\r\n _this.tooltipY = 0;\r\n // Set defaults\r\n _this.iconPosition = \"left\";\r\n _this.layout = \"horizontal\";\r\n _this.contentAlign = \"center\";\r\n _this.contentValign = \"middle\";\r\n _this.padding(8, 16, 8, 16);\r\n _this.setStateOnChildren = true;\r\n var interfaceColors = new InterfaceColorSet();\r\n // Create background\r\n var background = _this.background;\r\n background.fill = interfaceColors.getFor(\"secondaryButton\");\r\n background.stroke = interfaceColors.getFor(\"secondaryButtonStroke\");\r\n background.fillOpacity = 1;\r\n background.strokeOpacity = 1;\r\n background.cornerRadius(3, 3, 3, 3);\r\n // Create the label element\r\n _this.label = new Label();\r\n _this.label.fill = interfaceColors.getFor(\"secondaryButtonText\");\r\n ;\r\n _this.label.shouldClone = false;\r\n // Create default states\r\n var hoverState = background.states.create(\"hover\");\r\n hoverState.properties.fillOpacity = 1;\r\n hoverState.properties.fill = interfaceColors.getFor(\"secondaryButtonHover\");\r\n var downState = background.states.create(\"down\");\r\n downState.transitionDuration = 100;\r\n downState.properties.fill = interfaceColors.getFor(\"secondaryButtonDown\");\r\n downState.properties.fillOpacity = 1;\r\n // Set up accessibility\r\n // A button should be always focusable\r\n _this.role = \"button\";\r\n _this.focusable = true;\r\n // Apply theme\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n Object.defineProperty(Button.prototype, \"icon\", {\r\n /**\r\n * @return Icon Sprite\r\n */\r\n get: function () {\r\n return this._icon;\r\n },\r\n /**\r\n * A [[Sprite]] to be used as an icon on button.\r\n *\r\n * @param icon Icon Sprite\r\n */\r\n set: function (icon) {\r\n var currentIcon = this._icon;\r\n if (currentIcon) {\r\n //this._icon.dispose();\r\n //this.removeDispose(currentIcon);\r\n currentIcon.parent = undefined;\r\n }\r\n if (icon) {\r\n this._icon = icon;\r\n icon.parent = this;\r\n icon.interactionsEnabled = false;\r\n icon.shouldClone = false;\r\n this.iconPosition = this.iconPosition;\r\n this._disposers.push(icon);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Button.prototype, \"iconPosition\", {\r\n /**\r\n * @return Icon position\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"iconPosition\");\r\n },\r\n /**\r\n * Icon position: \"left\" or \"right\".\r\n *\r\n * @default \"left\"\r\n * @param position Icon position\r\n */\r\n set: function (position) {\r\n this.setPropertyValue(\"iconPosition\", position);\r\n if (this.icon) {\r\n if (position == \"left\") {\r\n this.icon.toBack();\r\n }\r\n else {\r\n this.icon.toFront();\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Button.prototype, \"label\", {\r\n /**\r\n * @return Label element\r\n */\r\n get: function () {\r\n return this._label;\r\n },\r\n /**\r\n * [[Label]] element to be used for text.\r\n *\r\n * @param label element\r\n */\r\n set: function (label) {\r\n if (this._label) {\r\n //this._label.dispose();\r\n this.removeDispose(this._label);\r\n }\r\n this._label = label;\r\n if (label) {\r\n label.parent = this;\r\n label.interactionsEnabled = false;\r\n this._disposers.push(this._label);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Creates a background element for the button.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Background element\r\n */\r\n Button.prototype.createBackground = function () {\r\n return new RoundedRectangle();\r\n };\r\n /**\r\n * Copies properties and other attributes.\r\n *\r\n * @param source Source\r\n */\r\n Button.prototype.copyFrom = function (source) {\r\n _super.prototype.copyFrom.call(this, source);\r\n if (source.label) {\r\n this.label.copyFrom(source.label);\r\n }\r\n if (source.icon) {\r\n this.icon = source.icon.clone();\r\n }\r\n };\r\n return Button;\r\n}(Container));\r\nexport { Button };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"Button\"] = Button;\r\n","/**\r\n * Functionality for drawing circles.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Sprite } from \"../Sprite\";\r\nimport { percent } from \"../utils/Percent\";\r\nimport { registry } from \"../Registry\";\r\nimport * as $utils from \"../utils/Utils\";\r\nimport * as $math from \"../utils/Math\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Used to create a circle\r\n * @see {@link ICircleEvents} for a list of available events\r\n * @see {@link ICircleAdapters} for a list of available Adapters\r\n */\r\nvar Circle = /** @class */ (function (_super) {\r\n __extends(Circle, _super);\r\n /**\r\n * Constructor\r\n */\r\n function Circle() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"Circle\";\r\n _this.element = _this.paper.add(\"circle\");\r\n _this.setPercentProperty(\"radius\", percent(100));\r\n _this.setPropertyValue(\"horizontalCenter\", \"middle\");\r\n _this.setPropertyValue(\"verticalCenter\", \"middle\");\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * Draws the circle.\r\n */\r\n Circle.prototype.draw = function () {\r\n _super.prototype.draw.call(this);\r\n this.element.attr({ \"r\": this.pixelRadius });\r\n };\r\n Object.defineProperty(Circle.prototype, \"radius\", {\r\n /**\r\n * @return Radius\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"radius\");\r\n },\r\n /**\r\n * Radius of the circle.\r\n *\r\n * Can be either absolute (pixels) or relative ([Percent]).\r\n *\r\n * @param value Radius\r\n */\r\n set: function (value) {\r\n this.setPercentProperty(\"radius\", value, true, false, 10, false);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Circle.prototype, \"pixelRadius\", {\r\n /**\r\n * Radius of the circle in pixels.\r\n *\r\n * This is a read-only property. To set radius in pixels, use `radius`\r\n * property.\r\n *\r\n * @readonly\r\n * @return Radius (px)\r\n */\r\n get: function () {\r\n return $utils.relativeToValue(this.radius, $math.min(this.innerWidth / 2, this.innerHeight / 2));\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Updates bounding box.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Circle.prototype.measureElement = function () {\r\n var pixelRadius = this.pixelRadius;\r\n this._bbox = {\r\n x: -pixelRadius,\r\n y: -pixelRadius,\r\n width: pixelRadius * 2,\r\n height: pixelRadius * 2\r\n };\r\n };\r\n return Circle;\r\n}(Sprite));\r\nexport { Circle };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"Circle\"] = Circle;\r\n","/**\r\n * Text class deals with all text placed on chart.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Container } from \"../Container\";\r\nimport { registry } from \"../Registry\";\r\nimport { getTextFormatter } from \"../formatters/TextFormatter\";\r\nimport { MultiDisposer } from \"../utils/Disposer\";\r\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\r\nimport * as $math from \"../utils/Math\";\r\nimport * as $utils from \"../utils/Utils\";\r\nimport * as $type from \"../utils/Type\";\r\nimport * as $dom from \"../utils/DOM\";\r\nimport { defaultRules, ResponsiveBreakpoints } from \"../utils/Responsive\";\r\nimport { options } from \"../Options\";\r\n;\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Text is used to display highly configurable, data-enabled textual elements.\r\n *\r\n * ## Data Binding\r\n *\r\n * A Text element can dynamically parse and populate its contents with values\r\n * from a [[DataItem]].\r\n *\r\n * To activate such binding, set element's `dataItem` property.\r\n *\r\n * When activated, text contents will be parsed for special tags, e.g.:\r\n *\r\n * ```TypeScript\r\n * label.dataItem = myDataItem;\r\n * label.text = \"The title is: {title}\";\r\n * ```\r\n * ```JavaScript\r\n * label.dataItem = myDataItem;\r\n * label.text = \"The title is: {title}\";\r\n * ```\r\n *\r\n * The above will automatically replace \"{title}\" in the string with the\r\n * actual data value from `myDataItem`.\r\n *\r\n * Note, that most often dataItem is set by the Component.\r\n *\r\n *\r\n * @see {@link ILabelEvents} for a list of available events\r\n * @see {@link ILabelAdapters} for a list of available Adapters\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/formatters/formatting-strings/} for info on string formatting and data binding\r\n * @todo Vertical align\r\n * @important\r\n */\r\nvar Label = /** @class */ (function (_super) {\r\n __extends(Label, _super);\r\n /**\r\n * Constructor\r\n */\r\n function Label() {\r\n var _this = \r\n // Execute super's constructor\r\n _super.call(this) || this;\r\n /**\r\n * Indicates if the whole text does not fit into max dimenstions set for it.\r\n */\r\n _this.isOversized = false;\r\n // Set this class name\r\n _this.className = \"Label\";\r\n _this.fill = new InterfaceColorSet().getFor(\"text\");\r\n // not good to set this, as then these will appear on each label and values set on container won't be applied.\r\n //this.textDecoration = \"none\";\r\n //this.fontWeight = \"normal\";\r\n // Set defaults\r\n _this.wrap = false;\r\n _this.truncate = false;\r\n _this.fullWords = true;\r\n _this.ellipsis = \"…\";\r\n _this.textAlign = \"start\";\r\n _this.textValign = \"top\";\r\n _this.layout = \"absolute\";\r\n _this.baseLineRatio = -0.27;\r\n //this.pixelPerfect = true;\r\n _this._positionPrecision = 1;\r\n // Add events to watch for maxWidth/maxHeight changes so that we can\r\n // invalidate this\r\n _this.events.on(\"maxsizechanged\", function () {\r\n if (_this.inited) {\r\n _this.handleMaxSize();\r\n }\r\n }, _this, false);\r\n // this solves strange bug when text just added to svg is 0x0\r\n _this.events.once(\"validated\", _this.handleValidate, _this, false);\r\n // Aply theme\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * A placeholder method that is called **after** element finishes drawing\r\n * itself.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Label.prototype.afterDraw = function () {\r\n // since we removed validatePosition from sprite, we still need it here to handle rotated text\r\n _super.prototype.afterDraw.call(this);\r\n this.validatePosition();\r\n };\r\n /**\r\n * Sets [[Paper]] instance to use to draw elements.\r\n * @ignore\r\n * @param paper Paper\r\n * @return true if paper was changed, false, if it's the same\r\n */\r\n Label.prototype.setPaper = function (paper) {\r\n var changed = _super.prototype.setPaper.call(this, paper);\r\n if (changed) {\r\n this.hardInvalidate();\r\n }\r\n return changed;\r\n };\r\n /**\r\n * @ignore\r\n */\r\n Label.prototype.handleValidate = function () {\r\n if ((this.currentText || this.text) && (this.bbox.width == 0 || this.bbox.height == 0)) {\r\n registry.events.once(\"exitframe\", this.hardInvalidate, this);\r\n }\r\n };\r\n /**\r\n * @ignore\r\n */\r\n Label.prototype.handleMaxSize = function () {\r\n if ((this.bbox.width > this.availableWidth)\r\n || ((this.bbox.width < this.availableWidth) && (this.isOversized || this.truncate))\r\n || (this.bbox.height > this.availableHeight)\r\n || ((this.bbox.height < this.availableHeight) && this.isOversized)) {\r\n this.invalidate();\r\n }\r\n else {\r\n //this.alignSVGText();\r\n }\r\n };\r\n /**\r\n * [arrange description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\r\n Label.prototype.arrange = function () {\r\n };\r\n /**\r\n * Updates current text according to data item and supported features.\r\n * Returns `true` if current text has changed.\r\n *\r\n * @return Text changed?\r\n */\r\n Label.prototype.updateCurrentText = function () {\r\n // Determine output format\r\n var output, text;\r\n if ($utils.isNotEmpty(this.html) && this.paper.supportsForeignObject()) {\r\n // We favor HTML text if it's set and browser supports `foreignObject`\r\n output = \"html\";\r\n text = this.html;\r\n }\r\n else {\r\n output = \"svg\";\r\n text = this.text;\r\n }\r\n // Need to toString source?\r\n if ($type.isObject(text)) {\r\n text = text.toString();\r\n }\r\n // Need to format text all the time\r\n if ($type.hasValue(text) && text !== \"\") {\r\n text = this.populateString(text, this.dataItem);\r\n }\r\n if (output == \"html\") {\r\n if (this._adapterO) {\r\n text = this._adapterO.apply(\"htmlOutput\", text);\r\n }\r\n }\r\n else {\r\n if (this._adapterO) {\r\n text = this._adapterO.apply(\"textOutput\", text);\r\n }\r\n }\r\n // Update the text\r\n var changed = text != this.currentText || output != this._currentFormat;\r\n this.currentText = text;\r\n this._currentFormat = output;\r\n return changed;\r\n };\r\n /**\r\n * Hard invalidate means the text will be redrawn even if it hasn't changed.\r\n * This is used when we change `fontSize`, `fontFamily`, or for some other\r\n * reasons.\r\n */\r\n Label.prototype.hardInvalidate = function () {\r\n this._prevStatus = \"\";\r\n this.invalidate();\r\n };\r\n /**\r\n * Gets line bbox, uses caching to save cpu\r\n * @ignore\r\n */\r\n Label.prototype.getLineBBox = function (lineInfo) {\r\n //let cacheKey = lineInfo.text + lineInfo.style;\r\n //let lineBBox = this.getCache(cacheKey);\r\n //if (!lineBBox) {\r\n //lineBBox = lineInfo.element.getBBox();\r\n //if (lineBBox.width != 0 && lineBBox.height != 0) {\r\n //\tthis.setCache(cacheKey, lineBBox, 5000);\r\n //}\r\n //}\r\n var element = lineInfo && lineInfo.element;\r\n var node = element && element.node;\r\n // Check for the parent Node to avoid FF from throwing errors\r\n if (node && node.parentNode) {\r\n lineInfo.bbox = element.getBBox();\r\n }\r\n };\r\n /**\r\n * Draws the textual label.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Label.prototype.draw = function () {\r\n // Draw super\r\n _super.prototype.draw.call(this);\r\n var oldW = this.bbox.width;\r\n var oldH = this.bbox.height;\r\n var topParent = this.topParent;\r\n if (topParent) {\r\n if (!topParent.maxWidth || !topParent.maxHeight) {\r\n topParent.events.once(\"maxsizechanged\", this.hardInvalidate, this, false);\r\n return;\r\n }\r\n }\r\n // Calculate max width and height\r\n var maxWidth = $math.max(this.availableWidth - this.pixelPaddingLeft - this.pixelPaddingRight, 0);\r\n var maxHeight = $math.max(this.availableHeight - this.pixelPaddingTop - this.pixelPaddingBottom, 0);\r\n // save\r\n var status = maxHeight + \",\" + maxWidth + this.wrap + this.truncate + this.fullWords + this.rtl + this.ellipsis;\r\n // Update text\r\n if (!this.updateCurrentText() && this.inited && this._prevStatus == status) {\r\n return;\r\n }\r\n this._measuredWidth = 0;\r\n this._measuredHeight = 0;\r\n // Reset\r\n this.isOversized = false;\r\n // Determine output format\r\n var output = this._currentFormat;\r\n var text = this.currentText;\r\n // Empty string\r\n if (!$type.hasValue(text) || text == \"\") {\r\n this.element.attr({ display: \"none\" });\r\n return;\r\n }\r\n // Chop up text into lines\r\n // We're still processing SVG and HTML in the same way for now\r\n var lines = text.split(\"\\n\");\r\n // Do we need to go through the trouble of measuring lines\r\n //let measure: boolean = true;// (lines.length > 1) || this.wrap;\r\n this._prevStatus = status;\r\n this.textAlign = this.textAlign;\r\n // need this to measure\r\n var display = this.group.getAttr(\"display\");\r\n if (display == \"none\") {\r\n this.group.removeAttr(\"display\");\r\n }\r\n if (this.textPathElement) {\r\n this.textPathElement.removeChildren();\r\n }\r\n // SVG or HTML?\r\n if (output === \"svg\") {\r\n /**\r\n * SVG\r\n */\r\n this.element.removeAttr(\"display\");\r\n // Clear the element\r\n var group = this.element;\r\n //group.removeChildren();\r\n this.resetBBox();\r\n // Init state variables\r\n var currentHeight = 0;\r\n var currentFormat = \"\";\r\n // Process each line\r\n for (var i = 0; i < lines.length; i++) {\r\n // Get line\r\n var line = lines[i];\r\n // Check if line is empty\r\n if (line == \"\") {\r\n // It is, let's just update currentHeight and go to the next one\r\n // If it's the first line, we'll have to use arbirary line height,\r\n // since there's nothing to measure. For subsequent lines we can take\r\n // previous line's height\r\n var tempElement = this.getSVGLineElement(\"\", 0);\r\n tempElement.add(this.getSvgElement(\".\", getTextFormatter().translateStyleShortcuts(currentFormat)));\r\n group.add(tempElement);\r\n var offset = Math.ceil(tempElement.getBBox().height);\r\n if (offset > 0) {\r\n currentHeight += offset;\r\n }\r\n group.removeElement(tempElement);\r\n // Clear cache if necessary\r\n var lineInfo_1 = this.getLineInfo(i);\r\n if (lineInfo_1) {\r\n lineInfo_1.text = \"\";\r\n lineInfo_1.element.textContent = \"\";\r\n }\r\n continue;\r\n }\r\n // Chunk up the line and process each chunk\r\n var chunks = getTextFormatter().chunk(line, null, this.ignoreFormatting);\r\n var currentLineHeight = 0;\r\n var firstChunk = true;\r\n var skipTextChunks = false;\r\n // Create line element or grab it from cache\r\n var lineInfo = this.getLineInfo(i);\r\n if (lineInfo) {\r\n // Empty line\r\n lineInfo.text = \"\";\r\n lineInfo.element.textContent = \"\";\r\n }\r\n else {\r\n // Init new line info\r\n lineInfo = {\r\n \"text\": \"\",\r\n \"element\": this.getSVGLineElement(\"\", 0),\r\n \"complex\": false\r\n };\r\n // Create the line element\r\n //lineInfo.element = this.getSVGLineElement(\"\", 0);\r\n //lineElement = this.getSVGLineElement(\"\", 0);\r\n group.add(lineInfo.element);\r\n }\r\n lineInfo.element.removeAttr(\"display\");\r\n lineInfo.element.removeChildren(); // memory leak without this\r\n if (this.textPathElement) {\r\n lineInfo.element.add(this.textPathElement);\r\n }\r\n /*// @todo not needed anymore\r\n if (this.rtl) {\r\n chunks.reverse();\r\n }*/\r\n // Process each chunk\r\n for (var x = 0; x < chunks.length; x++) {\r\n // If there's more than one chunk, means the line is \"complex\"\r\n if (x) {\r\n lineInfo.complex = true;\r\n }\r\n // Get chunk\r\n var chunk = chunks[x];\r\n // Is this chunk format or text?\r\n if (chunk.type === \"format\") {\r\n // Log current format, so that we can apply it to multiple lines if\r\n // necessary\r\n currentFormat = chunk.text;\r\n }\r\n else {\r\n // It's text block\r\n // Need to skip?\r\n // We do this when truncating. We can't just simply go ahead and\r\n // abandon chunk processing as they might have formatting\r\n // instructions in them that are relevant for subsequent lines\r\n if (skipTextChunks) {\r\n continue;\r\n }\r\n // Add chunk to the current element\r\n //lineInfo.element.content += $utils.trim(getTextFormatter().format(currentFormat + chunk.text, output));\r\n lineInfo.text = chunk.text;\r\n lineInfo.style = getTextFormatter().translateStyleShortcuts(currentFormat);\r\n if (this.textPathElement) {\r\n this.getSvgElement(lineInfo.text, lineInfo.style, this.textPathElement);\r\n }\r\n else {\r\n this.getSvgElement(lineInfo.text, lineInfo.style, lineInfo.element);\r\n }\r\n this.getLineBBox(lineInfo);\r\n lineInfo.bbox.width = Math.ceil(lineInfo.bbox.width);\r\n // Updated current line height\r\n if (currentLineHeight < lineInfo.bbox.height) {\r\n currentLineHeight = lineInfo.bbox.height;\r\n }\r\n // Wrapping?\r\n if ((this.wrap || this.truncate) && (lineInfo.bbox.width > maxWidth)) {\r\n // Set oversized\r\n this.isOversized = true;\r\n // Take temporary measurements\r\n var lineText = lineInfo.element.textContent;\r\n var avgCharWidth = (lineInfo.bbox.width / lineText.length); // * .9;\r\n // Calculate average number of symbols / width\r\n var excessChars = $math.min(Math.ceil((lineInfo.bbox.width - maxWidth) / avgCharWidth), lineText.length);\r\n // Are we truncating or auto-wrapping text?\r\n if (this.truncate) {\r\n /**\r\n * Processing line truncation\r\n * With the addition of each text chunk we measure if current\r\n * line does not exceed maxWidth. If it does, we will stop\r\n * addition of further chunks as well as try to truncate\r\n * current or any number of previous chunks with an added\r\n * ellipsis\r\n */\r\n // Indicator whether we need to add ellipsis to the current\r\n // element, even if it fits. This is needed to indicate\r\n // whether we have already removed some subsequent chunks in\r\n // which case we need to add ellipsis.\r\n var addEllipsis = false;\r\n // Process each child in the temporary line, until the whole\r\n // line fits, preferably with an ellipsis\r\n // TODO use iterator instead\r\n var node_1 = lineInfo.element.node;\r\n if (node_1 && node_1.childNodes) {\r\n for (var e = lineInfo.element.node.childNodes.length - 1; e >= 0; e--) {\r\n // Get current element\r\n var node_2 = lineInfo.element.node.childNodes[e];\r\n // Add ellipsis only if previous chunk was removed in full\r\n // and this chunk already fits\r\n //if (addEllipsis && (bbox.width <= maxWidth)) {\r\n if (addEllipsis && (lineInfo.bbox.width <= maxWidth)) {\r\n // Add ellipsis\r\n node_2.textContent += \" \" + this.ellipsis;\r\n // Measure again (we need to make sure ellipsis fits)\r\n lineInfo.bbox = lineInfo.element.getBBox();\r\n lineInfo.bbox.width = Math.floor(lineInfo.bbox.width);\r\n // If it fits, we're done here\r\n // If it doesn't we continue rolling\r\n if (lineInfo.bbox.width <= maxWidth) {\r\n break;\r\n }\r\n }\r\n addEllipsis = false;\r\n // Get element text\r\n var elementText = node_2.textContent;\r\n // Calculate average number of symbols / width\r\n lineText = lineInfo.element.textContent;\r\n excessChars = $math.min(Math.ceil((lineInfo.bbox.width - maxWidth) / avgCharWidth), lineText.length);\r\n // Do this until we fit\r\n while ((lineInfo.bbox.width > maxWidth) && (excessChars <= lineText.length) && (excessChars > 0)) {\r\n // Calculate max available chars\r\n var maxChars = $math.max(lineText.length - excessChars - this.ellipsis.length, 1);\r\n // Is there anything left?\r\n if (maxChars <= 1) {\r\n // Nope, let's jump to the previous item\r\n // Set excess characters to zero so that this loop does\r\n // not repeat when it over\r\n excessChars = 0;\r\n // Add ellipsis to previous item\r\n // Subsequent iterations will check if the ellipsis fits\r\n if (e > 0) {\r\n // Indicating to add ellipsis to previous item\r\n addEllipsis = true;\r\n // Removing this node\r\n lineInfo.element.node.removeChild(node_2);\r\n }\r\n }\r\n // Truncate the text\r\n elementText = $utils.truncateWithEllipsis(elementText, maxChars, this.ellipsis, this.fullWords, this.rtl);\r\n if ((elementText.length > maxChars) && this.fullWords) {\r\n // Still too long?\r\n // Let's try truncating breaking words anyway\r\n elementText = $utils.truncateWithEllipsis(elementText, maxChars, this.ellipsis, false, this.rtl);\r\n }\r\n // Set truncated text\r\n node_2.textContent = elementText;\r\n // Measure again\r\n lineInfo.bbox = lineInfo.element.getBBox();\r\n lineInfo.bbox.width = Math.floor(lineInfo.bbox.width);\r\n // Increase excess characters count, just in case it still\r\n // doesn't fit and we have to go at it again\r\n excessChars = Math.ceil(excessChars * 1.1);\r\n }\r\n // Do not process further chunks\r\n skipTextChunks = true;\r\n }\r\n }\r\n }\r\n else {\r\n /**\r\n * Processign auto-wrap\r\n * In this case we're going to be adding text chunks until\r\n * they don't fit into current line. Once that happens we will\r\n * inject the rest of the chunks to the next line\r\n */\r\n // Get last node added and measure it\r\n var node_3 = lineInfo.element.node;\r\n if (node_3) {\r\n var lastNode = lineInfo.element.node.lastChild;\r\n // Init split lines\r\n var splitLines = void 0;\r\n while ((lineInfo.bbox.width > maxWidth) && (excessChars <= lineText.length) && (excessChars > 0)) {\r\n // Calculate max available chars\r\n var maxChars = $math.max(chunk.text.length - excessChars, 1);\r\n // Don't split the words mid-word if it's not the first chunk\r\n // in the line\r\n if (firstChunk) {\r\n // Split mid-word if necessary\r\n splitLines = $utils.splitTextByCharCount(chunk.text, maxChars, true, this.rtl);\r\n }\r\n else {\r\n // Don't split mid-word\r\n splitLines = $utils.splitTextByCharCount(chunk.text, maxChars, true, this.rtl, false);\r\n // Check if the first word is too long\r\n if ((splitLines[0].length > maxChars) || maxChars === 1) {\r\n // Yes - move the whole chunk to the next line\r\n // Remove the element we just added\r\n lineInfo.element.node.removeChild(lastNode);\r\n // Break out of the while on next cycle\r\n excessChars = 0;\r\n }\r\n }\r\n // Use the first line to update last item\r\n if (excessChars > 0) {\r\n var lineText_1 = splitLines.shift();\r\n if (firstChunk) {\r\n lineText_1 = $utils.trim(lineText_1);\r\n }\r\n lastNode.textContent = getTextFormatter().cleanUp(lineText_1);\r\n }\r\n // Measure again, just in case\r\n lineInfo.bbox = lineInfo.element.getBBox();\r\n lineInfo.bbox.width = Math.floor(lineInfo.bbox.width);\r\n // Increase excess characters count, just in case it still\r\n // doesn't fit and we have to go at it again\r\n //excessChars = Math.ceil(excessChars * 1.05);\r\n excessChars++;\r\n }\r\n // Construct the rest of the line\r\n if (splitLines.length > 0) {\r\n var restOfLine = \"\";\r\n // Add leftovers from splitting the current chunk\r\n if ($type.hasValue(splitLines)) {\r\n if (this.rtl) {\r\n restOfLine += splitLines.join(\"\") + currentFormat;\r\n }\r\n else {\r\n restOfLine += currentFormat + splitLines.join(\"\").replace(/([\\[\\]]{1})/g, \"$1$1\");\r\n }\r\n }\r\n // Add the rest of the chunks\r\n for (var c = x + 1; c < chunks.length; c++) {\r\n if (chunks[c].type == \"value\") {\r\n // We're escaping single square brackets that were\r\n // cleaned up by chunk() back to double square brackets\r\n // so that they are not being treated as format on\r\n // next pass.\r\n restOfLine += chunks[c].text.replace(/([\\[\\]]{1})/g, \"$1$1\");\r\n }\r\n else {\r\n restOfLine += chunks[c].text;\r\n }\r\n }\r\n // Inject the rest of the lines as chunks for subsequent\r\n lines.splice(i + 1, 0, restOfLine);\r\n }\r\n // Skip processing the rest of the chunks\r\n skipTextChunks = true;\r\n }\r\n }\r\n }\r\n // Let's update the text's bbox with the line's one\r\n if (this.bbox.width < lineInfo.bbox.width) {\r\n this.bbox.width = lineInfo.bbox.width;\r\n }\r\n // commented to avoid bug (seen on sankey link) where text is incorrectly aligned\r\n //if (this.bbox.x > lineInfo.bbox.x) {\r\n //this.bbox.x = lineInfo.bbox.x;\r\n //}\r\n this.bbox.height = currentHeight + currentLineHeight;\r\n // Position current line\r\n if (!this.textPathElement) {\r\n lineInfo.element.attr({\r\n \"x\": \"0\",\r\n \"y\": currentHeight + currentLineHeight,\r\n \"dy\": $math.round((this.baseLineRatio * currentLineHeight), 3).toString()\r\n });\r\n }\r\n else {\r\n lineInfo.element.attr({\r\n \"dy\": -this.paddingBottom.toString()\r\n });\r\n }\r\n firstChunk = false;\r\n }\r\n }\r\n // Trim the last item\r\n var node = lineInfo.element.node;\r\n if (node) {\r\n var lastNode = node.lastChild;\r\n if (lastNode) {\r\n lastNode.textContent = this.rtl ?\r\n $utils.ltrim(lastNode.textContent) :\r\n $utils.rtrim(lastNode.textContent);\r\n }\r\n }\r\n // Increment collective height\r\n currentHeight += currentLineHeight;\r\n // Save line cache\r\n this.addLineInfo(lineInfo, i);\r\n }\r\n // Check if maybe we need to hide the whole label if it doesn't fit\r\n this.maybeHideOversized();\r\n this.measureFailed = false;\r\n if (this.bbox.width == 0 || this.bbox.height == 0) {\r\n this.measureFailed = true;\r\n }\r\n // Updated measured dims\r\n this._measuredWidth = $math.round($math.max(this.bbox.width, this.pixelWidth - this.pixelPaddingLeft - this.pixelPaddingRight));\r\n this._measuredHeight = $math.round($math.max(this.bbox.height, this.pixelHeight - this.pixelPaddingTop - this.pixelPaddingBottom));\r\n // Align the lines\r\n this.alignSVGText();\r\n this.bbox.width = this._measuredWidth;\r\n this.bbox.height = this._measuredHeight;\r\n if (oldH != this._measuredHeight || oldW != this._measuredWidth) {\r\n this.dispatch(\"transformed\");\r\n }\r\n this.hideUnused(lines.length);\r\n }\r\n else {\r\n /**\r\n * HTML\r\n */\r\n this.element.removeAttr(\"display\");\r\n this.resetBBox();\r\n // Clear the element\r\n var group = this.element;\r\n group.removeChildren();\r\n this.setCache(\"lineInfo\", [], 0);\r\n // Create a ForeignObject to use as HTML container\r\n var fo = this.paper.foreignObject();\r\n group.add(fo);\r\n // Set widths on foreignObject so that autosizing measurements work\r\n // This will bet reset to actual content width/height\r\n if (this.maxWidth) {\r\n fo.attr({\r\n width: this.maxWidth - this.pixelPaddingLeft - this.pixelPaddingRight\r\n });\r\n }\r\n if (this.maxHeight) {\r\n fo.attr({\r\n height: this.maxHeight - this.pixelPaddingTop - this.pixelPaddingBottom\r\n });\r\n }\r\n // Create line element\r\n //let lineElement: HTMLElement = this.getHTMLLineElement(getTextFormatter().format(this.html, output));\r\n var lineElement = this.getHTMLLineElement(text);\r\n fo.node.appendChild(lineElement);\r\n // Temporarily set to inline-block so we can measure real width and height\r\n lineElement.style.display = \"inline-block\";\r\n var clientWidth = lineElement.clientWidth;\r\n var clientHeight = lineElement.clientHeight;\r\n lineElement.style.display = \"block\";\r\n this._bbox = {\r\n x: 0,\r\n y: 0,\r\n width: clientWidth,\r\n height: clientHeight\r\n };\r\n // Set exact dimensions of foreignObject so it is sized exactly as\r\n // the content within (add one pixel to width so it does not wrap)\r\n fo.attr({\r\n width: clientWidth + 1,\r\n height: clientHeight\r\n });\r\n // Check if maybe we need to hide the whole label if it doesn't fit\r\n this.maybeHideOversized();\r\n // Set measurements and update bbox\r\n this._measuredWidth = $math.max(this.bbox.width, this.pixelWidth - this.pixelPaddingLeft - this.pixelPaddingRight);\r\n this._measuredHeight = $math.max(this.bbox.height, this.pixelHeight - this.pixelPaddingTop - this.pixelPaddingBottom);\r\n this.bbox.width = this._measuredWidth;\r\n this.bbox.height = this._measuredHeight;\r\n // Don't let labels bleed out of the alotted area\r\n if (this.truncate) {\r\n lineElement.style.overflow = \"hidden\";\r\n }\r\n if ((clientWidth > maxWidth) || (clientHeight > maxHeight)) {\r\n this.isOversized = true;\r\n }\r\n }\r\n // Set applicable styles\r\n this.setStyles();\r\n this.updateCenter();\r\n this.updateBackground();\r\n if (display == \"none\") {\r\n this.group.attr({ display: \"none\" });\r\n }\r\n if (this.pathElement) {\r\n this.paper.appendDef(this.pathElement);\r\n }\r\n };\r\n /**\r\n * Hides element if it does not fit into available space\r\n */\r\n Label.prototype.maybeHideOversized = function () {\r\n if (this.hideOversized) {\r\n if ((this.availableWidth < this.bbox.width) || (this.availableHeight < this.bbox.height)) {\r\n this.element.attr({ display: \"none\" });\r\n this.isOversized = true;\r\n }\r\n else {\r\n this.element.removeAttr(\"display\");\r\n this.isOversized = false;\r\n }\r\n }\r\n };\r\n /**\r\n * Aligns the lines horizontally and vertically, based on properties.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Label.prototype.alignSVGText = function () {\r\n // Get Group\r\n var group = this.element;\r\n var children = group.node.children || group.node.childNodes;\r\n // Is there anything to align?\r\n if (!children || (children && children.length == 0)) {\r\n return;\r\n }\r\n var width = this._measuredWidth;\r\n var height = this._measuredHeight;\r\n // TODO maybe these aren't needed ?\r\n $utils.used(this.pixelPaddingLeft);\r\n $utils.used(this.pixelPaddingRight);\r\n $utils.used(this.pixelPaddingTop);\r\n $utils.used(this.pixelPaddingBottom);\r\n if (this.rtl) {\r\n group.attr({\r\n \"direction\": \"rtl\"\r\n });\r\n }\r\n else {\r\n group.removeAttr(\"direction\");\r\n }\r\n // Process each line\r\n //$iter.each(group.children.backwards().iterator(), (element) => {\r\n for (var i = children.length - 1; i >= 0; i--) {\r\n // Align horizontally\r\n // Since we are using `text-anchor` for horizontal alignment, all we need\r\n // to do here is move the `x` position\r\n var node = children[i];\r\n node.setAttribute(\"text-anchor\", this.textAlign);\r\n if (this.textPathElement) {\r\n node.removeAttribute(\"x\");\r\n node.removeAttribute(\"y\");\r\n }\r\n else {\r\n switch (this.textAlign) {\r\n case \"middle\":\r\n node.setAttribute(\"x\", (width / 2).toString() + \"px\");\r\n break;\r\n case \"end\":\r\n if (this.rtl) {\r\n }\r\n else {\r\n node.setAttribute(\"x\", width.toString());\r\n }\r\n break;\r\n default:\r\n if (this.rtl) {\r\n node.setAttribute(\"x\", width.toString());\r\n }\r\n else {\r\n node.removeAttribute(\"text-anchor\");\r\n }\r\n break;\r\n }\r\n var y = $type.toNumber(node.getAttribute(\"y\"));\r\n switch (this.textValign) {\r\n case \"middle\":\r\n node.setAttribute(\"y\", ((y || 0) + (height - this.bbox.height) / 2).toString());\r\n break;\r\n case \"bottom\":\r\n node.setAttribute(\"y\", ((y || 0) + height - this.bbox.height).toString());\r\n break;\r\n default:\r\n node.setAttribute(\"y\", (y || 0).toString());\r\n break;\r\n }\r\n }\r\n }\r\n };\r\n /**\r\n * Produces an SVG line element with formatted text.\r\n *\r\n * @ignore Exclude from docs\r\n * @param text Text to wrap into line\r\n * @param y Current line vertical position\r\n * @return A DOM element\r\n * @todo Implement HTML support\r\n */\r\n Label.prototype.getSVGLineElement = function (text, y) {\r\n // Create a <text> node and set text\r\n var element = this.paper.addGroup(\"text\");\r\n element.textContent = text;\r\n // Set parameters\r\n element.attr({\r\n \"x\": \"0\"\r\n //\"alignment-baseline\": \"hanging\",\r\n //\"baseline-shift\": \"-20%\",\r\n //\"text-anchor\": \"center\"\r\n });\r\n // Set `y` position\r\n if ($type.hasValue(y)) {\r\n element.attr({\r\n \"y\": y.toString()\r\n });\r\n }\r\n // Don't let labels blled out of the alotted area\r\n if (this.truncate || this.wrap) {\r\n element.attr({ \"overflow\": \"hidden\" });\r\n }\r\n // Add RTL?\r\n // This has now been moved to this.alignSVGText()\r\n // if (this.rtl) {\r\n // \telement.attr({\r\n // \t\t\"direction\": \"rtl\",\r\n // \t\t//\"unicode-bidi\": \"bidi-override\"\r\n // \t});\r\n // }\r\n return element;\r\n };\r\n Object.defineProperty(Label.prototype, \"rtl\", {\r\n /**\r\n * @return RTL?\r\n */\r\n get: function () {\r\n if ($type.hasValue(this._rtl)) {\r\n return this._rtl;\r\n }\r\n else if (this._topParent) {\r\n return this._topParent.rtl;\r\n }\r\n return false;\r\n },\r\n /**\r\n * An RTL (right-to-left) setting.\r\n *\r\n * RTL may affect alignment, text, and other visual properties.\r\n *\r\n * If you set this on a top-level chart object, it will be used for all\r\n * child elements, e.g. labels, unless they have their own `rtl` setting\r\n * set directly on them.\r\n *\r\n * @param value `true` for to use RTL\r\n */\r\n set: function (value) {\r\n value = $type.toBoolean(value);\r\n this._rtl = value;\r\n if (this.element) {\r\n this.alignSVGText();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Resets cached BBox.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Label.prototype.resetBBox = function () {\r\n this._bbox = { x: 0, y: 0, width: 0, height: 0 };\r\n };\r\n /**\r\n * Creates and returns an HTML line element (`<div>`).\r\n *\r\n * @ignore Exclude from docs\r\n * @param text Text to add\r\n * @return `<div>` element reference\r\n */\r\n Label.prototype.getHTMLLineElement = function (text) {\r\n // Create the <div> element\r\n var div = document.createElement(\"div\");\r\n div.innerHTML = text;\r\n // Set text alignment\r\n switch (this.textAlign) {\r\n case \"middle\":\r\n div.style.textAlign = \"center\";\r\n break;\r\n case \"end\":\r\n div.style.textAlign = \"right\";\r\n break;\r\n }\r\n // Disable or enable wrapping\r\n if (this.wrap) {\r\n div.style.wordWrap = \"break-word\";\r\n }\r\n else {\r\n div.style.whiteSpace = \"nowrap\";\r\n }\r\n // Don't let labels bleed out of the alotted area\r\n // Moved to `draw()` because setting \"hidden\" kills all measuring\r\n /*if (this.truncate) {\r\n div.style.overflow = \"hidden\";\r\n }*/\r\n // Set RTL-related styles\r\n if (this.rtl) {\r\n div.style.direction = \"rtl\";\r\n //div.style.unicodeBidi = \"bidi-override\";\r\n }\r\n // Translate some of the SVG styles into CSS\r\n if ($type.hasValue(this.fill)) {\r\n div.style.color = this.fill.toString();\r\n }\r\n return div;\r\n };\r\n /**\r\n * Applies specific styles to text to make it not selectable, unless it is\r\n * explicitly set as `selectable`.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Set styles via AMElement\r\n */\r\n Label.prototype.setStyles = function () {\r\n var group = this.element;\r\n if (!this.selectable || this.draggable || this.resizable || this.swipeable) {\r\n group.addStyle({\r\n \"webkitUserSelect\": \"none\",\r\n \"msUserSelect\": \"none\"\r\n });\r\n }\r\n else if (this.selectable) {\r\n group.removeStyle(\"webkitUserSelect\");\r\n group.removeStyle(\"msUserSelect\");\r\n }\r\n };\r\n /**\r\n * Hides unused lines\r\n */\r\n Label.prototype.hideUnused = function (index) {\r\n this.initLineCache();\r\n var lines = this.getCache(\"lineInfo\");\r\n if (lines.length >= index) {\r\n for (var i = index; i < lines.length; i++) {\r\n var line = lines[i];\r\n if (line && line.element) {\r\n line.element.attr({ \"display\": \"none\" });\r\n }\r\n }\r\n }\r\n };\r\n Object.defineProperty(Label.prototype, \"text\", {\r\n /**\r\n * @return SVG text\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"text\");\r\n },\r\n /**\r\n * An SVG text.\r\n *\r\n * Please note that setting `html` will override this setting if browser\r\n * supports `foreignObject` in SGV, such as most modern browsers excluding\r\n * IEs.\r\n *\r\n * @param value SVG Text\r\n */\r\n set: function (value) {\r\n //this.setPropertyValue(\"html\", undefined);\r\n this.setPropertyValue(\"text\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Label.prototype, \"path\", {\r\n /**\r\n * @return Path\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"path\");\r\n },\r\n /**\r\n * An SVG path string to position text along. If set, the text will follow\r\n * the curvature of the path.\r\n *\r\n * Location along the path can be set using `locationOnPath`.\r\n *\r\n * IMPORTANT: Only SVG text can be put on path. If you are using HTML text\r\n * this setting will be ignored.\r\n *\r\n * @since 4.1.2\r\n * @param value Path\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"path\", value, true)) {\r\n if (this.pathElement) {\r\n this.pathElement.dispose();\r\n }\r\n if (this.textPathElement) {\r\n this.textPathElement.dispose();\r\n }\r\n this.pathElement = this.paper.add(\"path\");\r\n this.pathElement.attr({ \"d\": value });\r\n this.pathElement.attr({ \"id\": \"text-path-\" + this.uid });\r\n this._disposers.push(this.pathElement);\r\n this.textPathElement = this.paper.addGroup(\"textPath\");\r\n this.textPathElement.attrNS($dom.XLINK, \"xlink:href\", \"#text-path-\" + this.uid);\r\n // TODO remove after https://bugzilla.mozilla.org/show_bug.cgi?id=455986 is fixed\r\n this.textPathElement.attr({ \"path\": value });\r\n this._disposers.push(this.textPathElement);\r\n this.hardInvalidate();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Label.prototype, \"locationOnPath\", {\r\n /**\r\n * @return Relatvie location on path\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"locationOnPath\");\r\n },\r\n /**\r\n * Relative label location on `path`. Value range is from 0 (beginning)\r\n * to 1 (end).\r\n *\r\n * Works only if you set `path` setting to an SVG path.\r\n *\r\n * @since 4.1.2\r\n * @default 0\r\n * @param value Relatvie location on path\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"locationOnPath\", value);\r\n if (this.textPathElement) {\r\n this.textPathElement.attr({ \"startOffset\": (value * 100) + \"%\" });\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Label.prototype, \"baseLineRatio\", {\r\n /**\r\n * @return Base line ratio\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"baseLineRatio\");\r\n },\r\n /**\r\n * A ratio to calculate text baseline. Ralative distance from the bottom of\r\n * the label.\r\n *\r\n * @since 4.4.2\r\n * @default -0.27\r\n * @param value Base line ratio\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"baseLineRatio\", value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Label.prototype, \"wrap\", {\r\n /**\r\n * @return Auto-wrap enabled or not\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"wrap\");\r\n },\r\n /**\r\n * Enables or disables autowrapping of text.\r\n *\r\n * @param value Auto-wrapping enabled\r\n */\r\n set: function (value) {\r\n this.resetBBox();\r\n this.setPropertyValue(\"wrap\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Label.prototype, \"truncate\", {\r\n /**\r\n * @return Truncate text?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"truncate\");\r\n },\r\n /**\r\n * Indicates if text lines need to be truncated if they do not fit, using\r\n * configurable `ellipsis` string.\r\n *\r\n * `truncate` overrides `wrap` if both are set to `true`.\r\n *\r\n * NOTE: For HTML text, this setting **won't** trigger a parser and actual\r\n * line truncation with ellipsis. It will just hide everything that goes\r\n * outside the label.\r\n *\r\n * @param value trincate text?\r\n */\r\n set: function (value) {\r\n this.resetBBox();\r\n this.setPropertyValue(\"truncate\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Label.prototype, \"fullWords\", {\r\n /**\r\n * @return Truncate on full words?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"fullWords\");\r\n },\r\n /**\r\n * If `truncate` is enabled, should Label try to break only on full words\r\n * (`true`), or whenever needed, including middle of the word. (`false`)\r\n *\r\n * @default true\r\n * @param value Truncate on full words?\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"fullWords\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Label.prototype, \"ellipsis\", {\r\n /**\r\n * @return Ellipsis string\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"ellipsis\");\r\n },\r\n /**\r\n * Ellipsis character to use if `truncate` is enabled.\r\n *\r\n * @param value Ellipsis string\r\n * @default \"...\"\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"ellipsis\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Label.prototype, \"selectable\", {\r\n /**\r\n * @return Text selectable?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"selectable\");\r\n },\r\n /**\r\n * Forces the text to be selectable. This setting will be ignored if the\r\n * object has some kind of interaction attached to it, such as it is\r\n * `draggable`, `swipeable`, `resizable`.\r\n *\r\n * @param value Text selectable?\r\n * @default false\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"selectable\", value, true);\r\n this.setStyles();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Label.prototype, \"textAlign\", {\r\n /**\r\n * @return Alignment\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"textAlign\");\r\n },\r\n /**\r\n * Horizontal text alignment.\r\n *\r\n * Available choices:\r\n * * \"start\"\r\n * * \"middle\"\r\n * * \"end\"\r\n *\r\n * @param value Alignment\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"textAlign\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Label.prototype, \"textValign\", {\r\n /**\r\n * @ignore Exclude from docs (not used)\r\n * @return Alignment\r\n * @deprecated\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"textValign\");\r\n },\r\n /**\r\n * Vertical text alignment.\r\n *\r\n * @ignore Exclude from docs (not used)\r\n * @param value Alignment\r\n * @deprecated\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"textValign\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Label.prototype, \"html\", {\r\n /**\r\n * @return HTML content\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"html\");\r\n },\r\n /**\r\n * Raw HTML to be used as text.\r\n *\r\n * NOTE: HTML text is subject to browser support. It relies on browsers\r\n * supporting SVG `foreignObject` nodes. Some browsers (read IEs) do not\r\n * support it. On those browsers, the text will fall back to basic SVG text,\r\n * striping out all HTML markup and styling that goes with it.\r\n *\r\n * For more information about `foreignObject` and its browser compatibility\r\n * refer to [this page](https://developer.mozilla.org/en/docs/Web/SVG/Element/foreignObject#Browser_compatibility).\r\n *\r\n * @param value HTML text\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"html\", value, true);\r\n if (!$type.hasValue(value)) {\r\n var group = this.element;\r\n group.removeChildrenByTag(\"foreignObject\");\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Label.prototype.setFill = function (value) {\r\n _super.prototype.setFill.call(this, value);\r\n if (this.html) {\r\n var group = this.element;\r\n var divs = group.node.getElementsByTagName(\"div\");\r\n for (var i = 0; i < divs.length; i++) {\r\n var div = divs[i];\r\n if ($type.hasValue(this.fill)) {\r\n div.style.color = this.fill.toString();\r\n }\r\n }\r\n }\r\n };\r\n Object.defineProperty(Label.prototype, \"hideOversized\", {\r\n /**\r\n * @return Hide if text does not fit?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"hideOversized\");\r\n },\r\n /**\r\n * Indicates whether the whole text should be hidden if it does not fit into\r\n * its allotted space.\r\n *\r\n * @param value Hide if text does not fit?\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"hideOversized\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Label.prototype, \"ignoreFormatting\", {\r\n /**\r\n * @return Ignore formatting?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"ignoreFormatting\");\r\n },\r\n /**\r\n * If set to `true` square-bracket formatting blocks will be treated as\r\n * regular text.\r\n *\r\n * @default false\r\n * @param value Ignore formatting?\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"ignoreFormatting\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Override `mesaureElement` so it does not get measure again, because\r\n * internal `_bbox` is being updated by measuring routines in Text itself.\r\n */\r\n Label.prototype.measureElement = function () { };\r\n /**\r\n * Returns information about a line element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param index Line index\r\n * @return Line info object\r\n */\r\n Label.prototype.getLineInfo = function (index) {\r\n this.initLineCache();\r\n var lines = this.getCache(\"lineInfo\");\r\n return lines.length > index ? lines[index] : undefined;\r\n };\r\n /**\r\n * Adds a line to line info cache.\r\n *\r\n * @ignore Exclude from docs\r\n * @param line Line info object\r\n * @param index Insert at specified index\r\n */\r\n Label.prototype.addLineInfo = function (line, index) {\r\n this.initLineCache();\r\n this.getCache(\"lineInfo\")[index] = line;\r\n };\r\n /**\r\n * Checks if line cache is initialized and initializes it.\r\n */\r\n Label.prototype.initLineCache = function () {\r\n if (!$type.hasValue(this.getCache(\"lineInfo\"))) {\r\n this.setCache(\"lineInfo\", [], 0);\r\n }\r\n };\r\n /**\r\n * Sets a [[DataItem]] to use for populating dynamic sections of the text.\r\n *\r\n * Check the description for [[Text]] class, for data binding.\r\n *\r\n * @param dataItem Data item\r\n */\r\n Label.prototype.setDataItem = function (dataItem) {\r\n if (this._sourceDataItemEvents) {\r\n this._sourceDataItemEvents.dispose();\r\n }\r\n if (dataItem) {\r\n this._sourceDataItemEvents = new MultiDisposer([\r\n dataItem.events.on(\"valuechanged\", this.invalidate, this, false),\r\n dataItem.events.on(\"workingvaluechanged\", this.invalidate, this, false),\r\n dataItem.events.on(\"calculatedvaluechanged\", this.invalidate, this, false),\r\n dataItem.events.on(\"propertychanged\", this.invalidate, this, false)\r\n ]);\r\n }\r\n _super.prototype.setDataItem.call(this, dataItem);\r\n };\r\n Object.defineProperty(Label.prototype, \"availableWidth\", {\r\n /**\r\n * Returns available horizontal space.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Available width (px)\r\n */\r\n get: function () {\r\n return $type.hasValue(this.maxWidth) ? this.maxWidth : this.pixelWidth;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Label.prototype, \"availableHeight\", {\r\n /**\r\n * Returns available vertical space.\r\n *\r\n * @return Available height (px)\r\n */\r\n get: function () {\r\n return $type.hasValue(this.maxHeight) ? this.maxHeight : this.pixelHeight;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n // temp, replacing textFormatter method\r\n Label.prototype.getSvgElement = function (text, style, parent) {\r\n var element = this.paper.add(\"tspan\");\r\n element.textContent = text;\r\n if (style) {\r\n if (options.nonce && parent) {\r\n //element.node.setAttribute(\"nonce\", \"test123\");\r\n var classid = \"amcharts_element_style_\" + btoa(style).replace(/[^\\w]*/g, \"\");\r\n element.node.setAttribute(\"class\", classid);\r\n var defs = document.createElementNS($dom.SVGNS, \"defs\");\r\n parent.node.appendChild(defs);\r\n var e = document.createElement(\"style\");\r\n e.type = \"text/css\";\r\n e.innerHTML = \".\" + classid + \" { \" + style + \"}\";\r\n e.setAttribute(\"nonce\", options.nonce);\r\n defs.appendChild(e);\r\n }\r\n else {\r\n element.node.setAttribute(\"style\", style);\r\n }\r\n }\r\n if (parent) {\r\n parent.add(element);\r\n }\r\n return element;\r\n };\r\n /**\r\n * Invalidates the whole element, including layout AND all its child\r\n * elements.\r\n */\r\n Label.prototype.deepInvalidate = function () {\r\n _super.prototype.deepInvalidate.call(this);\r\n this.hardInvalidate();\r\n };\r\n Object.defineProperty(Label.prototype, \"readerTitle\", {\r\n /**\r\n * @return Title\r\n */\r\n get: function () {\r\n var title = this.getPropertyValue(\"readerTitle\");\r\n if (!title) {\r\n title = this.populateString($utils.plainText($utils.isNotEmpty(this.html)\r\n ? this.html\r\n : this.text));\r\n }\r\n else if (this.dataItem) {\r\n title = this.populateString(title);\r\n }\r\n return title;\r\n },\r\n /**\r\n * Screen reader title of the element.\r\n *\r\n * @param value Title\r\n */\r\n set: function (value) {\r\n value = $type.toText(value);\r\n if (this.setPropertyValue(\"readerTitle\", value)) {\r\n this.applyAccessibility();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return Label;\r\n}(Container));\r\nexport { Label };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"Label\"] = Label;\r\n/**\r\n * Add default responsive rules\r\n */\r\n/**\r\n * Hide labels added directly to chart, like titles if chart is short.\r\n */\r\ndefaultRules.push({\r\n relevant: ResponsiveBreakpoints.heightXS,\r\n state: function (target, stateId) {\r\n if (target instanceof Label && target.parent && target.parent.isBaseSprite) {\r\n var state = target.states.create(stateId);\r\n state.properties.disabled = true;\r\n return state;\r\n }\r\n return null;\r\n }\r\n});\r\n","/**\r\n * Line drawing functionality.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Sprite } from \"../Sprite\";\r\nimport { color } from \"../utils/Color\";\r\nimport { LinearGradient } from \"../rendering/fills/LinearGradient\";\r\nimport { registry } from \"../Registry\";\r\nimport * as $type from \"../utils/Type\";\r\nimport * as $math from \"../utils/Math\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Draws a line.\r\n *\r\n * @see {@link ILineEvents} for a list of available events\r\n * @see {@link ILineAdapters} for a list of available Adapters\r\n */\r\nvar Line = /** @class */ (function (_super) {\r\n __extends(Line, _super);\r\n /**\r\n * Constructor\r\n */\r\n function Line() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"Line\";\r\n _this.element = _this.paper.add(\"line\");\r\n _this.fill = color(); //\"none\";\r\n _this.x1 = 0;\r\n _this.y1 = 0;\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * Draws the line.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Line.prototype.draw = function () {\r\n _super.prototype.draw.call(this);\r\n if (this.x1 == this.x2 || this.y1 == this.y2) {\r\n this.pixelPerfect = true;\r\n }\r\n else {\r\n this.pixelPerfect = false;\r\n }\r\n this.x1 = this.x1;\r\n this.x2 = this.x2;\r\n this.y1 = this.y1;\r\n this.y2 = this.y2;\r\n };\r\n Object.defineProperty(Line.prototype, \"x1\", {\r\n /**\r\n * @return X\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"x1\");\r\n },\r\n /**\r\n * X coordinate of first end.\r\n *\r\n * @param value X\r\n */\r\n set: function (value) {\r\n if (!$type.isNumber(value)) {\r\n value = 0;\r\n }\r\n var delta = 0;\r\n if (this.pixelPerfect && this.stroke instanceof LinearGradient) {\r\n delta = 0.00001;\r\n }\r\n this.setPropertyValue(\"x1\", value, true);\r\n this.element.attr({ \"x1\": value + delta });\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Line.prototype, \"x2\", {\r\n /**\r\n * @return X\r\n */\r\n get: function () {\r\n var value = this.getPropertyValue(\"x2\");\r\n if (!$type.isNumber(value)) {\r\n value = this.pixelWidth;\r\n }\r\n return value;\r\n },\r\n /**\r\n * X coordinate of second end.\r\n *\r\n * @param value X\r\n */\r\n set: function (value) {\r\n if (!$type.isNumber(value)) {\r\n value = 0;\r\n }\r\n this.setPropertyValue(\"x2\", value, true);\r\n this.element.attr({ \"x2\": value });\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Line.prototype, \"y1\", {\r\n /**\r\n * @return Y\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"y1\");\r\n },\r\n /**\r\n * Y coordinate of first end.\r\n *\r\n * @param value Y\r\n */\r\n set: function (value) {\r\n if (!$type.isNumber(value)) {\r\n value = 0;\r\n }\r\n var delta = 0;\r\n if (this.pixelPerfect && this.stroke instanceof LinearGradient) {\r\n delta = 0.00001;\r\n }\r\n this.setPropertyValue(\"y1\", value, true);\r\n this.element.attr({ \"y1\": value + delta });\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Line.prototype, \"y2\", {\r\n /**\r\n * @return Y\r\n */\r\n get: function () {\r\n var value = this.getPropertyValue(\"y2\");\r\n if (!$type.isNumber(value)) {\r\n value = this.pixelHeight;\r\n }\r\n return value;\r\n },\r\n /**\r\n * Y coordinate of second end.\r\n *\r\n * @param value Y\r\n */\r\n set: function (value) {\r\n if (!$type.isNumber(value)) {\r\n value = 0;\r\n }\r\n this.setPropertyValue(\"y2\", value, true);\r\n this.element.attr({ \"y2\": value });\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Converts relative position along the line (0-1) into pixel coordinates.\r\n *\r\n * @param position Position (0-1)\r\n * @return Coordinates\r\n */\r\n Line.prototype.positionToPoint = function (position) {\r\n var point1 = { x: this.x1, y: this.y1 };\r\n var point2 = { x: this.x2, y: this.y2 };\r\n var point = $math.getMidPoint(point1, point2, position);\r\n var angle = $math.getAngle(point1, point2);\r\n return { x: point.x, y: point.y, angle: angle };\r\n };\r\n return Line;\r\n}(Sprite));\r\nexport { Line };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"Line\"] = Line;\r\n","/**\r\n * Modal class is used to display information over chart area.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Popup } from \"./Popup\";\r\nimport { Adapter } from \"../utils/Adapter\";\r\n/**\r\n * Shows an HTML modal which covers window or a chart area.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/popups-and-modals/} For examples and docs on Popups and Modals.\r\n */\r\nvar Modal = /** @class */ (function (_super) {\r\n __extends(Modal, _super);\r\n /**\r\n * Constructor\r\n */\r\n function Modal() {\r\n var _this = _super.call(this) || this;\r\n /**\r\n * Adapter.\r\n */\r\n _this.adapter = new Adapter(_this);\r\n _this.className = \"Modal\";\r\n _this.showCurtain = true;\r\n _this.draggable = false;\r\n return _this;\r\n }\r\n return Modal;\r\n}(Popup));\r\nexport { Modal };\r\n","/**\r\n * Pointed rectangle module.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { PointedShape } from \"./PointedShape\";\r\nimport * as $math from \"../utils/Math\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Draws a rectangle with a pointer.\r\n *\r\n * @see {@link IPointedRectangleEvents} for a list of available events\r\n * @see {@link IPointedRectangleAdapters} for a list of available Adapters\r\n */\r\nvar PointedRectangle = /** @class */ (function (_super) {\r\n __extends(PointedRectangle, _super);\r\n /**\r\n * Constructor\r\n */\r\n function PointedRectangle() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"PointedRectangle\";\r\n _this.element = _this.paper.add(\"path\");\r\n _this.cornerRadius = 6;\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * Draws the element.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n PointedRectangle.prototype.draw = function () {\r\n _super.prototype.draw.call(this);\r\n var cr = this.cornerRadius;\r\n var w = this.innerWidth;\r\n var h = this.innerHeight;\r\n if (w > 0 && h > 0) {\r\n var x = this.pointerX;\r\n var y = this.pointerY;\r\n var bwh = this.pointerBaseWidth / 2;\r\n var maxcr = $math.min(w / 2, h / 2);\r\n var crtl = $math.fitToRange(cr, 0, maxcr);\r\n var crtr = $math.fitToRange(cr, 0, maxcr);\r\n var crbr = $math.fitToRange(cr, 0, maxcr);\r\n var crbl = $math.fitToRange(cr, 0, maxcr);\r\n // corner coordinates\r\n // top left\r\n var xtl = 0;\r\n var ytl = 0;\r\n // top right\r\n var xtr = w;\r\n var ytr = 0;\r\n // bottom right\r\n var xbr = w;\r\n var ybr = h;\r\n // bottom left\r\n var xbl = 0;\r\n var ybl = h;\r\n var lineT = void 0;\r\n var lineR = void 0;\r\n var lineB = void 0;\r\n var lineL = void 0;\r\n // find stem base side: http://$math.stackexchange.com/questions/274712/calculate-on-which-side-of-straign-line-is-dot-located\r\n // d=(x−x1)(y2−y1)−(y−y1)(x2−x1)\r\n var d1 = (x - xtl) * (ybr - ytl) - (y - ytl) * (xbr - xtl);\r\n var d2 = (x - xbl) * (ytr - ybl) - (y - ybl) * (xtr - xbl);\r\n // top\r\n if (d1 > 0 && d2 > 0) {\r\n var stemX = $math.fitToRange(x, crtl + bwh, w - bwh - crtr);\r\n y = $math.fitToRange(y, -Infinity, 0);\r\n lineT = \"M\" + crtl + \",0 L\" + (stemX - bwh) + \",0 L\" + x + \",\" + y + \" L\" + (stemX + bwh) + \",0 L\" + (w - crtr) + \",0\";\r\n }\r\n else {\r\n lineT = \"M\" + crtl + \",0 L\" + (w - crtr) + \",0\";\r\n }\r\n // bottom\r\n if (d1 < 0 && d2 < 0) {\r\n var stemX = $math.fitToRange(x, crbl + bwh, w - bwh - crbr);\r\n y = $math.fitToRange(y, h, Infinity);\r\n lineB = \" L\" + (w - crbr) + \",\" + h + \" L\" + (stemX + bwh) + \",\" + h + \" L\" + x + \",\" + y + \" L\" + (stemX - bwh) + \",\" + h + \" L\" + crbl + \",\" + h;\r\n }\r\n else {\r\n lineB = \" L\" + crbl + \",\" + h;\r\n }\r\n // left\r\n if (d1 < 0 && d2 > 0) {\r\n var stemY = $math.fitToRange(y, crtl + bwh, h - crbl - bwh);\r\n x = $math.fitToRange(x, -Infinity, 0);\r\n lineL = \" L0,\" + (h - crbl) + \" L0,\" + (stemY + bwh) + \" L\" + x + \",\" + y + \" L0,\" + (stemY - bwh) + \" L0,\" + crtl;\r\n }\r\n else {\r\n lineL = \" L0,\" + crtl;\r\n }\r\n // right\r\n if (d1 > 0 && d2 < 0) {\r\n var stemY = $math.fitToRange(y, crtr + bwh, h - bwh - crbr);\r\n x = $math.fitToRange(x, w, Infinity);\r\n lineR = \" L\" + w + \",\" + crtr + \" L\" + w + \",\" + (stemY - bwh) + \" L\" + x + \",\" + y + \" L\" + w + \",\" + (stemY + bwh) + \" L\" + w + \",\" + (h - crbr);\r\n }\r\n else {\r\n lineR = \" L\" + w + \",\" + (h - crbr);\r\n }\r\n var arcTR = \" a\" + crtr + \",\" + crtr + \" 0 0 1 \" + crtr + \",\" + crtr;\r\n var arcBR = \" a\" + crbr + \",\" + crbr + \" 0 0 1 -\" + crbr + \",\" + crbr;\r\n var arcBL = \" a\" + crbl + \",\" + crbl + \" 0 0 1 -\" + crbl + \",-\" + crbl;\r\n var arcTL = \" a\" + crtl + \",\" + crtl + \" 0 0 1 \" + crtl + \",-\" + crtl;\r\n this.path = lineT + arcTR + lineR + arcBR + lineB + arcBL + lineL + arcTL;\r\n }\r\n };\r\n Object.defineProperty(PointedRectangle.prototype, \"cornerRadius\", {\r\n /**\r\n * @return Corner radius (px)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"cornerRadius\");\r\n },\r\n /**\r\n * Radius of rectangle's border in pixels.\r\n *\r\n * @default 0\r\n * @param value Corner radius (px)\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"cornerRadius\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return PointedRectangle;\r\n}(PointedShape));\r\nexport { PointedRectangle };\r\n","/**\r\n * Pointed shape module.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Sprite } from \"../Sprite\";\r\nimport * as $type from \"../utils/Type\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Draws a shape with a pointer.\r\n *\r\n * @see {@link IPointedShapeEvents} for a list of available events\r\n * @see {@link IPointedShapeAdapters} for a list of available Adapters\r\n */\r\nvar PointedShape = /** @class */ (function (_super) {\r\n __extends(PointedShape, _super);\r\n /**\r\n * Constructor\r\n */\r\n function PointedShape() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"PointedShape\";\r\n _this.pointerBaseWidth = 15;\r\n _this.pointerLength = 10;\r\n _this.pointerY = 0;\r\n _this.pointerX = 0;\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * Draws the element.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n PointedShape.prototype.draw = function () {\r\n _super.prototype.draw.call(this);\r\n if (!$type.isNumber(this.pointerX)) {\r\n this.pointerX = this.pixelWidth / 2;\r\n }\r\n if (!$type.isNumber(this.pointerY)) {\r\n this.pointerY = this.pixelHeight + 10;\r\n }\r\n };\r\n Object.defineProperty(PointedShape.prototype, \"pointerBaseWidth\", {\r\n /**\r\n * @return Width (px)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"pointerBaseWidth\");\r\n },\r\n /**\r\n * A width of the pinter's (stem's) thick end (base) in pixels.\r\n *\r\n * @default 15\r\n * @param value Width (px)\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"pointerBaseWidth\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(PointedShape.prototype, \"pointerLength\", {\r\n /**\r\n * @return Length (px)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"pointerLength\");\r\n },\r\n /**\r\n * A length of the pinter (stem) in pixels.\r\n *\r\n * @default 10\r\n * @param value Length (px)\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"pointerLength\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(PointedShape.prototype, \"pointerX\", {\r\n /**\r\n * @return X\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"pointerX\");\r\n },\r\n /**\r\n * X coordinate the shape is pointing to.\r\n *\r\n * @param value X\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"pointerX\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(PointedShape.prototype, \"pointerY\", {\r\n /**\r\n * @return Y\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"pointerY\");\r\n },\r\n /**\r\n * Y coordinate the shape is pointing to.\r\n *\r\n * @param value Y\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"pointerY\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return PointedShape;\r\n}(Sprite));\r\nexport { PointedShape };\r\n","/**\r\n * Module for a multi-part arched line.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Polyline } from \"./Polyline\";\r\nimport { registry } from \"../Registry\";\r\nimport * as $math from \"../../core/utils/Math\";\r\nimport * as $path from \"../../core/rendering/Path\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Draws a multi-part arched line.\r\n *\r\n * @see {@link IPolyarcEvents} for a list of available events\r\n * @see {@link IPolyarcAdapters} for a list of available Adapters\r\n */\r\nvar Polyarc = /** @class */ (function (_super) {\r\n __extends(Polyarc, _super);\r\n /**\r\n * Constructor\r\n */\r\n function Polyarc() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"Polyarc\";\r\n _this.controlPointDistance = 0.5;\r\n _this.controlPointPosition = 0.5;\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * Creats and adds an SVG path for the arc.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Polyarc.prototype.makePath = function () {\r\n this._distance = 0;\r\n var segments = this.segments;\r\n if (segments && segments.length > 0) {\r\n var path = \"\";\r\n this._realSegments = [];\r\n for (var i = 0, len = segments.length; i < len; i++) {\r\n var points = segments[i];\r\n var realPoints = [];\r\n this._realSegments.push(realPoints);\r\n if (points.length > 0) {\r\n path += $path.moveTo(points[0]);\r\n for (var p = 1; p < points.length; p++) {\r\n var pointA = points[p - 1];\r\n var pointB = points[p];\r\n var distanceAB = $math.getDistance(pointB, pointA);\r\n var cpDistance = distanceAB * this.controlPointDistance;\r\n var controlPointPosition = this.controlPointPosition;\r\n var angle = -$math.getAngle(pointA, pointB);\r\n var cpx = pointA.x + (pointB.x - pointA.x) * controlPointPosition * 0.5 - cpDistance * $math.sin(angle);\r\n var cpy = pointA.y + (pointB.y - pointA.y) * controlPointPosition * 0.5 - cpDistance * $math.cos(angle);\r\n var controlPoint1 = { x: cpx, y: cpy };\r\n var cpx2 = pointA.x + (pointB.x - pointA.x) * controlPointPosition * 1.5 - cpDistance * $math.sin(angle);\r\n var cpy2 = pointA.y + (pointB.y - pointA.y) * controlPointPosition * 1.5 - cpDistance * $math.cos(angle);\r\n var controlPoint2 = { x: cpx2, y: cpy2 };\r\n path += $path.cubicCurveTo(pointB, controlPoint1, controlPoint2);\r\n // we add a lot of points in order to get the position/angle later\r\n var stepCount = Math.ceil(distanceAB);\r\n var prevPoint = pointA;\r\n if (stepCount > 0) {\r\n for (var i_1 = 0; i_1 <= stepCount; i_1++) {\r\n var point = $math.getPointOnCubicCurve(pointA, pointB, controlPoint1, controlPoint2, i_1 / stepCount);\r\n realPoints.push(point);\r\n this._distance += $math.getDistance(prevPoint, point);\r\n prevPoint = point;\r\n }\r\n }\r\n else {\r\n realPoints.push(pointA);\r\n }\r\n }\r\n }\r\n }\r\n this.path = path;\r\n }\r\n };\r\n Object.defineProperty(Polyarc.prototype, \"controlPointPosition\", {\r\n /**\r\n * @return Position (0-1)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"controlPointPosition\");\r\n },\r\n /**\r\n * Relative position along the line the control point is. (0-1)\r\n *\r\n * @default 0.5\r\n * @param value Position (0-1)\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"controlPointPosition\", value);\r\n this.makePath();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Polyarc.prototype, \"controlPointDistance\", {\r\n /**\r\n * @return Distance (0-1)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"controlPointDistance\");\r\n },\r\n /**\r\n * Relative distance of the control point. (0-1)\r\n *\r\n * Default is half the length of the line. (0.5)\r\n *\r\n * @default 0.5\r\n * @param value Distance (0-1)\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"controlPointDistance\", value);\r\n this.makePath();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return Polyarc;\r\n}(Polyline));\r\nexport { Polyarc };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"Polyarc\"] = Polyarc;\r\n","/**\r\n * Polygon module.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Sprite } from \"../Sprite\";\r\nimport { Morpher } from \"../utils/Morpher\";\r\nimport { registry } from \"../Registry\";\r\nimport * as $path from \"../rendering/Path\";\r\nimport * as $type from \"../utils/Type\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Draws a polygon.\r\n *\r\n * @see {@link IPolygonEvents} for a list of available events\r\n * @see {@link IPolygonAdapters} for a list of available Adapters\r\n */\r\nvar Polygon = /** @class */ (function (_super) {\r\n __extends(Polygon, _super);\r\n /**\r\n * Constructor\r\n */\r\n function Polygon() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"Polygon\";\r\n _this.element = _this.paper.add(\"path\");\r\n _this.shapeRendering = \"auto\";\r\n _this._currentPoints = [];\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n Object.defineProperty(Polygon.prototype, \"points\", {\r\n /**\r\n * @return Polygon points\r\n */\r\n get: function () {\r\n var points = this.getPropertyValue(\"points\");\r\n var path = this.path;\r\n if (path && (!points || points.length == 0)) {\r\n var valueStr = path.slice(1, path.length - 1);\r\n var segments = valueStr.split(\"ZM\");\r\n for (var s = 0; s < segments.length; s++) {\r\n var segment = segments[s];\r\n if (segment.length > 0) {\r\n var areaHole = segment.split(\"M\");\r\n var areaArr = areaHole[0];\r\n var holeArr = areaHole[1];\r\n if (areaArr && areaArr.length > 0) {\r\n var pointsArr = areaArr.split(\"L\");\r\n if (pointsArr.length > 0) {\r\n var area = [];\r\n var areaAndHole = [area];\r\n points.push(areaAndHole);\r\n for (var p = 0; p < pointsArr.length; p++) {\r\n var coords = pointsArr[p].split(\",\");\r\n area.push({ x: +coords[0], y: +coords[1] });\r\n }\r\n if (holeArr && holeArr.length > 0) {\r\n var pointsArr_1 = holeArr.split(\"L\");\r\n if (pointsArr_1.length > 0) {\r\n var hole = [];\r\n areaAndHole.push(hole);\r\n for (var p = pointsArr_1.length - 1; p >= 0; p--) {\r\n var coords = pointsArr_1[p].split(\",\");\r\n hole.push({ x: +coords[0], y: +coords[1] });\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n this.setPropertyValue(\"points\", points);\r\n this._currentPoints = points;\r\n }\r\n return points;\r\n },\r\n /**\r\n * An array of X/Y coordinates for each elbow of the polygon.\r\n *\r\n * @todo Example\r\n * @param points Polygon points\r\n */\r\n set: function (points) {\r\n this.setPropertyValue(\"points\", points, true);\r\n this._currentPoints = points;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Polygon.prototype, \"currentPoints\", {\r\n /**\r\n * @return Polygon points\r\n */\r\n get: function () {\r\n if ((!this._currentPoints || this._currentPoints.length == 0) && this.path) {\r\n this._currentPoints = this.points;\r\n }\r\n return this._currentPoints;\r\n },\r\n /**\r\n * Current points. Used when morphing the element, so that original `points`\r\n * are not overwritten.\r\n *\r\n * @param points Polygon points\r\n */\r\n set: function (points) {\r\n if (this._currentPoints != points) {\r\n this._currentPoints = points;\r\n this.draw();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Draws the element.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Polygon.prototype.draw = function () {\r\n var path = \"\";\r\n var points = this._currentPoints;\r\n var left;\r\n var right;\r\n var top;\r\n var bottom;\r\n if (points.length > 0) {\r\n // separate areas\r\n for (var i = 0, len = points.length; i < len; i++) {\r\n // surface\r\n var surface = points[i][0];\r\n var hole = points[i][1];\r\n if (surface && surface.length > 0) {\r\n var point = surface[0];\r\n path += $path.moveTo(point);\r\n for (var s = 0; s < surface.length; s++) {\r\n point = surface[s];\r\n path += $path.lineTo(point);\r\n if (!$type.isNumber(right) || (right < point.x)) {\r\n right = point.x;\r\n }\r\n if (!$type.isNumber(left) || (left > point.x)) {\r\n left = point.x;\r\n }\r\n if (!$type.isNumber(top) || (top > point.y)) {\r\n top = point.y;\r\n }\r\n if (!$type.isNumber(bottom) || (bottom < point.y)) {\r\n bottom = point.y;\r\n }\r\n }\r\n }\r\n // hole\r\n if (hole && hole.length > 0) {\r\n var point = hole[0];\r\n path += $path.moveTo(point);\r\n for (var h = 0, hlen = hole.length; h < hlen; h++) {\r\n point = hole[h];\r\n path += $path.lineTo(point);\r\n }\r\n }\r\n }\r\n if (path) {\r\n path += $path.closePath();\r\n }\r\n this.bbox.x = left;\r\n this.bbox.y = top;\r\n this.bbox.width = right - left;\r\n this.bbox.height = bottom - top;\r\n _super.prototype.setPath.call(this, path);\r\n }\r\n };\r\n /**\r\n * @ignore\r\n */\r\n Polygon.prototype.setPath = function (value) {\r\n if (_super.prototype.setPath.call(this, value)) {\r\n this.points = [];\r\n this._bbox = this.group.getBBox();\r\n return true;\r\n }\r\n return false;\r\n };\r\n /**\r\n * Measures element\r\n */\r\n Polygon.prototype.measureElement = function () {\r\n // Overriding to avoid extra measurement.\r\n };\r\n Object.defineProperty(Polygon.prototype, \"centerPoint\", {\r\n /**\r\n * A calculated center point for the shape.\r\n *\r\n * @readonly\r\n * @return Center\r\n */\r\n get: function () {\r\n return { x: this.bbox.x + this.bbox.width / 2, y: this.bbox.y + this.bbox.height / 2 };\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Polygon.prototype, \"morpher\", {\r\n /**\r\n * A [[Morpher]] instance that is used to morph polygon into some other\r\n * shape.\r\n *\r\n * @readonly\r\n * @return Morpher instance\r\n */\r\n get: function () {\r\n if (!this._morpher) {\r\n this._morpher = new Morpher(this);\r\n this._disposers.push(this._morpher);\r\n }\r\n return this._morpher;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return Polygon;\r\n}(Sprite));\r\nexport { Polygon };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"Polygon\"] = Polygon;\r\n","/**\r\n * Polyline module\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Sprite } from \"../Sprite\";\r\nimport { color } from \"../utils/Color\";\r\nimport { registry } from \"../Registry\";\r\nimport * as $path from \"../rendering/Path\";\r\nimport * as $math from \"../utils/Math\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Draws a polyline.\r\n *\r\n * @see {@link IPolylineEvents} for a list of available events\r\n * @see {@link IPolylineAdapters} for a list of available Adapters\r\n */\r\nvar Polyline = /** @class */ (function (_super) {\r\n __extends(Polyline, _super);\r\n /**\r\n * Constructor\r\n */\r\n function Polyline() {\r\n var _this = _super.call(this) || this;\r\n /**\r\n * [_distance description]\r\n *\r\n * @todo Description\r\n */\r\n _this._distance = 0;\r\n _this.className = \"Polyline\";\r\n _this.element = _this.paper.add(\"path\");\r\n _this.shapeRendering = \"auto\";\r\n _this.fill = color();\r\n _this.strokeOpacity = 1;\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * Creats and adds an SVG path for the arc.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Polyline.prototype.makePath = function () {\r\n this._distance = 0;\r\n var segments = this.segments;\r\n if (segments && segments.length > 0) {\r\n var path = \"\";\r\n for (var i = 0, len = segments.length; i < len; i++) {\r\n var points = segments[i];\r\n if (points.length > 0) {\r\n path += $path.moveTo(points[0]);\r\n for (var p = 1; p < points.length; p++) {\r\n var point = points[p];\r\n path += $path.lineTo(point);\r\n this._distance += $math.getDistance(points[p - 1], point);\r\n }\r\n }\r\n }\r\n this.path = path;\r\n }\r\n this._realSegments = segments;\r\n };\r\n Object.defineProperty(Polyline.prototype, \"segments\", {\r\n /**\r\n * @return Segments\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"segments\");\r\n },\r\n /**\r\n * A list of segment coordinates for the multi-part line.\r\n *\r\n * @todo Example\r\n * @param segments Segments\r\n */\r\n set: function (segments) {\r\n this.setPropertyValue(\"segments\", segments);\r\n this.makePath();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Polyline.prototype, \"distance\", {\r\n /**\r\n * [distance description]\r\n *\r\n * @todo Description\r\n * @return [description]\r\n */\r\n get: function () {\r\n return this._distance;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Converts relative position along the line (0-1) into pixel coordinates.\r\n *\r\n * @param position Position (0-1)\r\n * @return Coordinates\r\n */\r\n Polyline.prototype.positionToPoint = function (position) {\r\n var deltaAngle = 0;\r\n if (position < 0) {\r\n position = Math.abs(position);\r\n deltaAngle = 180;\r\n }\r\n var segments = this._realSegments;\r\n if (segments) {\r\n var totalDistance = this.distance;\r\n var currentDistance = 0;\r\n var distanceAB = void 0;\r\n var positionA = 0;\r\n var positionB = 0;\r\n var pointA = void 0;\r\n var pointB = void 0;\r\n for (var s = 0; s < segments.length; s++) {\r\n var points = segments[s];\r\n if (points.length > 1) {\r\n for (var p = 1; p < points.length; p++) {\r\n pointA = points[p - 1];\r\n pointB = points[p];\r\n positionA = currentDistance / totalDistance;\r\n distanceAB = $math.getDistance(pointA, pointB);\r\n currentDistance += distanceAB;\r\n positionB = currentDistance / totalDistance;\r\n if (positionA <= position && positionB > position) {\r\n s = segments.length;\r\n break;\r\n }\r\n }\r\n }\r\n else if (points.length == 1) {\r\n pointA = points[0];\r\n pointB = points[0];\r\n positionA = 0;\r\n positionB = 1;\r\n }\r\n }\r\n if (pointA && pointB) {\r\n var positionAB = (position - positionA) / (positionB - positionA);\r\n var midPoint = $math.getMidPoint(pointA, pointB, positionAB);\r\n return { x: midPoint.x, y: midPoint.y, angle: deltaAngle + $math.getAngle(pointA, pointB) };\r\n }\r\n }\r\n return { x: 0, y: 0, angle: 0 };\r\n };\r\n Object.defineProperty(Polyline.prototype, \"realSegments\", {\r\n /**\r\n * @ignore\r\n */\r\n get: function () {\r\n return this._realSegments;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return Polyline;\r\n}(Sprite));\r\nexport { Polyline };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"Polyline\"] = Polyline;\r\n","/**\r\n * Polyspline (smoothed line) module.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Polyline } from \"./Polyline\";\r\nimport { registry } from \"../Registry\";\r\nimport * as $math from \"../../core/utils/Math\";\r\nimport * as $type from \"../../core/utils/Type\";\r\nimport * as $path from \"../../core/rendering/Path\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Draws a polysline. (smoothed multi-sigment line)\r\n *\r\n * @see {@link IPolysplineEvents} for a list of available events\r\n * @see {@link IPolysplineAdapters} for a list of available Adapters\r\n */\r\nvar Polyspline = /** @class */ (function (_super) {\r\n __extends(Polyspline, _super);\r\n /**\r\n * Constructor\r\n */\r\n function Polyspline() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"Polyspline\";\r\n _this.tensionX = 0.5;\r\n _this.tensionY = 0.5;\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * Creats and adds an SVG path for the arc.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Polyspline.prototype.makePath = function () {\r\n this._distance = 0;\r\n var segments = this.segments;\r\n var tensionX = this.tensionX;\r\n var tensionY = this.tensionY;\r\n this.allPoints = [];\r\n if (segments && segments.length > 0) {\r\n var path = \"\";\r\n this._realSegments = [];\r\n for (var i = 0, len = segments.length; i < len; i++) {\r\n var points = segments[i];\r\n var realPoints = [];\r\n this._realSegments.push(realPoints);\r\n if (points.length > 0) {\r\n var first = points[0];\r\n var last = points[points.length - 1];\r\n var closed_1 = false;\r\n if ($math.round(first.x, 3) == $math.round(last.x) && $math.round(first.y) == $math.round(last.y)) {\r\n closed_1 = true;\r\n }\r\n path += $path.moveTo(points[0]);\r\n for (var p = 0; p < points.length - 1; p++) {\r\n var p0 = points[p - 1];\r\n var p1 = points[p];\r\n var p2 = points[p + 1];\r\n var p3 = points[p + 2];\r\n if (p === 0) {\r\n p0 = points[p];\r\n }\r\n else if (p == points.length - 2) {\r\n p3 = points[p + 1];\r\n }\r\n if (!p3) {\r\n p3 = p2;\r\n }\r\n if (p === 0) {\r\n if (closed_1) {\r\n p0 = points[points.length - 2];\r\n }\r\n else {\r\n p0 = points[i];\r\n }\r\n }\r\n else if (p == points.length - 2) {\r\n if (closed_1) {\r\n p3 = points[1];\r\n }\r\n else {\r\n p3 = points[p + 1];\r\n }\r\n }\r\n var controlPointA = $math.getCubicControlPointA(p0, p1, p2, p3, tensionX, tensionY);\r\n var controlPointB = $math.getCubicControlPointB(p0, p1, p2, p3, tensionX, tensionY);\r\n path += $path.cubicCurveTo(p2, controlPointA, controlPointB);\r\n // now split to small segments so that we could have positionToPoint later\r\n var stepCount = Math.ceil($math.getCubicCurveDistance(p1, p2, controlPointA, controlPointB, 20)) * 1.2;\r\n var prevPoint = p1;\r\n if (stepCount > 0) {\r\n // not good for curved charts\r\n //this.allPoints[0] = { x: points[0].x, y: points[0].y, angle: $math.getAngle(points[0], points[1]) };\r\n //realPoints.push(this.allPoints[0]);\r\n for (var s = 0; s <= stepCount; s++) {\r\n var point = $math.getPointOnCubicCurve(p1, p2, controlPointA, controlPointB, s / stepCount);\r\n if (point.x == prevPoint.x && point.y == prevPoint.y) {\r\n continue;\r\n }\r\n realPoints.push(point);\r\n var angle = $math.round($math.getAngle(prevPoint, point), 5);\r\n //this.allPoints.push({ x: point.x, y: point.y, angle: angle });\r\n this._distance += $math.getDistance(prevPoint, point);\r\n this.allPoints[Math.floor(this._distance)] = { x: point.x, y: point.y, angle: angle };\r\n prevPoint = point;\r\n }\r\n }\r\n else {\r\n realPoints.push(p0);\r\n }\r\n }\r\n }\r\n var allPoints = this.allPoints;\r\n if (allPoints.length > 1) {\r\n for (var i_1 = 0; i_1 < allPoints.length; i_1++) {\r\n if (!allPoints[i_1]) {\r\n if (i_1 > 1) {\r\n allPoints[i_1] = allPoints[i_1 - 1];\r\n }\r\n else {\r\n for (var k = 1; k < allPoints.length; k++) {\r\n if (allPoints[k]) {\r\n allPoints[i_1] = allPoints[k];\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n this.path = path;\r\n }\r\n };\r\n /**\r\n * Returns an index of the point that is closest to specified coordinates.\r\n *\r\n * @param point Reference point\r\n * @return Index\r\n */\r\n Polyspline.prototype.getClosestPointIndex = function (point) {\r\n var points = this.allPoints;\r\n var index;\r\n var closest = Infinity;\r\n if (points.length > 1) {\r\n for (var p = 1; p < points.length; p++) {\r\n var distance = $math.getDistance(point, points[p]);\r\n if (distance < closest) {\r\n index = p;\r\n closest = distance;\r\n }\r\n }\r\n }\r\n return index;\r\n };\r\n Object.defineProperty(Polyspline.prototype, \"tensionX\", {\r\n /**\r\n * @return Tension\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"tensionX\");\r\n },\r\n /**\r\n * Horizontal tension for the spline.\r\n *\r\n * Used by the line smoothing algorithm.\r\n *\r\n * @default 0.5\r\n * @param value Tension\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"tensionX\", value);\r\n this.makePath();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Polyspline.prototype, \"tensionY\", {\r\n /**\r\n * @return Tension\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"tensionY\");\r\n },\r\n /**\r\n * Vertical tension for the spline.\r\n *\r\n * Used by the line smoothing algorithm.\r\n *\r\n * @default 0.5\r\n * @param value Tensions\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"tensionY\", value, true);\r\n this.makePath();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Converts relative position along the line (0-1) into pixel coordinates.\r\n *\r\n * @param position Position (0-1)\r\n * @return Coordinates\r\n */\r\n Polyspline.prototype.positionToPoint = function (position, extend) {\r\n var deltaAngle = 0;\r\n var allPoints = this.allPoints;\r\n var len = allPoints.length;\r\n if (!$type.isNumber(position)) {\r\n position = 0;\r\n }\r\n if (len > 1) {\r\n if (extend && len > 3) {\r\n if (position < 0) {\r\n if (position < -0.01) {\r\n position = -0.01;\r\n }\r\n var f0 = allPoints[0];\r\n var f1 = allPoints[1];\r\n var x = f0.x - (f0.x - f1.x) * len * position;\r\n var y = f0.y - (f0.y - f1.y) * len * position;\r\n return { x: x, y: y, angle: $math.getAngle(f0, f1) };\r\n }\r\n else if (position > 1) {\r\n if (position > 1.01) {\r\n position = 1.01;\r\n }\r\n var f0 = allPoints[allPoints.length - 2];\r\n var f1 = allPoints[allPoints.length - 3];\r\n var x = f0.x + (f0.x - f1.x) * len * (position - 1);\r\n var y = f0.y + (f0.y - f1.y) * len * (position - 1);\r\n return { x: x, y: y, angle: $math.getAngle(f0, { x: x, y: y }) };\r\n }\r\n else if (position == 1) {\r\n var point_1 = allPoints[allPoints.length - 1];\r\n return { x: point_1.x, y: point_1.y, angle: point_1.angle };\r\n }\r\n }\r\n else {\r\n if (position < 0) {\r\n position = Math.abs(position);\r\n deltaAngle = 180;\r\n }\r\n if (position >= 1) {\r\n position = 0.9999999999999;\r\n }\r\n }\r\n var point = allPoints[Math.floor(position * len)];\r\n return { x: point.x, y: point.y, angle: point.angle + deltaAngle };\r\n }\r\n else if (len == 1) {\r\n var point = allPoints[0];\r\n return { x: point.x, y: point.y, angle: point.angle };\r\n }\r\n else {\r\n return { x: 0, y: 0, angle: 0 };\r\n }\r\n };\r\n return Polyspline;\r\n}(Polyline));\r\nexport { Polyspline };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"Polyspline\"] = Polyspline;\r\n","import { StyleRule } from \"../utils/DOM\";\r\nimport { Dictionary } from \"../utils/Dictionary\";\r\nimport { MultiDisposer, CounterDisposer } from \"../utils/Disposer\";\r\nimport { InterfaceColorSet } from \"../utils/InterfaceColorSet\";\r\nvar rules = new Dictionary();\r\n/**\r\n * Default CSS for Popup.\r\n *\r\n * @ignore Exclude from docs\r\n * @param prefix Prefix for CSS classes\r\n * @return Disposer for the CSS definition\r\n */\r\nexport default function (element, prefix) {\r\n if (!prefix) {\r\n prefix = \"ampopup\";\r\n }\r\n var cs = new InterfaceColorSet();\r\n var fg = cs.getFor(\"text\");\r\n var bg = cs.getFor(\"background\");\r\n bg.alpha = 0.8;\r\n var abg = cs.getFor(\"alternativeBackground\");\r\n abg.alpha = 0.05;\r\n var counter = rules.insertKeyIfEmpty(prefix, function () {\r\n var disposer = new MultiDisposer([\r\n new StyleRule(element, \".\" + prefix, {\r\n //\"width\": \"100%\",\r\n //\"height\": \"100%\",\r\n \"overflow\": \"visible\",\r\n \"position\": \"absolute\",\r\n \"top\": \"0\",\r\n \"left\": \"0\",\r\n \"z-index\": \"2000\"\r\n }),\r\n new StyleRule(element, \".\" + prefix + \"-curtain\", {\r\n \"width\": \"100%\",\r\n \"height\": \"100%\",\r\n \"position\": \"absolute\",\r\n \"top\": \"0\",\r\n \"left\": \"0\",\r\n \"z-index\": \"2001\",\r\n \"background-color\": bg.hex,\r\n \"opacity\": \"0.5\"\r\n }),\r\n new StyleRule(element, \".\" + prefix + \"-header\", {\r\n \"display\": \"block\",\r\n \"width\": \"100%\",\r\n \"min-height\": \"1.8em\",\r\n \"background\": abg.rgba\r\n }),\r\n new StyleRule(element, \".\" + prefix + \"-title\", {\r\n \"font-weight\": \"bold\",\r\n \"font-size\": \"110%\",\r\n \"padding\": \"0.5em 1.2em 0.5em 1em\"\r\n }),\r\n new StyleRule(element, \".\" + prefix + \"-content\", {\r\n /*\"width\": \"100%\",\r\n \"height\": \"100%\",*/\r\n // \"padding\": \"2em 1em 1em 1em\",\r\n \"background\": bg.hex,\r\n \"background-color\": bg.rgba,\r\n \"color\": fg.hex,\r\n \"display\": \"inline-block\",\r\n \"position\": \"absolute\",\r\n \"top\": \"0\",\r\n \"left\": \"0\",\r\n \"max-width\": \"90%\",\r\n \"max-height\": \"90%\",\r\n \"overflow\": \"auto\",\r\n \"z-index\": \"2002\"\r\n }),\r\n new StyleRule(element, \".\" + prefix + \"-inside\", {\r\n \"padding\": \"1em\"\r\n }),\r\n new StyleRule(element, \".\" + prefix + \"-close\", {\r\n \"display\": \"block\",\r\n \"position\": \"absolute\",\r\n \"top\": \"0.3em\",\r\n \"right\": \"0.3em\",\r\n \"background-color\": \"rgb(100, 100, 100)\",\r\n \"background\": \"rgba(100, 100, 100, 0.1) url(data:image/svg+xml;charset=utf-8;base64,PHN2ZyBoZWlnaHQ9IjUxMiIgdmVyc2lvbj0iMSIgdmlld0JveD0iMCAwIDUxMiA1MTIiIHdpZHRoPSI1MTIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTQ0NS4yIDEwOS4ybC00Mi40LTQyLjRMMjU2IDIxMy42IDEwOS4yIDY2LjhsLTQyLjQgNDIuNEwyMTMuNiAyNTYgNjYuOCA0MDIuOGw0Mi40IDQyLjRMMjU2IDI5OC40bDE0Ni44IDE0Ni44IDQyLjQtNDIuNEwyOTguNCAyNTYiLz48L3N2Zz4=) no-repeat center\",\r\n \"background-size\": \"80%\",\r\n \"width\": \"1.2em\",\r\n \"height\": \"1.2em\",\r\n \"cursor\": \"pointer\"\r\n }),\r\n ]);\r\n return new CounterDisposer(function () {\r\n rules.removeKey(prefix);\r\n disposer.dispose();\r\n });\r\n });\r\n return counter.increment();\r\n}\r\n","/**\r\n * Popup class is used to display information over chart area.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport popupCSS from \"./PopupCSS\";\r\nimport { Adapter } from \"../utils/Adapter\";\r\nimport { BaseObjectEvents } from \"../Base\";\r\nimport { getInteraction } from \"../interaction/Interaction\";\r\nimport { keyboard } from \"../utils/Keyboard\";\r\nimport { MultiDisposer } from \"../utils/Disposer\";\r\nimport { getShadowRoot } from \"../utils/DOM\";\r\nimport * as $type from \"../utils/Type\";\r\nimport * as $object from \"../utils/Object\";\r\n/**\r\n * Shows an HTML popup which covers window or a chart area.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/popups-and-modals/} For examples and docs on Popups and Modals.\r\n * @todo Positioning over whole window\r\n */\r\nvar Popup = /** @class */ (function (_super) {\r\n __extends(Popup, _super);\r\n /**\r\n * Constructor\r\n */\r\n function Popup() {\r\n var _this = _super.call(this) || this;\r\n /**\r\n * Adapter.\r\n */\r\n _this.adapter = new Adapter(_this);\r\n /**\r\n * Holds references to various HTML elements, Popup consists of.\r\n */\r\n _this._elements = {};\r\n /**\r\n * Holdes Interaction objects for various Popup's elements.\r\n */\r\n _this._IOs = {};\r\n /**\r\n * Contents of popup window.\r\n */\r\n _this._content = \"\";\r\n /**\r\n * Title of the popup window.\r\n */\r\n _this._title = \"\";\r\n /**\r\n * Prefix to apply to class names for popup elements.\r\n */\r\n _this._classPrefix = \"ampopup\";\r\n /**\r\n * If set to `true` [[Popup]] will use default styles.\r\n */\r\n _this._defaultStyles = true;\r\n /**\r\n * If set to `true` [[Popup]] will dim out all chart content behind it by\r\n * showing a semi-transparent fill. (curtain)\r\n */\r\n _this._showCurtain = false;\r\n /**\r\n * Indicates whether popup can be dragged.\r\n */\r\n _this._draggable = true;\r\n /**\r\n * Horizontal position of the content window.\r\n */\r\n _this._align = \"center\";\r\n /**\r\n * Resize popup as images are being loaded.\r\n */\r\n _this._dynamicResize = true;\r\n /**\r\n * Vertical position of the content window.\r\n */\r\n _this._verticalAlign = \"middle\";\r\n /**\r\n * Shift in position of the element. (used for dragging)\r\n */\r\n _this._shift = {\r\n x: 0,\r\n y: 0\r\n };\r\n /**\r\n * Temporary shift in position of the element. (used for dragging)\r\n */\r\n _this._tempShift = {\r\n x: 0,\r\n y: 0\r\n };\r\n /**\r\n * A title for screen readers. It is very highly recommended to set that title\r\n * so that people using screen reader tools can get an immediate summary of\r\n * the information in the popup.\r\n */\r\n _this._readerTitle = \"\";\r\n /**\r\n * Is popup closable?\r\n */\r\n _this._closable = true;\r\n /**\r\n * Was CSS already loaded?\r\n */\r\n _this._cssLoaded = false;\r\n /**\r\n * If set to other than \"none\" will try to re-adjust the position of the\r\n * popop to fit within chart container or browser window.\r\n *\r\n * @ignore Feature not yet implemented\r\n * @todo Implement\r\n */\r\n _this._fitTo = \"window\";\r\n /**\r\n * Identifies if this object is a \"template\" and should not be treated as\r\n * real object that is drawn or actually used in the chart.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n _this.isTemplate = false;\r\n /**\r\n * Indicates if the element was already sized and should not be measured for\r\n * size again, saving some precious resources.\r\n */\r\n _this._sized = false;\r\n _this.className = \"Popup\";\r\n return _this;\r\n }\r\n /**\r\n * Shows popup window.\r\n */\r\n Popup.prototype.open = function () {\r\n if (this.container) {\r\n if (this._elements.wrapper) {\r\n this.container.appendChild(this._elements.wrapper);\r\n }\r\n if (this._elements.curtain) {\r\n this.container.appendChild(this._elements.curtain);\r\n this.showCurtain = this.showCurtain;\r\n }\r\n this.positionElement();\r\n this.dispatchImmediately(\"opened\");\r\n }\r\n };\r\n /**\r\n * Hides popup window.\r\n */\r\n Popup.prototype.close = function () {\r\n if (this._elements.wrapper) {\r\n if (this._elements.wrapper.parentElement) {\r\n this._elements.wrapper.parentElement.removeChild(this._elements.wrapper);\r\n }\r\n }\r\n if (this._elements.curtain) {\r\n if (this._elements.curtain.parentElement) {\r\n this._elements.curtain.parentElement.removeChild(this._elements.curtain);\r\n }\r\n }\r\n this.dispatchImmediately(\"closed\");\r\n this.releasePointers();\r\n };\r\n /**\r\n * Destroy (dispose) popup.\r\n */\r\n Popup.prototype.dispose = function () {\r\n this.close();\r\n _super.prototype.dispose.call(this);\r\n };\r\n /**\r\n * Positions content element in the center of popup based on its actual size.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Popup.prototype.positionElement = function (forceResize) {\r\n var _this = this;\r\n if (forceResize === void 0) { forceResize = true; }\r\n if (!this._elements.wrapper) {\r\n return;\r\n }\r\n setTimeout(function () {\r\n if (!_this._elements.wrapper) {\r\n return;\r\n }\r\n if (forceResize || !_this._sized) {\r\n _this._elements.wrapper.style.opacity = \"0.01\";\r\n _this._elements.wrapper.style.left = \"0\";\r\n _this._elements.wrapper.style.top = \"0\";\r\n _this._elements.wrapper.style.margin = \"0 0 0 0\";\r\n _this._elements.wrapper.style.width = \"\";\r\n _this._elements.wrapper.style.height = \"\";\r\n var bbox = _this._elements.wrapper.getBoundingClientRect();\r\n _this._elements.wrapper.style.width = bbox.width + \"px\";\r\n _this._elements.wrapper.style.height = bbox.height + \"px\";\r\n _this._sized = true;\r\n }\r\n // Check for any images that are not yet loaded\r\n if (_this.dynamicResize) {\r\n var images = _this._elements.wrapper.getElementsByTagName(\"img\");\r\n for (var i = 0; i < images.length; i++) {\r\n var image = images[i];\r\n if (!image.complete) {\r\n // Resize popup once again when image is loaded\r\n image.addEventListener(\"load\", function () {\r\n _this.positionElement(true);\r\n });\r\n // Do this for one image only as it will be checked again next time\r\n // anyway\r\n break;\r\n }\r\n }\r\n }\r\n setTimeout(function () {\r\n if (!_this._elements.wrapper) {\r\n return;\r\n }\r\n var bbox;\r\n if ((forceResize || !_this._sized) && _this._bbox) {\r\n bbox = _this._bbox;\r\n }\r\n else {\r\n bbox = _this._elements.wrapper.getBoundingClientRect();\r\n _this._elements.wrapper.style.opacity = \"\";\r\n }\r\n // Set horizontal positioning\r\n switch (_this.align) {\r\n case \"left\":\r\n _this._elements.wrapper.style.left = \"0\";\r\n _this._elements.wrapper.style.right = \"auto\";\r\n _this._elements.wrapper.style.marginLeft = _this.toStyle(_this._shift.x + _this._tempShift.x);\r\n break;\r\n case \"center\":\r\n _this._elements.wrapper.style.left = \"50%\";\r\n _this._elements.wrapper.style.right = \"auto\";\r\n _this._elements.wrapper.style.marginLeft = _this.toStyle(Math.round(-bbox.width / 2) + (_this._shift.x + _this._tempShift.x));\r\n break;\r\n case \"right\":\r\n _this._elements.wrapper.style.left = \"auto\";\r\n _this._elements.wrapper.style.right = \"0\";\r\n _this._elements.wrapper.style.marginLeft = _this.toStyle(_this._shift.x + _this._tempShift.x);\r\n break;\r\n default:\r\n _this._elements.wrapper.style.left = _this.toStyle(_this.left) || \"auto\";\r\n _this._elements.wrapper.style.right = _this.toStyle(_this.right) || \"auto\";\r\n _this._elements.wrapper.style.marginLeft = _this.toStyle(_this._shift.x + _this._tempShift.x);\r\n break;\r\n }\r\n // Set vertical positioning\r\n switch (_this.verticalAlign) {\r\n case \"top\":\r\n _this._elements.wrapper.style.top = \"0\";\r\n _this._elements.wrapper.style.bottom = \"auto\";\r\n _this._elements.wrapper.style.marginTop = _this.toStyle(_this._shift.y + _this._tempShift.y);\r\n break;\r\n case \"middle\":\r\n _this._elements.wrapper.style.top = \"50%\";\r\n _this._elements.wrapper.style.bottom = \"auto\";\r\n _this._elements.wrapper.style.marginTop = _this.toStyle(Math.round(-bbox.height / 2) + (_this._shift.y + _this._tempShift.y));\r\n break;\r\n case \"bottom\":\r\n _this._elements.wrapper.style.top = \"auto\";\r\n _this._elements.wrapper.style.bottom = \"0\";\r\n _this._elements.wrapper.style.marginTop = _this.toStyle(_this._shift.y + _this._tempShift.y);\r\n break;\r\n default:\r\n _this._elements.wrapper.style.top = _this.toStyle(_this.top) || \"auto\";\r\n _this._elements.wrapper.style.bottom = _this.toStyle(_this.bottom) || \"auto\";\r\n _this._elements.wrapper.style.marginTop = _this.toStyle(_this._shift.y + _this._tempShift.y);\r\n break;\r\n }\r\n }, 1);\r\n }, 1);\r\n };\r\n Popup.prototype.setupDragging = function () {\r\n var _this = this;\r\n if (this.draggable) {\r\n if (!this._IOs.header.events.has(\"drag\")) {\r\n this._IOs.header.events.on(\"drag\", function (ev) {\r\n _this._tempShift.x = ev.shift.x;\r\n _this._tempShift.y = ev.shift.y;\r\n _this.positionElement(false);\r\n });\r\n }\r\n if (!this._IOs.header.events.has(\"dragstop\")) {\r\n this._IOs.header.events.on(\"dragstop\", function (ev) {\r\n _this._shift.x += _this._tempShift.x;\r\n _this._shift.y += _this._tempShift.y;\r\n _this._tempShift.x = 0;\r\n _this._tempShift.y = 0;\r\n _this.positionElement(false);\r\n });\r\n }\r\n }\r\n else {\r\n if (this._IOs.header) {\r\n getInteraction().unprepElement(this._IOs.header);\r\n if (this._IOs.header.events.has(\"drag\")) {\r\n this._IOs.header.events.off(\"drag\");\r\n }\r\n if (this._IOs.header.events.has(\"dragstop\")) {\r\n this._IOs.header.events.off(\"dragstop\");\r\n }\r\n }\r\n }\r\n };\r\n Popup.prototype.toStyle = function (value) {\r\n if (!$type.hasValue(value)) {\r\n return null;\r\n }\r\n else if ($type.isNumber(value)) {\r\n return \"\" + value + \"px\";\r\n }\r\n else {\r\n return value.toString();\r\n }\r\n };\r\n Object.defineProperty(Popup.prototype, \"classPrefix\", {\r\n /**\r\n * A prefix that is applied to class names of various popup elements.\r\n *\r\n * @return Class name prefix\r\n */\r\n get: function () {\r\n return this.adapter.apply(\"classPrefix\", this._classPrefix);\r\n },\r\n /**\r\n * @param value Class name prefix\r\n */\r\n set: function (value) {\r\n this._classPrefix = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Popup.prototype, \"classPrefixRaw\", {\r\n /**\r\n * Returns raw prefix (without adapters applied).\r\n *\r\n * @ignore Exclude from docs\r\n * @return Class name prefix\r\n */\r\n get: function () {\r\n return this._classPrefix;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Popup.prototype, \"content\", {\r\n /**\r\n * @return Popup content\r\n */\r\n get: function () {\r\n return this.adapter.apply(\"content\", this._content);\r\n },\r\n /**\r\n * Popup content.\r\n *\r\n * Popup content can be any valid HTML, including CSS.\r\n *\r\n * @param value Popup content\r\n */\r\n set: function (value) {\r\n if (this._content != value) {\r\n this._content = value;\r\n if (!this._elements.content) {\r\n this.createContentElement();\r\n }\r\n this._elements.content.innerHTML = value;\r\n this.positionElement();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Popup.prototype.getClassNames = function () {\r\n return this.adapter.apply(\"classNames\", {\r\n wrapperClass: this.classPrefix + \"\",\r\n headerClass: this.classPrefix + \"-header\",\r\n titleClass: this.classPrefix + \"-title\",\r\n contentClass: this.classPrefix + \"-content\",\r\n insideClass: this.classPrefix + \"-inside\",\r\n curtainClass: this.classPrefix + \"-curtain\",\r\n closeClass: this.classPrefix + \"-close\"\r\n });\r\n };\r\n /**\r\n * Creates content element.\r\n */\r\n Popup.prototype.createContentElement = function () {\r\n // Check if it's created already\r\n if (this._elements.wrapper) {\r\n return;\r\n }\r\n // Get class names for popup elements\r\n var classNames = this.getClassNames();\r\n // Create content element\r\n var wrapper = document.createElement(\"div\");\r\n wrapper.className = classNames.contentClass;\r\n wrapper.style.opacity = \"0.01\";\r\n // Create close button\r\n var close = document.createElement(\"a\");\r\n close.className = classNames.closeClass;\r\n // header title\r\n var header = document.createElement(\"div\");\r\n header.className = classNames.headerClass;\r\n // Content title\r\n var title = document.createElement(\"div\");\r\n title.innerHTML = this.title;\r\n title.className = classNames.titleClass;\r\n if (!this.title) {\r\n title.style.display = \"none\";\r\n }\r\n // Content div\r\n var content = document.createElement(\"div\");\r\n content.className = classNames.insideClass;\r\n content.innerHTML = this.content;\r\n // Set up events for content\r\n this._IOs.wrapper = getInteraction().getInteraction(wrapper);\r\n this._IOs.header = getInteraction().getInteraction(header);\r\n this._disposers.push(this._IOs.wrapper);\r\n // Set hover/out events\r\n this._IOs.wrapper.events.on(\"over\", this.disablePointers, this);\r\n this._IOs.wrapper.events.on(\"out\", this.releasePointers, this);\r\n // Create an InteractionObject for close\r\n this._IOs.close = getInteraction().getInteraction(close);\r\n this._disposers.push(this._IOs.close);\r\n // Hide close for now\r\n close.style.visibility = \"hidden\";\r\n // Add accessible stuff\r\n wrapper.setAttribute(\"role\", \"dialog\");\r\n // Add to wrapper\r\n header.appendChild(close);\r\n header.appendChild(title);\r\n wrapper.appendChild(header);\r\n wrapper.appendChild(content);\r\n this.container.appendChild(wrapper);\r\n // Save for later access\r\n this._elements.wrapper = wrapper;\r\n this._elements.header = header;\r\n this._elements.content = content;\r\n this._elements.title = title;\r\n this._elements.close = close;\r\n // Load CSS\r\n if (this.defaultStyles) {\r\n this.loadDefaultCSS();\r\n }\r\n // Create curtain as well\r\n this.createCurtainElement();\r\n // Apply events\r\n this.applyEvents();\r\n this.applyReaderSettings();\r\n // Draggable?\r\n this.setupDragging();\r\n };\r\n Object.defineProperty(Popup.prototype, \"title\", {\r\n /**\r\n * @return Popup title\r\n */\r\n get: function () {\r\n return this.adapter.apply(\"title\", this._title);\r\n },\r\n /**\r\n * Popup title.\r\n *\r\n * Popup title can be any valid HTML, including CSS.\r\n *\r\n * @param value Popup title\r\n */\r\n set: function (value) {\r\n if (this._title != value) {\r\n this._title = value;\r\n if (!this._elements.content) {\r\n this.createContentElement();\r\n }\r\n this._elements.title.innerHTML = value;\r\n this.positionElement();\r\n this.applyReaderSettings();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Popup.prototype, \"readerTitle\", {\r\n /**\r\n * @return Popup content\r\n */\r\n get: function () {\r\n return this.adapter.apply(\"readerTitle\", this._readerTitle != \"\" ? this._readerTitle : this.title);\r\n },\r\n /**\r\n * A title for screen readers. It is very highly recommended to set that title\r\n * so that people using screen reader tools can get an immediate summary of\r\n * the information in the popup.\r\n *\r\n * @param value Reader title\r\n */\r\n set: function (value) {\r\n if (this._readerTitle != value) {\r\n this._readerTitle = value;\r\n this.applyReaderSettings();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Popup.prototype, \"closable\", {\r\n /**\r\n * @return Closable?\r\n */\r\n get: function () {\r\n return this.adapter.apply(\"closable\", this._closable);\r\n },\r\n /**\r\n * Is popup closable?\r\n *\r\n * If it is, it can be closed in a number of ways, e.g. by hitting ESC key,\r\n * clicking curtain, or clicking the close button.\r\n *\r\n * If it is not closable, the only way to close it is via `close()` call.\r\n *\r\n * @param value Closable?\r\n */\r\n set: function (value) {\r\n if (value !== this._closable) {\r\n this._closable = value;\r\n this.applyEvents();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Popup.prototype, \"fitTo\", {\r\n /**\r\n * @ignore\r\n * @todo Implement\r\n * @return Fit option\r\n */\r\n get: function () {\r\n return this.adapter.apply(\"fitTo\", this._fitTo);\r\n },\r\n /**\r\n * If set to other than \"none\" will try to re-adjust the position of the\r\n * popop to fit within chart container or browser window.\r\n *\r\n * @ignore\r\n * @todo Implement\r\n * @default \"window\"\r\n * @param value Fit option\r\n */\r\n set: function (value) {\r\n if (value != this._fitTo) {\r\n this._fitTo = value;\r\n this.positionElement();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Popup.prototype, \"defaultStyles\", {\r\n /**\r\n * @return Use default CSS?\r\n */\r\n get: function () {\r\n return this.adapter.apply(\"defaultStyles\", this._defaultStyles);\r\n },\r\n /**\r\n * Should popup use default CSS?\r\n *\r\n * If default CSS is disabled, an external CSS should handle the look of the\r\n * popup, since it will look quite out of place otherwise.\r\n *\r\n * @default true\r\n * @param Use default CSS?\r\n */\r\n set: function (value) {\r\n if (this._defaultStyles != value) {\r\n this._defaultStyles = value;\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Popup.prototype, \"showCurtain\", {\r\n /**\r\n * @return Show curtain?\r\n */\r\n get: function () {\r\n return this.adapter.apply(\"showCurtain\", this._showCurtain);\r\n },\r\n /**\r\n * Should popup use dim out all content behind it?\r\n *\r\n * @default false\r\n * @param Show curtain?\r\n */\r\n set: function (value) {\r\n if (this._showCurtain != value) {\r\n this._showCurtain = value;\r\n if (this._elements.curtain) {\r\n this._elements.curtain.style.display = value ? \"block\" : \"none\";\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Creates curtain element.\r\n */\r\n Popup.prototype.createCurtainElement = function () {\r\n // Get class names for popup elements\r\n var classNames = this.getClassNames();\r\n // Create the curtain\r\n var curtain = document.createElement(\"div\");\r\n curtain.className = classNames.curtainClass;\r\n // Append curtain to wrapper\r\n this.container.appendChild(curtain);\r\n // Create an InteractionObject for curtain because we might need to\r\n // set interactions on it\r\n this._IOs.curtain = getInteraction().getInteraction(curtain);\r\n // Add Curtain IO to disposers\r\n this._disposers.push(this._IOs.curtain);\r\n // Set events to disable underlying interactivity\r\n this._IOs.curtain.events.on(\"over\", this.disablePointers, this);\r\n this._IOs.curtain.events.on(\"out\", this.releasePointers, this);\r\n // Hide it?\r\n curtain.style.display = this.showCurtain ? \"block\" : \"none\";\r\n // Save for later\r\n this._elements.curtain = curtain;\r\n };\r\n Object.defineProperty(Popup.prototype, \"draggable\", {\r\n /**\r\n * @return Show curtain?\r\n */\r\n get: function () {\r\n return this.adapter.apply(\"draggable\", this._draggable);\r\n },\r\n /**\r\n * Can the popup be dragged with a pointer?\r\n *\r\n * @default false\r\n * @param Show curtain?\r\n */\r\n set: function (value) {\r\n if (this._draggable != value) {\r\n this._draggable = value;\r\n this.setupDragging();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Popup.prototype, \"dynamicResize\", {\r\n /**\r\n * @return Resize dynamically?\r\n */\r\n get: function () {\r\n return this.adapter.apply(\"dynamicResize\", this._dynamicResize);\r\n },\r\n /**\r\n * Resize popup as images are being loaded.\r\n *\r\n * @default true\r\n * @since 4.9.17\r\n * @param Resize dynamically?\r\n */\r\n set: function (value) {\r\n if (this._dynamicResize != value) {\r\n this._dynamicResize = value;\r\n this.positionElement(true);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Popup.prototype, \"align\", {\r\n /**\r\n * @return Horizontal position\r\n */\r\n get: function () {\r\n return this.adapter.apply(\"align\", this._align);\r\n },\r\n /**\r\n * Horizontal positioning of the content window.\r\n *\r\n * Available options: \"left\", \"center\" (default), \"right\", and \"none\".\r\n *\r\n * @default \"center\"\r\n * @param Horizontal position\r\n */\r\n set: function (value) {\r\n if (this._align != value) {\r\n this._align = value;\r\n this.positionElement();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Popup.prototype, \"verticalAlign\", {\r\n /**\r\n * @return Vertical position\r\n */\r\n get: function () {\r\n return this.adapter.apply(\"verticalAlign\", this._verticalAlign);\r\n },\r\n /**\r\n * Vertical positioning of the content window.\r\n *\r\n * Available options: \"top\", \"middle\" (default), \"bottom\", and \"none\".\r\n *\r\n * @default \"middle\"\r\n * @param Vertical position\r\n */\r\n set: function (value) {\r\n if (this._verticalAlign != value) {\r\n this._verticalAlign = value;\r\n this.positionElement();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Popup.prototype, \"left\", {\r\n /**\r\n * @return Left\r\n */\r\n get: function () {\r\n return this.adapter.apply(\"left\", this._left);\r\n },\r\n /**\r\n * \"left\" coordinate of a non-aligned (`align = \"none\"`) popup.\r\n *\r\n * Can be either absolute pixel value, or relative (`Percent`).\r\n *\r\n * Setting this property will automatically set `align` to \"none\".\r\n *\r\n * NOTE: The position is relative to the chart container.\r\n *\r\n * @param Left\r\n */\r\n set: function (value) {\r\n if (this.left != value) {\r\n this._left = value;\r\n this._align = \"none\";\r\n this.positionElement();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Popup.prototype, \"right\", {\r\n /**\r\n * @return Right\r\n */\r\n get: function () {\r\n return this.adapter.apply(\"right\", this._right);\r\n },\r\n /**\r\n * \"right\" coordinate of a non-aligned (`align = \"none\"`) popup.\r\n *\r\n * Can be either absolute pixel value, or relative (`Percent`).\r\n *\r\n * Setting this property will automatically set `align` to \"none\".\r\n *\r\n * NOTE: The position is relative to the chart container.\r\n *\r\n * @param Right\r\n */\r\n set: function (value) {\r\n if (this.right != value) {\r\n this._right = value;\r\n this._align = \"none\";\r\n this.positionElement();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Popup.prototype, \"top\", {\r\n /**\r\n * @return Top\r\n */\r\n get: function () {\r\n return this.adapter.apply(\"top\", this._top);\r\n },\r\n /**\r\n * \"top\" coordinate of a non-aligned (`verticalAlign = \"none\"`) popup.\r\n *\r\n * Can be either absolute pixel value, or relative (`Percent`).\r\n *\r\n * Setting this property will automatically set `verticalAlign` to \"none\".\r\n *\r\n * NOTE: The position is relative to the chart container.\r\n *\r\n * @param Top\r\n */\r\n set: function (value) {\r\n if (this.top != value) {\r\n this._top = value;\r\n this._verticalAlign = \"none\";\r\n this.positionElement();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Popup.prototype, \"bottom\", {\r\n /**\r\n * @return Bottom\r\n */\r\n get: function () {\r\n return this.adapter.apply(\"bottom\", this._bottom);\r\n },\r\n /**\r\n * \"bottom\" coordinate of a non-aligned (`verticalAlign = \"none\"`) popup.\r\n *\r\n * Can be either absolute pixel value, or relative (`Percent`).\r\n *\r\n * Setting this property will automatically set `verticalAlign` to \"none\".\r\n *\r\n * NOTE: The position is relative to the chart container.\r\n *\r\n * @param Bottom\r\n */\r\n set: function (value) {\r\n if (this.bottom != value) {\r\n this._bottom = value;\r\n this._verticalAlign = \"none\";\r\n this.positionElement();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Popup.prototype, \"elements\", {\r\n /**\r\n * Returns an object with references to various elements of the Popup.\r\n *\r\n * * `wrapper`\r\n * * `title`\r\n * * `content`\r\n * * `close`\r\n * * `curtain`\r\n */\r\n get: function () {\r\n return this._elements;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Loads popup CSS.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Popup.prototype.loadDefaultCSS = function () {\r\n if (!this._cssLoaded) {\r\n this._disposers.push(popupCSS(getShadowRoot(this.container), this.classPrefix));\r\n $object.each(this._elements, function (key, el) {\r\n el.style.display = \"\";\r\n });\r\n this._cssLoaded = true;\r\n }\r\n };\r\n /**\r\n * If popup is closable, this method adds various events to popup elements.\r\n */\r\n Popup.prototype.applyEvents = function () {\r\n var _this = this;\r\n if (this._IOs.close) {\r\n if (this.closable) {\r\n this._IOs.close.element.style.visibility = \"visible\";\r\n var disposers = [\r\n getInteraction().body.events.on(\"keyup\", function (ev) {\r\n if (keyboard.isKey(ev.event, \"esc\") && _this.closable) {\r\n _this.close();\r\n }\r\n }),\r\n this._IOs.close.events.on(\"hit\", function (ev) {\r\n _this.close();\r\n })\r\n ];\r\n disposers.push(this._IOs.curtain.events.on(\"hit\", function (ev) {\r\n if (_this.showCurtain && _this.closable) {\r\n _this.close();\r\n }\r\n }));\r\n this._disposers.push(new MultiDisposer(disposers));\r\n }\r\n else {\r\n this._IOs.close.element.style.visibility = \"hidden\";\r\n }\r\n }\r\n };\r\n /**\r\n * Disables interactivity on parent chart.\r\n */\r\n Popup.prototype.disablePointers = function () {\r\n if (this.sprite) {\r\n this._spriteInteractionsEnabled = this.sprite.interactionsEnabled;\r\n this.sprite.interactionsEnabled = false;\r\n }\r\n };\r\n /**\r\n * Releases temporarily disabled pointers on parent chart.\r\n */\r\n Popup.prototype.releasePointers = function () {\r\n if ($type.hasValue(this._spriteInteractionsEnabled)) {\r\n this.sprite.interactionsEnabled = this._spriteInteractionsEnabled;\r\n this._spriteInteractionsEnabled = undefined;\r\n }\r\n };\r\n /**\r\n * Sets screen reader related settings.\r\n */\r\n Popup.prototype.applyReaderSettings = function () {\r\n this.elements.wrapper.setAttribute(\"aria-label\", this.readerTitle);\r\n };\r\n /**\r\n * Copies all properties and related data from different element.\r\n *\r\n * @param object Source element\r\n */\r\n Popup.prototype.copyFrom = function (source) {\r\n _super.prototype.copyFrom.call(this, source);\r\n this.container = source.container;\r\n this.sprite = source.sprite;\r\n this.classPrefix = source.classPrefixRaw;\r\n this.content = source.content;\r\n this.title = source.title;\r\n this.readerTitle = source.readerTitle;\r\n this.defaultStyles = source.defaultStyles;\r\n this.showCurtain = source.showCurtain;\r\n this.align = source.align;\r\n this.verticalAlign = source.verticalAlign;\r\n this.left = source.left;\r\n this.right = source.right;\r\n this.top = source.top;\r\n this.bottom = source.bottom;\r\n this.adapter.copyFrom(source.adapter);\r\n };\r\n return Popup;\r\n}(BaseObjectEvents));\r\nexport { Popup };\r\n","/**\r\n * Functionality for drawing rectangles.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Sprite } from \"../Sprite\";\r\nimport { registry } from \"../Registry\";\r\nimport * as $math from \"../utils/Math\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Used to draw a rectangle.\r\n *\r\n * @see {@link IRectangleEvents} for a list of available events\r\n * @see {@link IRectangleAdapters} for a list of available Adapters\r\n */\r\nvar Rectangle = /** @class */ (function (_super) {\r\n __extends(Rectangle, _super);\r\n /**\r\n * Constructor\r\n * * Creates a `<rect>` element\r\n * * Creates default state\r\n */\r\n function Rectangle() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"Rectangle\";\r\n _this.element = _this.paper.add(\"rect\");\r\n //this.pixelPerfect = false;\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * Draws the element.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Rectangle.prototype.draw = function () {\r\n _super.prototype.draw.call(this);\r\n var precision = this._positionPrecision;\r\n if (this.pixelPerfect) {\r\n precision = 0;\r\n }\r\n var w = $math.round(this.innerWidth, precision);\r\n var h = $math.round(this.innerHeight, precision);\r\n this.element.attr({\r\n \"width\": w,\r\n \"height\": h\r\n });\r\n };\r\n /**\r\n * Measures the element.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Rectangle.prototype.measureElement = function () {\r\n };\r\n Object.defineProperty(Rectangle.prototype, \"bbox\", {\r\n /**\r\n * Returns bounding box (square) for this element.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n get: function () {\r\n if (this.definedBBox) {\r\n return this.definedBBox;\r\n }\r\n if (this.isMeasured) {\r\n return {\r\n x: 0,\r\n y: 0,\r\n width: this.innerWidth,\r\n height: this.innerHeight\r\n };\r\n }\r\n else {\r\n return { x: 0, y: 0, width: 0, height: 0 };\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return Rectangle;\r\n}(Sprite));\r\nexport { Rectangle };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"Rectangle\"] = Rectangle;\r\n","/**\r\n * Resize button module.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Button } from \"./Button\";\r\nimport { Sprite } from \"../Sprite\";\r\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\r\nimport { registry } from \"../Registry\";\r\nimport * as $path from \"../rendering/Path\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Creates a draggable resize/grip button.\r\n *\r\n * @see {@link IResizeButtonEvents} for a list of available events\r\n * @see {@link IResizeButtonAdapters} for a list of available Adapters\r\n */\r\nvar ResizeButton = /** @class */ (function (_super) {\r\n __extends(ResizeButton, _super);\r\n /**\r\n * Constructor\r\n */\r\n function ResizeButton() {\r\n var _this = \r\n // Init\r\n _super.call(this) || this;\r\n _this.className = \"ResizeButton\";\r\n // Set defaults\r\n _this.orientation = \"horizontal\";\r\n _this.layout = \"absolute\";\r\n _this.horizontalCenter = \"middle\";\r\n _this.verticalCenter = \"middle\";\r\n _this.draggable = true;\r\n _this.padding(8, 8, 8, 8);\r\n _this.background.cornerRadius(20, 20, 20, 20);\r\n // Create an icon\r\n var icon = new Sprite();\r\n icon.element = _this.paper.add(\"path\");\r\n var path = $path.moveTo({ x: -2, y: -6 });\r\n path += $path.lineTo({ x: -2, y: 6 });\r\n path += $path.moveTo({ x: 2, y: -6 });\r\n path += $path.lineTo({ x: 2, y: 6 });\r\n icon.path = path;\r\n icon.pixelPerfect = true;\r\n icon.padding(0, 4, 0, 4);\r\n icon.stroke = new InterfaceColorSet().getFor(\"alternativeText\");\r\n icon.strokeOpacity = 0.7;\r\n //icon.align = \"center\";\r\n //icon.valign = \"middle\";\r\n _this.icon = icon;\r\n _this.label.dispose();\r\n _this.label = undefined;\r\n // Apply theme\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n Object.defineProperty(ResizeButton.prototype, \"orientation\", {\r\n /**\r\n * Use for setting of direction (orientation) of the resize button.\r\n *\r\n * Available options: \"horizontal\", \"vertical\".\r\n *\r\n * @param value Orientation\r\n */\r\n set: function (value) {\r\n var icon = this.icon;\r\n if (icon) {\r\n if (value == \"horizontal\") {\r\n icon.rotation = 0;\r\n }\r\n else {\r\n icon.rotation = -90;\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return ResizeButton;\r\n}(Button));\r\nexport { ResizeButton };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"ResizeButton\"] = ResizeButton;\r\n","/**\r\n * Rounded rectangle module.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Sprite } from \"../Sprite\";\r\nimport { registry } from \"../Registry\";\r\nimport * as $math from \"../utils/Math\";\r\nimport * as $type from \"../utils/Type\";\r\nimport * as $utils from \"../utils/Utils\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Draws a rectangle with rounded corners.\r\n *\r\n * @see {@link IRoundedRectangleEvents} for a list of available events\r\n * @see {@link IRoundedRectangleAdapters} for a list of available Adapters\r\n */\r\nvar RoundedRectangle = /** @class */ (function (_super) {\r\n __extends(RoundedRectangle, _super);\r\n /**\r\n * Constructor\r\n */\r\n function RoundedRectangle() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"RoundedRectangle\";\r\n _this.element = _this.paper.add(\"path\");\r\n _this.cornerRadius(3, 3, 3, 3);\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * Draws the element.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n RoundedRectangle.prototype.draw = function () {\r\n _super.prototype.draw.call(this);\r\n var w = this.innerWidth;\r\n var h = this.innerHeight;\r\n if ($type.isNumber(w) && $type.isNumber(h)) {\r\n var minSide = $math.min(w, h) / 2;\r\n var cornerRadiusTopLeft = $utils.relativeToValue(this.cornerRadiusTopLeft, minSide);\r\n var cornerRadiusTopRight = $utils.relativeToValue(this.cornerRadiusTopRight, minSide);\r\n var cornerRadiusBottomRight = $utils.relativeToValue(this.cornerRadiusBottomRight, minSide);\r\n var cornerRadiusBottomLeft = $utils.relativeToValue(this.cornerRadiusBottomLeft, minSide);\r\n var maxcr = $math.min(Math.abs(w / 2), Math.abs(h / 2));\r\n var crtl = $math.fitToRange(cornerRadiusTopLeft, 0, maxcr);\r\n var crtr = $math.fitToRange(cornerRadiusTopRight, 0, maxcr);\r\n var crbr = $math.fitToRange(cornerRadiusBottomRight, 0, maxcr);\r\n var crbl = $math.fitToRange(cornerRadiusBottomLeft, 0, maxcr);\r\n var lineT = \"M\" + crtl + \",0 L\" + (w - crtr) + \",0\";\r\n var lineB = \" L\" + crbl + \",\" + h;\r\n var lineL = \" L0,\" + crtl;\r\n var lineR = \" L\" + w + \",\" + (h - crbr);\r\n var arcTR = \" a\" + crtr + \",\" + crtr + \" 0 0 1 \" + crtr + \",\" + crtr;\r\n var arcBR = \" a\" + crbr + \",\" + crbr + \" 0 0 1 -\" + crbr + \",\" + crbr;\r\n var arcBL = \" a\" + crbl + \",\" + crbl + \" 0 0 1 -\" + crbl + \",-\" + crbl;\r\n var arcTL = \" a\" + crtl + \",\" + crtl + \" 0 0 1 \" + crtl + \",-\" + crtl;\r\n var path = lineT + arcTR + lineR + arcBR + lineB + arcBL + lineL + arcTL + \" Z\";\r\n this.path = path;\r\n }\r\n };\r\n /**\r\n * Sets radius for all four corners at ones.\r\n *\r\n * All numbers are in pixels.\r\n *\r\n * @param tl Top-left corner\r\n * @param tr Top-right corner\r\n * @param bl Bottom-left corner\r\n * @param br Bottom-right corner\r\n */\r\n RoundedRectangle.prototype.cornerRadius = function (tl, tr, bl, br) {\r\n this.cornerRadiusTopLeft = tl;\r\n this.cornerRadiusTopRight = tr;\r\n this.cornerRadiusBottomLeft = bl;\r\n this.cornerRadiusBottomRight = br;\r\n };\r\n Object.defineProperty(RoundedRectangle.prototype, \"cornerRadiusTopLeft\", {\r\n /**\r\n * @return Radius (px or Percent)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"cornerRadiusTopLeft\");\r\n },\r\n /**\r\n * Radius of the top-left corner in pixels.\r\n *\r\n * @default 3\r\n * @param value Radius (px or Percent)\r\n */\r\n set: function (value) {\r\n this.setPercentProperty(\"cornerRadiusTopLeft\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(RoundedRectangle.prototype, \"cornerRadiusTopRight\", {\r\n /**\r\n * @return Radius (px or Percent)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"cornerRadiusTopRight\");\r\n },\r\n /**\r\n * Radius of the top-right corner in pixels.\r\n *\r\n * @default 3\r\n * @param value Radius (px or Percent)\r\n */\r\n set: function (value) {\r\n this.setPercentProperty(\"cornerRadiusTopRight\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(RoundedRectangle.prototype, \"cornerRadiusBottomRight\", {\r\n /**\r\n * @return Radius (px or Percent)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"cornerRadiusBottomRight\");\r\n },\r\n /**\r\n * Radius of the bottom-right corner in pixels.\r\n *\r\n * @default 3\r\n * @param value Radius (px or Percent)\r\n */\r\n set: function (value) {\r\n this.setPercentProperty(\"cornerRadiusBottomRight\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(RoundedRectangle.prototype, \"cornerRadiusBottomLeft\", {\r\n /**\r\n * @return Radius (px or Percent)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"cornerRadiusBottomLeft\");\r\n },\r\n /**\r\n * Radius of the bottom-left corner in pixels.\r\n *\r\n * @default 3\r\n * @param value Radius (px or Percent)\r\n */\r\n set: function (value) {\r\n this.setPercentProperty(\"cornerRadiusBottomLeft\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Measures the element.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n RoundedRectangle.prototype.measureElement = function () {\r\n };\r\n Object.defineProperty(RoundedRectangle.prototype, \"bbox\", {\r\n /**\r\n * Returns bounding box (square) for this element.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n get: function () {\r\n if (this.definedBBox) {\r\n return this.definedBBox;\r\n }\r\n if (this.isMeasured) {\r\n return {\r\n x: 0,\r\n y: 0,\r\n width: this.innerWidth,\r\n height: this.innerHeight\r\n };\r\n }\r\n else {\r\n return { x: 0, y: 0, width: 0, height: 0 };\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return RoundedRectangle;\r\n}(Sprite));\r\nexport { RoundedRectangle };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"RoundedRectangle\"] = RoundedRectangle;\r\n","/**\r\n * Provides functionality used to build scrollbars.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Container } from \"../Container\";\r\nimport { ResizeButton } from \"../elements/ResizeButton\";\r\nimport { Button } from \"../elements/Button\";\r\nimport { getInteraction } from \"../interaction/Interaction\";\r\nimport { MouseCursorStyle } from \"../interaction/Mouse\";\r\nimport { RoundedRectangle } from \"../elements/RoundedRectangle\";\r\nimport { registry } from \"../Registry\";\r\nimport { keyboard } from \"../utils/Keyboard\";\r\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\r\nimport { percent, Percent } from \"../utils/Percent\";\r\nimport * as $math from \"../utils/Math\";\r\nimport * as $ease from \"../utils/Ease\";\r\nimport * as $type from \"../utils/Type\";\r\nimport * as $utils from \"../utils/Utils\";\r\n;\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Scrollbar is a generic control allowing to select a range of values or pan\r\n * the selection.\r\n *\r\n * @see {@link IScrollbarEvents} for a list of available events\r\n * @see {@link IScrollbarAdapters} for a list of available Adapters\r\n */\r\nvar Scrollbar = /** @class */ (function (_super) {\r\n __extends(Scrollbar, _super);\r\n /**\r\n * Construtor\r\n */\r\n function Scrollbar() {\r\n var _this = _super.call(this) || this;\r\n /**\r\n * Previously selected lower (start) value.\r\n */\r\n _this._previousStart = 0;\r\n /**\r\n * Previously selected upper (end) value.\r\n */\r\n _this._previousEnd = 1;\r\n /**\r\n * A value of previously selected lower value, used for doubleclick function.\r\n */\r\n _this._prevStart = 0;\r\n /**\r\n * A value of previously selected upper value, used for doubleclick function.\r\n */\r\n _this._prevEnd = 1;\r\n /**\r\n * Indicates if the Scrollbar is currently \"busy\" (animating and or\r\n * performing zoom by user interaction).\r\n */\r\n _this._isBusy = false;\r\n /**\r\n * [_skipRangeEvents description]\r\n *\r\n * @todo Description\r\n */\r\n _this._skipRangeEvents = false;\r\n /**\r\n * Update the selection when dragging the grips.\r\n *\r\n * If set to `false` selection will be updated only when the grip is\r\n * released.\r\n *\r\n * @default true\r\n */\r\n _this.updateWhileMoving = true;\r\n _this.className = \"Scrollbar\";\r\n _this.minHeight = 12;\r\n _this.minWidth = 12;\r\n _this.animationDuration = 0;\r\n _this.animationEasing = $ease.cubicOut;\r\n _this.margin(10, 10, 10, 10);\r\n var interfaceColors = new InterfaceColorSet();\r\n // background is also container as it might contain graphs, grid, etc\r\n var background = _this.background;\r\n background.cornerRadius(10, 10, 10, 10);\r\n background.fill = interfaceColors.getFor(\"fill\");\r\n background.fillOpacity = 0.5;\r\n // Make system tooltips appear by default\r\n _this.showSystemTooltip = true;\r\n _this.startGrip = new ResizeButton();\r\n _this.endGrip = new ResizeButton();\r\n // Default orientation...\r\n // ... is set in `applyInternalDefaults()` because it accesses `language`\r\n // and should only be started to access when parent is set\r\n // Set events\r\n _this.events.on(\"transformed\", function () {\r\n _this.updateThumb();\r\n }, _this, false);\r\n // Initial positions\r\n _this.start = 0;\r\n _this.end = 1;\r\n // Set roles\r\n _this.role = \"scrollbar\";\r\n _this.thumb.role = \"slider\";\r\n _this.thumb.readerLive = \"polite\";\r\n _this.startGrip.role = \"slider\";\r\n _this.endGrip.role = \"slider\";\r\n // otherwise range changed won't be registered\r\n _this.events.once(\"inited\", function () {\r\n _this._previousStart = undefined;\r\n _this.dispatchRangeChange();\r\n }, undefined, false);\r\n _this.hideGrips = false;\r\n _this.orientation = \"horizontal\";\r\n // Min/max values for accessibility\r\n _this.setSVGAttribute({ \"aria-valuemin\": \"0\" });\r\n _this.setSVGAttribute({ \"aria-valuemax\": \"100\" });\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * Sets defaults that instantiate some objects that rely on parent, so they\r\n * cannot be set in constructor.\r\n */\r\n Scrollbar.prototype.applyInternalDefaults = function () {\r\n _super.prototype.applyInternalDefaults.call(this);\r\n // Set screen reader tetxt accordingly\r\n if (this.orientation === \"horizontal\") {\r\n if (!$type.hasValue(this.readerTitle)) {\r\n this.readerTitle = this.language.translate(\"Use TAB to select grip buttons or left and right arrows to change selection\");\r\n }\r\n if (!$type.hasValue(this.thumb.readerDescription)) {\r\n this.thumb.readerDescription = this.language.translate(\"Use left and right arrows to move selection\");\r\n }\r\n if (!$type.hasValue(this.startGrip.readerDescription)) {\r\n this.startGrip.readerDescription = this.language.translate(\"Use left and right arrows to move left selection\");\r\n }\r\n if (!$type.hasValue(this.endGrip.readerDescription)) {\r\n this.endGrip.readerDescription = this.language.translate(\"Use left and right arrows to move right selection\");\r\n }\r\n this.readerOrientation = \"horizontal\";\r\n }\r\n else {\r\n if (!$type.hasValue(this.readerTitle)) {\r\n this.readerTitle = this.language.translate(\"Use TAB select grip buttons or up and down arrows to change selection\");\r\n }\r\n if (!$type.hasValue(this.thumb.readerDescription)) {\r\n this.thumb.readerDescription = this.language.translate(\"Use up and down arrows to move selection\");\r\n }\r\n if (!$type.hasValue(this.startGrip.readerDescription)) {\r\n this.startGrip.readerDescription = this.language.translate(\"Use up and down arrows to move upper selection\");\r\n }\r\n if (!$type.hasValue(this.endGrip.readerDescription)) {\r\n this.endGrip.readerDescription = this.language.translate(\"Use up and down arrows to move lower selection\");\r\n }\r\n this.readerOrientation = \"vertical\";\r\n }\r\n this.readerControls = this.baseSprite.uidAttr();\r\n };\r\n /**\r\n * Validates the layout of the scrollbar's elements.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Scrollbar.prototype.validateLayout = function () {\r\n this.updateSize();\r\n _super.prototype.validateLayout.call(this);\r\n // when size changes, need to update extremes\r\n this.updateExtremes();\r\n };\r\n /**\r\n * Update background for the scrollbar.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Scrollbar.prototype.processBackground = function () {\r\n _super.prototype.processBackground.call(this);\r\n var background = this.background;\r\n background.clickable = true;\r\n background.events.on(\"hit\", this.handleBgHit, this, undefined);\r\n };\r\n /**\r\n * Zooms to the particular place when clicked/tapped on the scrollbar\r\n * background.\r\n *\r\n * @ignore Exclude from docs\r\n * @param event Event\r\n */\r\n Scrollbar.prototype.handleBgHit = function (event) {\r\n this.makeBusy();\r\n var point = event.spritePoint;\r\n point = $utils.spritePointToSprite(point, this.background, this);\r\n var thumb = this.thumb;\r\n if (this.orientation == \"horizontal\") {\r\n var thumbX = point.x - thumb.pixelWidth / 2;\r\n thumbX = $math.fitToRange(thumbX, 0, this.innerWidth - thumb.pixelWidth);\r\n this._thumbAnimation = thumb.animate({ property: \"x\", to: thumbX }, this.animationDuration, this.animationEasing);\r\n }\r\n else {\r\n var thumbY = point.y - thumb.pixelHeight / 2;\r\n thumbY = $math.fitToRange(thumbY, 0, this.innerHeight - thumb.pixelHeight);\r\n this._thumbAnimation = thumb.animate({ property: \"y\", to: thumbY }, this.animationDuration, this.animationEasing);\r\n }\r\n if (this.animationDuration > 0) {\r\n this._thumbAnimation.events.on(\"animationended\", this.makeUnbusy, this, false);\r\n }\r\n else {\r\n this._thumb.validate();\r\n this.makeUnbusy();\r\n }\r\n };\r\n /**\r\n * Set scrollbar as busy. (currently zooming)\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Scrollbar.prototype.makeBusy = function () {\r\n this._isBusy = true;\r\n this._skipRangeEvents = false;\r\n if (this._unbusyTimeout) {\r\n this.removeDispose(this._unbusyTimeout);\r\n }\r\n this._unbusyTimeout = undefined;\r\n this.stopAnimations();\r\n };\r\n /**\r\n * Stops all animations, currently playing for the scrollbar.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Scrollbar.prototype.stopAnimations = function () {\r\n if (this._thumbAnimation) {\r\n this._thumbAnimation.stop(true);\r\n }\r\n if (this._zoomAnimation) {\r\n this._zoomAnimation.stop(true);\r\n }\r\n };\r\n /**\r\n * Cancels \"busy\" status of the Scrollbar.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Scrollbar.prototype.makeUnbusy = function () {\r\n /**\r\n * We cannot make Scrollbar not busy right after release, because then axes\r\n * will take over controll and Scrollbar will start to animate.\r\n * Theorethically, it's not right to set timeout by `animationDuration`,\r\n * however we can not know all the durations of elements we scroll, so we\r\n * assume that animation duration will be the same as\r\n * `interpolationDuration` or `rangeChange` duration.\r\n */\r\n this._unbusyTimeout = this.setTimeout(this.makeUnbusyReal.bind(this), this.animationDuration * 1.1);\r\n };\r\n /**\r\n * [makeUnbusyReal description]\r\n *\r\n * @todo Description\r\n * @ignore Exclude from docs\r\n */\r\n Scrollbar.prototype.makeUnbusyReal = function () {\r\n this._usingGrip = undefined;\r\n this._isBusy = false;\r\n if (!this.updateWhileMoving) {\r\n this.dispatchRangeChange();\r\n }\r\n };\r\n /**\r\n * Disptatches rangechanged event if it really changed\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Scrollbar.prototype.dispatchRangeChange = function () {\r\n if (this._previousEnd != this.end || this._previousStart != this.start) {\r\n this._previousStart = this.start;\r\n this._previousEnd = this.end;\r\n this.dispatch(\"rangechanged\");\r\n }\r\n };\r\n /**\r\n * Updates the \"thumb\" element. A draggable element between the grips.\r\n * @ignore\r\n */\r\n Scrollbar.prototype.updateThumb = function (dispatchEvents) {\r\n if (dispatchEvents === void 0) { dispatchEvents = true; }\r\n if (!this.parent) {\r\n return;\r\n }\r\n var thumb = this.thumb;\r\n var start = this.start;\r\n var end = this.end;\r\n var startGrip = this.startGrip;\r\n var endGrip = this.endGrip;\r\n if (this.orientation == \"horizontal\") {\r\n var innerWidth_1 = this.innerWidth;\r\n thumb.width = innerWidth_1 * (end - start);\r\n thumb.maxX = innerWidth_1 - thumb.pixelWidth;\r\n thumb.x = start * innerWidth_1;\r\n startGrip.moveTo({ x: thumb.pixelX, y: 0 }, undefined, undefined, true); // overrides dragging\r\n endGrip.moveTo({ x: thumb.pixelX + thumb.pixelWidth, y: 0 }, undefined, undefined, true);\r\n startGrip.readerTitle = this.language.translate(\"From %1\", undefined, this.adapter.apply(\"positionValue\", {\r\n value: Math.round(start * 100) + \"%\",\r\n position: start\r\n }).value);\r\n startGrip.readerValueNow = \"\" + Math.round(start * 100);\r\n startGrip.readerValueText = startGrip.readerTitle;\r\n endGrip.readerTitle = this.language.translate(\"To %1\", undefined, this.adapter.apply(\"positionValue\", {\r\n value: Math.round(end * 100) + \"%\",\r\n position: end\r\n }).value);\r\n endGrip.readerValueNow = \"\" + Math.round(end * 100);\r\n endGrip.readerValueText = endGrip.readerTitle;\r\n }\r\n else {\r\n var innerHeight_1 = this.innerHeight;\r\n thumb.height = innerHeight_1 * (end - start);\r\n thumb.maxY = innerHeight_1 - thumb.pixelHeight;\r\n thumb.y = (1 - end) * innerHeight_1;\r\n startGrip.moveTo({ x: 0, y: thumb.pixelY + thumb.pixelHeight }, undefined, undefined, true);\r\n endGrip.moveTo({ x: 0, y: thumb.pixelY }, undefined, undefined, true);\r\n startGrip.readerTitle = this.language.translate(\"To %1\", undefined, this.adapter.apply(\"positionValue\", {\r\n value: Math.round((1 - start) * 100) + \"%\",\r\n position: (1 - start)\r\n }).value);\r\n startGrip.readerValueNow = \"\" + Math.round(start * 100);\r\n startGrip.readerValueText = startGrip.readerTitle;\r\n endGrip.readerTitle = this.language.translate(\"From %1\", undefined, this.adapter.apply(\"positionValue\", {\r\n value: Math.round((1 - end) * 100) + \"%\",\r\n position: (1 - end)\r\n }).value);\r\n endGrip.readerValueNow = \"\" + Math.round(end * 100);\r\n endGrip.readerValueText = endGrip.readerTitle;\r\n }\r\n // Add accessibility\r\n thumb.readerTitle = this.language.translate(\"From %1 to %2\", undefined, this.adapter.apply(\"positionValue\", {\r\n value: Math.round(start * 100) + \"%\",\r\n position: start\r\n }).value, this.adapter.apply(\"positionValue\", {\r\n value: Math.round(end * 100) + \"%\",\r\n position: end\r\n }).value);\r\n thumb.readerValueNow = \"\" + Math.round(start * 100);\r\n thumb.readerValueText = thumb.readerTitle;\r\n this.readerValueNow = \"\" + Math.round(start * 100);\r\n this.readerValueText = thumb.readerTitle;\r\n if (!this._skipRangeEvents && this.updateWhileMoving && dispatchEvents) {\r\n this.dispatchRangeChange();\r\n }\r\n };\r\n /**\r\n * Updates extremes of the scrollbar.\r\n */\r\n Scrollbar.prototype.updateExtremes = function () {\r\n var orientation = this.orientation;\r\n var minX = 0;\r\n var minY = 0;\r\n var maxX = 0;\r\n var maxY = 0;\r\n if (orientation == \"horizontal\") {\r\n maxX = this.innerWidth;\r\n minY = maxY = this.innerHeight / 2;\r\n }\r\n else {\r\n maxY = this.innerHeight;\r\n minX = maxX = this.innerWidth / 2;\r\n }\r\n var startGrip = this.startGrip;\r\n startGrip.minX = minX;\r\n startGrip.maxX = maxX;\r\n startGrip.minY = minY;\r\n startGrip.maxY = maxY;\r\n var endGrip = this.endGrip;\r\n endGrip.minX = minX;\r\n endGrip.maxX = maxX;\r\n endGrip.minY = minY;\r\n endGrip.maxY = maxY;\r\n var thumb = this.thumb;\r\n thumb.minX = minX;\r\n thumb.maxX = maxX;\r\n thumb.minY = minY;\r\n thumb.maxY = maxY;\r\n };\r\n /**\r\n * Updates size of the scrollbar.\r\n */\r\n Scrollbar.prototype.updateSize = function () {\r\n var orientation = this.orientation;\r\n var startGrip = this.startGrip;\r\n if (startGrip) {\r\n startGrip.orientation = orientation;\r\n }\r\n if (this.endGrip) {\r\n this.endGrip.orientation = orientation;\r\n }\r\n var thumb = this.thumb;\r\n if (thumb) {\r\n if (orientation == \"horizontal\") {\r\n if (!$type.isNumber(this._pixelWidth)) {\r\n if (!(this.width instanceof Percent)) {\r\n this.width = percent(100);\r\n }\r\n }\r\n // this teorethically might be wrong, if user indeed sets height of a horizontal scrollbar in percent\r\n // however without this height might be equal to 100% if previous orientation was set to horizontal\r\n // so this is ok solution, in case user really wants to have scrollbar height set in percent,\r\n // he should do this after orientation.\r\n if ($type.hasValue(this.percentHeight)) {\r\n this.height = this.minHeight;\r\n }\r\n thumb.height = this.innerHeight;\r\n thumb.verticalCenter = \"middle\";\r\n thumb.horizontalCenter = \"left\";\r\n }\r\n else {\r\n if (!$type.isNumber(this._pixelHeight)) {\r\n if (!(this.height instanceof Percent)) {\r\n this.height = percent(100);\r\n }\r\n }\r\n // same as above with percentHeight\r\n if ($type.hasValue(this.percentWidth)) {\r\n this.width = this.minWidth;\r\n }\r\n thumb.width = this.innerWidth;\r\n thumb.verticalCenter = \"top\";\r\n thumb.horizontalCenter = \"middle\";\r\n }\r\n }\r\n };\r\n Object.defineProperty(Scrollbar.prototype, \"isBusy\", {\r\n /**\r\n * Indicates if the Scrollbar is currently \"busy\" (animating and or\r\n * performing zoom by user interaction).\r\n * @return boolean\r\n */\r\n get: function () {\r\n return this._isBusy;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Scrollbar.prototype, \"start\", {\r\n /**\r\n * @return Position (0-1)\r\n */\r\n get: function () {\r\n return Math.min(this.getPosition(this._start), this.getPosition(this._end));\r\n },\r\n /**\r\n * ==========================================================================\r\n * POSITIONS\r\n * ==========================================================================\r\n * @hidden\r\n */\r\n /**\r\n * Relative position (0-1) of the start grip.\r\n *\r\n * @param position Position (0-1)\r\n */\r\n set: function (position) {\r\n if (!this._isBusy) {\r\n this.__start = position;\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Scrollbar.prototype, \"__start\", {\r\n /**\r\n * @return [description]\r\n */\r\n get: function () {\r\n return this._start;\r\n },\r\n /**\r\n * [__start description]\r\n *\r\n * @todo Description\r\n * @param position [description]\r\n */\r\n set: function (position) {\r\n this._start = this.getPosition(position);\r\n this.updateThumb();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Scrollbar.prototype, \"end\", {\r\n /**\r\n * @return Position (0-1)\r\n */\r\n get: function () {\r\n return Math.max(this.getPosition(this._start), this.getPosition(this._end));\r\n },\r\n /**\r\n * Relative position (0-1) of the end grip.\r\n *\r\n * @param position Position (0-1)\r\n */\r\n set: function (position) {\r\n if (!this._isBusy) {\r\n this.__end = position;\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Scrollbar.prototype, \"__end\", {\r\n /**\r\n * @return [description]\r\n */\r\n get: function () {\r\n return this._end;\r\n },\r\n /**\r\n * [__end description]\r\n *\r\n * @todo Description\r\n * @param position [description]\r\n */\r\n set: function (position) {\r\n this._end = this.getPosition(position);\r\n this.updateThumb();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Scrollbar.prototype, \"range\", {\r\n /**\r\n * Current selection range.\r\n *\r\n * @readonly\r\n * @return Range\r\n */\r\n get: function () {\r\n return { start: this.start, end: this.end, priority: this._usingGrip };\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Disables range change events.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Scrollbar.prototype.skipRangeEvents = function () {\r\n if (!this._isBusy) {\r\n this._skipRangeEvents = true;\r\n }\r\n };\r\n /**\r\n * [fixRange description]\r\n *\r\n * @todo Description\r\n * @ignore Exclude from docs\r\n * @param range Range\r\n */\r\n Scrollbar.prototype.fixRange = function (range) {\r\n if (range.start != $math.round(this._start, 2) || range.end != $math.round(this._end, 2)) {\r\n this._start = range.start;\r\n this._end = range.end;\r\n this._skipRangeEvents = true;\r\n this.updateThumb();\r\n this._skipRangeEvents = false;\r\n this.thumb.validate();\r\n this.thumb.background.validate();\r\n }\r\n };\r\n /**\r\n * [getPosition description]\r\n *\r\n * @todo Description\r\n * @param position [description]\r\n * @return [description]\r\n */\r\n Scrollbar.prototype.getPosition = function (position) {\r\n return $math.fitToRange($math.round(position, 4), 0, 1);\r\n };\r\n Object.defineProperty(Scrollbar.prototype, \"orientation\", {\r\n /**\r\n * @return Orientation\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"orientation\");\r\n },\r\n /**\r\n * ==========================================================================\r\n * MISC\r\n * ==========================================================================\r\n * @hidden\r\n */\r\n /**\r\n * Orientation of the scrollbar.\r\n *\r\n * Available options: \"horizontal\" (default) and \"vertical\".\r\n *\r\n * @default \"horizontal\"\r\n * @param value Orientation\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"orientation\", value)) {\r\n // Set mouse cursors and screen reader tetxt accordingly\r\n if (value === \"horizontal\") {\r\n // Mouse styles\r\n this.startGrip.cursorOverStyle = MouseCursorStyle.horizontalResize;\r\n this.endGrip.cursorOverStyle = MouseCursorStyle.horizontalResize;\r\n // Reader text\r\n /*this.readerTitle = this.language.translate(\"Use TAB to select grip buttons or left and right arrows to change selection\");\r\n this.thumb.readerDescription = this.language.translate(\"Use left and right arrows to move selection\");\r\n this.startGrip.readerDescription = this.language.translate(\"Use left and right arrows to move left selection\");\r\n this.endGrip.readerDescription = this.language.translate(\"Use left and right arrows to move right selection\");*/\r\n }\r\n else {\r\n // Mouse styles\r\n this.startGrip.cursorOverStyle = MouseCursorStyle.verticalResize;\r\n this.endGrip.cursorOverStyle = MouseCursorStyle.verticalResize;\r\n // Reader text\r\n /*this.readerTitle = this.language.translate(\"Use TAB select grip buttons or up and down arrows to change selection\");\r\n this.thumb.readerDescription = this.language.translate(\"Use up and down arrows to move selection\");\r\n this.startGrip.readerDescription = this.language.translate(\"Use up and down arrows to move upper selection\");\r\n this.endGrip.readerDescription = this.language.translate(\"Use up and down arrows to move lower selection\");*/\r\n }\r\n this.updateByOrientation();\r\n this.invalidate();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * @ignore\r\n */\r\n Scrollbar.prototype.updateByOrientation = function () {\r\n };\r\n Object.defineProperty(Scrollbar.prototype, \"startGrip\", {\r\n /**\r\n * @return Grip element\r\n */\r\n get: function () {\r\n return this._startGrip;\r\n },\r\n /**\r\n * ==========================================================================\r\n * GRIPS\r\n * ==========================================================================\r\n * @hidden\r\n */\r\n /**\r\n * Start grip element. (button)\r\n *\r\n * @param button Grip element\r\n */\r\n set: function (button) {\r\n if (this._startGrip) {\r\n this.removeDispose(this._startGrip);\r\n }\r\n this._startGrip = button;\r\n this.processGrip(button);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Scrollbar.prototype, \"endGrip\", {\r\n /**\r\n * @return Grip element\r\n */\r\n get: function () {\r\n return this._endGrip;\r\n },\r\n /**\r\n * End grip element. (button)\r\n *\r\n * @param button Grip element\r\n */\r\n set: function (button) {\r\n if (this._endGrip) {\r\n this.removeDispose(this._endGrip);\r\n }\r\n this._endGrip = button;\r\n this.processGrip(button);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Decorates the grip button with properties and events.\r\n *\r\n * @ignore Exclude from docs\r\n * @param button Grip button\r\n */\r\n Scrollbar.prototype.processGrip = function (button) {\r\n button.parent = this;\r\n button.isMeasured = false;\r\n button.focusable = true;\r\n button.shouldClone = false;\r\n // Set button defaults\r\n //button.showSystemTooltip = true; // setting this here is not right because we break inheritance\r\n button.zIndex = 100;\r\n button.events.on(\"drag\", this.handleGripDrag, this, false);\r\n button.events.on(\"dragstop\", this.makeUnbusy, this, false);\r\n button.events.on(\"down\", this.makeBusy, this, false);\r\n button.events.on(\"up\", this.makeUnbusy, this, false);\r\n this._disposers.push(button);\r\n };\r\n /**\r\n * Updates positions of related elements after grip element is dragged.\r\n *\r\n * @ignore Exclude from docs\r\n * @param event Event\r\n */\r\n Scrollbar.prototype.handleGripDrag = function (event) {\r\n this.makeBusy();\r\n if (event.target === this._startGrip) {\r\n this._usingGrip = \"start\";\r\n }\r\n else {\r\n this._usingGrip = \"end\";\r\n }\r\n if (this.orientation == \"horizontal\") {\r\n this._start = this.startGrip.pixelX / this.innerWidth;\r\n this._end = this.endGrip.pixelX / this.innerWidth;\r\n }\r\n else {\r\n this._start = 1 - this.startGrip.pixelY / this.innerHeight;\r\n this._end = 1 - this.endGrip.pixelY / this.innerHeight;\r\n }\r\n this.updateThumb();\r\n };\r\n Object.defineProperty(Scrollbar.prototype, \"thumb\", {\r\n /**\r\n * @return Thumb element\r\n */\r\n get: function () {\r\n if (!this._thumb) {\r\n // Create scrollbar controls (setters will handle adding disposers)\r\n var thumb = new Button();\r\n thumb.background.cornerRadius(10, 10, 10, 10);\r\n thumb.padding(0, 0, 0, 0);\r\n this.thumb = thumb;\r\n }\r\n return this._thumb;\r\n },\r\n /**\r\n * A \"thumb\" element.\r\n *\r\n * It's a draggable square space between the grips, that can be used to\r\n * pan the selection.\r\n *\r\n * @param thumb Thumb element\r\n */\r\n set: function (thumb) {\r\n var _this = this;\r\n if (thumb) {\r\n if (this._thumb) {\r\n this.removeDispose(this._thumb);\r\n }\r\n this._thumb = thumb;\r\n thumb.parent = this;\r\n thumb.isMeasured = false;\r\n thumb.inert = true;\r\n thumb.draggable = true;\r\n thumb.clickable = true;\r\n thumb.hoverable = true;\r\n thumb.focusable = true;\r\n thumb.shouldClone = false;\r\n thumb.zIndex = 0;\r\n // TODO remove closures ?\r\n // Add events\r\n // Add cursor styles to thumb\r\n thumb.cursorOverStyle = MouseCursorStyle.grab;\r\n thumb.cursorDownStyle = MouseCursorStyle.grabbing;\r\n thumb.events.on(\"dragstart\", this.makeBusy, this, false);\r\n thumb.events.on(\"dragstop\", this.makeUnbusy, this, false);\r\n thumb.events.on(\"positionchanged\", this.handleThumbPosition, this, false);\r\n thumb.events.on(\"sizechanged\", this.handleThumbPosition, this, false);\r\n thumb.events.on(\"doublehit\", this.handleDoubleClick, this, false);\r\n // Add event for space and ENTER to toggle full zoom out and back\r\n // (same as doubleclick)\r\n this._disposers.push(getInteraction().body.events.on(\"keyup\", function (ev) {\r\n if (keyboard.isKey(ev.event, [\"space\", \"enter\"]) && _this.thumb.isFocused) {\r\n ev.event.preventDefault();\r\n _this.handleDoubleClick();\r\n }\r\n }));\r\n this._disposers.push(this._thumb);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Zooms-in and out the selection on double-click of the thumb.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Scrollbar.prototype.handleDoubleClick = function () {\r\n this.makeBusy();\r\n var newStart = 0;\r\n var newEnd = 1;\r\n if (this.start != 0 || this.end != 1) {\r\n this._prevStart = this.start;\r\n this._prevEnd = this.end;\r\n }\r\n else {\r\n newStart = this._prevStart;\r\n newEnd = this._prevEnd;\r\n }\r\n var zoomAnimation = this.animate([{ property: \"__start\", to: newStart }, { property: \"__end\", to: newEnd }], this.animationDuration, this.animationEasing);\r\n if (zoomAnimation && !zoomAnimation.isFinished()) {\r\n zoomAnimation.events.on(\"animationended\", this.makeUnbusy, this, false);\r\n this._zoomAnimation = zoomAnimation;\r\n }\r\n else {\r\n this.makeUnbusy();\r\n }\r\n };\r\n /**\r\n * Updates positions of other elements when thumb is moved.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Scrollbar.prototype.handleThumbPosition = function () {\r\n var thumb = this.thumb;\r\n if (this.orientation == \"horizontal\") {\r\n var innerWidth_2 = this.innerWidth;\r\n var w = thumb.innerWidth;\r\n var x = thumb.pixelX;\r\n this._start = x / innerWidth_2;\r\n this._end = (x + w) / innerWidth_2;\r\n this.updateThumb();\r\n }\r\n else {\r\n var innerHeight_2 = this.innerHeight;\r\n var h = thumb.innerHeight;\r\n var y = thumb.pixelY;\r\n if (y + h > innerHeight_2) {\r\n y = innerHeight_2 - h;\r\n thumb.y = y;\r\n }\r\n this._start = 1 - (y + h) / innerHeight_2;\r\n this._end = 1 - y / innerHeight_2;\r\n this.updateThumb();\r\n }\r\n };\r\n /**\r\n * Creates a background element for the scrollbar.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Background\r\n */\r\n Scrollbar.prototype.createBackground = function () {\r\n return new RoundedRectangle();\r\n };\r\n Object.defineProperty(Scrollbar.prototype, \"hideGrips\", {\r\n /**\r\n * @return Show only on hover?\r\n */\r\n get: function () {\r\n return this._hideGrips;\r\n },\r\n /**\r\n * Use this property to set whether grips should be always visible (`false`),\r\n * or they should just appear on scrollbar hover (`true`).\r\n *\r\n * @param value Show only on hover?\r\n */\r\n set: function (value) {\r\n var _this = this;\r\n this._hideGrips = value;\r\n if (this._overDisposer) {\r\n this.removeDispose(this._overDisposer);\r\n }\r\n if (this._outDisposer) {\r\n this.removeDispose(this._outDisposer);\r\n }\r\n if (value) {\r\n this._overDisposer = this.events.on(\"over\", function () {\r\n _this.startGrip.show();\r\n _this.endGrip.show();\r\n }, undefined, false);\r\n this._outDisposer = this.events.on(\"out\", function () {\r\n _this.startGrip.hide();\r\n _this.endGrip.hide();\r\n }, undefined, false);\r\n this.startGrip.hide();\r\n this.endGrip.hide();\r\n }\r\n else {\r\n this.startGrip.show();\r\n this.endGrip.show();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Scrollbar.prototype, \"animationDuration\", {\r\n /**\r\n * @return Orientation\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"animationDuration\");\r\n },\r\n /**\r\n * Duration in milliseconds of scrollbar animation (happens when user clicks on a background of a scrollbar)\r\n * @default 0\r\n * @param value number\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"animationDuration\", value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Scrollbar.prototype, \"animationEasing\", {\r\n /**\r\n * @return {Function}\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"animationEasing\");\r\n },\r\n /**\r\n * Animation easing function.\r\n * @todo: review description and default\r\n * @default $ease.cubicOut\r\n * @param value (value: number) => number\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"animationEasing\", value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Adds easing functions to \"function\" fields.\r\n *\r\n * @param field Field name\r\n * @return Assign as function?\r\n */\r\n Scrollbar.prototype.asFunction = function (field) {\r\n return field == \"animationEasing\" || _super.prototype.asIs.call(this, field);\r\n };\r\n return Scrollbar;\r\n}(Container));\r\nexport { Scrollbar };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"Scrollbar\"] = Scrollbar;\r\n","/**\r\n * Provides functionality used to creating and showing tooltips (balloons).\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Container } from \"../Container\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport { PointedRectangle } from \"./PointedRectangle\";\r\nimport { Label } from \"../elements/Label\";\r\nimport { Animation } from \"../utils/Animation\";\r\nimport { color } from \"../utils/Color\";\r\nimport { DropShadowFilter } from \"../rendering/filters/DropShadowFilter\";\r\nimport * as $math from \"../utils/Math\";\r\nimport * as $ease from \"../utils/Ease\";\r\nimport * as $utils from \"../utils/Utils\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Tooltip displays text and/or multimedia information in a balloon over chart\r\n * area.\r\n * @see {@link ITooltipEvents} for a list of available events\r\n * @see {@link ITooltipAdapters} for a list of available Adapters\r\n */\r\nvar Tooltip = /** @class */ (function (_super) {\r\n __extends(Tooltip, _super);\r\n /**\r\n * Constructor\r\n */\r\n function Tooltip() {\r\n var _this = \r\n // Init\r\n _super.call(this) || this;\r\n /**\r\n * Holds numeric boundary values. Calculated from the `boundingContainer`.\r\n * @ignore\r\n */\r\n _this._boundingRect = { x: -40000, y: -40000, width: 80000, height: 80000 };\r\n /**\r\n * Coordinates tooltip's pointer (stem) should point to.\r\n */\r\n _this._pointTo = { x: 0, y: 0 };\r\n /**\r\n * If set to `true` the pointer/stem of the Tooltip will not go outside\r\n * Tooltip's width or height depending on pointer's orientation.\r\n *\r\n * @default false\r\n */\r\n _this.fitPointerToBounds = false;\r\n /**\r\n * If `tooltipOrientation` is vertical, it can be drawn below or above point\r\n * We need to know this when solving overlapping.\r\n */\r\n _this._verticalOrientation = \"up\";\r\n /**\r\n * @ignore\r\n */\r\n _this.fixDoc = true;\r\n _this.className = \"Tooltip\";\r\n _this.isMeasured = false;\r\n _this.getFillFromObject = true;\r\n _this.margin(5, 5, 5, 5);\r\n _this.defaultState.transitionDuration = 1;\r\n _this.hiddenState.transitionDuration = 1;\r\n // Create chrome/background\r\n var background = _this.background;\r\n background.interactionsEnabled = false;\r\n background.fillOpacity = 0.9;\r\n background.strokeWidth = 1;\r\n background.strokeOpacity = 1;\r\n background.stroke = color(\"#ffffff\");\r\n background.cornerRadius = 3;\r\n background.pointerLength = 6;\r\n background.pointerBaseWidth = 10;\r\n var dropShadow = new DropShadowFilter();\r\n dropShadow.dy = 1;\r\n dropShadow.dx = 1;\r\n dropShadow.opacity = 0.5;\r\n background.filters.push(dropShadow);\r\n _this.autoTextColor = true;\r\n // Create text element\r\n var label = _this.createChild(Label);\r\n label.shouldClone = false;\r\n _this.label = label;\r\n label.padding(7, 12, 4, 12);\r\n label.interactionsEnabled = false;\r\n label.horizontalCenter = \"middle\";\r\n label.fill = color(\"#ffffff\");\r\n _this._disposers.push(label);\r\n _this.label.events.on(\"sizechanged\", _this.drawBackground, _this);\r\n _this.label.zIndex = 1; // @todo remove this line when bg sorting is solved\r\n // Set defaults\r\n _this.pointerOrientation = \"vertical\";\r\n _this.animationDuration = 0;\r\n _this.animationEasing = $ease.cubicOut;\r\n _this.setPropertyValue(\"showInViewport\", false);\r\n // Set accessibility options\r\n _this.role = \"tooltip\";\r\n _this.visible = false;\r\n _this.opacity = 0;\r\n _this.x = 0;\r\n _this.y = 0;\r\n _this.events.on(\"visibilitychanged\", _this.handleVisibility, _this);\r\n // Apply theme\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n Tooltip.prototype.handleVisibility = function () {\r\n if (this.visible) {\r\n this.label.invalidate();\r\n }\r\n };\r\n Object.defineProperty(Tooltip.prototype, \"getStrokeFromObject\", {\r\n /**\r\n * Specifies if tooltip background should get stroke color from the sprite it is pointing to.\r\n *\r\n * @return {boolean}\r\n * @default false\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"getStrokeFromObject\");\r\n },\r\n /**\r\n * Specifies if tooltip background should get stroke color from the sprite it is pointing to.\r\n *\r\n * @param value boolean\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"getStrokeFromObject\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Tooltip.prototype, \"autoTextColor\", {\r\n /**\r\n * @return {boolean}\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"autoTextColor\");\r\n },\r\n /**\r\n * Specifies if text color should be chosen automatically for a better\r\n * readability.\r\n *\r\n * IMPORTANT: this feature is generally ignored, if `getFillFromObject = false`.\r\n *\r\n * If inheriting of `fill` color from object tooltip is displayed for is\r\n * disabled, this feature will not work. If you are explicitly setting a\r\n * color for tooltip background, you may set a color for its label as well\r\n * using `tooltip.label.fill` property.\r\n *\r\n *\r\n * @param value boolean\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"autoTextColor\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Tooltip.prototype, \"keepTargetHover\", {\r\n /**\r\n * @return Keep target hovered?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"keepTargetHover\");\r\n },\r\n /**\r\n * If this tooltip is displayed on hover on some other object, keep that\r\n * element hovered if hovering on the tooltip.\r\n *\r\n * @default false\r\n * @since 4.1.13\r\n * @param value Keep target hovered?\r\n */\r\n set: function (value) {\r\n var _this = this;\r\n if (this.setPropertyValue(\"keepTargetHover\", value, true)) {\r\n if (value) {\r\n this.hoverable = true;\r\n this.background.interactionsEnabled = true;\r\n this._disposers.push(this.events.on(\"over\", function (ev) {\r\n if (_this.targetSprite && _this.targetSprite.hoverable) {\r\n _this.targetSprite.isHover = true;\r\n }\r\n }));\r\n this._disposers.push(this.events.on(\"out\", function (ev) {\r\n if (_this.targetSprite && _this.targetSprite.hoverable) {\r\n //this.hideTooltip();\r\n //this.targetSprite.handleOut();\r\n _this.targetSprite.isHover = false;\r\n }\r\n }));\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Tooltip.prototype, \"showInViewport\", {\r\n /**\r\n * @return Force showing tooltip?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"showInViewport\");\r\n },\r\n /**\r\n * Normally, a tooltip will hide itself if it is pointing to a coordinate\r\n * that is outside viewport.\r\n *\r\n * Setting this setting to `true` will override that and make tooltip\r\n * appear next to the viewport edge closest to the target point.\r\n *\r\n * @default false\r\n * @since 4.5.7\r\n * @param value Force showing tooltip?\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"showInViewport\", value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Tooltip.prototype, \"getFillFromObject\", {\r\n /**\r\n * Specifies if tooltip background should get fill color from the sprite it is pointing to.\r\n *\r\n * @return {boolean}\r\n * @default true\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"getFillFromObject\");\r\n },\r\n /**\r\n * @param value boolean\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"getFillFromObject\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Creates and returns a background element.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Background\r\n */\r\n Tooltip.prototype.createBackground = function () {\r\n return new PointedRectangle();\r\n };\r\n Object.defineProperty(Tooltip.prototype, \"pointerOrientation\", {\r\n /**\r\n * @return Orientation\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"pointerOrientation\");\r\n },\r\n /**\r\n * Pointer orientation: `\"horizontal\"`, `\"vertical\"`, `\"up\"`, `\"down\"`,\r\n * `\"right\"`, or `\"left\"`.\r\n *\r\n * Options`\"horizontal\"` or `\"vertical\"` are location-aware, meaning they\r\n * will change position of the Tooltip based on the target point's position\r\n * in relation to chart center.\r\n *\r\n * Options `\"up\"`, `\"down\"`, `\"right\"`, `\"left\"` are static and will point\r\n * in the specified direction regardless of the position, even if that means\r\n * going out of chart/screen bounds.\r\n *\r\n * IMPORTANT: in some situations, like having multiple tooltips stacked for\r\n * multiple series, the `\"up\"` and `\"down\"` values might be ignored in order\r\n * to make tooltip overlap algorithm work.\r\n *\r\n * @default \"vertical\"\r\n * @param value Orientation\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"pointerOrientation\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Tooltip.prototype, \"animationDuration\", {\r\n /**\r\n * @return Orientation\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"animationDuration\");\r\n },\r\n /**\r\n * Duration in milliseconds for the animation to take place when the tooltip\r\n * is moving from one place to another.\r\n *\r\n * @default 0\r\n * @param value number\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"animationDuration\", value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Tooltip.prototype, \"animationEasing\", {\r\n /**\r\n * @return {Function}\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"animationEasing\");\r\n },\r\n /**\r\n * Tooltip animation (moving from one place to another) easing function.\r\n *\r\n * @default $ease.cubicOut\r\n * @param value (value: number) => number\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"animationEasing\", value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Tooltip.prototype, \"html\", {\r\n /**\r\n * @return HTML content\r\n */\r\n get: function () {\r\n return this.label.html;\r\n },\r\n /**\r\n * HTML content for the Tooltip.\r\n *\r\n * Provided value will be used as is, without applying any further\r\n * formatting to it.\r\n *\r\n * @param value HTML content\r\n */\r\n set: function (value) {\r\n if (this.label.html != value) {\r\n this.label.html = value;\r\n this.invalidate();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Tooltip.prototype, \"text\", {\r\n /**\r\n * @return SVG text\r\n */\r\n get: function () {\r\n return this.label.text;\r\n },\r\n /**\r\n * SVG text content for the Tooltip.\r\n *\r\n * Text can have a number of formatting options supported by\r\n * [[TextFormatter]].\r\n *\r\n * @param value SVG text\r\n */\r\n set: function (value) {\r\n if (this.label.text != value) {\r\n this.label.text = value;\r\n this.invalidate();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Creates the Tooltip.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Tooltip.prototype.draw = function () {\r\n _super.prototype.draw.call(this);\r\n var label = this.label;\r\n if (label.invalid) {\r\n label.validate();\r\n }\r\n var x = this._pointTo.x;\r\n var y = this._pointTo.y;\r\n var boundingRect = this._boundingRect;\r\n var textW = label.measuredWidth;\r\n var textH = label.measuredHeight;\r\n var pointerLength = this.background.pointerLength;\r\n var textX;\r\n var textY;\r\n if (this.ignoreBounds) {\r\n boundingRect = undefined;\r\n }\r\n // try to handle if text is wider than br\r\n if (boundingRect && this.fixDoc && textW > boundingRect.width) {\r\n // TODO maybe this isn't needed ?\r\n $utils.spritePointToDocument({ x: boundingRect.x, y: boundingRect.y }, this.parent);\r\n var p1 = $utils.spritePointToDocument({ x: boundingRect.x + boundingRect.width, y: boundingRect.y + boundingRect.height }, this.parent);\r\n var documentWidth = document.body.offsetWidth;\r\n // TODO maybe this isn't needed ?\r\n $utils.used(document.body.offsetHeight);\r\n if (p1.x > documentWidth / 2) {\r\n boundingRect.x = boundingRect.width - textW;\r\n }\r\n else {\r\n boundingRect.width = boundingRect.x + textW;\r\n }\r\n }\r\n var pointerOrientation = this.pointerOrientation;\r\n // horizontal\r\n if (pointerOrientation == \"horizontal\" || pointerOrientation == \"left\" || pointerOrientation == \"right\") {\r\n textY = -textH / 2;\r\n if (pointerOrientation == \"horizontal\") {\r\n if (boundingRect && x > boundingRect.x + boundingRect.width / 2) {\r\n textX = -textW / 2 - pointerLength;\r\n }\r\n else {\r\n textX = textW / 2 + pointerLength;\r\n }\r\n }\r\n else if (pointerOrientation == \"left\") {\r\n textX = textW / 2 + pointerLength;\r\n }\r\n else {\r\n textX = -textW / 2 - pointerLength;\r\n }\r\n }\r\n // vertical pointer\r\n else {\r\n if (boundingRect) {\r\n textX = $math.fitToRange(0, boundingRect.x - x + textW / 2, boundingRect.x - x + boundingRect.width - textW / 2);\r\n }\r\n if (pointerOrientation == \"vertical\") {\r\n if (boundingRect && y > boundingRect.y + textH + pointerLength) {\r\n textY = -textH - pointerLength;\r\n this._verticalOrientation = \"up\";\r\n }\r\n else {\r\n textY = pointerLength;\r\n this._verticalOrientation = \"down\";\r\n }\r\n }\r\n else if (pointerOrientation == \"down\") {\r\n textY = -textH - pointerLength;\r\n this._verticalOrientation = \"up\";\r\n }\r\n else {\r\n textY = pointerLength;\r\n this._verticalOrientation = \"down\";\r\n }\r\n }\r\n if (boundingRect) {\r\n textY = $math.fitToRange(textY, boundingRect.y - y, boundingRect.y + boundingRect.height - textH - y);\r\n }\r\n label.x = textX;\r\n label.y = textY;\r\n this.drawBackground();\r\n };\r\n /**\r\n * Overrides functionality from the superclass.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Tooltip.prototype.updateBackground = function () {\r\n this.group.addToBack(this.background.group);\r\n };\r\n /**\r\n * Draws Tooltip background (chrome, background and pointer/stem).\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Tooltip.prototype.drawBackground = function () {\r\n var label = this.label;\r\n var background = this.background;\r\n var textWidth = label.measuredWidth;\r\n var textHeight = label.measuredHeight;\r\n var boundingRect = this._boundingRect;\r\n var bgWidth = textWidth;\r\n var bgX = label.pixelX - textWidth / 2;\r\n var bgHeight = textHeight;\r\n var bgY = label.pixelY;\r\n var x = this._pointTo.x;\r\n var y = this._pointTo.y;\r\n var boundX1 = boundingRect.x - x;\r\n var boundX2 = boundX1 + boundingRect.width;\r\n var boundY1 = boundingRect.y - y;\r\n var boundY2 = boundY1 + boundingRect.height;\r\n background.x = bgX;\r\n background.y = bgY;\r\n background.width = bgWidth;\r\n background.height = bgHeight;\r\n if (this.fitPointerToBounds) {\r\n background.pointerX = $math.fitToRange(-background.x, boundX1 - background.x, boundX2 - background.x);\r\n background.pointerY = $math.fitToRange(-background.y, boundY1 - background.y, boundY2 - background.y);\r\n }\r\n else {\r\n background.pointerX = -background.x;\r\n background.pointerY = -background.y;\r\n }\r\n background.validate();\r\n };\r\n /**\r\n *\r\n */\r\n Tooltip.prototype.delayedPointTo = function (point, instantly) {\r\n var _this = this;\r\n if (this._pointToDisposer) {\r\n this._pointToDisposer.dispose();\r\n }\r\n this._pointToDisposer = registry.events.once(\"exitframe\", function () {\r\n _this.pointTo(point, instantly);\r\n });\r\n this.addDisposer(this._pointToDisposer);\r\n };\r\n /**\r\n * Set nes tooltip's anchor point and moves whole tooltip.\r\n *\r\n * @param x X coordinate\r\n * @param y Y coordinate\r\n */\r\n Tooltip.prototype.pointTo = function (point, instantly) {\r\n if (this._pointTo.x != point.x || this._pointTo.y != point.y) {\r\n this._pointTo = point;\r\n this.invalidate();\r\n // this helps to avoid strange animation from nowhere on initial show or when balloon was hidden already\r\n if (!this.visible || instantly) {\r\n this.moveTo(this._pointTo);\r\n if (this._animation) {\r\n this._animation.kill();\r\n }\r\n }\r\n else {\r\n // helps to avoid flicker on top/left corner\r\n if (this.pixelX == 0 && this.pixelY == 0) {\r\n this.moveTo(this._pointTo);\r\n }\r\n else {\r\n if (this._animation) {\r\n this._animation.kill();\r\n }\r\n this._animation = new Animation(this, [{ property: \"x\", to: point.x, from: this.pixelX }, { property: \"y\", to: point.y, from: this.pixelY }], this.animationDuration, this.animationEasing).start();\r\n }\r\n }\r\n }\r\n };\r\n /**\r\n * Sets numeric boundaries Tooltip needs to obey (so it does not go outside\r\n * specific area).\r\n *\r\n * @ignore Exclude from docs\r\n * @param rectangle Boundary rectangle\r\n */\r\n Tooltip.prototype.setBounds = function (rectangle) {\r\n var oldRect = this._boundingRect;\r\n if (oldRect.x != rectangle.x || oldRect.y != rectangle.y || oldRect.width != rectangle.width || oldRect.height != rectangle.height) {\r\n this._boundingRect = rectangle;\r\n this.invalidate();\r\n }\r\n };\r\n Object.defineProperty(Tooltip.prototype, \"boundingContainer\", {\r\n /**\r\n * Sets a [[Container]] instance to be used when calculating numeric\r\n * boundaries for the Tooltip.\r\n *\r\n * @ignore Exclude from docs\r\n * @param container Boundary container\r\n */\r\n set: function (container) {\r\n this._boundingContainer = container;\r\n // TODO remove closures ?\r\n container.events.on(\"sizechanged\", this.updateBounds, this);\r\n container.events.on(\"positionchanged\", this.updateBounds, this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Updates numeric boundaries for the Tooltip, based on the\r\n * `boundingCountrainer`.\r\n */\r\n Tooltip.prototype.updateBounds = function () {\r\n var boundingContainer = this._boundingContainer;\r\n // to global\r\n var rect = $utils.spriteRectToSvg({\r\n x: boundingContainer.pixelX,\r\n y: boundingContainer.pixelY,\r\n width: boundingContainer.maxWidth,\r\n height: boundingContainer.maxHeight\r\n }, boundingContainer);\r\n this.setBounds(rect);\r\n };\r\n Object.defineProperty(Tooltip.prototype, \"ignoreBounds\", {\r\n /**\r\n * @return Ignore chart bounds?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"ignoreBounds\");\r\n },\r\n /**\r\n * Normally, a tooltip's position will be adjusted so it always fits into\r\n * chart's coundaries.\r\n *\r\n * Setting this to `false` will disable such checks and will allow tooltip\r\n * to \"bleed over\" the edge of the chart.\r\n *\r\n * @default false\r\n * @since 4.10.8\r\n * @param value Ignore chart bounds?\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"ignoreBounds\", value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Tooltip.prototype, \"verticalOrientation\", {\r\n /**\r\n * If tooltipOrientation is vertical, it can be drawn below or above point.\r\n * We need to know this when solving overlapping.\r\n *\r\n * @ignore Exclude from docs\r\n * @return \"up\" | \"down\"\r\n */\r\n get: function () {\r\n return this._verticalOrientation;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Tooltip.prototype, \"tooltip\", {\r\n /**\r\n * To avoid stackoverflow\r\n * @ignore\r\n */\r\n get: function () {\r\n return undefined;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Copies properties and other attributes.\r\n *\r\n * @param source Source\r\n */\r\n Tooltip.prototype.copyFrom = function (source) {\r\n _super.prototype.copyFrom.call(this, source);\r\n this.label.copyFrom(source.label);\r\n if (source._boundingRect) {\r\n this._boundingRect = source._boundingRect;\r\n }\r\n };\r\n /**\r\n * Adds easing functions to \"function\" fields.\r\n *\r\n * @param field Field name\r\n * @return Assign as function?\r\n */\r\n Tooltip.prototype.asFunction = function (field) {\r\n return field == \"animationEasing\" || _super.prototype.asIs.call(this, field);\r\n };\r\n return Tooltip;\r\n}(Container));\r\nexport { Tooltip };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"Tooltip\"] = Tooltip;\r\n","/**\r\n * Functionality for drawing triangles.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Sprite } from \"../Sprite\";\r\nimport { registry } from \"../Registry\";\r\nimport * as $path from \"../rendering/Path\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Used to draw a triangle.\r\n *\r\n * @see {@link ITriangleEvents} for a list of available events\r\n * @see {@link ITriangleAdapters} for a list of available Adapters\r\n */\r\nvar Triangle = /** @class */ (function (_super) {\r\n __extends(Triangle, _super);\r\n /**\r\n * Constructor\r\n */\r\n function Triangle() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"Triangle\";\r\n _this.element = _this.paper.add(\"path\");\r\n _this.direction = \"top\";\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * Draws the element.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Triangle.prototype.draw = function () {\r\n _super.prototype.draw.call(this);\r\n var w = this.pixelWidth;\r\n var h = this.pixelHeight;\r\n var path;\r\n switch (this.direction) {\r\n case \"right\":\r\n path = $path.moveTo({ x: 0, y: 0 })\r\n + $path.lineTo({ x: w, y: h / 2 })\r\n + $path.lineTo({ x: 0, y: h })\r\n + $path.closePath();\r\n break;\r\n case \"left\":\r\n path = $path.moveTo({ x: w, y: 0 })\r\n + $path.lineTo({ x: 0, y: h / 2 })\r\n + $path.lineTo({ x: w, y: h })\r\n + $path.closePath();\r\n break;\r\n case \"bottom\":\r\n path = $path.moveTo({ x: 0, y: 0 })\r\n + $path.lineTo({ x: w, y: 0 })\r\n + $path.lineTo({ x: w / 2, y: h })\r\n + $path.closePath();\r\n break;\r\n case \"top\":\r\n path = $path.moveTo({ x: w / 2, y: 0 })\r\n + $path.lineTo({ x: w, y: h })\r\n + $path.lineTo({ x: 0, y: h })\r\n + $path.closePath();\r\n break;\r\n }\r\n this.path = path;\r\n };\r\n Object.defineProperty(Triangle.prototype, \"direction\", {\r\n /**\r\n * Returns direction of a triangle\r\n *\r\n * @return value\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"direction\");\r\n },\r\n /**\r\n * Sets direction of a triangle\r\n *\r\n * @param value\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"direction\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return Triangle;\r\n}(Sprite));\r\nexport { Triangle };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"Triangle\"] = Triangle;\r\n","/**\r\n * Functionality for drawing waved lines.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Line } from \"./Line\";\r\nimport { color } from \"../utils/Color\";\r\nimport { wavedLine } from \"../rendering/Smoothing\";\r\nimport * as $path from \"../rendering/Path\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Draws a waved line.\r\n *\r\n * @see {@link IWavedLineEvents} for a list of available events\r\n * @see {@link IWavedLineAdapters} for a list of available Adapters\r\n */\r\nvar WavedLine = /** @class */ (function (_super) {\r\n __extends(WavedLine, _super);\r\n /**\r\n * Constructor\r\n */\r\n function WavedLine() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"WavedLine\";\r\n _this.element = _this.paper.add(\"path\");\r\n _this.waveLength = 16;\r\n _this.waveHeight = 4;\r\n _this.tension = 0.8;\r\n _this.pixelPerfect = false;\r\n _this.fill = color();\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * Draws the waved line.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n WavedLine.prototype.draw = function () {\r\n //super.draw();\r\n var p1 = { x: this.x1, y: this.y1 };\r\n var p2 = { x: this.x2, y: this.y2 };\r\n this.path = $path.moveTo(p1) + wavedLine(p1, p2, this.waveLength, this.waveHeight, this.tension, true);\r\n };\r\n Object.defineProperty(WavedLine.prototype, \"waveLength\", {\r\n /**\r\n * @return Wave length (px)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"waveLength\");\r\n },\r\n /**\r\n * Wave length in pixels.\r\n *\r\n * @default 16\r\n * @param value Wave length (px)\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"waveLength\", value);\r\n this.invalidate();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(WavedLine.prototype, \"waveHeight\", {\r\n /**\r\n * @return Wave height (px)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"waveHeight\");\r\n },\r\n /**\r\n * Wave height in pixels.\r\n *\r\n * @default 4\r\n * @param value Wave height (px)\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"waveHeight\", value);\r\n this.invalidate();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(WavedLine.prototype, \"tension\", {\r\n /**\r\n * @return Tension\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"tension\");\r\n },\r\n /**\r\n * Tension of the wave.\r\n *\r\n * @default 0.8\r\n * @param value Tension\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"tension\", value);\r\n this.invalidate();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return WavedLine;\r\n}(Line));\r\nexport { WavedLine };\r\n","/**\r\n * Functionality for drawing rectangles with waved edges.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Rectangle } from \"./Rectangle\";\r\nimport { wavedLine } from \"../rendering/Smoothing\";\r\nimport * as $path from \"../rendering/Path\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Draws a rectangle with waved edges.\r\n *\r\n * @see {@link IWavedRectangleEvents} for a list of available events\r\n * @see {@link IWavedRectangleAdapters} for a list of available Adapters\r\n */\r\nvar WavedRectangle = /** @class */ (function (_super) {\r\n __extends(WavedRectangle, _super);\r\n /**\r\n * Constructor\r\n */\r\n function WavedRectangle() {\r\n var _this = \r\n // Init\r\n _super.call(this) || this;\r\n _this.className = \"WavedRectangle\";\r\n // Add path element\r\n _this.element = _this.paper.add(\"path\");\r\n // Set defaults\r\n _this.waveLength = 16;\r\n _this.waveHeight = 4;\r\n _this.tension = 0.8;\r\n _this.setPropertyValue(\"wavedLeft\", true);\r\n _this.setPropertyValue(\"wavedRight\", true);\r\n _this.setPropertyValue(\"wavedTop\", true);\r\n _this.setPropertyValue(\"wavedBottom\", true);\r\n // Apply theme\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * Draws the waved rectangle.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n WavedRectangle.prototype.draw = function () {\r\n _super.prototype.draw.call(this);\r\n var w = this.pixelWidth;\r\n var h = this.pixelHeight;\r\n if (w > 0 && h > 0) {\r\n var p1 = { x: 0, y: 0 };\r\n var p2 = { x: w, y: 0 };\r\n var p3 = { x: w, y: h };\r\n var p4 = { x: 0, y: h };\r\n var waveLengthH = Math.min(w, this.waveLength);\r\n var waveHeightH = Math.min(h, this.waveHeight);\r\n var waveLengthV = Math.min(h, this.waveLength);\r\n var waveHeightV = Math.min(w, this.waveHeight);\r\n var td = \"\";\r\n var rd = \"\";\r\n var bd = \"\";\r\n var ld = \"\";\r\n if (this.wavedTop) {\r\n td = wavedLine(p1, p2, waveLengthH, waveHeightH, this.tension, true);\r\n }\r\n if (this.wavedRight) {\r\n rd = wavedLine(p2, p3, waveLengthV, waveHeightV, this.tension, true);\r\n }\r\n if (this.wavedBottom) {\r\n bd = wavedLine(p3, p4, waveLengthH, waveHeightH, this.tension, true);\r\n }\r\n if (this.wavedLeft) {\r\n ld = wavedLine(p4, p1, waveLengthV, waveHeightV, this.tension, true);\r\n }\r\n this.path = $path.moveTo(p1) + td + $path.lineTo(p2) + rd + $path.lineTo(p3) + bd + $path.lineTo(p4) + ld + \"z\";\r\n }\r\n };\r\n Object.defineProperty(WavedRectangle.prototype, \"waveLength\", {\r\n /**\r\n * @return Wave length (px)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"waveLength\");\r\n },\r\n /**\r\n * Wave length in pixels.\r\n *\r\n * @default 16\r\n * @param value Wave length (px)\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"waveLength\", value);\r\n this.invalidate();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(WavedRectangle.prototype, \"waveHeight\", {\r\n /**\r\n * @return Wave height (px)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"waveHeight\");\r\n },\r\n /**\r\n * Wave height in pixels.\r\n *\r\n * @default 4\r\n * @param value Wave height (px)\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"waveHeight\", value);\r\n this.invalidate();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Sets which side should be waved or not. If particular side is set to\r\n * `false`, a straight line will be drawn on that side.\r\n *\r\n * @param top Top waved?\r\n * @param right Right side waved?\r\n * @param bottom Bottom Waved?\r\n * @param left Left side waved?\r\n */\r\n WavedRectangle.prototype.setWavedSides = function (top, right, bottom, left) {\r\n this.wavedTop = top;\r\n this.wavedRight = right;\r\n this.wavedBottom = bottom;\r\n this.wavedLeft = left;\r\n };\r\n Object.defineProperty(WavedRectangle.prototype, \"tension\", {\r\n /**\r\n * @return Tension\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"tension\");\r\n },\r\n /**\r\n * Tension of the wave.\r\n *\r\n * @default 0.8\r\n * @param value Tension\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"tension\", value);\r\n this.invalidate();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(WavedRectangle.prototype, \"wavedRight\", {\r\n /**\r\n * @return Wave right side?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"wavedRight\");\r\n },\r\n /**\r\n * Specifies if right side should be waved.\r\n *\r\n * @default true\r\n * @param value Waved?\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"wavedRight\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(WavedRectangle.prototype, \"wavedLeft\", {\r\n /**\r\n * @return Wave left side?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"wavedLeft\");\r\n },\r\n /**\r\n * Specifies if left side should be waved.\r\n *\r\n * @default true\r\n * @param value Waved?\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"wavedLeft\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(WavedRectangle.prototype, \"wavedTop\", {\r\n /**\r\n * @return Wave top side?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"wavedTop\");\r\n },\r\n /**\r\n * Specifies if top side should be waved.\r\n *\r\n * @default true\r\n * @param value Waved?\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"wavedTop\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(WavedRectangle.prototype, \"wavedBottom\", {\r\n /**\r\n * @return Wave bottom side?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"wavedBottom\");\r\n },\r\n /**\r\n * Specifies if bottom side should be waved.\r\n *\r\n * @default true\r\n * @param value Waved?\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"wavedBottom\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return WavedRectangle;\r\n}(Rectangle));\r\nexport { WavedRectangle };\r\n","/**\r\n * Export module.\r\n *\r\n * Parts of Export functionality rely on the following third party libraries:\r\n *\r\n * [canvg.js](https://github.com/canvg/canvg)\r\n * Copyright (c) Gabe Lerner\r\n * Licensed under [MIT](https://github.com/canvg/canvg/blob/master/LICENSE)\r\n *\r\n * [pdfmake](http://pdfmake.org/)\r\n * Copyright (c) 2014 bpampuch\r\n * Licensed under [MIT](https://github.com/bpampuch/pdfmake/blob/master/LICENSE)\r\n *\r\n * [SheetJS Community Edition](https://github.com/sheetjs/js-xlsx)\r\n * Licensed under [Apache License 2.0](https://github.com/SheetJS/js-xlsx/blob/master/LICENSE)\r\n *\r\n * [JSZip](http://stuartk.com/jszip)\r\n * Copyright (c) Stuart Knightley\r\n * Dual licenced under the [MIT license or GPLv3](https://raw.githubusercontent.com/Stuk/jszip/master/LICENSE.markdown).\r\n */\r\nimport { __awaiter, __extends, __generator } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { ExportMenu } from \"./ExportMenu\";\r\nimport { Adapter } from \"../utils/Adapter\";\r\nimport { Sprite } from \"../Sprite\";\r\nimport { Modal } from \"../elements/Modal\";\r\nimport { List } from \"../utils/List\";\r\nimport { Dictionary } from \"../utils/Dictionary\";\r\nimport { DateFormatter } from \"../formatters/DateFormatter\";\r\nimport { DurationFormatter } from \"../formatters/DurationFormatter\";\r\nimport { NumberFormatter } from \"../formatters/NumberFormatter\";\r\nimport { Language } from \"../utils/Language\";\r\nimport { Validatable } from \"../utils/Validatable\";\r\nimport { color } from \"../utils/Color\";\r\nimport { registry } from \"../Registry\";\r\nimport { options } from \"../Options\";\r\nimport { StyleRule, getComputedStyle } from \"../utils/DOM\";\r\nimport * as $browser from \"../utils/Browser\";\r\nimport * as $object from \"../utils/Object\";\r\nimport * as $net from \"../utils/Net\";\r\nimport * as $dom from \"../utils/DOM\";\r\nimport * as $type from \"../utils/Type\";\r\nimport * as $log from \"../utils/Log\";\r\nimport * as $utils from \"../utils/Utils\";\r\nimport * as $array from \"../utils/Array\";\r\nimport * as $math from \"../utils/Math\";\r\nimport * as $strings from \"../utils/Strings\";\r\n// This is used to cache the pdfmake loading\r\nvar pdfmakePromise;\r\n/**\r\n * Loads pdfmake dynamic module\r\n *\r\n * This is an asynchronous function. Check the description of `getImage()`\r\n * for description and example usage.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Instance of pdfmake\r\n * @async\r\n */\r\nfunction _pdfmake() {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var a, pdfmake, vfs_fonts, global;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4 /*yield*/, Promise.all([\r\n import(/* webpackChunkName: \"pdfmake\" */ \"pdfmake/build/pdfmake.js\"),\r\n import(/* webpackChunkName: \"pdfmake\" */ \"../../pdfmake/vfs_fonts\")\r\n ])];\r\n case 1:\r\n a = _a.sent();\r\n pdfmake = a[0];\r\n vfs_fonts = a[1];\r\n global = window;\r\n global.pdfMake = global.pdfMake || {};\r\n global.pdfMake.vfs = vfs_fonts.default;\r\n pdfmake.vfs = vfs_fonts.default;\r\n return [2 /*return*/, pdfmake];\r\n }\r\n });\r\n });\r\n}\r\n// TODO better parsing\r\nvar fontFamilySrcRegexp = /src: ([^;]+);/;\r\n// TODO better checks\r\nfunction supportsBlobUri() {\r\n return window.navigator.msSaveOrOpenBlob != null;\r\n}\r\n// TODO move into utils or something ?\r\nfunction blobToDataUri(blob) {\r\n return new Promise(function (resolve, reject) {\r\n // TODO handle abort ?\r\n var f = new FileReader();\r\n f.onload = function (e) { resolve(f.result); };\r\n f.onerror = function (e) { reject(e); };\r\n f.readAsDataURL(blob);\r\n });\r\n}\r\nfunction getCssRules(s) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var sheet, e_1;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n sheet = s.sheet;\r\n _a.label = 1;\r\n case 1:\r\n _a.trys.push([1, 2, , 4]);\r\n return [2 /*return*/, sheet.cssRules];\r\n case 2:\r\n e_1 = _a.sent();\r\n return [4 /*yield*/, new Promise(function (success, error) {\r\n s.addEventListener(\"load\", function () {\r\n success(sheet.cssRules);\r\n }, true);\r\n s.addEventListener(\"error\", function (e) {\r\n error(e);\r\n }, true);\r\n setTimeout(function () {\r\n error(new Error(\"Timeout while waiting for <style> to load\"));\r\n }, 10000);\r\n })];\r\n case 3: \r\n // Needed because of https://bugzilla.mozilla.org/show_bug.cgi?id=625013\r\n return [2 /*return*/, _a.sent()];\r\n case 4: return [2 /*return*/];\r\n }\r\n });\r\n });\r\n}\r\n// This loads a stylesheet by URL and then calls the function with it\r\n// TODO this should be moved into utils or something\r\nfunction loadStylesheet(doc, url, f) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var response, e_2, s, rules;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n _a.trys.push([0, 2, , 3]);\r\n return [4 /*yield*/, $net.load(url)];\r\n case 1:\r\n response = _a.sent();\r\n return [3 /*break*/, 3];\r\n case 2:\r\n e_2 = _a.sent();\r\n console.error(\"Failed to load stylesheet\", url, e_2);\r\n return [2 /*return*/];\r\n case 3:\r\n s = doc.createElement(\"style\");\r\n s.textContent = response.response;\r\n if (options.nonce != \"\") {\r\n s.setAttribute(\"nonce\", options.nonce);\r\n }\r\n doc.head.appendChild(s);\r\n _a.label = 4;\r\n case 4:\r\n _a.trys.push([4, , 7, 8]);\r\n return [4 /*yield*/, getCssRules(s)];\r\n case 5:\r\n rules = _a.sent();\r\n return [4 /*yield*/, eachStylesheet(doc, url, rules, f)];\r\n case 6:\r\n _a.sent();\r\n return [3 /*break*/, 8];\r\n case 7:\r\n doc.head.removeChild(s);\r\n return [7 /*endfinally*/];\r\n case 8: return [2 /*return*/];\r\n }\r\n });\r\n });\r\n}\r\n// This calls a function for each CSSRule inside of a CSSStyleSheet.\r\n// If the CSSStyleSheet has any @import, then it will recursively call the function for those CSSRules too.\r\n// TODO this should be moved into utils or something\r\nfunction eachStylesheet(doc, topUrl, rules, f) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var promises, length, i, rule, url;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n promises = [];\r\n length = rules.length;\r\n for (i = 0; i < length; i++) {\r\n rule = rules[i];\r\n if (rule.type === CSSRule.IMPORT_RULE) {\r\n url = rule.href;\r\n if (url) {\r\n url = $utils.joinUrl(topUrl, url);\r\n promises.push(loadStylesheet(doc, url, f));\r\n }\r\n }\r\n else {\r\n f(topUrl, rule);\r\n }\r\n }\r\n if (!promises.length) return [3 /*break*/, 2];\r\n return [4 /*yield*/, Promise.all(promises)];\r\n case 1:\r\n _a.sent();\r\n _a.label = 2;\r\n case 2: return [2 /*return*/];\r\n }\r\n });\r\n });\r\n}\r\n// This calls a function for each CSSRule for all of the stylesheets in the page.\r\n// If the CSSStyleSheet has any @import, then it will recursively call the function for those CSSRules too.\r\n// TODO this should be moved into utils or something\r\nfunction eachStylesheets(f) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var iframe, doc_1;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n iframe = document.createElement(\"iframe\");\r\n // This causes it to use the same origin policy as the parent page\r\n iframe.src = \"about:blank\";\r\n // This tries to make it more accessible for screen readers\r\n iframe.setAttribute(\"title\", \"\");\r\n document.head.appendChild(iframe);\r\n _a.label = 1;\r\n case 1:\r\n _a.trys.push([1, , 3, 4]);\r\n doc_1 = iframe.contentDocument;\r\n // TODO use $dom.getRoot instead of document ?\r\n return [4 /*yield*/, Promise.all($array.map(document.styleSheets, function (sheet) {\r\n var url = sheet.href;\r\n if (url == null) {\r\n return eachStylesheet(doc_1, location.href, sheet.cssRules, f);\r\n }\r\n else {\r\n url = $utils.joinUrl(location.href, url);\r\n return loadStylesheet(doc_1, url, f);\r\n }\r\n }))];\r\n case 2:\r\n // TODO use $dom.getRoot instead of document ?\r\n _a.sent();\r\n return [3 /*break*/, 4];\r\n case 3:\r\n document.head.removeChild(iframe);\r\n return [7 /*endfinally*/];\r\n case 4: return [2 /*return*/];\r\n }\r\n });\r\n });\r\n}\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * [[Export]] allows downloading of current snapshot of the chart as an\r\n * image, PDF, or its data in various formats.\r\n *\r\n * The export functionality is enabled by default in charts and is accessible\r\n * via API or optional export menu.\r\n *\r\n * To enable menu, simply access export's `menu` property. E.g.:\r\n *\r\n * ```TypeScript\r\n * chart.exporting.menu = new am4core.ExportMenu();\r\n * ```\r\n * ```JavaScript\r\n * chart.exporting.menu = new am4core.ExportMenu();\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"exporting\": {\r\n * \"menu\": {}\r\n * }\r\n * }\r\n * ```\r\n *\r\n * To export via API, use `export()` method:\r\n *\r\n * ```TypeScript\r\n * chart.exporting.export(type, [options]);\r\n * ```\r\n * ```JavaScript\r\n * chart.exporting.export(type, [options]);\r\n * ```\r\n *\r\n * E.g.:\r\n *\r\n * ```TypeScript\r\n * chart.exporting.export(\"png\");\r\n * ```\r\n * ```JavaScript\r\n * chart.exporting.export(\"png\");\r\n * ```\r\n *\r\n * @todo Better loading indicator?\r\n * @todo Implement multiplier option\r\n * @todo Handling of hanged exports\r\n * @important\r\n */\r\nvar Export = /** @class */ (function (_super) {\r\n __extends(Export, _super);\r\n /**\r\n * Constructor\r\n */\r\n function Export(container) {\r\n var _this = _super.call(this) || this;\r\n /**\r\n * Adapter.\r\n */\r\n _this.adapter = new Adapter(_this);\r\n /**\r\n * Holds options for each format.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n _this._formatOptions = new Dictionary();\r\n /**\r\n * Extra [[Sprite]] elements to include in exports.\r\n */\r\n _this._extraSprites = [];\r\n /**\r\n * A list of [[Sprite]] elements that need to be valid before export\r\n * commences.\r\n */\r\n _this._validateSprites = [];\r\n /**\r\n * Holds an array of data field names. If set, exported data fields will try\r\n * to maintain this order.\r\n *\r\n * If not set (default), the export will try to maintain the same order as\r\n * in source data, or as in `dataFields` (if set).\r\n *\r\n * @since 4.9.7\r\n */\r\n _this.dataFieldsOrder = [];\r\n /**\r\n * Indicates whether data fields were generated dynamically (`true`) or\r\n * if they were pre-set by the user (`false`).\r\n */\r\n _this._dynamicDataFields = true;\r\n /**\r\n * Holds a list of objects that were temporarily removed from the DOM while\r\n * exporting. Those most probably are tainted images, or foreign objects that\r\n * would otherwise prevent SVG to be converted to canvas.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n _this._removedObjects = new List();\r\n /**\r\n * Holds references to the objects that were temporarily hidden when export\r\n * started, so that we can reveal them back when export ends.\r\n */\r\n _this._hiddenObjects = [];\r\n /**\r\n * Indicates if non-exportable objects are now hidden;\r\n */\r\n _this._objectsAlreadyHidden = false;\r\n /**\r\n * Exported files will be prefixed with whatever it is set here.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n _this._filePrefix = \"amCharts\";\r\n /**\r\n * If you are using web fonts (such as Google Fonts), your chart might be\r\n * using them as well.\r\n *\r\n * Normally, exporting to image will require to download these fonts so the\r\n * are carried over to exported image.\r\n *\r\n * This setting can be used to disable or enable this functionality.\r\n *\r\n * @default true\r\n */\r\n _this.useWebFonts = true;\r\n /**\r\n * Many modern displays have use more actual pixels per displayed pixel. This\r\n * results in sharper images on screen. Unfortunately, when exported to a\r\n * bitmap image of the sam width/height size it will lose those extra pixels,\r\n * resulting in somewhat blurry image.\r\n *\r\n * This is why we are going to export images larger than they are, so that we\r\n * don't lose any details.\r\n *\r\n * If you'd rather export images without change in size, set this to `false`.\r\n *\r\n * @default true\r\n */\r\n _this.useRetina = true;\r\n /**\r\n * By default Export will try to use built-in method for transforming chart\r\n * into an image for download, then fallback to external library (canvg) for\r\n * conversion if failed.\r\n *\r\n * Setting this to `false` will force use of external library for all export\r\n * operations.\r\n *\r\n * It might be useful to turn off simplified export if you are using strict\r\n * content security policies, that disallow images with blobs as their\r\n * source.\r\n *\r\n * @default true\r\n * @since 4.2.5\r\n */\r\n _this.useSimplifiedExport = true;\r\n /**\r\n * If export operation takes longer than milliseconds in this second, we will\r\n * show a modal saying export operation took longer than expected.\r\n */\r\n _this.timeoutDelay = 2000;\r\n _this._exportRunning = false;\r\n /**\r\n * Indicator used by [[Component]].\r\n *\r\n * @ignore\r\n */\r\n _this._prevHasData = false;\r\n _this._container = container;\r\n _this.className = \"Export\";\r\n // Set default options\r\n _this._formatOptions.setKey(\"png\", {});\r\n _this._formatOptions.setKey(\"jpg\", {\r\n quality: 0.8\r\n });\r\n _this._formatOptions.setKey(\"gif\", {});\r\n _this._formatOptions.setKey(\"svg\", {});\r\n _this._formatOptions.setKey(\"pdf\", {\r\n fontSize: 14,\r\n imageFormat: \"png\",\r\n align: \"left\",\r\n addURL: true,\r\n addColumnNames: true\r\n });\r\n _this._formatOptions.setKey(\"json\", {\r\n indent: 2,\r\n useLocale: true\r\n });\r\n _this._formatOptions.setKey(\"csv\", {\r\n addColumnNames: true,\r\n emptyAs: \"\",\r\n addBOM: true\r\n });\r\n _this._formatOptions.setKey(\"xlsx\", {\r\n addColumnNames: true,\r\n useLocale: true,\r\n emptyAs: \"\"\r\n });\r\n _this._formatOptions.setKey(\"html\", {\r\n addColumnNames: true,\r\n emptyAs: \"\"\r\n });\r\n _this._formatOptions.setKey(\"pdfdata\", {\r\n fontSize: 14,\r\n imageFormat: \"png\",\r\n addURL: true,\r\n addColumnNames: true,\r\n emptyAs: \"\"\r\n });\r\n _this._formatOptions.setKey(\"print\", {\r\n delay: 500,\r\n printMethod: \"iframe\"\r\n });\r\n // Add options adapter\r\n _this.adapter.add(\"options\", function (arg) {\r\n var formatOptions = _this._formatOptions.getKey(arg.type);\r\n if (arg.options) {\r\n arg.options = $object.merge(formatOptions, arg.options);\r\n }\r\n else {\r\n arg.options = formatOptions;\r\n }\r\n return arg;\r\n });\r\n _this.applyTheme();\r\n _this.dispatchImmediately(\"inited\");\r\n return _this;\r\n }\r\n Object.defineProperty(Export.prototype, \"menu\", {\r\n /**\r\n * @return ExportMenu instance\r\n */\r\n get: function () {\r\n return this._menu;\r\n },\r\n /**\r\n * An instance of [[ExportMenu]].\r\n *\r\n * To add an export menu to a chart, set this to a new instance of\r\n * [[ExportMenu]].\r\n *\r\n * ```TypeScript\r\n * chart.exporting.menu = new am4core.ExportMenu();\r\n * ```\r\n * ```JavaScript\r\n * chart.exporting.menu = new am4core.ExportMenu();\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"exporting\": {\r\n * \"menu\": {}\r\n * }\r\n * }\r\n * ```\r\n *\r\n * @param menu ExportMenu instance\r\n */\r\n set: function (menu) {\r\n var _this = this;\r\n if (this._menu) {\r\n this.removeDispose(this._menu);\r\n }\r\n this._menu = menu;\r\n // Set container and language\r\n this._menu.container = this.container;\r\n this._menu.language = this._language;\r\n // Add adapter to check for browser support\r\n this._menu.adapter.add(\"branch\", function (arg) {\r\n arg.branch.unsupported = !_this.typeSupported(arg.branch.type);\r\n return arg;\r\n });\r\n // Add click events\r\n this._menu.events.on(\"hit\", function (ev) {\r\n _this.export(ev.branch.type, ev.branch.options);\r\n _this.menu.close();\r\n });\r\n this._menu.events.on(\"enter\", function (ev) {\r\n _this.export(ev.branch.type, ev.branch.options);\r\n _this.menu.close();\r\n });\r\n this._menu.events.on(\"over\", function (ev) {\r\n _this._disablePointers();\r\n });\r\n this._menu.events.on(\"out\", function (ev) {\r\n setTimeout(function () { _this._releasePointers(); }, 10);\r\n });\r\n // Dispatch event\r\n this.dispatchImmediately(\"menucreated\");\r\n // Prefix with Sprite's class name\r\n this._menu.adapter.add(\"classPrefix\", function (obj) {\r\n obj.classPrefix = options.classNamePrefix + obj.classPrefix;\r\n return obj;\r\n });\r\n // Add menu to disposers so that it's destroyed when Export is disposed\r\n this._disposers.push(this._menu);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Checks if this specific menu item type is supported by current system.\r\n *\r\n * @param type Menu item type\r\n * @return `false` if not supported\r\n */\r\n Export.prototype.typeSupported = function (type) {\r\n var supported = true;\r\n var options = this.getFormatOptions(type);\r\n if ($type.hasValue(options) && options.disabled) {\r\n supported = false;\r\n }\r\n else if (type === \"pdf\") {\r\n //supported = this.downloadSupport();\r\n }\r\n else if (type === \"xlsx\") {\r\n //supported = (this.downloadSupport() && this._hasData()) ? true : false;\r\n supported = this._hasData() ? true : false;\r\n }\r\n else if (type == \"print\" && !window.print) {\r\n supported = false;\r\n }\r\n else if ([\"json\", \"csv\", \"html\", \"pdfdata\"].indexOf(type) !== -1 && !this._hasData()) {\r\n supported = false;\r\n }\r\n return this.adapter.apply(\"supported\", {\r\n supported: supported,\r\n type: type\r\n }).supported;\r\n };\r\n /**\r\n * Checks if data is available.\r\n *\r\n * @return Has data?\r\n */\r\n Export.prototype._hasData = function () {\r\n return this.data && this.data.length;\r\n };\r\n /**\r\n * Get function to handle export for particular format.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Export.prototype._getFunction = function (type) {\r\n switch (type) {\r\n case \"png\":\r\n case \"gif\":\r\n case \"jpg\":\r\n return this.getImage;\r\n case \"svg\":\r\n return this.getSVG;\r\n case \"pdf\":\r\n case \"pdfdata\":\r\n return this.getPDF;\r\n case \"xlsx\":\r\n return this.getExcel;\r\n case \"csv\":\r\n return this.getCSV;\r\n case \"json\":\r\n return this.getJSON;\r\n case \"html\":\r\n return this.getHTML;\r\n case \"print\":\r\n return this.getPrint;\r\n default:\r\n return this.unsupported;\r\n }\r\n };\r\n /**\r\n * Initiates export procedure.\r\n *\r\n * @param type Export type\r\n * @param options Options\r\n * @return `true` if export was successful\r\n * @async\r\n */\r\n Export.prototype.export = function (type, options) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var event_1, func, data, event_2, event_3;\r\n var _this = this;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n // Check if it's a custom item, and do nothing or execute custom callback\r\n if (type == \"custom\") {\r\n this.handleCustom(options);\r\n return [2 /*return*/, true];\r\n }\r\n // Set export running flag\r\n this._exportRunning = true;\r\n // Dispatch event\r\n if (this.events.isEnabled(\"exportstarted\")) {\r\n event_1 = {\r\n \"type\": \"exportstarted\",\r\n \"target\": this,\r\n \"format\": type,\r\n \"options\": options\r\n };\r\n this.events.dispatchImmediately(\"exportstarted\", event_1);\r\n }\r\n // Schedule a preloader\r\n this.showPreloader();\r\n // Schedule a timeout\r\n if (this.timeoutDelay) {\r\n this.hideTimeout();\r\n this._timeoutTimeout = this.setTimeout(function () {\r\n // Dispatch event\r\n if (_this.events.isEnabled(\"exporttimedout\")) {\r\n var event_4 = {\r\n \"type\": \"exporttimedout\",\r\n \"target\": _this,\r\n \"format\": type,\r\n \"options\": options\r\n };\r\n _this.events.dispatchImmediately(\"exporttimedout\", event_4);\r\n }\r\n // Show modal\r\n _this.showTimeout();\r\n }, this.timeoutDelay);\r\n }\r\n // Hide items that should not be exported\r\n this.hideNonExportableSprites();\r\n func = this._getFunction(type);\r\n // Give chance for plugins to override both function and options\r\n options = this.adapter.apply(\"options\", {\r\n options: options,\r\n type: type\r\n }).options;\r\n func = this.adapter.apply(\"exportFunction\", {\r\n func: func,\r\n type: type,\r\n options: options\r\n }).func;\r\n return [4 /*yield*/, func.call(this, type, options)];\r\n case 1:\r\n data = _a.sent();\r\n // Release pointers\r\n this._exportRunning = false;\r\n this._releasePointers();\r\n // Restore temporarily hidden elements\r\n this.restoreNonExportableSprites();\r\n if (data) {\r\n // Dispatch event\r\n if (this.events.isEnabled(\"exportfinished\")) {\r\n event_2 = {\r\n \"type\": \"exportfinished\",\r\n \"target\": this,\r\n \"format\": type,\r\n \"options\": options\r\n };\r\n this.events.dispatchImmediately(\"exportfinished\", event_2);\r\n }\r\n // Hide preloader and timeout modals\r\n this.hidePreloader();\r\n this.hideTimeout();\r\n if (this.menu) {\r\n this.menu.close();\r\n }\r\n // Download or print\r\n if (type === \"print\") {\r\n return [2 /*return*/, this.print(data, options, this.adapter.apply(\"title\", {\r\n title: this.title,\r\n options: options\r\n }).title)];\r\n }\r\n else {\r\n if (type == \"pdfdata\") {\r\n return [2 /*return*/, this.download(data, this.filePrefix + \".pdf\")];\r\n }\r\n return [2 /*return*/, this.download(data, this.filePrefix + \".\" + type, (options && options.addBOM))];\r\n }\r\n }\r\n else {\r\n // Throw exception?\r\n // @todo\r\n // Dispatch event\r\n if (this.events.isEnabled(\"error\")) {\r\n event_3 = {\r\n \"type\": \"error\",\r\n \"target\": this,\r\n \"format\": type,\r\n \"options\": options\r\n };\r\n this.events.dispatchImmediately(\"error\", event_3);\r\n }\r\n return [2 /*return*/, false];\r\n }\r\n return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * A function that should handle unsupported export types.\r\n *\r\n * @ignore Exclude from docs\r\n * @param type Export type\r\n * @param options Options\r\n * @return Promise\r\n * @async\r\n */\r\n Export.prototype.unsupported = function (type, options) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n return __generator(this, function (_a) {\r\n // TODO should this return `undefined`?\r\n return [2 /*return*/, \"\"];\r\n });\r\n });\r\n };\r\n /**\r\n * Handles click on a \"custom\" menu item.\r\n *\r\n * Basically, if it has \"callback\" enabled, it will be called. Nothing else.\r\n *\r\n * @ignore Exclude from docs\r\n * @param options Options\r\n */\r\n Export.prototype.handleCustom = function (options) {\r\n if ($type.hasValue(options) && $type.hasValue(options.callback)) {\r\n options.callback.call(options.callbackTarget || this, options);\r\n }\r\n };\r\n /**\r\n * Requests a Print of the chart.\r\n *\r\n * @param type Export type\r\n * @param options Options\r\n * @return Promise\r\n * @async\r\n */\r\n Export.prototype.getPrint = function (type, options) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n return __generator(this, function (_a) {\r\n return [2 /*return*/, this.getImage(\"png\", options)];\r\n });\r\n });\r\n };\r\n /**\r\n * A function that returns data: URI encoded @font-family, so that way it can be embedded into SVG.\r\n *\r\n * @ignore Exclude from docs\r\n * @return String which can be embedded directly into a <style> element.\r\n * @async\r\n */\r\n Export.prototype.getFontFamilies = function () {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var DOMURL, blobs, promises, a;\r\n var _this = this;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n DOMURL = this.getDOMURL();\r\n blobs = [];\r\n promises = [];\r\n return [4 /*yield*/, eachStylesheets(function (topUrl, rule) {\r\n if (rule.type === CSSRule.FONT_FACE_RULE) {\r\n var cssText_1 = rule.cssText;\r\n // TODO this is necessary because Edge doesn't let you access the src using getPropertyValue\r\n var src = fontFamilySrcRegexp.exec(cssText_1);\r\n if (src !== null) {\r\n // TODO make this faster (don't create Promises for non-url stuff)\r\n var urls = src[1].split(/ *, */).map(function (url) { return __awaiter(_this, void 0, void 0, function () {\r\n var a, after, fullUrl, response, url_1, e_3;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n a = /^url\\([\"']?([^\"'\\)]+)[\"']?\\)([^,]*)$/.exec(url);\r\n if (!(a === null)) return [3 /*break*/, 1];\r\n return [2 /*return*/, url];\r\n case 1:\r\n after = a[2];\r\n fullUrl = $utils.joinUrl(topUrl, a[1]);\r\n if (this.webFontFilter && !fullUrl.match(this.webFontFilter)) {\r\n return [2 /*return*/, null];\r\n }\r\n _a.label = 2;\r\n case 2:\r\n _a.trys.push([2, 7, , 8]);\r\n return [4 /*yield*/, $net.load(fullUrl, undefined, { responseType: \"blob\" })];\r\n case 3:\r\n response = _a.sent();\r\n if (!supportsBlobUri()) return [3 /*break*/, 4];\r\n url_1 = DOMURL.createObjectURL(response.blob);\r\n blobs.push(url_1);\r\n return [3 /*break*/, 6];\r\n case 4: return [4 /*yield*/, blobToDataUri(response.blob)];\r\n case 5:\r\n url_1 = _a.sent();\r\n _a.label = 6;\r\n case 6: \r\n // TODO should it should escape the URI ?\r\n return [2 /*return*/, \"url(\\\"\" + url_1 + \"\\\")\" + after];\r\n case 7:\r\n e_3 = _a.sent();\r\n console.error(\"Failed to load font\", fullUrl, e_3);\r\n return [2 /*return*/, null];\r\n case 8: return [2 /*return*/];\r\n }\r\n });\r\n }); });\r\n promises.push(Promise.all(urls).then(function (a) {\r\n a = a.filter(function (x) { return x != null; });\r\n if (a.length === 0) {\r\n return \"\";\r\n }\r\n else {\r\n return cssText_1.replace(fontFamilySrcRegexp, \"src: \" + a.join(\", \") + \";\");\r\n }\r\n }));\r\n }\r\n }\r\n })];\r\n case 1:\r\n _a.sent();\r\n return [4 /*yield*/, Promise.all(promises)];\r\n case 2:\r\n a = _a.sent();\r\n return [2 /*return*/, {\r\n blobs: blobs,\r\n cssText: a.filter(function (x) { return !!x; }).join(\"\\n\")\r\n }];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Produces image output from the element.\r\n *\r\n * Converts to a `Canvas` first, then produces an image to download.\r\n *\r\n * This is an asynchronous function. Rather than returning a result, it\r\n * returns a Promise.\r\n *\r\n * You can use `await` notion from other async functions, or `then()`\r\n * anywhere else.\r\n *\r\n * ```TypeScript\r\n * let img;\r\n *\r\n * // Async\r\n * img = await chart.exporting.getImage( \"png\" );\r\n *\r\n * // Sync\r\n * chart.exporting.getImage( \"png\" ).then( ( data ) => {\r\n * img = data;\r\n * } );\r\n * ```\r\n * ```JavaScript\r\n * var img;\r\n * chart.exporting.getImage( \"png\" ).then( ( data ) => {\r\n * img = data;\r\n * } );\r\n * ```\r\n *\r\n * @param type Image format\r\n * @param options Options\r\n * @param includeExtras Should extra sprites be included if set?\r\n * @return Promise\r\n */\r\n Export.prototype.getImage = function (type, options, includeExtras) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var prehidden, canvas, newCanvas, uri, e_4, data, data;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n prehidden = this._objectsAlreadyHidden;\r\n if (!prehidden) {\r\n this.hideNonExportableSprites();\r\n }\r\n if (!$type.hasValue(options)) {\r\n options = this.getFormatOptions(type);\r\n }\r\n // Wait for required elements to be ready before proceeding\r\n return [4 /*yield*/, this.awaitValidSprites()];\r\n case 1:\r\n // Wait for required elements to be ready before proceeding\r\n _a.sent();\r\n return [4 /*yield*/, this.simplifiedImageExport()];\r\n case 2:\r\n if (!_a.sent()) return [3 /*break*/, 10];\r\n canvas = void 0;\r\n _a.label = 3;\r\n case 3:\r\n _a.trys.push([3, 7, , 9]);\r\n return [4 /*yield*/, this.getCanvas(options)];\r\n case 4:\r\n canvas = _a.sent();\r\n if (!(includeExtras !== false)) return [3 /*break*/, 6];\r\n return [4 /*yield*/, this.addExtras(canvas, options)];\r\n case 5:\r\n newCanvas = _a.sent();\r\n this.disposeCanvas(canvas);\r\n canvas = newCanvas;\r\n _a.label = 6;\r\n case 6:\r\n uri = canvas.toDataURL(this.getContentType(type), options.quality);\r\n // Get rid of the canvas\r\n this.disposeCanvas(canvas);\r\n if (!prehidden) {\r\n this.restoreNonExportableSprites();\r\n }\r\n return [2 /*return*/, uri];\r\n case 7:\r\n e_4 = _a.sent();\r\n console.error(e_4.message + \"\\n\" + e_4.stack);\r\n $log.warn(\"Simple export failed, falling back to advanced export\");\r\n if (canvas) {\r\n this.disposeCanvas(canvas);\r\n }\r\n return [4 /*yield*/, this.getImageAdvanced(type, options, includeExtras)];\r\n case 8:\r\n data = _a.sent();\r\n if (!prehidden) {\r\n this.restoreNonExportableSprites();\r\n }\r\n return [2 /*return*/, data];\r\n case 9: return [3 /*break*/, 12];\r\n case 10: return [4 /*yield*/, this.getImageAdvanced(type, options, includeExtras)];\r\n case 11:\r\n data = _a.sent();\r\n if (!prehidden) {\r\n this.restoreNonExportableSprites();\r\n }\r\n return [2 /*return*/, data];\r\n case 12: return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Adds extra elements to the canvas.\r\n *\r\n * @param canvas Original canvas\r\n * @param options Options\r\n */\r\n Export.prototype.addExtras = function (canvas, options, advanced) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var middleLeft_1, middleTop_1, middleWidth_1, middleHeight_1, extraRight_1, extraBottom_1, extras, newCanvas, ctx_1, background, left_1, top_1, right_1, bottom_1;\r\n var _this = this;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n if (!this.extraSprites.length) return [3 /*break*/, 2];\r\n middleLeft_1 = 0;\r\n middleTop_1 = 0;\r\n middleWidth_1 = canvas.width;\r\n middleHeight_1 = canvas.height;\r\n extraRight_1 = 0;\r\n extraBottom_1 = 0;\r\n return [4 /*yield*/, Promise.all($array.map(this.extraSprites, function (extraSprite) { return __awaiter(_this, void 0, void 0, function () {\r\n var extra, extraCanvas, extraWidth, extraHeight;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n if (extraSprite instanceof Sprite) {\r\n extra = {\r\n sprite: extraSprite,\r\n position: \"bottom\"\r\n };\r\n }\r\n else {\r\n extra = extraSprite;\r\n }\r\n // Set defaults\r\n extra.position = extra.position || \"bottom\";\r\n extra.marginTop = extra.marginTop || 0;\r\n extra.marginRight = extra.marginRight || 0;\r\n extra.marginBottom = extra.marginBottom || 0;\r\n extra.marginLeft = extra.marginLeft || 0;\r\n if (!advanced) return [3 /*break*/, 2];\r\n return [4 /*yield*/, extra.sprite.exporting.getCanvasAdvanced(options)];\r\n case 1:\r\n extraCanvas = _a.sent();\r\n return [3 /*break*/, 4];\r\n case 2: return [4 /*yield*/, extra.sprite.exporting.getCanvas(options)];\r\n case 3:\r\n extraCanvas = _a.sent();\r\n _a.label = 4;\r\n case 4:\r\n extraWidth = extraCanvas.width + extra.marginLeft + extra.marginRight;\r\n extraHeight = extraCanvas.height + extra.marginTop + extra.marginBottom;\r\n if (extra.position == \"top\") {\r\n middleWidth_1 = extra.crop ? middleHeight_1 : $math.max(middleWidth_1, extraWidth);\r\n middleTop_1 += extraHeight;\r\n }\r\n else if (extra.position == \"right\") {\r\n middleHeight_1 = extra.crop ? middleHeight_1 : $math.max(middleHeight_1, extraHeight);\r\n extraRight_1 += extraWidth;\r\n }\r\n else if (extra.position == \"left\") {\r\n middleHeight_1 = extra.crop ? middleHeight_1 : $math.max(middleHeight_1, extraHeight);\r\n middleLeft_1 += extraWidth;\r\n }\r\n else if (extra.position === \"bottom\") {\r\n middleWidth_1 = extra.crop ? middleHeight_1 : $math.max(middleWidth_1, extraWidth);\r\n extraBottom_1 += extraHeight;\r\n }\r\n return [2 /*return*/, {\r\n canvas: extraCanvas,\r\n position: extra.position,\r\n left: extra.marginLeft,\r\n top: extra.marginTop,\r\n width: extraWidth,\r\n height: extraHeight\r\n }];\r\n }\r\n });\r\n }); }))];\r\n case 1:\r\n extras = _a.sent();\r\n newCanvas = this.getDisposableCanvas();\r\n newCanvas.width = middleLeft_1 + middleWidth_1 + extraRight_1;\r\n newCanvas.height = middleTop_1 + middleHeight_1 + extraBottom_1;\r\n ctx_1 = newCanvas.getContext(\"2d\");\r\n background = this.backgroundColor || this.findBackgroundColor(this.sprite.dom);\r\n if (background) {\r\n ctx_1.fillStyle = background.toString();\r\n ctx_1.fillRect(0, 0, newCanvas.width, newCanvas.height);\r\n }\r\n left_1 = middleLeft_1;\r\n top_1 = middleTop_1;\r\n right_1 = left_1 + middleWidth_1;\r\n bottom_1 = top_1 + middleHeight_1;\r\n // Radiates outwards from center\r\n $array.each(extras, function (extra) {\r\n if (extra.position == \"top\") {\r\n top_1 -= extra.height;\r\n ctx_1.drawImage(extra.canvas, middleLeft_1 + extra.left, top_1 + extra.top);\r\n }\r\n else if (extra.position == \"right\") {\r\n ctx_1.drawImage(extra.canvas, right_1 + extra.left, middleTop_1 + extra.top);\r\n right_1 += extra.width;\r\n }\r\n else if (extra.position == \"left\") {\r\n left_1 -= extra.width;\r\n ctx_1.drawImage(extra.canvas, left_1 + extra.left, middleTop_1 + extra.top);\r\n }\r\n else if (extra.position === \"bottom\") {\r\n ctx_1.drawImage(extra.canvas, middleLeft_1 + extra.left, bottom_1 + extra.top);\r\n bottom_1 += extra.height;\r\n }\r\n _this.disposeCanvas(extra.canvas);\r\n });\r\n ctx_1.drawImage(canvas, middleLeft_1, middleTop_1);\r\n return [2 /*return*/, newCanvas];\r\n case 2: return [2 /*return*/, canvas];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Returns canvas representation of the [[Sprite]].\r\n *\r\n * @param options Options\r\n * @return Canvas\r\n */\r\n Export.prototype.getCanvas = function (options) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var background, DOMURL, url, blobs, canvas, width, height, font, fontSize, scale, pixelRatio, ctx, promises, a, data, svg, img;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n // Options are set?\r\n if (!$type.hasValue(options)) {\r\n options = {};\r\n }\r\n background = this.backgroundColor || this.findBackgroundColor(this.sprite.dom);\r\n DOMURL = this.getDOMURL();\r\n url = null;\r\n blobs = null;\r\n _a.label = 1;\r\n case 1:\r\n _a.trys.push([1, , 4, 5]);\r\n width = this.sprite.pixelWidth;\r\n height = this.sprite.pixelHeight;\r\n font = $dom.findFont(this.sprite.dom);\r\n fontSize = $dom.findFontSize(this.sprite.dom);\r\n scale = options.scale || 1;\r\n pixelRatio = this.getPixelRatio(options);\r\n // Check if scale needs to be updated as per min/max dimensions\r\n scale = this.getAdjustedScale(width * pixelRatio, height * pixelRatio, scale, options);\r\n // Create canvas and its 2D context\r\n canvas = this.getDisposableCanvas();\r\n // Set canvas width/height\r\n canvas.style.width = width * scale + 'px';\r\n canvas.style.height = height * scale + 'px';\r\n canvas.width = width * scale;\r\n canvas.height = height * scale;\r\n ctx = canvas.getContext(\"2d\");\r\n // if (pixelRatio != 1) {\r\n // \tctx.setTransform(pixelRatio, 0, 0, pixelRatio, 0, 0);\r\n // }\r\n // Add background if necessary\r\n if (background) {\r\n ctx.fillStyle = background.toString();\r\n ctx.fillRect(0, 0, width * scale, height * scale);\r\n }\r\n promises = [];\r\n if (this.useWebFonts) {\r\n // TODO what if one of the other things errors before it's been able to set `blobs` ?\r\n promises.push(this.getFontFamilies().then(function (fonts) {\r\n blobs = fonts.blobs;\r\n return fonts.cssText;\r\n }));\r\n }\r\n promises.push(this.imagesToDataURI(this.sprite.dom, options));\r\n promises.push(this.prepForeignObjects(this.sprite.dom, options));\r\n return [4 /*yield*/, Promise.all(promises)];\r\n case 2:\r\n a = _a.sent();\r\n data = this.normalizeSVG(\"<style>\" + a[0] + \"</style>\" + this.serializeElement(this.sprite.paper.defs) + this.serializeElement(this.sprite.dom), options, width, height, scale, font, fontSize);\r\n svg = new Blob([data], { type: \"image/svg+xml\" });\r\n url = DOMURL.createObjectURL(svg);\r\n return [4 /*yield*/, this.loadNewImage(url, width * scale * pixelRatio, height * scale * pixelRatio, \"anonymous\")];\r\n case 3:\r\n img = _a.sent();\r\n // Draw image on canvas\r\n ctx.drawImage(img, 0, 0);\r\n return [3 /*break*/, 5];\r\n case 4:\r\n if (url !== null) {\r\n DOMURL.revokeObjectURL(url);\r\n }\r\n if (blobs !== null) {\r\n $array.each(blobs, function (url) {\r\n DOMURL.revokeObjectURL(url);\r\n });\r\n }\r\n // Restore replaced tainted images in DOM\r\n this.restoreRemovedObjects();\r\n return [7 /*endfinally*/];\r\n case 5: return [2 /*return*/, canvas];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Returns canvas representation of the [[Sprite]] using canvg.\r\n *\r\n * @param options Options\r\n * @return Canvas\r\n */\r\n Export.prototype.getCanvasAdvanced = function (options) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var background, canvg, width, height, font, fontSize, scale, pixelRatio, data, canvas, config;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n // Options are set?\r\n if (!$type.hasValue(options)) {\r\n options = {};\r\n }\r\n // Convert external images to data uris\r\n return [4 /*yield*/, this.imagesToDataURI(this.sprite.dom, options)];\r\n case 1:\r\n // Convert external images to data uris\r\n _a.sent();\r\n background = this.backgroundColor || this.findBackgroundColor(this.sprite.dom);\r\n return [4 /*yield*/, this.canvg];\r\n case 2:\r\n canvg = _a.sent();\r\n width = this.sprite.pixelWidth;\r\n height = this.sprite.pixelHeight;\r\n font = $dom.findFont(this.sprite.dom);\r\n fontSize = $dom.findFontSize(this.sprite.dom);\r\n scale = options.scale || 1;\r\n pixelRatio = this.getPixelRatio(options);\r\n // Check if scale needs to be updated as per min/max dimensions\r\n scale = this.getAdjustedScale(width * pixelRatio, height * pixelRatio, scale, options);\r\n data = this.normalizeSVG(this.serializeElement(this.sprite.paper.defs) + this.serializeElement(this.sprite.dom), options, width, height, scale, font, fontSize, background);\r\n canvas = this.getDisposableCanvas();\r\n // Set canvas width/height\r\n canvas.style.width = (width * pixelRatio * scale) + 'px';\r\n canvas.style.height = (height * pixelRatio * scale) + 'px';\r\n canvas.width = width * pixelRatio * scale;\r\n canvas.height = height * pixelRatio * scale;\r\n config = {\r\n //ignoreDimensions: true,\r\n useCORS: true\r\n };\r\n if (pixelRatio != 1) {\r\n config.ignoreDimensions = true;\r\n config.scaleWidth = width * pixelRatio * scale;\r\n config.scaleHeight = height * pixelRatio * scale;\r\n }\r\n return [4 /*yield*/, canvg.fromString(canvas.getContext(\"2d\"), data, config).render()];\r\n case 3:\r\n _a.sent();\r\n return [2 /*return*/, canvas];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Tries to dynamically load [canvg.js](https://github.com/canvg/canvg) and\r\n * export an image using its functions.\r\n *\r\n * This is an asynchronous function. Check the description of `getImage()`\r\n * for description and example usage.\r\n *\r\n * @param type Image format\r\n * @param options Options\r\n * @return Data uri\r\n */\r\n Export.prototype.getImageAdvanced = function (type, options, includeExtras) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var prehidden, canvas, uri;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n prehidden = this._objectsAlreadyHidden;\r\n if (!prehidden) {\r\n this.hideNonExportableSprites();\r\n }\r\n if (!$type.hasValue(options)) {\r\n options = this.getFormatOptions(type);\r\n }\r\n return [4 /*yield*/, this.getCanvasAdvanced(options)];\r\n case 1:\r\n canvas = _a.sent();\r\n if (!(includeExtras !== false)) return [3 /*break*/, 3];\r\n return [4 /*yield*/, this.addExtras(canvas, options, true)];\r\n case 2:\r\n canvas = _a.sent();\r\n _a.label = 3;\r\n case 3:\r\n uri = canvas.toDataURL(this.getContentType(type), options.quality);\r\n // Get rid of the canvas\r\n this.disposeCanvas(canvas);\r\n if (!prehidden) {\r\n this.restoreNonExportableSprites();\r\n }\r\n return [2 /*return*/, uri];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Creates a `<canvas>` element and returns it.\r\n *\r\n * @return Canvas element\r\n */\r\n Export.prototype.getDisposableCanvas = function () {\r\n var canvas = document.createElement(\"canvas\");\r\n canvas.style.position = \"fixed\";\r\n canvas.style.top = \"-10000px\";\r\n document.body.appendChild(canvas);\r\n return canvas;\r\n };\r\n /**\r\n * Removes canvas.\r\n *\r\n * @param canvas Canvas element\r\n */\r\n Export.prototype.disposeCanvas = function (canvas) {\r\n if (document.body.contains(canvas)) {\r\n document.body.removeChild(canvas);\r\n }\r\n };\r\n /**\r\n * Returns pixel ratio for retina displays.\r\n *\r\n * @return Pixel ratio\r\n */\r\n Export.prototype.getPixelRatio = function (options) {\r\n // const scale = options && options.scale ? options.scale : 1;\r\n // return (this.useRetina ? $utils.getPixelRatio() : 1) * scale;\r\n return this.useRetina ? $utils.getPixelRatio() : 1;\r\n };\r\n /**\r\n * Calculates adjusted scale if image does not fit or is larger than min/max\r\n * settings.\r\n *\r\n * @param width Width of the source image\r\n * @param height Height of the source image\r\n * @param scale Current scale\r\n * @param options Options\r\n * @return Adjusted scale\r\n */\r\n Export.prototype.getAdjustedScale = function (width, height, scale, options) {\r\n if (!options) {\r\n return scale;\r\n }\r\n var adjWidth = width * scale;\r\n var adjHeight = width * scale;\r\n // Check max restrictions\r\n var widthScale;\r\n var heightScale;\r\n if (options.maxWidth && (adjWidth > options.maxWidth)) {\r\n widthScale = options.maxWidth / width;\r\n }\r\n if (options.maxHeight && (adjHeight > options.maxHeight)) {\r\n heightScale = options.maxHeight / height;\r\n }\r\n if (widthScale || heightScale) {\r\n return $math.min(widthScale, heightScale);\r\n }\r\n // Check min restrictions\r\n if (options.minWidth && (adjWidth < options.minWidth)) {\r\n widthScale = options.minWidth / width;\r\n }\r\n if (options.minHeight && (adjHeight < options.minHeight)) {\r\n heightScale = options.minHeight / height;\r\n }\r\n if (widthScale || heightScale) {\r\n return $math.max(widthScale, heightScale);\r\n }\r\n return scale;\r\n };\r\n /**\r\n * Converts all `<image>` tags in SVG to use data uris instead of external\r\n * URLs\r\n *\r\n * This is an asynchronous function. Check the description of `getImage()`\r\n * for description and example usage.\r\n *\r\n * @ignore Exclude from docs\r\n * @param el SVG node\r\n * @param options Options\r\n * @return Promise\r\n */\r\n Export.prototype.imagesToDataURI = function (el, options) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var images, promises, count, i, image, href;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n images = el.querySelectorAll(\"image\");\r\n if (!images.length) return [3 /*break*/, 2];\r\n promises = [];\r\n // There are images, process each of them\r\n for (count = images.length, i = 0; i < count; i++) {\r\n image = images[i];\r\n href = image.getAttributeNS(Export.XLINK, \"href\");\r\n // no href?\r\n if (!href) {\r\n continue;\r\n }\r\n if (href.indexOf(\"data:image\") !== -1) {\r\n // Ignore image if it's already in Data URI format\r\n }\r\n else {\r\n // SVG or bitmap image?\r\n if (href.indexOf(\".svg\") !== -1) {\r\n promises.push(this.svgToDataURI(image, options));\r\n }\r\n else {\r\n promises.push(this.imageToDataURI(image, options));\r\n }\r\n }\r\n }\r\n return [4 /*yield*/, Promise.all(promises)];\r\n case 1:\r\n _a.sent();\r\n return [2 /*return*/];\r\n case 2: return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * `foreignObject` elements cannot be exported. This function hides them\r\n * temprarily. In the future it might try to convert them to SVG to make them\r\n * exportable.\r\n *\r\n * This is an asynchronous function. Check the description of `getImage()`\r\n * for description and example usage.\r\n *\r\n * @ignore Exclude from docs\r\n * @param el SVG node\r\n * @param options Options\r\n * @return Promise\r\n */\r\n Export.prototype.prepForeignObjects = function (el, options) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var objects, count, i;\r\n return __generator(this, function (_a) {\r\n objects = el.querySelectorAll(\"foreignObject\");\r\n if (objects.length) {\r\n // There are foreign objects, process each of them\r\n for (count = objects.length, i = 0; i < count; i++) {\r\n this.temporarilyRemoveObject(objects[i]);\r\n }\r\n }\r\n return [2 /*return*/];\r\n });\r\n });\r\n };\r\n /**\r\n * Converts an SVG `<image>` to use its data uri for `href` instead of\r\n * external file.\r\n *\r\n * This is an asynchronous function. Check the description of `getImage()`\r\n * for description and example usage.\r\n *\r\n * @ignore Exclude from docs\r\n * @param el SVG element\r\n * @param options Options\r\n */\r\n Export.prototype.imageToDataURI = function (el, options) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var img, canvas, uri, e_5;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n _a.trys.push([0, 2, , 3]);\r\n return [4 /*yield*/, this.loadNewImage(el.getAttributeNS(Export.XLINK, \"href\"), null, null, \"anonymous\")];\r\n case 1:\r\n // Create image\r\n img = _a.sent();\r\n canvas = document.createElement(\"canvas\");\r\n canvas.width = img.width;\r\n canvas.height = img.height;\r\n // Draw new image on it via `toDataURL`\r\n canvas.getContext(\"2d\").drawImage(img, 0, 0);\r\n // Replace image `href` with data uri\r\n // If we got to this point it means image has loaded, however we might\r\n // still get an error with `toDataURL()`\r\n try {\r\n uri = canvas.toDataURL();\r\n el.setAttribute(\"href\", uri);\r\n return [2 /*return*/, uri];\r\n }\r\n catch (e) {\r\n // Give up and temporarily remove the element href temporarily\r\n if (options.keepTainted !== false) {\r\n /*this._removedObjects.push({\r\n \"element\": el,\r\n \"originalHref\": el.getAttributeNS(Export.XLINK, \"href\")\r\n });\r\n el.setAttributeNS(Export.XLINK, \"href\", \"\");*/\r\n this.temporarilyRemoveObject(el);\r\n }\r\n return [2 /*return*/, undefined];\r\n }\r\n return [3 /*break*/, 3];\r\n case 2:\r\n e_5 = _a.sent();\r\n // Give up and temporarily remove the element's href\r\n if (!options || options.keepTainted !== false) {\r\n /*this._removedObjects.push({\r\n \"element\": el,\r\n \"originalHref\": el.getAttributeNS(Export.XLINK, \"href\")\r\n });\r\n el.setAttributeNS(Export.XLINK, \"href\", \"\");*/\r\n this.temporarilyRemoveObject(el);\r\n }\r\n return [2 /*return*/, undefined];\r\n case 3: return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Converts `<image>` with external SVG source to data uri. Loads external SVG\r\n * file, then converts it to data uri and replaces the `xlink:href` parameter.\r\n *\r\n * This is an asynchronous function. Check the description of `getImage()`\r\n * for description and example usage.\r\n *\r\n * @ignore Exclude from docs\r\n * @param el An SVG element\r\n * @param options Options\r\n */\r\n Export.prototype.svgToDataURI = function (el, options) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var href, data, charset, uri, e_6;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n href = el.getAttributeNS(Export.XLINK, \"href\");\r\n _a.label = 1;\r\n case 1:\r\n _a.trys.push([1, 3, , 4]);\r\n return [4 /*yield*/, $net.load(href)];\r\n case 2:\r\n data = _a.sent();\r\n charset = this.adapter.apply(\"charset\", {\r\n charset: \"base64\",\r\n type: \"svg\",\r\n options: options\r\n }).charset;\r\n uri = this.adapter.apply(\"svgToDataURI\", {\r\n data: \"data:\" + this.getContentType(\"svg\") + \";\" + charset + \",\" + btoa(data.response),\r\n options: options\r\n }).data;\r\n el.setAttributeNS(Export.XLINK, \"href\", uri);\r\n return [2 /*return*/, uri];\r\n case 3:\r\n e_6 = _a.sent();\r\n // Disable temporarily\r\n if (!options || options.keepTainted !== false) {\r\n /*this._removedObjects.push({\r\n \"element\": el,\r\n \"originalHref\": href\r\n });\r\n el.setAttributeNS(Export.XLINK, \"href\", \"\");*/\r\n this.temporarilyRemoveObject(el);\r\n }\r\n return [2 /*return*/, undefined];\r\n case 4: return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Temporarily removes element from DOM, and replaces it with a dummy\r\n * placeholder, as well as stores it for later restoration.\r\n *\r\n * This is an asynchronous function. Check the description of `getImage()`\r\n * for description and example usage.\r\n *\r\n * @ignore Exclude from docs\r\n * @param el Node\r\n */\r\n Export.prototype.temporarilyRemoveObject = function (el, placeholder) {\r\n // Get parent\r\n var parent = el.parentElement || el.parentNode;\r\n // Create a placeholder group element if it has not been passed in\r\n if (!placeholder) {\r\n placeholder = this.sprite.paper.add(\"g\").node;\r\n }\r\n parent.insertBefore(placeholder, el);\r\n // Check if we have a textContents we can replace with\r\n // @todo Perhaps we should explore alternatives to creating text nodes\r\n // i.e. creating a text version of the HTML-based Text, just for export\r\n // purposes. Converting HTML into SVG is very complicated\r\n if (el.textContent) {\r\n /*let text = this.sprite.paper.add(\"text\").node;\r\n text.textContent = el.textContent;\r\n placeholder.appendChild(text);\r\n\r\n // Copy properties from the removing element to the placeholder\r\n $dom.copyAttributes(el, placeholder);*/\r\n }\r\n // Remove the old element\r\n parent.removeChild(el);\r\n // Log removed item\r\n this._removedObjects.push({\r\n \"element\": el,\r\n \"placeholder\": placeholder\r\n });\r\n };\r\n /**\r\n * Restores all (possibly tainted or unsupported) objects that were\r\n * temporarily removed when exporting.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Export.prototype.restoreRemovedObjects = function () {\r\n var obj;\r\n while (true) {\r\n obj = this._removedObjects.pop();\r\n if (!obj) {\r\n break;\r\n }\r\n //obj.element.setAttribute(\"href\", obj.originalHref);\r\n var parent_1 = obj.placeholder.parentElement || obj.placeholder.parentNode;\r\n parent_1.insertBefore(obj.element, obj.placeholder);\r\n //parent.removeChild(obj.placeholder);\r\n }\r\n };\r\n /**\r\n * Checkes if simplified export can be used using `createObjectURL` and SVG\r\n * document does not contain any external images.\r\n *\r\n * This is an asynchronous function. Check the description of `getImage()`\r\n * for description and example usage.\r\n *\r\n * @ignore Exclude from docs\r\n * @return `true` if simplified export can be used\r\n */\r\n Export.prototype.simplifiedImageExport = function () {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var cache, canvas, ctx, DOMURL, svg, url, img, e_7, e_8;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n if (this.useSimplifiedExport === false) {\r\n return [2 /*return*/, false];\r\n }\r\n cache = registry.getCache(\"simplifiedImageExport\");\r\n if (cache === false || cache === true) {\r\n return [2 /*return*/, cache];\r\n }\r\n _a.label = 1;\r\n case 1:\r\n _a.trys.push([1, 6, , 7]);\r\n canvas = document.createElement(\"canvas\");\r\n canvas.width = 1;\r\n canvas.height = 1;\r\n ctx = canvas.getContext(\"2d\");\r\n DOMURL = this.getDOMURL();\r\n svg = new Blob([this.normalizeSVG(\"<g></g>\", {}, 1, 1)], { type: \"image/svg+xml\" });\r\n url = DOMURL.createObjectURL(svg);\r\n img = void 0;\r\n _a.label = 2;\r\n case 2:\r\n _a.trys.push([2, 4, , 5]);\r\n return [4 /*yield*/, this.loadNewImage(url, 1, 1)];\r\n case 3:\r\n img = _a.sent();\r\n return [3 /*break*/, 5];\r\n case 4:\r\n e_7 = _a.sent();\r\n return [2 /*return*/, false];\r\n case 5:\r\n ctx.drawImage(img, 0, 0);\r\n DOMURL.revokeObjectURL(url);\r\n try {\r\n //let uri = canvas.toDataURL(\"image/png\");\r\n registry.setCache(\"simplifiedImageExport\", true);\r\n return [2 /*return*/, true];\r\n }\r\n catch (e) {\r\n registry.setCache(\"simplifiedImageExport\", false);\r\n return [2 /*return*/, false];\r\n }\r\n return [3 /*break*/, 7];\r\n case 6:\r\n e_8 = _a.sent();\r\n registry.setCache(\"simplifiedImageExport\", false);\r\n return [2 /*return*/, false];\r\n case 7: return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Returns a new `<image>` element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param url URL of the image\r\n * @param width Width (px)\r\n * @param height Height (px)\r\n * @param crossOrigin Cross-Origin setting\r\n * @return Promise\r\n */\r\n Export.prototype.loadNewImage = function (url, width, height, crossOrigin) {\r\n return new Promise(function (success, error) {\r\n // New image\r\n var image;\r\n if (width && height) {\r\n image = new Image(width, height);\r\n }\r\n else {\r\n image = new Image();\r\n }\r\n // Set crossorigin\r\n if (crossOrigin) {\r\n image.setAttribute(\"crossOrigin\", crossOrigin);\r\n }\r\n // Report success on load\r\n image.onload = function () {\r\n success(image);\r\n };\r\n function onerror() {\r\n // Error occurred. Just in case it's the crossOrigin issue, let's try\r\n // stripping off this attribute and trying again\r\n if (crossOrigin) {\r\n // Retain old uri\r\n var currentHref = image.src;\r\n // Set up another `onerror` to handle situations where image is not\r\n // loadable at all (i.e. protected by CORS)\r\n image.onerror = function () {\r\n // Nope, no luck\r\n error(new Error(\"Loading image \\\"\" + url + \"\\\" failed\"));\r\n };\r\n // remove the `crossOrigin` attribute\r\n image.removeAttribute(\"crossorigin\");\r\n // retry\r\n image.src = \"\";\r\n image.src = currentHref;\r\n }\r\n else {\r\n error(new Error(\"Loading image \\\"\" + url + \"\\\" failed\"));\r\n }\r\n }\r\n // Set image error handlers\r\n image.onabort = onerror;\r\n image.onerror = onerror;\r\n // Trigger load\r\n image.src = url;\r\n });\r\n };\r\n /**\r\n * Returns current DOM URL.\r\n *\r\n * @ignore Exclude from docs\r\n * @return URL\r\n */\r\n Export.prototype.getDOMURL = function () {\r\n return self.URL || self.webkitURL || self;\r\n };\r\n /**\r\n * Returns an SVG representation of the chart.\r\n *\r\n * This is an asynchronous function. Check the description of `getImage()`\r\n * for description and example usage.\r\n *\r\n * @param type Type of the export\r\n * @param options Options\r\n * @param encodeURI If true, will return result will be data URI\r\n * @return Promise\r\n */\r\n Export.prototype.getSVG = function (type, options, encodeURI) {\r\n if (encodeURI === void 0) { encodeURI = true; }\r\n return __awaiter(this, void 0, void 0, function () {\r\n var prehidden, width, height, font, fontSize, scale, pixelRatio, svg, charset, uri;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n prehidden = this._objectsAlreadyHidden;\r\n if (!prehidden) {\r\n this.hideNonExportableSprites();\r\n }\r\n if (!$type.hasValue(options)) {\r\n options = this.getFormatOptions(\"svg\");\r\n }\r\n // Wait for required elements to be ready before proceeding\r\n return [4 /*yield*/, this.awaitValidSprites()];\r\n case 1:\r\n // Wait for required elements to be ready before proceeding\r\n _a.sent();\r\n width = this.sprite.pixelWidth;\r\n height = this.sprite.pixelHeight;\r\n font = $dom.findFont(this.sprite.dom);\r\n fontSize = $dom.findFontSize(this.sprite.dom);\r\n scale = options.scale || 1;\r\n pixelRatio = this.getPixelRatio(options);\r\n // Check if scale needs to be updated as per min/max dimensions\r\n scale = this.getAdjustedScale(width * pixelRatio, height * pixelRatio, scale, options);\r\n svg = this.normalizeSVG(this.serializeElement(this.sprite.paper.defs) + this.serializeElement(this.sprite.dom), options, width, height, scale, font, fontSize);\r\n charset = this.adapter.apply(\"charset\", {\r\n charset: \"charset=utf-8\",\r\n type: \"svg\",\r\n options: options\r\n }).charset;\r\n uri = this.adapter.apply(\"getSVG\", {\r\n data: encodeURI ? \"data:\" + this.getContentType(type) + \";\" + charset + \",\" + encodeURIComponent(svg) : svg,\r\n options: options\r\n }).data;\r\n if (!prehidden) {\r\n this.restoreNonExportableSprites();\r\n }\r\n return [2 /*return*/, uri];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Checks if SVG is fully formatted. Encloses in `<svg>...</svg>` if\r\n * necessary.\r\n *\r\n * @ignore Exclude from docs\r\n * @param svg Input SVG\r\n * @param options Options\r\n * @param width Width of the SVG viewport\r\n * @param height Height of the SVG viewport\r\n * @param font Font family to use as a base\r\n * @param fontSize Font size to use as a base\r\n * @return Output SVG\r\n * @todo Add style params to existing <svg>\r\n */\r\n Export.prototype.normalizeSVG = function (svg, options, width, height, scale, font, fontSize, background) {\r\n // Construct width/height params\r\n var dimParams = \"\";\r\n if (width) {\r\n dimParams += \"width=\\\"\" + Math.round(width * (scale || 1)) + \"px\\\" \";\r\n }\r\n if (height) {\r\n dimParams += \"height=\\\"\" + Math.round(height * (scale || 1)) + \"px\\\" \";\r\n }\r\n // Apply font settings\r\n var styleParams = \"\";\r\n if (font) {\r\n styleParams += \"font-family: \" + font.replace(/\"/g, \"\") + \";\";\r\n }\r\n if (fontSize) {\r\n styleParams += \"font-size: \" + fontSize + \";\";\r\n }\r\n // Scale\r\n if (scale) {\r\n dimParams += \"viewBox=\\\"0 0 \" + (width) + \" \" + (height) + \"\\\" \";\r\n }\r\n // Remove foreign objects temporarily\r\n var fos = [];\r\n var ms = svg.match(/<foreignObject[\\s\\S]*<\\/foreignObject>/gi);\r\n if (ms) {\r\n for (var i = 0; i < ms.length; i++) {\r\n svg = svg.replace(ms[i], $strings.PLACEHOLDER);\r\n fos.push(ms[i]);\r\n }\r\n }\r\n // Add missing <svg> enclosure\r\n if (!svg.match(/<svg/)) {\r\n svg = \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\"?><svg \" + dimParams + \" style=\\\"\" + styleParams + \"\\\" version=\\\"1.1\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\" xmlns:xlink=\\\"http://www.w3.org/1999/xlink\\\">\" + svg + \"</svg>\";\r\n }\r\n else {\r\n if (dimParams !== \"\") {\r\n // Clear current params\r\n svg = svg.replace(/(<svg[^>]*)width=\"[^\"]*\"/, \"$1\");\r\n svg = svg.replace(/(<svg[^>]*)height=\"[^\"]*\"/, \"$1\");\r\n // Add new params\r\n svg = svg.replace(/(<svg)/, \"$1\" + dimParams);\r\n }\r\n /*if (styleParams !== \"\") {\r\n // Clear current params\r\n svg = svg.replace(/(<svg[^>]*)stylewidth=\"[^\"]*\"/, \"$1\");\r\n svg = svg.replace(/(<svg[^>]*)height=\"[^\"]*\"/, \"$1\");\r\n\r\n // Add new params\r\n svg = svg.replace(/(<svg)/, \"$1\" + dimParams);\r\n }*/\r\n }\r\n if (background) {\r\n svg = svg.replace(/(<svg[^>]*>)/, \"$1<rect width=\\\"100%\\\" height=\\\"100%\\\" fill=\\\"\" + background.rgba + \"\\\"/>\");\r\n //svg = svg.replace(/<\\/svg>/, \"<rect width=\\\"100%\\\" height=\\\"100%\\\" fill=\\\"\" + background.rgba + \"\\\"/></svg>\");\r\n }\r\n if ($browser.isInternetExplorer()) {\r\n // IE can't handle exporting <feColorMatrix> for some reason\r\n svg = svg.replace(/<feColorMatrix [^\\/>]*\\/>/gi, \"\");\r\n }\r\n // Remove base uri-related stuff\r\n var reg = new RegExp(\"url\\\\(\" + $utils.escapeForRgex($utils.getBaseURI()), \"g\");\r\n svg = svg.replace(reg, \"url(#\");\r\n // Remove escaped quotes in url() parameters\r\n svg = svg.replace(/url\\("([^)]*)"\\)/gm, \"url($1)\");\r\n // Put foreignObjects back in\r\n if (fos.length) {\r\n for (var i = 0; i < fos.length; i++) {\r\n svg = svg.replace($strings.PLACEHOLDER, fos[i]);\r\n }\r\n }\r\n svg = this.adapter.apply(\"normalizeSVG\", {\r\n data: svg,\r\n options: options\r\n }).data;\r\n return svg;\r\n };\r\n /**\r\n * Serializes an element and returns its contents.\r\n *\r\n * @ignore Exclude from docs\r\n * @param element An element to serialize\r\n * @return A serialized XML\r\n */\r\n Export.prototype.serializeElement = function (element) {\r\n return new XMLSerializer().serializeToString(element);\r\n };\r\n /**\r\n * Returns a PDF containing chart image.\r\n *\r\n * This is an asynchronous function. Check the description of `getImage()`\r\n * for description and example usage.\r\n *\r\n * @param type Type of the export\r\n * @param options Options\r\n * @return Promise\r\n * @async\r\n * @todo Account for header when calculating vertical fit\r\n */\r\n Export.prototype.getPDF = function (type, options) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n function addFont(font) {\r\n var paths = {};\r\n paths.normal = font.normal.path;\r\n vfs[font.normal.path] = font.normal.bytes;\r\n if (font.bold) {\r\n paths.bold = font.bold.path;\r\n vfs[font.bold.path] = font.bold.bytes;\r\n }\r\n else {\r\n paths.bold = font.normal.path;\r\n }\r\n if (font.italics) {\r\n paths.italics = font.italics.path;\r\n vfs[font.italics.path] = font.italics.bytes;\r\n }\r\n else {\r\n paths.italics = font.normal.path;\r\n }\r\n if (font.bolditalics) {\r\n paths.bolditalics = font.bolditalics.path;\r\n vfs[font.bolditalics.path] = font.bolditalics.bytes;\r\n }\r\n else {\r\n paths.bolditalics = font.normal.path;\r\n }\r\n fonts[font.name] = paths;\r\n }\r\n var image, pdfmake, defaultMargins, doc, title, extraMargin, _a, _b, _c, fonts, vfs;\r\n return __generator(this, function (_d) {\r\n switch (_d.label) {\r\n case 0: return [4 /*yield*/, this.getImage(options.imageFormat || \"png\", options)];\r\n case 1:\r\n image = _d.sent();\r\n return [4 /*yield*/, this.pdfmake];\r\n case 2:\r\n pdfmake = _d.sent();\r\n defaultMargins = [30, 30, 30, 30];\r\n doc = {\r\n pageSize: options.pageSize || \"A4\",\r\n pageOrientation: options.pageOrientation || \"portrait\",\r\n pageMargins: options.pageMargins || defaultMargins,\r\n defaultStyle: {\r\n font: options.font ? options.font.name : undefined\r\n },\r\n //header: <any>[],\r\n content: []\r\n };\r\n title = this.adapter.apply(\"title\", {\r\n title: this.title,\r\n options: options\r\n }).title;\r\n extraMargin = 0;\r\n if (title) {\r\n doc.content.push({\r\n text: title,\r\n fontSize: options.fontSize || 14,\r\n bold: true,\r\n margin: [0, 0, 0, 15]\r\n });\r\n // Add some leftover margin for title\r\n extraMargin += 50;\r\n }\r\n // Add page URL?\r\n if (options.addURL) {\r\n doc.content.push({\r\n text: this.language.translate(\"Saved from\") + \": \" + document.location.href,\r\n fontSize: options.fontSize,\r\n margin: [0, 0, 0, 15]\r\n });\r\n // Add some leftover margin for URL\r\n extraMargin += 50;\r\n }\r\n // Add image\r\n if (type != \"pdfdata\") {\r\n doc.content.push({\r\n image: image,\r\n alignment: options.align || \"left\",\r\n fit: this.getPageSizeFit(doc.pageSize, doc.pageMargins, extraMargin)\r\n });\r\n }\r\n if (!(type == \"pdfdata\" || options.addData)) return [3 /*break*/, 4];\r\n _b = (_a = doc.content).push;\r\n _c = {};\r\n return [4 /*yield*/, this.getPDFData(\"pdf\", options)];\r\n case 3:\r\n _b.apply(_a, [(_c.table = _d.sent(),\r\n _c.fontSize = options.fontSize || 14,\r\n _c)]);\r\n _d.label = 4;\r\n case 4:\r\n // Apply adapters\r\n doc = this.adapter.apply(\"pdfmakeDocument\", {\r\n doc: doc,\r\n options: options\r\n }).doc;\r\n fonts = null;\r\n vfs = null;\r\n if (options.font) {\r\n fonts = {};\r\n vfs = {};\r\n addFont(options.font);\r\n if (options.extraFonts) {\r\n $array.each(options.extraFonts, addFont);\r\n }\r\n }\r\n return [4 /*yield*/, new Promise(function (success, error) {\r\n pdfmake.createPdf(doc, null, fonts, vfs).getDataUrl(function (uri) {\r\n success(uri);\r\n });\r\n })];\r\n case 5: \r\n // Create PDF\r\n return [2 /*return*/, _d.sent()];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Returns chart's data formatted suitable for PDF export (pdfmake).\r\n *\r\n * This is an asynchronous function. Check the description of `getImage()`\r\n * for description and example usage.\r\n *\r\n * @since 4.7.0\r\n * @param type Type of the export\r\n * @param options Options\r\n * @return Promise\r\n * @async\r\n */\r\n Export.prototype.getPDFData = function (type, options) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var content, dataFields, data, dataFieldsOrder_1, len, i;\r\n var _this = this;\r\n return __generator(this, function (_a) {\r\n content = {\r\n \"body\": []\r\n };\r\n dataFields = this.adapter.apply(\"formatDataFields\", {\r\n dataFields: this.dataFields,\r\n format: \"pdf\"\r\n }).dataFields;\r\n data = this.data;\r\n // Vertical or horizontal (default) layout\r\n if (options.pivot) {\r\n dataFieldsOrder_1 = this.adapter.apply(\"dataFieldsOrder\", {\r\n dataFieldsOrder: this.dataFieldsOrder,\r\n format: \"pdfdata\"\r\n }).dataFieldsOrder;\r\n $object.eachOrdered(dataFields, function (key, val) {\r\n var dataRow = [];\r\n if (options.addColumnNames) {\r\n dataRow.push(val);\r\n }\r\n for (var len = data.length, i = 0; i < len; i++) {\r\n var dataValue = data[i][key];\r\n dataRow.push(_this.convertToSpecialFormat(key, dataValue, options, true));\r\n }\r\n content.body.push(_this.getPDFDataRow(dataRow, options, undefined, true));\r\n }, function (a, b) {\r\n //console.log(a, b)\r\n var ai = dataFieldsOrder_1.indexOf(a);\r\n var bi = dataFieldsOrder_1.indexOf(b);\r\n if (ai > bi) {\r\n return 1;\r\n }\r\n else if (ai < bi) {\r\n return -1;\r\n }\r\n return 0;\r\n });\r\n }\r\n else {\r\n // Add column names?\r\n if (options.addColumnNames) {\r\n content.body.push(this.getPDFDataRow(dataFields, options, undefined, true));\r\n content.headerRows = 1;\r\n }\r\n for (len = data.length, i = 0; i < len; i++) {\r\n content.body.push(this.getPDFDataRow(data[i], options, dataFields));\r\n }\r\n }\r\n return [2 /*return*/, this.adapter.apply(\"pdfmakeTable\", {\r\n table: content,\r\n options: options\r\n }).table];\r\n });\r\n });\r\n };\r\n /**\r\n * Formats a row of data for use in PDF data table (pdfmake).\r\n *\r\n * @ignore Exclude from docs\r\n * @since 4.7.0\r\n * @param row An object holding data for the row\r\n * @param options Options\r\n * @param dataFields Data fields\r\n * @param asIs Do not try to convert to dates\r\n * @return Formated Data line\r\n */\r\n Export.prototype.getPDFDataRow = function (row, options, dataFields, asIs) {\r\n var _this = this;\r\n if (asIs === void 0) { asIs = false; }\r\n // Init\r\n var items = [];\r\n // Data fields\r\n if (!dataFields) {\r\n dataFields = row;\r\n }\r\n // Data fields order\r\n var dataFieldsOrder = this.adapter.apply(\"dataFieldsOrder\", {\r\n dataFieldsOrder: this.dataFieldsOrder,\r\n format: \"pdfdata\"\r\n }).dataFieldsOrder;\r\n // Process each row item\r\n $object.eachOrdered(dataFields, function (key, name) {\r\n // Get value\r\n var value = _this.convertEmptyValue(key, row[key], options);\r\n // Convert dates\r\n var item = asIs ? value : _this.convertToSpecialFormat(key, value, options);\r\n item = \"\" + item;\r\n // Add to item\r\n items.push(item);\r\n }, function (a, b) {\r\n //console.log(a, b)\r\n var ai = dataFieldsOrder.indexOf(a);\r\n var bi = dataFieldsOrder.indexOf(b);\r\n if (ai > bi) {\r\n return 1;\r\n }\r\n else if (ai < bi) {\r\n return -1;\r\n }\r\n return 0;\r\n });\r\n return items;\r\n };\r\n /**\r\n * Returns fit dimensions for available page sizes.\r\n *\r\n * @ignore Exclude from docs\r\n * @param pageSize Page size\r\n * @return `[width, height]` in pixels\r\n */\r\n Export.prototype.getPageSizeFit = function (pageSize, margins, extraMargin) {\r\n if (extraMargin === void 0) { extraMargin = 0; }\r\n // Check margins\r\n var newMargins = [0, 0, 0, 0];\r\n if (typeof margins == \"number\") {\r\n newMargins = [margins, margins, margins, margins];\r\n }\r\n else if (margins.length == 2) {\r\n newMargins = [margins[0], margins[1], margins[0], margins[1]];\r\n }\r\n else if (margins.length == 4) {\r\n newMargins = margins;\r\n }\r\n // Define available page sizes\r\n var sizes = {\r\n \"4A0\": [4767.87, 6740.79],\r\n \"2A0\": [3370.39, 4767.87],\r\n A0: [2383.94, 3370.39],\r\n A1: [1683.78, 2383.94],\r\n A2: [1190.55, 1683.78],\r\n A3: [841.89, 1190.55],\r\n A4: [595.28, 841.89],\r\n A5: [419.53, 595.28],\r\n A6: [297.64, 419.53],\r\n A7: [209.76, 297.64],\r\n A8: [147.40, 209.76],\r\n A9: [104.88, 147.40],\r\n A10: [73.70, 104.88],\r\n B0: [2834.65, 4008.19],\r\n B1: [2004.09, 2834.65],\r\n B2: [1417.32, 2004.09],\r\n B3: [1000.63, 1417.32],\r\n B4: [708.66, 1000.63],\r\n B5: [498.90, 708.66],\r\n B6: [354.33, 498.90],\r\n B7: [249.45, 354.33],\r\n B8: [175.75, 249.45],\r\n B9: [124.72, 175.75],\r\n B10: [87.87, 124.72],\r\n C0: [2599.37, 3676.54],\r\n C1: [1836.85, 2599.37],\r\n C2: [1298.27, 1836.85],\r\n C3: [918.43, 1298.27],\r\n C4: [649.13, 918.43],\r\n C5: [459.21, 649.13],\r\n C6: [323.15, 459.21],\r\n C7: [229.61, 323.15],\r\n C8: [161.57, 229.61],\r\n C9: [113.39, 161.57],\r\n C10: [79.37, 113.39],\r\n RA0: [2437.80, 3458.27],\r\n RA1: [1729.13, 2437.80],\r\n RA2: [1218.90, 1729.13],\r\n RA3: [864.57, 1218.90],\r\n RA4: [609.45, 864.57],\r\n SRA0: [2551.18, 3628.35],\r\n SRA1: [1814.17, 2551.18],\r\n SRA2: [1275.59, 1814.17],\r\n SRA3: [907.09, 1275.59],\r\n SRA4: [637.80, 907.09],\r\n EXECUTIVE: [521.86, 756.00],\r\n FOLIO: [612.00, 936.00],\r\n LEGAL: [612.00, 1008.00],\r\n LETTER: [612.00, 792.00],\r\n TABLOID: [792.00, 1224.00]\r\n };\r\n // Calculate size\r\n var fitSize = sizes[pageSize];\r\n fitSize[0] -= newMargins[0] + newMargins[2];\r\n fitSize[1] -= newMargins[1] + newMargins[3] + extraMargin;\r\n return fitSize;\r\n };\r\n /**\r\n * Returns an Excel file of chart's data.\r\n *\r\n * This is an asynchronous function. Check the description of `getImage()`\r\n * for description and example usage.\r\n *\r\n * @param type Type of the export\r\n * @param options Options\r\n * @return Promise\r\n * @async\r\n * @todo Handle dates\r\n * @todo Support for multi-sheet\r\n */\r\n Export.prototype.getExcel = function (type, options) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var XLSX, wbOptions, sheetName, wb, data, dataFields, dataFieldsOrder_2, len, i, uri;\r\n var _this = this;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n if (!$type.hasValue(options)) {\r\n options = this.getFormatOptions(\"xlsx\");\r\n }\r\n return [4 /*yield*/, this.xlsx];\r\n case 1:\r\n XLSX = _a.sent();\r\n wbOptions = this.adapter.apply(\"xlsxWorkbookOptions\", {\r\n xlsx: XLSX,\r\n options: {\r\n bookType: \"xlsx\",\r\n bookSST: false,\r\n type: \"base64\",\r\n }\r\n }).options;\r\n sheetName = this.normalizeExcelSheetName(this.adapter.apply(\"xlsxSheetName\", {\r\n xlsx: XLSX,\r\n name: this.title || this.language.translate(\"Data\")\r\n }).name);\r\n wb = {\r\n SheetNames: [sheetName],\r\n Sheets: {}\r\n };\r\n data = [];\r\n dataFields = this.adapter.apply(\"formatDataFields\", {\r\n dataFields: this.dataFields,\r\n format: \"xslx\"\r\n }).dataFields;\r\n // Vertical or horizontal (default) layout\r\n if (options.pivot) {\r\n dataFieldsOrder_2 = this.adapter.apply(\"dataFieldsOrder\", {\r\n dataFieldsOrder: this.dataFieldsOrder,\r\n format: \"xlsx\"\r\n }).dataFieldsOrder;\r\n $object.eachOrdered(dataFields, function (key, val) {\r\n var dataRow = [];\r\n if (options.addColumnNames) {\r\n dataRow.push(val);\r\n }\r\n for (var len = _this.data.length, i = 0; i < len; i++) {\r\n var dataValue = _this.data[i][key];\r\n dataRow.push(_this.convertToSpecialFormat(key, dataValue, options, true));\r\n }\r\n data.push(_this.getExcelRow(dataRow, options, undefined, true));\r\n }, function (a, b) {\r\n //console.log(a, b)\r\n var ai = dataFieldsOrder_2.indexOf(a);\r\n var bi = dataFieldsOrder_2.indexOf(b);\r\n if (ai > bi) {\r\n return 1;\r\n }\r\n else if (ai < bi) {\r\n return -1;\r\n }\r\n return 0;\r\n });\r\n }\r\n else {\r\n // Add column names?\r\n if (options.addColumnNames) {\r\n data.push(this.getExcelRow(dataFields, options, undefined, true));\r\n }\r\n // Add lines\r\n for (len = this.data.length, i = 0; i < len; i++) {\r\n data.push(this.getExcelRow(this.data[i], options, dataFields));\r\n }\r\n }\r\n // Create sheet and add data\r\n wb.Sheets[sheetName] = XLSX.utils.aoa_to_sheet(data);\r\n // Apply adapters\r\n wb = this.adapter.apply(\"xlsxWorkbook\", {\r\n xlsx: XLSX,\r\n workbook: wb,\r\n options: options\r\n }).workbook;\r\n uri = this.adapter.apply(\"getExcel\", {\r\n data: \"data:\" + this.getContentType(type) + \";base64,\" + XLSX.write(wb, wbOptions),\r\n options: options\r\n }).data;\r\n return [2 /*return*/, uri];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * This is needed to work around Excel limitations.\r\n *\r\n * @param name Source name\r\n * @return Normalized name\r\n */\r\n Export.prototype.normalizeExcelSheetName = function (name) {\r\n name = name.replace(/([:\\\\\\/?*\\[\\]]+)/g, \" \");\r\n return $utils.truncateWithEllipsis(name, 31, \"...\", true);\r\n };\r\n /**\r\n * Rertuns an array of values to be used as Excel row.\r\n *\r\n * @ignore Exclude from docs\r\n * @param row Row data\r\n * @param options Options\r\n * @param dataFields Data fields\r\n * @param asIs Do not try to convert to dates\r\n * @return Array of values\r\n */\r\n Export.prototype.getExcelRow = function (row, options, dataFields, asIs) {\r\n var _this = this;\r\n if (asIs === void 0) { asIs = false; }\r\n // Init\r\n var items = [];\r\n // Data fields\r\n if (!dataFields) {\r\n dataFields = row;\r\n }\r\n // Data fields order\r\n var dataFieldsOrder = this.adapter.apply(\"dataFieldsOrder\", {\r\n dataFieldsOrder: this.dataFieldsOrder,\r\n format: \"xlsx\"\r\n }).dataFieldsOrder;\r\n // Process each row item\r\n $object.eachOrdered(dataFields, function (key, name) {\r\n // Get value\r\n var value = _this.convertEmptyValue(key, row[key], options);\r\n // Convert dates\r\n var item = asIs ? value : _this.convertToSpecialFormat(key, value, options, true);\r\n items.push(item);\r\n }, function (a, b) {\r\n //console.log(a, b)\r\n var ai = dataFieldsOrder.indexOf(a);\r\n var bi = dataFieldsOrder.indexOf(b);\r\n if (ai > bi) {\r\n return 1;\r\n }\r\n else if (ai < bi) {\r\n return -1;\r\n }\r\n return 0;\r\n });\r\n return items;\r\n };\r\n /**\r\n * Returns chart's data formatted as CSV.\r\n *\r\n * This is an asynchronous function. Check the description of `getImage()`\r\n * for description and example usage.\r\n *\r\n * @param type Type of the export\r\n * @param options Options\r\n * @param encodeURI If true, will return result will be data URI\r\n * @return Promise\r\n * @async\r\n */\r\n Export.prototype.getCSV = function (type, options, encodeURI) {\r\n if (encodeURI === void 0) { encodeURI = true; }\r\n return __awaiter(this, void 0, void 0, function () {\r\n var csv, dataFields, br, data, dataFieldsOrder_3, len, i, row, charset, uri;\r\n var _this = this;\r\n return __generator(this, function (_a) {\r\n if (!$type.hasValue(options)) {\r\n options = this.getFormatOptions(\"csv\");\r\n }\r\n csv = \"\";\r\n dataFields = this.adapter.apply(\"formatDataFields\", {\r\n dataFields: this.dataFields,\r\n format: \"csv\"\r\n }).dataFields;\r\n br = \"\";\r\n data = this.data;\r\n // Vertical or horizontal (default) layout\r\n if (options.pivot) {\r\n dataFieldsOrder_3 = this.adapter.apply(\"dataFieldsOrder\", {\r\n dataFieldsOrder: this.dataFieldsOrder,\r\n format: \"csv\"\r\n }).dataFieldsOrder;\r\n $object.eachOrdered(dataFields, function (key, val) {\r\n var dataRow = [];\r\n if (options.addColumnNames) {\r\n dataRow.push(val);\r\n }\r\n for (var len = data.length, i = 0; i < len; i++) {\r\n var dataValue = data[i][key];\r\n dataRow.push(_this.convertToSpecialFormat(key, dataValue, options, true));\r\n }\r\n csv += br + _this.getCSVRow(dataRow, options, undefined, true);\r\n br = \"\\n\";\r\n }, function (a, b) {\r\n var ai = dataFieldsOrder_3.indexOf(a);\r\n var bi = dataFieldsOrder_3.indexOf(b);\r\n if (ai > bi) {\r\n return -1;\r\n }\r\n else if (ai < bi) {\r\n return 1;\r\n }\r\n return 0;\r\n });\r\n }\r\n else {\r\n for (len = data.length, i = 0; i < len; i++) {\r\n row = this.getCSVRow(data[i], options, dataFields);\r\n if (options.reverse) {\r\n csv = row + br + csv;\r\n }\r\n else {\r\n csv += br + row;\r\n }\r\n br = \"\\n\";\r\n }\r\n // Add column names?\r\n if (options.addColumnNames) {\r\n csv = this.getCSVRow(dataFields, options, undefined, true) + br + csv;\r\n }\r\n }\r\n charset = this.adapter.apply(\"charset\", {\r\n charset: \"charset=utf-8\",\r\n type: type,\r\n options: options\r\n }).charset;\r\n uri = this.adapter.apply(\"getCSV\", {\r\n data: encodeURI ? \"data:\" + this.getContentType(type) + \";\" + charset + \",\" + encodeURIComponent(csv) : csv,\r\n options: options\r\n }).data;\r\n return [2 /*return*/, uri];\r\n });\r\n });\r\n };\r\n /**\r\n * Formats a row of CSV data.\r\n *\r\n * @ignore Exclude from docs\r\n * @param row An object holding data for the row\r\n * @param options Options\r\n * @param dataFields Data fields\r\n * @param asIs Do not try to convert to dates\r\n * @return Formated CSV line\r\n */\r\n Export.prototype.getCSVRow = function (row, options, dataFields, asIs) {\r\n var _this = this;\r\n if (asIs === void 0) { asIs = false; }\r\n // Init\r\n var separator = options.separator || \",\";\r\n var items = [];\r\n // Data fields\r\n if (!dataFields) {\r\n dataFields = row;\r\n }\r\n // Data fields order\r\n var dataFieldsOrder = this.adapter.apply(\"dataFieldsOrder\", {\r\n dataFieldsOrder: this.dataFieldsOrder,\r\n format: \"csv\"\r\n }).dataFieldsOrder;\r\n // Process each row item\r\n $object.eachOrdered(dataFields, function (key, name) {\r\n // Get value\r\n var value = _this.convertEmptyValue(key, row[key], options);\r\n // Check if we need to skip\r\n // This is no longer required because we are iterating via dataFields anyway\r\n /*if ($type.hasValue(this.dataFields) && !$type.hasValue(this.dataFields[key])) {\r\n return;\r\n }*/\r\n // Convert dates\r\n var item = asIs ? value : _this.convertToSpecialFormat(key, value, options);\r\n // Cast and escape doublequotes\r\n item = \"\" + item;\r\n item = item.replace(/\"/g, '\"\"');\r\n // Enclose into double quotes\r\n if (options.forceQuotes || (item.search(new RegExp(\"\\\"|\\n|\" + separator, \"g\")) >= 0)) {\r\n item = \"\\\"\" + item + \"\\\"\";\r\n }\r\n // Add to item\r\n items.push(item);\r\n }, function (a, b) {\r\n //console.log(a, b)\r\n var ai = dataFieldsOrder.indexOf(a);\r\n var bi = dataFieldsOrder.indexOf(b);\r\n if (ai > bi) {\r\n return 1;\r\n }\r\n else if (ai < bi) {\r\n return -1;\r\n }\r\n return 0;\r\n });\r\n return items.join(separator);\r\n };\r\n /**\r\n * Returns chart's data formatted as HTML table.\r\n *\r\n * This is an asynchronous function. Check the description of `getImage()`\r\n * for description and example usage.\r\n *\r\n * @since 4.7.0\r\n * @param type Type of the export\r\n * @param options Options\r\n * @param encodeURI If true, will return result will be data URI\r\n * @return Promise\r\n * @async\r\n */\r\n Export.prototype.getHTML = function (type, options, encodeURI) {\r\n if (encodeURI === void 0) { encodeURI = true; }\r\n return __awaiter(this, void 0, void 0, function () {\r\n var html, dataFields, data, dataFieldsOrder_4, len, i, charset, uri;\r\n var _this = this;\r\n return __generator(this, function (_a) {\r\n if (!$type.hasValue(options)) {\r\n options = this.getFormatOptions(\"html\");\r\n }\r\n html = \"<table>\";\r\n if (options.tableClass) {\r\n html = \"<table class=\\\"\" + options.tableClass + \"\\\">\";\r\n }\r\n dataFields = this.adapter.apply(\"formatDataFields\", {\r\n dataFields: this.dataFields,\r\n format: \"html\"\r\n }).dataFields;\r\n data = this.data;\r\n // Vertical or horizontal (default) layout\r\n if (options.pivot) {\r\n dataFieldsOrder_4 = this.adapter.apply(\"dataFieldsOrder\", {\r\n dataFieldsOrder: this.dataFieldsOrder,\r\n format: \"html\"\r\n }).dataFieldsOrder;\r\n html += \"\\n<tbody>\";\r\n $object.eachOrdered(dataFields, function (key, val) {\r\n var dataRow = [];\r\n if (options.addColumnNames) {\r\n dataRow.push(val);\r\n }\r\n for (var len = data.length, i = 0; i < len; i++) {\r\n var dataValue = data[i][key];\r\n dataRow.push(_this.convertToSpecialFormat(key, dataValue, options, true));\r\n }\r\n html += \"\\n\" + _this.getHTMLRow(dataRow, options, undefined, true);\r\n }, function (a, b) {\r\n var ai = dataFieldsOrder_4.indexOf(a);\r\n var bi = dataFieldsOrder_4.indexOf(b);\r\n if (ai > bi) {\r\n return -1;\r\n }\r\n else if (ai < bi) {\r\n return 1;\r\n }\r\n return 0;\r\n });\r\n html += \"\\n</tbody>\";\r\n }\r\n else {\r\n // Add column names?\r\n if (options.addColumnNames) {\r\n html += \"\\n<thead>\\n\" + this.getHTMLRow(dataFields, options, undefined, true, true) + \"\\n</thead>\";\r\n }\r\n html += \"\\n<tbody>\";\r\n for (len = data.length, i = 0; i < len; i++) {\r\n html += \"\\n\" + this.getHTMLRow(data[i], options, dataFields);\r\n }\r\n html += \"\\n</tbody>\";\r\n }\r\n html += \"\\n</table>\";\r\n charset = this.adapter.apply(\"charset\", {\r\n charset: \"charset=utf-8\",\r\n type: type,\r\n options: options\r\n }).charset;\r\n uri = this.adapter.apply(\"getHTML\", {\r\n data: encodeURI ? \"data:\" + this.getContentType(type) + \";\" + charset + \",\" + encodeURIComponent(html) : html,\r\n options: options\r\n }).data;\r\n return [2 /*return*/, uri];\r\n });\r\n });\r\n };\r\n /**\r\n * Formats a row of HTML data.\r\n *\r\n * @since 4.7.0\r\n * @ignore Exclude from docs\r\n * @param row An object holding data for the row\r\n * @param options Options\r\n * @param dataFields Data fields\r\n * @param asIs Do not try to convert to dates\r\n * @return Formated HTML row\r\n */\r\n Export.prototype.getHTMLRow = function (row, options, dataFields, asIs, headerRow) {\r\n var _this = this;\r\n if (asIs === void 0) { asIs = false; }\r\n if (headerRow === void 0) { headerRow = false; }\r\n // Init output\r\n var html = \"\\t<tr>\";\r\n if (options.rowClass) {\r\n html = \"\\t<tr class=\\\"\" + options.rowClass + \"\\\">\";\r\n }\r\n // Data fields\r\n if (!dataFields) {\r\n dataFields = row;\r\n }\r\n // Data fields order\r\n var dataFieldsOrder = this.adapter.apply(\"dataFieldsOrder\", {\r\n dataFieldsOrder: this.dataFieldsOrder,\r\n format: \"html\"\r\n }).dataFieldsOrder;\r\n // th or dh?\r\n var tag = headerRow ? \"th\" : \"td\";\r\n // Process each row item\r\n var first = true;\r\n $object.eachOrdered(dataFields, function (key, name) {\r\n // Get value\r\n var value = _this.convertEmptyValue(key, row[key], options);\r\n // Convert dates\r\n var item = asIs ? value : _this.convertToSpecialFormat(key, value, options);\r\n // Escape HTML entities\r\n item = \"\" + item;\r\n item = item.replace(/[\\u00A0-\\u9999<>\\&]/gim, function (i) {\r\n return \"&#\" + i.charCodeAt(0) + \";\";\r\n });\r\n // Which tag to use\r\n var useTag = tag;\r\n if (options.pivot && first) {\r\n useTag = \"th\";\r\n }\r\n // Add cell\r\n if (options.cellClass) {\r\n html += \"\\n\\t\\t<\" + useTag + \" class=\\\"\" + options.cellClass + \"\\\">\" + item + \"</\" + useTag + \">\";\r\n }\r\n else {\r\n html += \"\\n\\t\\t<\" + useTag + \">\" + item + \"</\" + useTag + \">\";\r\n }\r\n first = false;\r\n }, function (a, b) {\r\n var ai = dataFieldsOrder.indexOf(a);\r\n var bi = dataFieldsOrder.indexOf(b);\r\n if (ai > bi) {\r\n return 1;\r\n }\r\n else if (ai < bi) {\r\n return -1;\r\n }\r\n return 0;\r\n });\r\n html += \"\\n\\t</tr>\";\r\n return html;\r\n };\r\n /**\r\n * Returns chart's data in JSON format.\r\n *\r\n * This is an asynchronous function. Check the description of `getImage()`\r\n * for description and example usage.\r\n *\r\n * @param type Type of the export\r\n * @param options Options\r\n * @param encodeURI If true, will return result will be data URI\r\n * @return Promise\r\n * @async\r\n */\r\n Export.prototype.getJSON = function (type, options, encodeURI) {\r\n if (encodeURI === void 0) { encodeURI = true; }\r\n return __awaiter(this, void 0, void 0, function () {\r\n var data, dataFields, sourceData, _loop_1, len, i, json, charset, uri;\r\n var _this = this;\r\n return __generator(this, function (_a) {\r\n if (!$type.hasValue(options)) {\r\n options = this.getFormatOptions(\"json\");\r\n }\r\n dataFields = this.adapter.apply(\"formatDataFields\", {\r\n dataFields: this.dataFields,\r\n format: \"json\"\r\n }).dataFields;\r\n if (!this._dynamicDataFields) {\r\n data = [];\r\n sourceData = this.data;\r\n _loop_1 = function (len, i) {\r\n var value = sourceData[i];\r\n if (typeof value == \"object\") {\r\n var newValue_1 = {};\r\n $object.each(value, function (field, item) {\r\n if ($type.hasValue(dataFields[field])) {\r\n newValue_1[dataFields[field]] = _this.convertToSpecialFormat(field, item, options);\r\n }\r\n });\r\n data.push(newValue_1);\r\n }\r\n };\r\n for (len = sourceData.length, i = 0; i < len; i++) {\r\n _loop_1(len, i);\r\n }\r\n }\r\n else {\r\n data = this.data;\r\n }\r\n json = JSON.stringify(data, function (key, value) {\r\n if (typeof value == \"object\") {\r\n $object.each(value, function (field, item) {\r\n value[field] = _this.convertToSpecialFormat(field, item, options);\r\n });\r\n }\r\n return value;\r\n }, options.indent);\r\n charset = this.adapter.apply(\"charset\", {\r\n charset: \"charset=utf-8\",\r\n type: type,\r\n options: options\r\n }).charset;\r\n uri = this.adapter.apply(\"getJSON\", {\r\n data: encodeURI ? \"data:\" + this.getContentType(type) + \";\" + charset + \",\" + encodeURIComponent(json) : json,\r\n options: options\r\n }).data;\r\n return [2 /*return*/, uri];\r\n });\r\n });\r\n };\r\n /**\r\n * Converts the value to proper date format.\r\n *\r\n * @ignore Exclude from docs\r\n * @param field Field name\r\n * @param value Value\r\n * @param options Options\r\n * @param keepOriginal Will ignore formatting and will keep value as it is in data\r\n * @return Formatted date value or unmodified value\r\n */\r\n Export.prototype.convertToSpecialFormat = function (field, value, options, keepOriginal) {\r\n // Is this a timestamp or duration?\r\n if (typeof value == \"number\") {\r\n if (this.isDateField(field)) {\r\n value = new Date(value);\r\n }\r\n else if (this.isDurationField(field)) {\r\n return this.durationFormatter.format(value, this.durationFormat);\r\n }\r\n else if (this.isNumberField(field) && this.numberFormat) {\r\n return this.numberFormatter.format(value, this.numberFormat);\r\n }\r\n }\r\n if (value instanceof Date) {\r\n if (options.useTimestamps) {\r\n value = value.getTime();\r\n }\r\n else if (options.useLocale) {\r\n if (!keepOriginal) {\r\n value = value.toLocaleString();\r\n }\r\n }\r\n else {\r\n value = this.dateFormatter.format(value, this.dateFormat);\r\n }\r\n }\r\n else if ($type.isString(value) && this.isDateField(field) && this.dateFormat) {\r\n value = this.dateFormatter.format(this.dateFormatter.parse(value), this.dateFormat);\r\n }\r\n return value;\r\n };\r\n /**\r\n * Converts empty value based on `emptyAs` option.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Export.prototype.convertEmptyValue = function (field, value, options) {\r\n return $type.hasValue(value) ? value : options.emptyAs;\r\n };\r\n /**\r\n * Triggers download of the file.\r\n *\r\n * This is an asynchronous function. Check the description of `getImage()`\r\n * for description and example usage.\r\n *\r\n * @param uri Data URI with file content\r\n * @param fileName File name\r\n * @return Promise\r\n * @async\r\n */\r\n Export.prototype.download = function (uri, fileName, addBOM) {\r\n if (addBOM === void 0) { addBOM = false; }\r\n return __awaiter(this, void 0, void 0, function () {\r\n var parts, contentType, decoded, blob_1, chars, i, charCode, blob, link_1, parts, contentType, decoded, blob_2, url_2, chars, i, charCode, blob, url_3, link, parts, contentType, iframe, idoc;\r\n return __generator(this, function (_a) {\r\n if (this.msBlobDownloadSupport()) {\r\n parts = uri.split(\";\");\r\n contentType = parts.shift().replace(/data:/, \"\");\r\n uri = decodeURIComponent(parts.join(\";\").replace(/^[^,]*,/, \"\"));\r\n // Check if we need to Base64-decode\r\n if ([\"image/svg+xml\", \"application/json\", \"text/csv\"].indexOf(contentType) == -1) {\r\n try {\r\n decoded = atob(uri);\r\n uri = decoded;\r\n }\r\n catch (e) {\r\n // Error occurred, meaning string was not Base64-encoded. Do nothing.\r\n return [2 /*return*/, false];\r\n }\r\n }\r\n else {\r\n blob_1 = new Blob([uri], { type: contentType });\r\n window.navigator.msSaveBlob(blob_1, fileName);\r\n return [2 /*return*/, true];\r\n }\r\n chars = new Array(uri.length);\r\n for (i = 0; i < uri.length; ++i) {\r\n charCode = uri.charCodeAt(i);\r\n chars[i] = charCode;\r\n }\r\n blob = new Blob([new Uint8Array(chars)], { type: contentType });\r\n window.navigator.msSaveBlob(blob, fileName);\r\n }\r\n else if (this.blobDownloadSupport()) {\r\n link_1 = document.createElement(\"a\");\r\n link_1.download = fileName;\r\n document.body.appendChild(link_1);\r\n parts = uri.split(\";\");\r\n contentType = parts.shift().replace(/data:/, \"\");\r\n uri = decodeURIComponent(parts.join(\";\").replace(/^[^,]*,/, \"\"));\r\n if ([\"image/svg+xml\", \"application/json\", \"text/csv\", \"text/html\"].indexOf(contentType) == -1) {\r\n try {\r\n decoded = atob(uri);\r\n uri = decoded;\r\n }\r\n catch (e) {\r\n // Error occurred, meaning string was not Base64-encoded. Do nothing.\r\n return [2 /*return*/, false];\r\n }\r\n }\r\n else {\r\n if (addBOM) {\r\n uri = \"\\ufeff\" + uri;\r\n }\r\n blob_2 = new Blob([uri], { type: contentType });\r\n url_2 = window.URL.createObjectURL(blob_2);\r\n link_1.href = url_2;\r\n link_1.download = fileName;\r\n link_1.click();\r\n setTimeout(function () {\r\n document.body.removeChild(link_1);\r\n window.URL.revokeObjectURL(url_2);\r\n }, 100);\r\n return [2 /*return*/, true];\r\n }\r\n chars = new Array(uri.length);\r\n for (i = 0; i < uri.length; ++i) {\r\n charCode = uri.charCodeAt(i);\r\n chars[i] = charCode;\r\n }\r\n if (addBOM) {\r\n chars = [0xEF, 0xBB, 0xBF].concat(chars);\r\n }\r\n blob = new Blob([new Uint8Array(chars)], { type: contentType });\r\n url_3 = window.URL.createObjectURL(blob);\r\n link_1.href = url_3;\r\n link_1.download = fileName;\r\n document.body.appendChild(link_1);\r\n link_1.click();\r\n document.body.removeChild(link_1);\r\n setTimeout(function () {\r\n window.URL.revokeObjectURL(url_3);\r\n }, 100);\r\n }\r\n else if (this.linkDownloadSupport()) {\r\n link = document.createElement(\"a\");\r\n link.download = fileName;\r\n link.href = uri;\r\n document.body.appendChild(link);\r\n link.click();\r\n document.body.removeChild(link);\r\n }\r\n else if (this.legacyIE()) {\r\n parts = uri.match(/^data:(.*);[ ]*([^,]*),(.*)$/);\r\n if (parts.length === 4) {\r\n // Base64-encoded or text-based stuff?\r\n if (parts[2] == \"base64\") {\r\n // Base64-encoded - probably an image\r\n if (parts[1].match(/^image\\//)) {\r\n // Yep, an image. Let's create a temporary image placeholder,\r\n // so that user can use do Save As.\r\n this.showModal(\"<img src=\\\"\" + uri + \"\\\" style=\\\"float: left; max-width: 50%; max-height: 80%; margin: 0 1em 0.5em 0; border: 1px solid #eee;\\\" />\" +\r\n \"<p>\" + this.language.translate(\"To save the image, right-click thumbnail on the left and choose \\\"Save picture as...\\\"\") +\r\n \"</p>\" +\r\n \"<p style=\\\"text-align: center;\\\"><small>\" + this.language.translate(\"(Press ESC to close this message)\") + \"</small></p>\", this.language.translate(\"Image Export Complete\"));\r\n }\r\n }\r\n else {\r\n contentType = void 0;\r\n if (fileName.match(/\\.svg$/)) {\r\n contentType = \"image/svg+xml\";\r\n }\r\n else {\r\n contentType = \"text/plain\";\r\n fileName += \".txt\";\r\n }\r\n iframe = document.createElement(\"iframe\");\r\n iframe.width = \"1px\";\r\n iframe.height = \"1px\";\r\n iframe.style.display = \"none\";\r\n document.body.appendChild(iframe);\r\n idoc = iframe.contentDocument;\r\n idoc.open(contentType, \"replace\");\r\n // TODO test this with various encodings (e.g. UTF)\r\n //idoc.charset = parts[2].replace(/charset=/, \"\");\r\n idoc.write(decodeURIComponent(parts[3]));\r\n idoc.close();\r\n idoc.execCommand(\"SaveAs\", true, fileName);\r\n // Destroy the iframe\r\n document.body.removeChild(iframe);\r\n }\r\n }\r\n }\r\n else {\r\n /**\r\n * Something else - perhaps a mobile.\r\n * Let's just display it in the same page.\r\n * (hey we don't like it either)\r\n */\r\n window.location.href = uri;\r\n }\r\n return [2 /*return*/, true];\r\n });\r\n });\r\n };\r\n /**\r\n * Returns `true` if browser has any supported methods to trigger download\r\n * of a binary file.\r\n *\r\n * @return Supports downloads?\r\n */\r\n Export.prototype.downloadSupport = function () {\r\n //return !this.legacyIE();\r\n return this.linkDownloadSupport() || this.msBlobDownloadSupport();\r\n };\r\n /**\r\n * Checks if the browser supports \"download\" attribute on links.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Browser supports triggering downloads?\r\n */\r\n Export.prototype.linkDownloadSupport = function () {\r\n // Do we have this cached?\r\n var cache = registry.getCache(\"linkDownloadSupport\");\r\n if (cache === false || cache === true) {\r\n return cache;\r\n }\r\n var a = document.createElement(\"a\");\r\n var res = typeof a.download !== \"undefined\";\r\n registry.setCache(\"linkDownloadSupport\", res);\r\n return res;\r\n };\r\n /**\r\n * Checks if the browser supports download via `msBlob`.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Browser supports triggering downloads?\r\n */\r\n Export.prototype.blobDownloadSupport = function () {\r\n return $type.hasValue(window.Blob);\r\n };\r\n /**\r\n * Checks if the browser supports download via `msBlob`.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Browser supports triggering downloads?\r\n */\r\n Export.prototype.msBlobDownloadSupport = function () {\r\n return $type.hasValue(window.navigator.msSaveOrOpenBlob);\r\n };\r\n /**\r\n * Checks if this is a legacy version of IE.\r\n *\r\n * @ignore Exclude from docs\r\n * @return IE9 or less?\r\n */\r\n Export.prototype.legacyIE = function () {\r\n // Create a temporary <div> with conditional tags in it an an <i> tag.\r\n // Count <i>s. If there are some, we have IE9 or late on our hands.\r\n var div = document.createElement(\"div\");\r\n div.innerHTML = \"<!--[if lt IE 10]><i></i><![endif]-->\";\r\n return div.getElementsByTagName(\"i\").length == 1;\r\n };\r\n /**\r\n * Initiates print of the chart.\r\n *\r\n * This is an asynchronous function. Check the description of `getImage()`\r\n * for description and example usage.\r\n *\r\n * @param data Data URI for the image\r\n * @param options Options\r\n * @param title Optional title to use (uses window's title by default)\r\n * @return Promise\r\n * @async\r\n */\r\n Export.prototype.print = function (data, options, title) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n return __generator(this, function (_a) {\r\n if (options.printMethod == \"css\") {\r\n return [2 /*return*/, this.printViaCSS(data, options, title)];\r\n }\r\n else {\r\n return [2 /*return*/, this.printViaIframe(data, options, title)];\r\n }\r\n return [2 /*return*/];\r\n });\r\n });\r\n };\r\n Export.prototype.printViaCSS = function (data, options, title) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var scroll, rule, originalTitle, img, isIOS;\r\n return __generator(this, function (_a) {\r\n scroll = document.documentElement.scrollTop || document.body.scrollTop;\r\n rule = new StyleRule($dom.getShadowRoot(this.container), \"body > *\", {\r\n \"display\": \"none\",\r\n \"position\": \"fixed\",\r\n \"visibility\": \"hidden\",\r\n \"opacity\": \"0\",\r\n \"clipPath\": \"polygon(0px 0px,0px 0px,0px 0px,0px 0px);\"\r\n });\r\n if (title && document && document.title) {\r\n originalTitle = document.title;\r\n document.title = title;\r\n }\r\n img = new Image();\r\n img.src = data;\r\n img.style.maxWidth = \"100%\";\r\n img.style.display = \"block\";\r\n img.style.position = \"relative\";\r\n img.style.visibility = \"visible\";\r\n img.style.opacity = \"1\";\r\n img.style.clipPath = \"none\";\r\n document.body.appendChild(img);\r\n // Print\r\n this.setTimeout(function () {\r\n window.print();\r\n }, 50);\r\n isIOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;\r\n if (isIOS && (options.delay < 1000)) {\r\n options.delay = 1000;\r\n }\r\n else if (options.delay < 100) {\r\n options.delay = 100;\r\n }\r\n // Delay function that resets back the document the way ot was before\r\n this.setTimeout(function () {\r\n // Remove image\r\n document.body.removeChild(img);\r\n // Reset back all elements\r\n /*for (let len = items.length, i = 0; i < len; i++) {\r\n let item = <HTMLElement>items[i];\r\n if ($dom.isElement(item)) {\r\n item.style.display = states[i];\r\n }\r\n }*/\r\n rule.dispose();\r\n // Restore title\r\n if (originalTitle) {\r\n document.title = document.title;\r\n }\r\n // Scroll back the document the way it was before\r\n document.documentElement.scrollTop = document.body.scrollTop = scroll;\r\n }, options.delay || 500);\r\n return [2 /*return*/, true];\r\n });\r\n });\r\n };\r\n Export.prototype.printViaIframe = function (data, options, title) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var iframe, img, isIOS;\r\n return __generator(this, function (_a) {\r\n iframe = document.createElement(\"iframe\");\r\n iframe.style.visibility = \"hidden\";\r\n document.body.appendChild(iframe);\r\n // This is needed for FireFox\r\n iframe.contentWindow.document.open();\r\n iframe.contentWindow.document.close();\r\n img = new Image();\r\n img.src = data;\r\n img.style.maxWidth = \"100%\";\r\n img.style.height = \"auto\";\r\n if (title) {\r\n iframe.contentWindow.document.title = title;\r\n }\r\n iframe.contentWindow.document.body.appendChild(img);\r\n iframe.load = function () {\r\n iframe.contentWindow.document.body.appendChild(img);\r\n };\r\n // Print\r\n this.setTimeout(function () {\r\n try {\r\n if (!iframe.contentWindow.document.execCommand(\"print\", false, null)) {\r\n iframe.contentWindow.print();\r\n }\r\n }\r\n catch (e) {\r\n iframe.contentWindow.print();\r\n }\r\n }, options.delay || 50);\r\n isIOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;\r\n if (isIOS && (options.delay < 1000)) {\r\n options.delay = 1000;\r\n }\r\n else if (options.delay < 100) {\r\n options.delay = 100;\r\n }\r\n // Delay function that resets back the document the way ot was before\r\n this.setTimeout(function () {\r\n // Remove image\r\n document.body.removeChild(iframe);\r\n }, options.delay + 50 || 100);\r\n return [2 /*return*/, true];\r\n });\r\n });\r\n };\r\n /**\r\n * Finds a background color for the element. If element is transparent it goes\r\n * up the DOM hierarchy to find a parent element that does.\r\n *\r\n * @ignore Exclude from docs\r\n * @param element Element\r\n * @return Color code\r\n */\r\n Export.prototype.findBackgroundColor = function (element) {\r\n // Check if element has styles set\r\n var opacity = 1, currentColor = getComputedStyle(element, \"background-color\");\r\n // Check opacity\r\n if (currentColor.match(/[^,]*,[^,]*,[^,]*,[ ]?0/) || currentColor == \"transparent\") {\r\n opacity = 0;\r\n }\r\n if (opacity == 0) {\r\n var parent_2 = element.parentElement; // || <Element>element.parentNode;\r\n // Completely transparent. Look for a parent\r\n if (parent_2) {\r\n return this.findBackgroundColor(parent_2);\r\n }\r\n else {\r\n return color(\"#fff\");\r\n }\r\n }\r\n else {\r\n return color(currentColor, opacity);\r\n }\r\n };\r\n Object.defineProperty(Export.prototype, \"container\", {\r\n /**\r\n * @return Reference\r\n */\r\n get: function () {\r\n return this.adapter.apply(\"container\", {\r\n container: this._container\r\n }).container;\r\n },\r\n /**\r\n * A reference to a container to be used to place [[ExportMenu]] in.\r\n *\r\n * @param value Reference\r\n */\r\n set: function (value) {\r\n this._container = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Export.prototype, \"sprite\", {\r\n /**\r\n * @return Sprite\r\n */\r\n get: function () {\r\n return this.adapter.apply(\"sprite\", {\r\n sprite: this._sprite\r\n }).sprite;\r\n },\r\n /**\r\n * A reference to [[Sprite]] to export. Can be any Sprite, including some\r\n * internal elements.\r\n *\r\n * @param value Sprite\r\n */\r\n set: function (value) {\r\n this._sprite = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Export.prototype, \"extraSprites\", {\r\n /**\r\n * @return Sprite\r\n */\r\n get: function () {\r\n return this.adapter.apply(\"extraSprites\", {\r\n extraSprites: this._extraSprites\r\n }).extraSprites;\r\n },\r\n /**\r\n * An array of extra [[Sprite]] elements to include in export.\r\n *\r\n * It can be used to export any external elements, or even other charts.\r\n *\r\n * E.g.:\r\n *\r\n * ```TypeScript\r\n * chart.exporting.extraSprites.push(chart2);\r\n * ```\r\n * ```JavaScript\r\n * chart.exporting.extraSprites.push(chart2);\r\n * ```\r\n *\r\n * IMPORTANT: This setting is ignored when exporting to SVG format.\r\n *\r\n * @since 4.2.0\r\n * @param value Sprite\r\n */\r\n set: function (value) {\r\n this._extraSprites = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Export.prototype, \"validateSprites\", {\r\n /**\r\n * @return Sprite\r\n */\r\n get: function () {\r\n return this.adapter.apply(\"validateSprites\", {\r\n validateSprites: this._validateSprites\r\n }).validateSprites;\r\n },\r\n /**\r\n * An array of [[Sprite]] elements that need to be valid before export\r\n * commences.\r\n *\r\n * If any of those elements is not completely ready when export is triggered,\r\n * the export will wait until they are (their `validated` event triggers)\r\n * before going through with the export opertaion.\r\n *\r\n * This is useful if you need to modify chart appearance for the export.\r\n *\r\n * E.g.:\r\n *\r\n * ```TypeScript\r\n * // Add watermark\r\n * let watermark = chart.createChild(am4core.Label);\r\n * watermark.text = \"Copyright (C) 2019\";\r\n * watermark.disabled = true;\r\n *\r\n * // Add watermark to validated sprites\r\n * chart.exporting.validateSprites.push(watermark);\r\n *\r\n * // Enable watermark on export\r\n * chart.exporting.events.on(\"exportstarted\", function(ev) {\r\n * watermark.disabled = false;\r\n * });\r\n *\r\n * // Disable watermark when export finishes\r\n * chart.exporting.events.on(\"exportfinished\", function(ev) {\r\n * watermark.disabled = true;\r\n * });\r\n * ```\r\n * ```JavaScript\r\n * // Add watermark\r\n * var watermark = chart.createChild(am4core.Label);\r\n * watermark.text = \"Copyright (C) 2019\";\r\n * watermark.disabled = true;\r\n *\r\n * // Add watermark to validated sprites\r\n * chart.exporting.validateSprites.push(watermark);\r\n *\r\n * // Enable watermark on export\r\n * chart.exporting.events.on(\"exportstarted\", function(ev) {\r\n * watermark.disabled = false;\r\n * });\r\n *\r\n * // Disable watermark when export finishes\r\n * chart.exporting.events.on(\"exportfinished\", function(ev) {\r\n * watermark.disabled = true;\r\n * });\r\n * ```\r\n *\r\n * @since 4.6.8\r\n * @param value Sprite\r\n */\r\n set: function (value) {\r\n this._validateSprites = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Export.prototype, \"data\", {\r\n /**\r\n * @return Data\r\n */\r\n get: function () {\r\n return this.adapter.apply(\"data\", {\r\n data: this._data\r\n }).data;\r\n },\r\n /**\r\n * Data to export.\r\n *\r\n * @param value Data\r\n */\r\n set: function (value) {\r\n this._data = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Export.prototype, \"dataFields\", {\r\n /**\r\n * @return Field names `{ field: fieldName }`\r\n */\r\n get: function () {\r\n if (!this._dataFields) {\r\n this.generateDataFields();\r\n }\r\n return this.adapter.apply(\"dataFields\", {\r\n dataFields: this._dataFields\r\n }).dataFields;\r\n },\r\n /**\r\n * Data fields in `{ field: fieldName }` format. Those are used for\r\n * exporting in data formats to name the columns.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/exporting/#Changing_order_and_names_of_columns} for examples and details\r\n * @param value Field names\r\n */\r\n set: function (value) {\r\n this._dataFields = value;\r\n this._dynamicDataFields = false;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Called after target chart's data updates.\r\n *\r\n * @ignore\r\n */\r\n Export.prototype.handleDataUpdated = function () {\r\n if (this._dynamicDataFields) {\r\n this._dataFields = undefined;\r\n }\r\n var hasData = this.data.length > 0;\r\n if (this._prevHasData != hasData) {\r\n this._prevHasData = hasData;\r\n if (this.menu) {\r\n this.menu.invalidate();\r\n }\r\n }\r\n };\r\n Object.defineProperty(Export.prototype, \"dateFormatter\", {\r\n /**\r\n * @return A DateFormatter instance\r\n */\r\n get: function () {\r\n if (!this._dateFormatter) {\r\n this._dateFormatter = new DateFormatter();\r\n this._dateFormatter.language = this.language;\r\n }\r\n return this.adapter.apply(\"dateFormatter\", {\r\n dateFormatter: this._dateFormatter\r\n }).dateFormatter;\r\n },\r\n /**\r\n * A [[DateFormatter]] to use when formatting dates when exporting data.\r\n *\r\n * @param value DateFormatter instance\r\n */\r\n set: function (value) {\r\n this._dateFormatter = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Export.prototype, \"dateFormat\", {\r\n /**\r\n * @return Date format\r\n */\r\n get: function () {\r\n return this.adapter.apply(\"dateFormat\", {\r\n dateFormat: this._dateFormat\r\n }).dateFormat;\r\n },\r\n /**\r\n * A date format to use for exporting dates. Will use [[DateFormatter]]\r\n * format if not set.\r\n *\r\n * @param value Date format\r\n */\r\n set: function (value) {\r\n this._dateFormat = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Export.prototype, \"dateFields\", {\r\n /**\r\n * @return Date field list\r\n */\r\n get: function () {\r\n if (!this._dateFields) {\r\n this._dateFields = new List();\r\n }\r\n return this.adapter.apply(\"dateFields\", {\r\n dateFields: this._dateFields\r\n }).dateFields;\r\n },\r\n /**\r\n * A list of fields that hold date values.\r\n *\r\n * @param value Date field list\r\n */\r\n set: function (value) {\r\n this._dateFields = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Export.prototype, \"numberFormatter\", {\r\n /**\r\n * @return A NumberFormatter instance\r\n */\r\n get: function () {\r\n if (!this._numberFormatter) {\r\n this._numberFormatter = new NumberFormatter();\r\n this._numberFormatter.language = this.language;\r\n }\r\n return this.adapter.apply(\"numberFormatter\", {\r\n numberFormatter: this._numberFormatter\r\n }).numberFormatter;\r\n },\r\n /**\r\n * A [[NumberFormatter]] to use when formatting dates when exporting data.\r\n *\r\n * @since 4.5.15\r\n * @param value NumberFormatter instance\r\n */\r\n set: function (value) {\r\n this._numberFormatter = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Export.prototype, \"numberFormat\", {\r\n /**\r\n * @return Number format\r\n */\r\n get: function () {\r\n return this.adapter.apply(\"numberFormat\", {\r\n numberFormat: this._numberFormat\r\n }).numberFormat;\r\n },\r\n /**\r\n * A number format to use for exporting dates. Will use [[NumberFormatter]]\r\n * format if not set.\r\n *\r\n * @since 4.5.15\r\n * @param value Number format\r\n */\r\n set: function (value) {\r\n this._numberFormat = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Export.prototype, \"numberFields\", {\r\n /**\r\n * @return Number field list\r\n */\r\n get: function () {\r\n if (!this._numberFields) {\r\n this._numberFields = new List();\r\n }\r\n return this.adapter.apply(\"numberFields\", {\r\n numberFields: this._numberFields\r\n }).numberFields;\r\n },\r\n /**\r\n * A list of fields that hold number values.\r\n *\r\n * @since 4.5.15\r\n * @param value Number field list\r\n */\r\n set: function (value) {\r\n this._numberFields = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Export.prototype, \"durationFormatter\", {\r\n /**\r\n * @return A DurationFormatter instance\r\n */\r\n get: function () {\r\n if (!this._durationFormatter) {\r\n this._durationFormatter = new DurationFormatter();\r\n this._durationFormatter.language = this.language;\r\n }\r\n return this.adapter.apply(\"durationFormatter\", {\r\n durationFormatter: this._durationFormatter\r\n }).durationFormatter;\r\n },\r\n /**\r\n * A [[DurationFormatter]] to use when formatting duration values when\r\n * exporting data.\r\n *\r\n * @param value DurationFormatter instance\r\n */\r\n set: function (value) {\r\n this._durationFormatter = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Export.prototype, \"durationFormat\", {\r\n /**\r\n * @return Duration format\r\n */\r\n get: function () {\r\n return this.adapter.apply(\"durationFormat\", {\r\n durationFormat: this._durationFormat\r\n }).durationFormat;\r\n },\r\n /**\r\n * A format to use when formatting values from `durationFields`.\r\n * Will use [[DurationFormatter]] format if not set.\r\n *\r\n * @param value Duration format\r\n */\r\n set: function (value) {\r\n this._durationFormat = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Export.prototype, \"durationFields\", {\r\n /**\r\n * @return Duration field list\r\n */\r\n get: function () {\r\n if (!this._durationFields) {\r\n this._durationFields = new List();\r\n }\r\n return this.adapter.apply(\"durationFields\", {\r\n durationFields: this._durationFields\r\n }).durationFields;\r\n },\r\n /**\r\n * A list of fields that hold duration values.\r\n *\r\n * @param value Duration field list\r\n */\r\n set: function (value) {\r\n this._durationFields = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Generates data fields out of the first row of data.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Export.prototype.generateDataFields = function () {\r\n var _this = this;\r\n this._dataFields = {};\r\n if (this.data.length) {\r\n $array.each(this.data, function (row) {\r\n $object.each(row, function (key, value) {\r\n if (!$type.hasValue(_this._dataFields[key])) {\r\n _this._dataFields[key] = _this.adapter.apply(\"dataFieldName\", {\r\n name: key,\r\n field: key\r\n }).name;\r\n }\r\n });\r\n });\r\n }\r\n };\r\n /**\r\n * Cheks against `dateFields` property to determine if this field holds\r\n * dates.\r\n *\r\n * @ignore Exclude from docs\r\n * @param field Field name\r\n * @param options Options\r\n * @return `true` if it's a date field\r\n */\r\n Export.prototype.isDateField = function (field) {\r\n return this.adapter.apply(\"isDateField\", {\r\n isDateField: this.dateFields.contains(field),\r\n field: field\r\n }).isDateField;\r\n };\r\n /**\r\n * Cheks against `numberFields` property to determine if this field holds\r\n * numbers.\r\n *\r\n * @ignore Exclude from docs\r\n * @param field Field name\r\n * @param options Options\r\n * @return `true` if it's a number field\r\n */\r\n Export.prototype.isNumberField = function (field) {\r\n return this.adapter.apply(\"isNumberField\", {\r\n isNumberField: this.numberFields.contains(field),\r\n field: field\r\n }).isNumberField;\r\n };\r\n /**\r\n * Cheks against `durationFields` property to determine if this field holds\r\n * durations.\r\n *\r\n * @ignore Exclude from docs\r\n * @param field Field name\r\n * @param options Options\r\n * @return `true` if it's a date field\r\n */\r\n Export.prototype.isDurationField = function (field) {\r\n return this.adapter.apply(\"isDurationField\", {\r\n isDurationField: this.durationFields.contains(field),\r\n field: field\r\n }).isDurationField;\r\n };\r\n /**\r\n * Returns proper content type for the export type.\r\n *\r\n * @param type Export format/type\r\n * @return Proper content type, i.e. \"image/jpeg\"\r\n */\r\n Export.prototype.getContentType = function (type) {\r\n var contentType = \"\";\r\n switch (type) {\r\n case \"png\":\r\n case \"gif\":\r\n contentType = \"image/\" + type;\r\n break;\r\n case \"jpg\":\r\n contentType = \"image/jpeg\";\r\n break;\r\n case \"svg\":\r\n contentType = \"image/svg+xml\";\r\n break;\r\n case \"csv\":\r\n contentType = \"text/csv\";\r\n break;\r\n case \"json\":\r\n contentType = \"application/json\";\r\n break;\r\n case \"html\":\r\n contentType = \"text/html\";\r\n break;\r\n case \"pdf\":\r\n case \"pdfdata\":\r\n contentType = \"application/pdf\";\r\n break;\r\n case \"xlsx\":\r\n contentType = \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\";\r\n break;\r\n }\r\n return this.adapter.apply(\"contentType\", {\r\n contentType: contentType,\r\n type: type\r\n }).contentType;\r\n };\r\n Object.defineProperty(Export.prototype, \"filePrefix\", {\r\n /**\r\n * @return File prefix\r\n */\r\n get: function () {\r\n return this.adapter.apply(\"filePrefix\", {\r\n filePrefix: this._filePrefix\r\n }).filePrefix;\r\n },\r\n /**\r\n * A file prefix to be used for all exported formats.\r\n *\r\n * Export will apply format-related extension to it. E.g. if this is set to\r\n * \"myExport\", the file name of the PNG exported image will be \"myExport.png\".\r\n *\r\n * @param value File prefix\r\n */\r\n set: function (value) {\r\n this._filePrefix = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Export.prototype, \"backgroundColor\", {\r\n /**\r\n * @return Background color\r\n */\r\n get: function () {\r\n return this.adapter.apply(\"backgroundColor\", {\r\n backgroundColor: this._backgroundColor\r\n }).backgroundColor;\r\n },\r\n /**\r\n * A background color to be used for exported images. If set, this will\r\n * override the automatically acquired background color.\r\n *\r\n * @param value Color\r\n */\r\n set: function (value) {\r\n this._backgroundColor = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Export.prototype, \"title\", {\r\n /**\r\n * @return Title\r\n */\r\n get: function () {\r\n return this.adapter.apply(\"title\", {\r\n title: this._title\r\n }).title;\r\n },\r\n /**\r\n * A title to be used when printing.\r\n *\r\n * @param value Title\r\n */\r\n set: function (value) {\r\n this._title = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Displays a preloader/exporting indicator.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Add ability to change text\r\n */\r\n Export.prototype.showPreloader = function () {\r\n var preloader = this.preloader;\r\n if (preloader) {\r\n preloader.progress = 0.5;\r\n preloader.label.text = \"...\";\r\n }\r\n };\r\n /**\r\n * Hides preloader/exporting indicator\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Export.prototype.hidePreloader = function () {\r\n var preloader = this.preloader;\r\n if (preloader) {\r\n preloader.progress = 1;\r\n }\r\n };\r\n Object.defineProperty(Export.prototype, \"preloader\", {\r\n /**\r\n * Returns a an instance of [[Preloader]] associated with the Sprite being\r\n * exported.\r\n *\r\n * @return Preloader\r\n */\r\n get: function () {\r\n return this._sprite && this._sprite.parent && this._sprite.parent.preloader ?\r\n this._sprite.parent.preloader :\r\n undefined;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Displays a modal saying export is taking longer than expected.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Export.prototype.showTimeout = function () {\r\n this.showModal(this.adapter.apply(\"timeoutMessage\", {\r\n message: this.language.translate(\"Export operation took longer than expected. Something might have gone wrong.\")\r\n }).message);\r\n };\r\n /**\r\n * Hides preloader/exporting indicator.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Export.prototype.hideTimeout = function () {\r\n if (this._timeoutTimeout) {\r\n this.removeDispose(this._timeoutTimeout);\r\n this._timeoutTimeout = null;\r\n }\r\n this.hideModal();\r\n };\r\n Object.defineProperty(Export.prototype, \"language\", {\r\n /**\r\n * @return A [[Language]] instance to be used\r\n */\r\n get: function () {\r\n if (!this._language) {\r\n this._language = new Language();\r\n }\r\n return this._language;\r\n },\r\n /**\r\n * A [[Language]] instance to be used for translations.\r\n *\r\n * @param value An instance of [[Language]]\r\n */\r\n set: function (value) {\r\n this._language = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Export.prototype, \"modal\", {\r\n /**\r\n * Returns (and creates) [[Modal]].\r\n *\r\n * @ignore Exclude from docs\r\n * @return Modal instance\r\n */\r\n get: function () {\r\n if (!this._modal) {\r\n this._modal = new Modal();\r\n // Prefix with Sprite's class name\r\n this._modal.adapter.add(\"classPrefix\", function (value) {\r\n value = options.classNamePrefix + value;\r\n return value;\r\n });\r\n }\r\n return this._modal;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Shows [[Modal]] with specific text.\r\n *\r\n * @ignore Exclude from docs\r\n * @param text Modal contents\r\n */\r\n Export.prototype.showModal = function (text, title) {\r\n // Hide previous modal and preloader\r\n this.hideModal();\r\n this.hidePreloader();\r\n // Create modal\r\n var modal = this.modal;\r\n modal.container = this.sprite.svgContainer.SVGContainer;\r\n modal.content = text;\r\n modal.readerTitle = title;\r\n modal.open();\r\n };\r\n /**\r\n * Hides modal window if one's currently open.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Export.prototype.hideModal = function () {\r\n if (this._modal) {\r\n this.modal.close();\r\n }\r\n };\r\n /**\r\n * Loads canvg dynamic module.\r\n *\r\n * This is an asynchronous function. Check the description of `getImage()`\r\n * for description and example usage.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Instance of canvg\r\n * @async\r\n */\r\n Export.prototype._canvg = function () {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var canvg;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4 /*yield*/, import(/* webpackChunkName: \"canvg\" */ \"../../canvg/index.js\")];\r\n case 1:\r\n canvg = (_a.sent());\r\n if (canvg.default != null) {\r\n return [2 /*return*/, canvg.default];\r\n }\r\n else {\r\n return [2 /*return*/, canvg];\r\n }\r\n return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n Object.defineProperty(Export.prototype, \"canvg\", {\r\n /**\r\n * Returns canvg instance.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Instance of canvg\r\n */\r\n get: function () {\r\n return this._canvg();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Export.prototype, \"pdfmake\", {\r\n /**\r\n * Returns pdfmake instance.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Instance of pdfmake\r\n */\r\n get: function () {\r\n if (pdfmakePromise == null) {\r\n pdfmakePromise = _pdfmake();\r\n }\r\n return pdfmakePromise;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Loads xlsx dynamic module.\r\n *\r\n * This is an asynchronous function. Check the description of `getImage()`\r\n * for description and example usage.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Instance of pdfmake\r\n * @async\r\n */\r\n Export.prototype._xlsx = function () {\r\n return __awaiter(this, void 0, void 0, function () {\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4 /*yield*/, import(/* webpackChunkName: \"xlsx\" */ \"xlsx/dist/xlsx.core.min.js\")];\r\n case 1: return [2 /*return*/, _a.sent()];\r\n }\r\n });\r\n });\r\n };\r\n Object.defineProperty(Export.prototype, \"xlsx\", {\r\n /**\r\n * Returns xlsx instance.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Instance of pdfmake\r\n */\r\n get: function () {\r\n return this._xlsx();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Sets options for a format.\r\n */\r\n Export.prototype.setFormatOptions = function (type, options) {\r\n this._formatOptions.setKey(type, options);\r\n };\r\n /**\r\n * Returns current options for a format.\r\n */\r\n Export.prototype.getFormatOptions = function (type) {\r\n return this._formatOptions.getKey(type);\r\n };\r\n Object.defineProperty(Export.prototype, \"formatOptions\", {\r\n /**\r\n * A [[Dictionary]] object containing format-specific options.\r\n *\r\n * May be used to change specific option for the format:\r\n *\r\n * ```TypeScript\r\n * chart.exporting.formatOptions.getKey(\"csv\").disabled = true;\r\n * ```\r\n * ```JavaScript\r\n * chart.exporting.formatOptions.getKey(\"csv\").disabled = true;\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"exporting\": {\r\n * // ...\r\n * \"formatOptions\": {\r\n * \"csv\": {\r\n * \"disabled\": true\r\n * }\r\n * }\r\n * }\r\n * }\r\n * ```\r\n *\r\n * @since 4.9.12\r\n * @return Options\r\n */\r\n get: function () {\r\n return this._formatOptions;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Disables interactivity on parent chart.\r\n */\r\n Export.prototype._disablePointers = function () {\r\n if (!$type.hasValue(this._spriteInteractionsEnabled)) {\r\n this._spriteInteractionsEnabled = this.sprite.interactionsEnabled;\r\n }\r\n this.sprite.interactionsEnabled = false;\r\n };\r\n /**\r\n * Releases temporarily disabled pointers on parent chart.\r\n */\r\n Export.prototype._releasePointers = function () {\r\n if ($type.hasValue(this._spriteInteractionsEnabled) && !this._exportRunning) {\r\n this.sprite.interactionsEnabled = this._spriteInteractionsEnabled;\r\n }\r\n };\r\n /**\r\n * Hides all elements that should not be included in the exported image.\r\n */\r\n Export.prototype.hideNonExportableSprites = function () {\r\n var _this = this;\r\n if (this._objectsAlreadyHidden) {\r\n return;\r\n }\r\n var svgContainer = this.sprite.svgContainer;\r\n if (svgContainer) {\r\n $array.each(svgContainer.nonExportableSprites, function (item) {\r\n if (!item.isHidden && !item.isHiding && item.visible) {\r\n _this._hiddenObjects.push(item);\r\n }\r\n item.hide(0);\r\n });\r\n }\r\n this._objectsAlreadyHidden = true;\r\n };\r\n /**\r\n * Respores elements that were hidden before export.\r\n */\r\n Export.prototype.restoreNonExportableSprites = function () {\r\n if (!this._objectsAlreadyHidden) {\r\n return;\r\n }\r\n $array.each(this._hiddenObjects, function (item) {\r\n item.show(0);\r\n });\r\n this._hiddenObjects = [];\r\n this._objectsAlreadyHidden = false;\r\n };\r\n /**\r\n * Checks if there are elements that absolutely need to be validated before\r\n * export.\r\n *\r\n * If there are invalid elements, it will await for them to be validated.\r\n *\r\n * @return Promise\r\n */\r\n Export.prototype.awaitValidSprites = function () {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var promises;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n promises = [];\r\n if (this.validateSprites.length) {\r\n $array.each(this.validateSprites, function (sprite, index) {\r\n if (sprite.invalid) {\r\n promises.push(new Promise(function (resolve, reject) {\r\n sprite.events.once(\"validated\", function (ev) {\r\n resolve();\r\n });\r\n }));\r\n }\r\n });\r\n }\r\n if (!promises.length) return [3 /*break*/, 2];\r\n return [4 /*yield*/, Promise.all(promises)];\r\n case 1:\r\n _a.sent();\r\n _a.label = 2;\r\n case 2: return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Processes JSON-based config before it is applied to the object.\r\n *\r\n * @ignore Exclude from docs\r\n * @param config Config\r\n */\r\n Export.prototype.processConfig = function (config) {\r\n registry.registeredClasses[\"ExportMenu\"] = ExportMenu;\r\n if (config) {\r\n // Set up menu\r\n if ($type.hasValue(config.menu) && !$type.hasValue(config.menu.type)) {\r\n config.menu.type = \"ExportMenu\";\r\n }\r\n if ($type.hasValue(config.dataFields) && $type.isObject(config.dataFields)) {\r\n this.dataFields = config.dataFields;\r\n delete config.dataFields;\r\n }\r\n }\r\n _super.prototype.processConfig.call(this, config);\r\n };\r\n /**\r\n * XLINK namespace definition.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Export.XLINK = \"http://www.w3.org/1999/xlink\";\r\n return Export;\r\n}(Validatable));\r\nexport { Export };\r\n","import { StyleRule } from \"../utils/DOM\";\r\nimport { InterfaceColorSet } from \"../utils/InterfaceColorSet\";\r\nimport { Dictionary } from \"../utils/Dictionary\";\r\nimport { MultiDisposer, CounterDisposer } from \"../utils/Disposer\";\r\nvar rules = new Dictionary();\r\n/**\r\n * A dynamically-loadable CSS module for Export menu.\r\n *\r\n * @ignore Exclude from docs\r\n * @param prefix Prefix to addtach to class names\r\n * @return A MultiDisposer with style rules\r\n */\r\nexport default function (element, prefix) {\r\n var newPrefix = (prefix ? prefix : \"amexport\");\r\n var colorSet = new InterfaceColorSet();\r\n var counter = rules.insertKeyIfEmpty(newPrefix, function () {\r\n var disposer = new MultiDisposer([\r\n /*new StyleRule(`.${newPrefix}-menu`, {\r\n \"opacity\": \"0.3\",\r\n \"transition\": \"all 100ms ease-in-out\",\r\n }),\r\n\r\n new StyleRule(`div:hover .${newPrefix}-menu, .${newPrefix}-menu.active`, {\r\n \"opacity\": \"0.9\",\r\n }),*/\r\n new StyleRule(element, \".\" + newPrefix + \"-menu *\", {\r\n \"box-sizing\": \"border-box\"\r\n }),\r\n new StyleRule(element, \".\" + newPrefix + \"-menu-level-0\", {\r\n \"position\": \"absolute\",\r\n \"top\": \"5px\",\r\n \"right\": \"5px\",\r\n }),\r\n new StyleRule(element, \".\" + newPrefix + \"-menu-level-0.\" + newPrefix + \"-left\", {\r\n \"right\": \"auto\",\r\n \"left\": \"5px\",\r\n }),\r\n new StyleRule(element, \".\" + newPrefix + \"-menu-level-0.\" + newPrefix + \"-right\", {\r\n \"right\": \"5px\",\r\n \"left\": \"auto\",\r\n }),\r\n new StyleRule(element, \".\" + newPrefix + \"-menu-level-0.\" + newPrefix + \"-top\", {\r\n \"top\": \"5px\",\r\n \"bottom\": \"auto\",\r\n }),\r\n new StyleRule(element, \".\" + newPrefix + \"-menu-level-0.\" + newPrefix + \"-bottom\", {\r\n \"top\": \"auto\",\r\n \"bottom\": \"5px\",\r\n }),\r\n new StyleRule(element, \".\" + newPrefix + \"-item.\" + newPrefix + \"-item-level-0\", {\r\n \"opacity\": \"0.3\",\r\n \"width\": \"30px\",\r\n \"min-height\": \"30px\",\r\n \"transition\": \"all 100ms ease-in-out\",\r\n }),\r\n new StyleRule(element, \"div:hover > div > .\" + newPrefix + \"-menu .\" + newPrefix + \"-item.\" + newPrefix + \"-item-level-0, .\" + newPrefix + \"-item.\" + newPrefix + \"-item-level-0.active\", {\r\n \"opacity\": \"0.9\",\r\n }),\r\n new StyleRule(element, \".\" + newPrefix + \"-item.\" + newPrefix + \"-item-level-0 > a\", {\r\n \"padding\": \"0\",\r\n \"text-align\": \"center\",\r\n \"overflow\": \"hidden\"\r\n }),\r\n new StyleRule(element, \".\" + newPrefix + \"-item.\" + newPrefix + \"-item-level-0:before\", {\r\n \"display\": \"block\"\r\n }),\r\n new StyleRule(element, \".\" + newPrefix + \"-item\", {\r\n \"position\": \"relative\",\r\n \"display\": \"block\",\r\n \"opacity\": \"0\",\r\n \"z-index\": \"1\",\r\n \"border-radius\": \"3px\",\r\n \"background-color\": colorSet.getFor(\"secondaryButton\").hex,\r\n \"padding\": \"0\",\r\n \"margin\": \"1px 1px 0 0\",\r\n \"color\": colorSet.getFor(\"secondaryButton\").alternative.hex,\r\n \"transition\": \"all 100ms ease-in-out, opacity 0.5s ease 0.5s\",\r\n }),\r\n new StyleRule(element, \".\" + newPrefix + \"-left .\" + newPrefix + \"-item\", {\r\n \"margin\": \"1px 0 0 1px\",\r\n }),\r\n new StyleRule(element, \".\" + newPrefix + \"-item:hover, .\" + newPrefix + \"-item.active\", {\r\n \"background\": colorSet.getFor(\"secondaryButtonHover\").hex,\r\n \"color\": colorSet.getFor(\"secondaryButtonText\").hex,\r\n }),\r\n new StyleRule(element, \".\" + newPrefix + \"-item > .\" + newPrefix + \"-menu\", {\r\n \"position\": \"absolute\",\r\n \"top\": \"-1px\",\r\n \"right\": \"0\",\r\n \"margin-right\": \"100%\",\r\n }),\r\n new StyleRule(element, \".\" + newPrefix + \"-left .\" + newPrefix + \"-item > .\" + newPrefix + \"-menu\", {\r\n \"left\": \"0\",\r\n \"right\": \"auto\",\r\n \"margin-left\": \"100%\",\r\n \"margin-right\": \"auto\",\r\n }),\r\n new StyleRule(element, \".\" + newPrefix + \"-right .\" + newPrefix + \"-item > .\" + newPrefix + \"-menu\", {\r\n \"left\": \"auto\",\r\n \"right\": \"0\",\r\n \"margin-left\": \"auto\",\r\n \"margin-right\": \"100%\",\r\n }),\r\n new StyleRule(element, \".\" + newPrefix + \"-top .\" + newPrefix + \"-item > .\" + newPrefix + \"-menu\", {\r\n \"top\": \"-1px\",\r\n \"bottom\": \"auto\",\r\n }),\r\n new StyleRule(element, \".\" + newPrefix + \"-bottom .\" + newPrefix + \"-item > .\" + newPrefix + \"-menu\", {\r\n \"top\": \"auto\",\r\n \"bottom\": \"0\",\r\n }),\r\n new StyleRule(element, \".\" + newPrefix + \"-item > .\" + newPrefix + \"-menu\", {\r\n \"display\": \"none\",\r\n }),\r\n new StyleRule(element, \".\" + newPrefix + \"-item:hover > .\" + newPrefix + \"-menu, .\" + newPrefix + \"-item.active > .\" + newPrefix + \"-menu\", {\r\n \"display\": \"block\",\r\n }),\r\n new StyleRule(element, \".\" + newPrefix + \"-item:hover > .\" + newPrefix + \"-menu > .\" + newPrefix + \"-item, .\" + newPrefix + \"-item.active > .\" + newPrefix + \"-menu > .\" + newPrefix + \"-item\", {\r\n \"opacity\": \"1\",\r\n }),\r\n new StyleRule(element, \".\" + newPrefix + \"-menu\", {\r\n \"display\": \"block\",\r\n \"list-style\": \"none\",\r\n \"margin\": \"0\",\r\n \"padding\": \"0\",\r\n }),\r\n new StyleRule(element, \".\" + newPrefix + \"-label\", {\r\n \"display\": \"block\",\r\n \"cursor\": \"default\",\r\n \"padding\": \"0.5em 1em\",\r\n }),\r\n new StyleRule(element, \".\" + newPrefix + \"-icon\", {\r\n \"display\": \"block\",\r\n \"cursor\": \"default\",\r\n \"padding\": \"0.2em 0.4em\",\r\n \"width\": \"1.2em\",\r\n \"height\": \"1.2em\",\r\n \"min-width\": \"32px\",\r\n \"min-height\": \"32px\",\r\n \"margin\": \"auto auto\",\r\n \"border-radius\": \"3px\",\r\n }),\r\n new StyleRule(element, \".\" + newPrefix + \"-item-level-0 > .\" + newPrefix + \"-icon\", {\r\n \"padding\": \"0.1em 0.2em\",\r\n }),\r\n new StyleRule(element, \".\" + newPrefix + \"-clickable\", {\r\n \"cursor\": \"pointer\",\r\n }),\r\n ]);\r\n return new CounterDisposer(function () {\r\n rules.removeKey(newPrefix);\r\n disposer.dispose();\r\n });\r\n });\r\n return counter.increment();\r\n}\r\n","/**\r\n * ExportMenu provides functionality for building Export menu\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport exportCSS from \"./ExportCSS\";\r\nimport { Adapter } from \"../utils/Adapter\";\r\nimport { List } from \"../utils/List\";\r\nimport { getInteraction } from \"../interaction/Interaction\";\r\nimport { MutableValueDisposer } from \"../utils/Disposer\";\r\nimport { Language } from \"../utils/Language\";\r\nimport { Validatable } from \"../utils/Validatable\";\r\nimport { keyboard } from \"../utils/Keyboard\";\r\nimport * as $utils from \"../utils/Utils\";\r\nimport * as $iter from \"../utils/Iterator\";\r\nimport * as $dom from \"../utils/DOM\";\r\nimport * as $type from \"../utils/Type\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Creates a menu for Export operations.\r\n *\r\n * To add an export menu to a chart, set this to a new instance of\r\n * [[ExportMenu]].\r\n *\r\n * ```TypeScript\r\n * chart.exporting.menu = new am4core.ExportMenu();\r\n * ```\r\n * ```JavaScript\r\n * chart.exporting.menu = new am4core.ExportMenu();\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"exporting\": {\r\n * \"menu\": {}\r\n * }\r\n * }\r\n * ```\r\n * @important\r\n */\r\nvar ExportMenu = /** @class */ (function (_super) {\r\n __extends(ExportMenu, _super);\r\n /**\r\n * Constructor\r\n */\r\n function ExportMenu() {\r\n var _this = _super.call(this) || this;\r\n /**\r\n * An [[Adapter]].\r\n */\r\n _this.adapter = new Adapter(_this);\r\n /**\r\n * How many milliseconds to hold menu/sub-menu open after it loses focus or\r\n * hover, before auto-closing it.\r\n *\r\n * @default 1000\r\n */\r\n _this.closeDelay = 1000;\r\n /**\r\n * Close the menu automatically when some export operation is triggered.\r\n *\r\n * @default true\r\n * @since 4.2.2\r\n */\r\n _this.closeOnClick = true;\r\n /**\r\n * An instance of [[Language]].\r\n */\r\n _this._language = new MutableValueDisposer();\r\n /**\r\n * What HTML tags to use to build menu.\r\n */\r\n _this._menuTag = \"ul\";\r\n /**\r\n * Which tag to use to enclose individual menu items.\r\n */\r\n _this._itemTag = \"li\";\r\n /**\r\n * Tag to wrap menu item labels in.\r\n */\r\n _this._labelTag = \"a\";\r\n /**\r\n * Tag to use for icons\r\n */\r\n _this._iconTag = \"img\";\r\n /**\r\n * Prefix for class names applied to menu elements.\r\n */\r\n _this._classPrefix = \"amexport\";\r\n /**\r\n * If set to `true` [[ExportMenu]] will load it's own external CSS when\r\n * instantiated.\r\n */\r\n _this._defaultStyles = true;\r\n /**\r\n * Horizontal positioning.\r\n */\r\n _this._align = \"right\";\r\n /**\r\n * Vertical positioning.\r\n */\r\n _this._verticalAlign = \"top\";\r\n /**\r\n * A tabindex to apply to Export Menu.\r\n */\r\n _this._tabindex = 0;\r\n /**\r\n * Whether next menu close event should be ignored.\r\n */\r\n _this._ignoreNextClose = false;\r\n /**\r\n * Default menu items.\r\n */\r\n _this._items = [\r\n {\r\n \"label\": \"...\",\r\n \"menu\": [\r\n {\r\n \"label\": \"Image\",\r\n \"menu\": [\r\n { \"type\": \"png\", \"label\": \"PNG\" },\r\n { \"type\": \"jpg\", \"label\": \"JPG\" },\r\n { \"type\": \"svg\", \"label\": \"SVG\" },\r\n { \"type\": \"pdf\", \"label\": \"PDF\" }\r\n ]\r\n }, {\r\n \"label\": \"Data\",\r\n \"menu\": [\r\n { \"type\": \"json\", \"label\": \"JSON\" },\r\n { \"type\": \"csv\", \"label\": \"CSV\" },\r\n { \"type\": \"xlsx\", \"label\": \"XLSX\" },\r\n { \"type\": \"html\", \"label\": \"HTML\" },\r\n { \"type\": \"pdfdata\", \"label\": \"PDF\" }\r\n ]\r\n }, {\r\n \"label\": \"Print\", \"type\": \"print\"\r\n }\r\n ]\r\n }\r\n ];\r\n _this.className = \"ExportMenu\";\r\n _this._disposers.push(_this._language);\r\n _this.invalidate();\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * (Re)draws the Export menu.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n ExportMenu.prototype.validate = function () {\r\n this.draw();\r\n _super.prototype.validate.call(this);\r\n };\r\n /**\r\n * Draws the menu based on current items.\r\n *\r\n * Normally, there's no need to call this explicitly. The chart, if it has\r\n * export menu enabled, will automatically draw the menu.\r\n */\r\n ExportMenu.prototype.draw = function () {\r\n var _this = this;\r\n // Create top-level menu item, or clear it\r\n if (!this._element) {\r\n this._element = this.createMenuElement(0);\r\n }\r\n else {\r\n this._element.innerHTML = \"\";\r\n this._element.className = this.getMenuItemClass(0);\r\n }\r\n // See if we're loading external CSS\r\n // Hide it until CSS is loaded\r\n if (this.defaultStyles) {\r\n this._element.style.display = \"none\";\r\n }\r\n // Append to container\r\n $type.getValue(this._container).appendChild(this._element);\r\n // Apply adapter to menu items before processing\r\n var items = this.adapter.apply(\"items\", {\r\n items: this._items\r\n }).items;\r\n for (var len = items.length, i = 0; i < len; i++) {\r\n this.drawBranch(this._element, items[i], 0);\r\n }\r\n // Apply adapter to finalized menu element\r\n this._element = this.adapter.apply(\"menuElement\", {\r\n menuElement: this._element\r\n }).menuElement;\r\n // Set up global \"down\" event\r\n this._disposers.push(getInteraction().body.events.on(\"down\", function (ev) {\r\n if (!ev.pointer.touch) {\r\n _this._ignoreNextClose = false;\r\n }\r\n _this.close();\r\n }));\r\n // Set up global event on ESC press to close the menu\r\n this._disposers.push(getInteraction().body.events.on(\"keydown\", function (ev) {\r\n var key = keyboard.getEventKey(ev.event);\r\n switch (key) {\r\n case \"esc\":\r\n _this.close();\r\n break;\r\n case \"up\":\r\n case \"down\":\r\n case \"left\":\r\n case \"right\":\r\n if (_this._currentSelection) {\r\n ev.event.preventDefault();\r\n }\r\n _this.moveSelection(key);\r\n break;\r\n }\r\n }));\r\n if (this.defaultStyles) {\r\n this.loadDefaultCSS();\r\n }\r\n };\r\n /**\r\n * Creates a new branch in export menu. This function is recursive for\r\n * building multi-level menus.\r\n *\r\n * @ignore Exclude from docs\r\n * @param container Container to put branch elements in\r\n * @param branch Menu item\r\n * @param level Current nesting level\r\n */\r\n ExportMenu.prototype.drawBranch = function (container, branch, level) {\r\n var _this = this;\r\n // Apply adapter\r\n branch = this.adapter.apply(\"branch\", {\r\n branch: branch,\r\n level: level\r\n }).branch;\r\n // Unsupported?\r\n // ExportMenu does not check or know for specific browser/system\r\n // capabilities. It must happen in some other code and applied via Adapter.\r\n // Export itself will check compatibility, but there might be other plugins\r\n // that influence it or even add any specific export functionality.\r\n if (branch.unsupported === true) {\r\n return;\r\n }\r\n // Init ascendants\r\n if (!branch.ascendants) {\r\n branch.ascendants = new List();\r\n }\r\n // Get type\r\n var type = branch.type;\r\n // Create an item\r\n var element = this.createItemElement(level, type);\r\n // Create label\r\n var label;\r\n // Create icon\r\n if (branch.icon) {\r\n label = this.createIconElement(level, type);\r\n label.src = branch.icon;\r\n if (branch.label || branch.title) {\r\n label.title = branch.title || branch.label;\r\n }\r\n }\r\n else if (branch.svg) {\r\n label = this.createSvgElement(level, type, branch.svg);\r\n if (branch.label || branch.title) {\r\n label.title = branch.title || branch.label;\r\n }\r\n }\r\n else {\r\n label = this.createLabelElement(level, type);\r\n label.innerHTML = (branch.label ? this.language.translate(branch.label) : \"\");\r\n if (branch.title) {\r\n label.title = branch.title;\r\n }\r\n }\r\n // Apply reader text to label\r\n var readerLabel = this.getReaderLabel(branch, label.innerHTML);\r\n label.setAttribute(\"aria-label\", readerLabel);\r\n // Add Label\r\n element.appendChild(label);\r\n // Create interaction object\r\n // TODO clean this up when it's disposed\r\n branch.interactions = getInteraction().getInteraction(element);\r\n branch.element = element;\r\n // Create interaction manager we can set event listeners to\r\n if (this.typeClickable(type)) {\r\n //branch.interactions.clickable = true;\r\n // TODO clean this up when it's disposed\r\n branch.interactions.events.on(\"hit\", function (ev) {\r\n if (_this.events.isEnabled(\"hit\") && !_this.isDisposed()) {\r\n var event_1 = {\r\n \"type\": \"hit\",\r\n \"event\": ev.event,\r\n \"target\": _this,\r\n \"branch\": branch\r\n };\r\n _this.events.dispatchImmediately(\"hit\", event_1);\r\n }\r\n });\r\n // TODO clean this up when it's disposed\r\n branch.interactions.events.on(\"keyup\", function (ev) {\r\n if (keyboard.isKey(ev.event, \"enter\")) {\r\n if (_this.events.isEnabled(\"enter\")) {\r\n var event_2 = {\r\n \"type\": \"enter\",\r\n \"event\": ev.event,\r\n \"target\": _this,\r\n \"branch\": branch\r\n };\r\n _this.events.dispatchImmediately(\"enter\", event_2);\r\n }\r\n }\r\n });\r\n }\r\n {\r\n var submenu_1 = this.getSubMenu(branch);\r\n // Add ENTER event to open sub-menus\r\n if (submenu_1 != null) {\r\n // TODO clean this up when it's disposed\r\n branch.interactions.events.on(\"keyup\", function (ev) {\r\n if (keyboard.isKey(ev.event, \"enter\")) {\r\n // This is item has sub-menu, activate the first child on ENTER\r\n _this.selectBranch(submenu_1[0]);\r\n // Attempt to set focus\r\n _this.setFocus(submenu_1[0]);\r\n }\r\n });\r\n branch.interactions.events.on(\"hit\", function (ev) {\r\n _this.selectBranch(branch);\r\n });\r\n }\r\n }\r\n // Add events\r\n // TODO clean this up when it's disposed\r\n branch.interactions.events.on(\"over\", function (ev) {\r\n if (ev.pointer.touch) {\r\n // Cancel pending menu closure\r\n _this._ignoreNextClose = true;\r\n }\r\n _this.selectBranch(branch);\r\n if (_this.events.isEnabled(\"over\")) {\r\n var event_3 = {\r\n \"type\": \"over\",\r\n \"event\": ev.event,\r\n \"target\": _this,\r\n \"branch\": branch\r\n };\r\n _this.events.dispatchImmediately(\"over\", event_3);\r\n }\r\n });\r\n // TODO clean this up when it's disposed\r\n branch.interactions.events.on(\"out\", function (ev) {\r\n if (_this.isDisposed()) {\r\n return;\r\n }\r\n if (!ev.pointer.touch) {\r\n _this.delayUnselectBranch(branch);\r\n }\r\n if (_this.events.isEnabled(\"out\")) {\r\n var event_4 = {\r\n \"type\": \"out\",\r\n \"event\": ev.event,\r\n \"target\": _this,\r\n \"branch\": branch\r\n };\r\n _this.events.dispatchImmediately(\"out\", event_4);\r\n }\r\n });\r\n // TODO clean this up when it's disposed\r\n branch.interactions.events.on(\"focus\", function (ev) {\r\n _this.selectBranch(branch);\r\n });\r\n // TODO clean this up when it's disposed\r\n branch.interactions.events.on(\"blur\", function (ev) {\r\n _this.delayUnselectBranch(branch);\r\n });\r\n // Increment level\r\n var local_level = level + 1;\r\n // Has sub-menu?\r\n if (branch.menu) {\r\n var submenu = this.createMenuElement(local_level);\r\n branch.submenuElement = submenu;\r\n for (var len = branch.menu.length, i = 0; i < len; i++) {\r\n var ascendants = new List();\r\n branch.menu[i].ascendants = ascendants;\r\n if (branch.ascendants.length) {\r\n ascendants.copyFrom(branch.ascendants);\r\n }\r\n ascendants.push(branch);\r\n this.drawBranch(submenu, branch.menu[i], local_level);\r\n }\r\n // Sub-menu is empty (all items are not supported)\r\n // Do not draw this menu item at all\r\n if (submenu.innerHTML == \"\") {\r\n return;\r\n }\r\n element.appendChild(submenu);\r\n }\r\n // Should this item be hidden?\r\n if (branch.hidden) {\r\n this.hideBranch(branch);\r\n }\r\n // Add id?\r\n if (branch.id) {\r\n element.setAttribute(\"id\", branch.id);\r\n }\r\n // Background color?\r\n if (branch.color) {\r\n element.style.backgroundColor = branch.color.hex;\r\n }\r\n // Append to container\r\n container.appendChild(element);\r\n };\r\n /**\r\n * Creates a menu element to hold its elements in. Usually it's an `<ul>`\r\n * tag.\r\n *\r\n * @ignore Exclude from docs\r\n * @param level Current nesting level\r\n * @return HTML element reference\r\n */\r\n ExportMenu.prototype.createMenuElement = function (level) {\r\n var element = document.createElement(this.menuTag);\r\n element.className = this.getMenuItemClass(level);\r\n // Accessibility\r\n if (level === 0) {\r\n element.setAttribute(\"role\", \"menubar\");\r\n }\r\n else {\r\n element.setAttribute(\"role\", \"menu\");\r\n }\r\n return element;\r\n };\r\n /**\r\n * Generates a class name for the menu element based on its nesting level.\r\n *\r\n * @ignore Exclude from docs\r\n * @param level Current nesting level\r\n * @return Class name(s)\r\n */\r\n ExportMenu.prototype.getMenuItemClass = function (level) {\r\n var className = this.classPrefix + \"-menu \" + this.classPrefix + \"-menu-level-\" + level;\r\n if (level === 0) {\r\n className += \" \" + this.classPrefix + \"-menu-root \" +\r\n this.classPrefix + \"-\" + this.align + \" \" +\r\n this.classPrefix + \"-\" + this.verticalAlign;\r\n }\r\n return this.adapter.apply(\"menuClass\", {\r\n className: className,\r\n level: level\r\n }).className;\r\n };\r\n /**\r\n * Creates menu item. Usually `<li>` tag. Its label and sub-elements will go\r\n * into this element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param level Current nesting level\r\n * @param type Type of the menu item\r\n * @return HTML element reference\r\n */\r\n ExportMenu.prototype.createItemElement = function (level, type) {\r\n var element = document.createElement(this.itemTag);\r\n var className = this.classPrefix + \"-item \" + this.classPrefix\r\n + \"-item-level-\" + level\r\n + \" \" + this.classPrefix + \"-item-\" + (type || \"blank\");\r\n element.className = this.adapter.apply(\"itemClass\", {\r\n className: className,\r\n level: level,\r\n type: type\r\n }).className;\r\n element.setAttribute(\"role\", \"menuitem\");\r\n element.setAttribute(\"tabindex\", this.tabindex.toString());\r\n return element;\r\n };\r\n /**\r\n * Creates a \"label\" part of the menu item. It could be text or any HTML\r\n * content.\r\n *\r\n * @ignore Exclude from docs\r\n * @param level Current nesting level\r\n * @param type Type of the menu item\r\n * @return An HTML Element\r\n */\r\n ExportMenu.prototype.createLabelElement = function (level, type) {\r\n var element = document.createElement(this.labelTag);\r\n var className = this.classPrefix + \"-label \" + this.classPrefix\r\n + \"-label-level-\" + level\r\n + \" \" + this.classPrefix + \"-item-\" + (type || \"blank\");\r\n if (this.typeClickable(type)) {\r\n className += \" \" + this.classPrefix + \"-clickable\";\r\n }\r\n element.className = this.adapter.apply(\"labelClass\", {\r\n className: className,\r\n level: level,\r\n type: type\r\n }).className;\r\n // Accessible navigation\r\n //element.setAttribute(\"tabindex\", this.tabindex.toString());\r\n //element.setAttribute(\"role\", \"menuitem\");\r\n return element;\r\n };\r\n /**\r\n * Creates a \"icon\" part of the menu item.\r\n *\r\n * @ignore Exclude from docs\r\n * @param level Current nesting level\r\n * @param type Type of the menu item\r\n * @return An HTML Element\r\n */\r\n ExportMenu.prototype.createIconElement = function (level, type) {\r\n var element = document.createElement(this.iconTag);\r\n var className = this.classPrefix + \"-icon \" + this.classPrefix\r\n + \"-icon-level-\" + level\r\n + \" \" + this.classPrefix + \"-item-\" + (type || \"blank\");\r\n if (this.typeClickable(type)) {\r\n className += \" \" + this.classPrefix + \"-clickable\";\r\n }\r\n element.className = this.adapter.apply(\"labelClass\", {\r\n className: className,\r\n level: level,\r\n type: type\r\n }).className;\r\n // Accessible navigation\r\n element.setAttribute(\"tabindex\", this.tabindex.toString());\r\n element.setAttribute(\"role\", \"menuitem\");\r\n return element;\r\n };\r\n /**\r\n * Creates a a custom element out of raw HTML.\r\n *\r\n * @ignore Exclude from docs\r\n * @param level Current nesting level\r\n * @param type Type of the menu item\r\n * @return An HTML Element\r\n */\r\n ExportMenu.prototype.createSvgElement = function (level, type, svg) {\r\n var parser = new DOMParser();\r\n var element = parser.parseFromString(svg, \"image/svg+xml\").documentElement;\r\n var className = this.classPrefix + \"-icon \" + this.classPrefix\r\n + \"-icon-level-\" + level\r\n + \" \" + this.classPrefix + \"-item-\" + (type || \"blank\");\r\n if (this.typeClickable(type)) {\r\n className += \" \" + this.classPrefix + \"-clickable\";\r\n }\r\n element.setAttribute(\"class\", this.adapter.apply(\"labelClass\", {\r\n className: className,\r\n level: level,\r\n type: type\r\n }).className);\r\n // Accessible navigation\r\n element.setAttribute(\"tabindex\", this.tabindex.toString());\r\n element.setAttribute(\"role\", \"menuitem\");\r\n return element;\r\n };\r\n /**\r\n * Destroys the menu and all its elements.\r\n */\r\n ExportMenu.prototype.dispose = function () {\r\n if (!this._disposed) {\r\n _super.prototype.dispose.call(this);\r\n if (this._element && this._element.parentNode) {\r\n this._element.parentNode.removeChild(this._element);\r\n }\r\n }\r\n };\r\n /**\r\n * Checks whether menu item type is supposed to be clickable.\r\n *\r\n * @ignore Exclude from docs\r\n * @param type Menu item type\r\n * @return Is clickable?\r\n */\r\n ExportMenu.prototype.typeClickable = function (type) {\r\n return $type.hasValue(type);\r\n };\r\n /**\r\n * Checks whether menu item has any sub-items.\r\n *\r\n * @ignore Exclude from docs\r\n * @param branch A menu item\r\n * @return Has sub-items?\r\n */\r\n ExportMenu.prototype.hasSubMenu = function (branch) {\r\n return (branch.menu && branch.menu.length) ? true : false;\r\n };\r\n /**\r\n * Returns sub-items (if they exist).\r\n *\r\n * @ignore Exclude from docs\r\n * @param branch A menu item\r\n * @return Submenus\r\n */\r\n ExportMenu.prototype.getSubMenu = function (branch) {\r\n if (branch.menu && branch.menu.length) {\r\n return branch.menu;\r\n }\r\n };\r\n /**\r\n * Generates and returns an applicable label to be used for screen readers.\r\n *\r\n * @ignore Exclude from docs\r\n * @param item A menu item instance\r\n * @param label Current label\r\n * @return Reader text\r\n */\r\n ExportMenu.prototype.getReaderLabel = function (branch, label) {\r\n // Strip any HTML from the label\r\n label = $utils.stripTags(label);\r\n // Add textual note if the branch is clickable\r\n if (branch.ascendants.length == 0) {\r\n label = label == \"...\" ? this.language.translate(\"Export\") : label;\r\n label += \" [\" + this.language.translate(\"Press ENTER or use arrow keys to navigate\") + \"]\";\r\n }\r\n else if (this.hasSubMenu(branch)) {\r\n label += \" [\" + this.language.translate(\"Click, tap or press ENTER to open\") + \"]\";\r\n }\r\n else if (branch.type == \"print\") {\r\n label = this.language.translate(\"Click, tap or press ENTER to print.\");\r\n }\r\n else if (this.typeClickable(branch.type)) {\r\n label = this.language.translate(\"Click, tap or press ENTER to export as %1.\", undefined, label);\r\n }\r\n return this.adapter.apply(\"rederLabel\", {\r\n label: label,\r\n branch: branch\r\n }).label;\r\n };\r\n Object.defineProperty(ExportMenu.prototype, \"container\", {\r\n /**\r\n * @return Container\r\n */\r\n get: function () {\r\n return this._container;\r\n },\r\n /**\r\n * Getters and setters\r\n */\r\n /**\r\n * An HTML container to place the Menu in.\r\n *\r\n * A container must be an HTML element, because menu itself is HTML, and\r\n * cannot be placed into SVG.\r\n *\r\n * @param container Reference to container element\r\n * @todo Check if menu is already build. If it is, just move it to a new container\r\n */\r\n set: function (container) {\r\n this._container = container;\r\n this.invalidate();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ExportMenu.prototype, \"items\", {\r\n /**\r\n * @return Menu items\r\n */\r\n get: function () {\r\n return this._items;\r\n },\r\n /**\r\n * A list of menu items. Can be nested.\r\n *\r\n * @param items Menu items\r\n */\r\n set: function (items) {\r\n this._items = items;\r\n this.invalidate();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ExportMenu.prototype, \"tag\", {\r\n /**\r\n * Sets main menu tag to place menu in.\r\n *\r\n * This also sets up how menu items are built.\r\n *\r\n * If you set this to \"ul\", menu items will be wrapped into `<li>` tags.\r\n *\r\n * If set to \"div\", menu items will be wrapped in `<div>` tags.\r\n *\r\n * @default \"ul\"\r\n * @param tag Tag to use for menu\r\n */\r\n set: function (tag) {\r\n this._menuTag = tag;\r\n this._itemTag = tag == \"ul\" ? \"li\" : \"div\";\r\n this.invalidate();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ExportMenu.prototype, \"menuTag\", {\r\n /**\r\n * Returns current menu tag.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Menu tag (item that contains sub-items)\r\n */\r\n get: function () {\r\n return this.adapter.apply(\"menuTag\", {\r\n tag: this._menuTag\r\n }).tag;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ExportMenu.prototype, \"itemTag\", {\r\n /**\r\n * Returns tag to wrap items into.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Item tag\r\n */\r\n get: function () {\r\n return this.adapter.apply(\"itemTag\", {\r\n tag: this._itemTag\r\n }).tag;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ExportMenu.prototype, \"labelTag\", {\r\n /**\r\n * Returns menu label tag.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Label tag\r\n */\r\n get: function () {\r\n return this.adapter.apply(\"labelTag\", {\r\n tag: this._labelTag\r\n }).tag;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ExportMenu.prototype, \"iconTag\", {\r\n /**\r\n * Returns icon tag.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Icon tag\r\n */\r\n get: function () {\r\n return this.adapter.apply(\"iconTag\", {\r\n tag: this._iconTag\r\n }).tag;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ExportMenu.prototype, \"align\", {\r\n /**\r\n * @return Horizontal alignment\r\n */\r\n get: function () {\r\n return this.adapter.apply(\"align\", {\r\n align: this._align\r\n }).align;\r\n },\r\n /**\r\n * A horizontal alignment for the menu placement.\r\n *\r\n * @param value Horizontal alignment\r\n */\r\n set: function (value) {\r\n this._align = value;\r\n this.invalidate();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ExportMenu.prototype, \"verticalAlign\", {\r\n /**\r\n * @return Vertical alignment\r\n */\r\n get: function () {\r\n return this.adapter.apply(\"verticalAlign\", {\r\n verticalAlign: this._verticalAlign\r\n }).verticalAlign;\r\n },\r\n /**\r\n * A vertical alignment for the menu placement.\r\n *\r\n * @param value Vertical alignment\r\n */\r\n set: function (value) {\r\n this._verticalAlign = value;\r\n this.invalidate();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ExportMenu.prototype, \"classPrefix\", {\r\n /**\r\n * @return Class name prefix\r\n */\r\n get: function () {\r\n return this.adapter.apply(\"classPrefix\", {\r\n classPrefix: this._classPrefix\r\n }).classPrefix;\r\n },\r\n /**\r\n * Class name prefix.\r\n *\r\n * @default \"amexport\"\r\n * @param value Class name prefix\r\n */\r\n set: function (value) {\r\n this._classPrefix = value;\r\n this.invalidate();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ExportMenu.prototype, \"defaultStyles\", {\r\n /**\r\n * @return Should ExportMenu load its own CSS?\r\n */\r\n get: function () {\r\n return this.adapter.apply(\"defaultStyles\", {\r\n defaultStyles: this._defaultStyles\r\n }).defaultStyles;\r\n },\r\n /**\r\n * Indicates whether [[ExportMenu]] should load external CSS to style itself.\r\n *\r\n * If set to `false`, the menu will not be styled, and will rely on some\r\n * external CSS.\r\n *\r\n * @default true\r\n * @param Should ExportMenu load its own CSS?\r\n */\r\n set: function (value) {\r\n if (this._defaultStyles != value) {\r\n this._defaultStyles = value;\r\n if (value) {\r\n this.loadDefaultCSS();\r\n }\r\n }\r\n this.invalidate();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Loads the default CSS.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n ExportMenu.prototype.loadDefaultCSS = function () {\r\n this._disposers.push(exportCSS($dom.getShadowRoot(this.container), this.classPrefix));\r\n if (this._element) {\r\n this._element.style.display = \"\";\r\n }\r\n };\r\n Object.defineProperty(ExportMenu.prototype, \"tabindex\", {\r\n /**\r\n * @return Tab index\r\n */\r\n get: function () {\r\n return this.adapter.apply(\"tabindex\", {\r\n tabindex: this._tabindex\r\n }).tabindex;\r\n },\r\n /**\r\n * A tab index for the menu.\r\n *\r\n * Tab index will influence the order in which elements on the chart and\r\n * the whole page are selected when pressing TAB key.\r\n *\r\n * @param value Tab index\r\n */\r\n set: function (value) {\r\n this._tabindex = value;\r\n this.invalidate();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ExportMenu.prototype, \"language\", {\r\n /**\r\n * @return A [[Language]] instance to be used\r\n */\r\n get: function () {\r\n var _this = this;\r\n var language = this._language.get();\r\n if (language == null) {\r\n language = new Language();\r\n // TODO code duplication with `set language()`\r\n this._language.set(language, language.events.on(\"localechanged\", function (ev) {\r\n _this.invalidate();\r\n }));\r\n }\r\n return language;\r\n },\r\n /**\r\n * A [[Language]] instance.\r\n *\r\n * @param value An instance of [[Language]]\r\n */\r\n set: function (value) {\r\n var _this = this;\r\n this._language.set(value, value.events.on(\"localechanged\", function (ev) {\r\n _this.invalidate();\r\n }));\r\n this.invalidate();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Controlling the menu\r\n */\r\n /**\r\n * Removes all active classes from menu items. Useful on touch devices and\r\n * keyboard navigation where open menu can be closed instantly by clicking or\r\n * tapping outside it.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n ExportMenu.prototype.close = function () {\r\n var _this = this;\r\n if (this.isDisposed()) {\r\n return;\r\n }\r\n if (this._ignoreNextClose) {\r\n this._ignoreNextClose = false;\r\n return;\r\n }\r\n if (this.closeOnClick) {\r\n this._element.style.pointerEvents = \"none\";\r\n setTimeout(function () {\r\n _this._element.style.pointerEvents = \"auto\";\r\n }, 100);\r\n }\r\n if (this._currentSelection) {\r\n this.setBlur(this._currentSelection);\r\n this._currentSelection = undefined;\r\n }\r\n if (this._element) {\r\n var items = this._element.getElementsByClassName(\"active\");\r\n for (var len = items.length, i = len - 1; i >= 0; i--) {\r\n if (items[i]) {\r\n $dom.removeClass(items[i], \"active\");\r\n }\r\n }\r\n }\r\n this.events.dispatchImmediately(\"closed\", {\r\n type: \"closed\",\r\n target: this\r\n });\r\n };\r\n /**\r\n * Selects a branch in the menu.\r\n *\r\n * Handles closing of currently open branch.\r\n *\r\n * @ignore Exclude from docs\r\n * @param branch Branch to select\r\n */\r\n ExportMenu.prototype.selectBranch = function (branch) {\r\n var _this = this;\r\n if (this.isDisposed()) {\r\n return;\r\n }\r\n // Cancel previous closure\r\n if (branch.closeTimeout) {\r\n this.removeDispose(branch.closeTimeout);\r\n branch.closeTimeout = undefined;\r\n }\r\n // Add active class\r\n $dom.addClass(branch.element, \"active\");\r\n // Set expanded\r\n if (branch.submenuElement) {\r\n branch.submenuElement.setAttribute(\"aria-expanded\", \"true\");\r\n }\r\n // Remove current selection\r\n if (this._currentSelection && this._currentSelection !== branch && this._currentSelection.ascendants) {\r\n $iter.each($iter.concat($iter.fromArray([this._currentSelection]), this._currentSelection.ascendants.iterator()), function (ascendant) {\r\n if (!branch.ascendants.contains(ascendant) && branch !== ascendant) {\r\n _this.unselectBranch(ascendant, true);\r\n }\r\n });\r\n }\r\n // Select and/or cancel timeout for current ascendants\r\n $iter.each(branch.ascendants.iterator(), function (ascendant) {\r\n if (ascendant.closeTimeout) {\r\n _this.removeDispose(ascendant.closeTimeout);\r\n ascendant.closeTimeout = undefined;\r\n }\r\n $dom.addClass(ascendant.element, \"active\");\r\n });\r\n // Log current selection\r\n this._currentSelection = branch;\r\n // Invoke event\r\n if (this.events.isEnabled(\"branchselected\")) {\r\n var event_5 = {\r\n type: \"branchselected\",\r\n target: this,\r\n branch: branch\r\n };\r\n this.events.dispatchImmediately(\"branchselected\", event_5);\r\n }\r\n };\r\n /**\r\n * Unselects a branch. Also selects a branch one level up if necessary.\r\n *\r\n * @ignore Exclude from docs\r\n * @param branch Branch to unselect\r\n * @param simple If `true`, only the branch will be unselected without selecting parent branch\r\n */\r\n ExportMenu.prototype.unselectBranch = function (branch, simple) {\r\n if (this.isDisposed()) {\r\n return;\r\n }\r\n // Remove active class\r\n $dom.removeClass(branch.element, \"active\");\r\n // Set expanded\r\n if (branch.submenuElement) {\r\n branch.submenuElement.removeAttribute(\"aria-expanded\");\r\n }\r\n // Remove current selection\r\n if (this._currentSelection == branch) {\r\n this._currentSelection = undefined;\r\n }\r\n // Invoke event\r\n if (this.events.isEnabled(\"branchunselected\")) {\r\n var event_6 = {\r\n type: \"branchunselected\",\r\n target: this,\r\n branch: branch\r\n };\r\n this.events.dispatchImmediately(\"branchunselected\", event_6);\r\n }\r\n };\r\n /**\r\n * Delay unselection of a branch. This can still be cancelled in some other\r\n * place if the branch or its children regain focus.\r\n *\r\n * @ignore Exclude from docs\r\n * @param branch Branch to unselect\r\n * @param simple If `true`, only the branch will be unselected without selecting parent branch\r\n */\r\n ExportMenu.prototype.delayUnselectBranch = function (branch, simple) {\r\n var _this = this;\r\n if (this.isDisposed()) {\r\n return;\r\n }\r\n // Schedule branch unselection\r\n if (branch.closeTimeout) {\r\n this.removeDispose(branch.closeTimeout);\r\n branch.closeTimeout = undefined;\r\n }\r\n branch.closeTimeout = this.setTimeout(function () {\r\n _this.unselectBranch(branch, simple);\r\n }, this.closeDelay);\r\n // Schedule unselection of all ascendants\r\n // In case focus went away from the export menu altogether, this will ensure\r\n // that all items will be closed.\r\n // In case we're jumping to other menu item, those delayed unselections will\r\n // be cancelled by `selectBranch`\r\n if (simple !== true && branch.ascendants) {\r\n $iter.each(branch.ascendants.iterator(), function (ascendant) {\r\n _this.delayUnselectBranch(ascendant, true);\r\n });\r\n }\r\n };\r\n /**\r\n * Navigates the menu based on which direction kayboard key was pressed.\r\n *\r\n * @ignore Exclude from docs\r\n * @param key A key that was pressed\r\n */\r\n ExportMenu.prototype.moveSelection = function (key) {\r\n if (this.isDisposed()) {\r\n return;\r\n }\r\n // Check if there's a current selection\r\n if (!this._currentSelection) {\r\n return;\r\n }\r\n var newSelection;\r\n if (key == \"up\") {\r\n // Try moving up in current menu list, or to the last item if already\r\n // at the top\r\n newSelection = this.getPrevSibling(this._currentSelection);\r\n }\r\n else if (key == \"down\") {\r\n // Try moving down in current menu list, or to the top item if already\r\n // at the bottom\r\n newSelection = this.getNextSibling(this._currentSelection);\r\n }\r\n else if ((key == \"left\" && this.align == \"right\") || (key == \"right\" && this.align == \"left\")) {\r\n var menu = this.getSubMenu(this._currentSelection);\r\n // Go one level-deeper\r\n if (menu != null) {\r\n newSelection = menu[0];\r\n }\r\n }\r\n else if ((key == \"right\" && this.align == \"right\") || (key == \"left\" && this.align == \"left\")) {\r\n // Go one level-deeper\r\n newSelection = this.getParentItem(this._currentSelection);\r\n }\r\n if (newSelection && newSelection !== this._currentSelection) {\r\n this.selectBranch(newSelection);\r\n this.setFocus(newSelection);\r\n this._currentSelection = newSelection;\r\n }\r\n };\r\n /**\r\n * Returns all siblings of a menu item, including this same menu item.\r\n *\r\n * @ignore Exclude from docs\r\n * @param branch Menu item\r\n * @return List of sibling menu items\r\n */\r\n ExportMenu.prototype.getSiblings = function (branch) {\r\n var parent = this.getParentItem(branch);\r\n if (parent && parent.menu) {\r\n return parent.menu;\r\n }\r\n else {\r\n return [];\r\n }\r\n };\r\n /**\r\n * Returns menu items parent item.\r\n *\r\n * @ignore Exclude from docs\r\n * @param branch Menu item\r\n * @return Parent menu item\r\n */\r\n ExportMenu.prototype.getParentItem = function (branch) {\r\n if (branch.ascendants && branch.ascendants.length) {\r\n return branch.ascendants.getIndex(branch.ascendants.length - 1);\r\n }\r\n else {\r\n return undefined;\r\n }\r\n };\r\n /**\r\n * Returns next sibling in the same menu branch. If there is no next sibling,\r\n * the first one is returned. If there is just one item, that item is\r\n * returned. Unsupported menu items are skipped.\r\n *\r\n * @ignore Exclude from docs\r\n * @param branch Menu item to search siblings for\r\n * @return Menu item\r\n */\r\n ExportMenu.prototype.getNextSibling = function (branch) {\r\n var siblings = this.getSiblings(branch);\r\n if (siblings.length > 1) {\r\n var next = siblings.indexOf(branch) + 1;\r\n next = siblings.length == next ? 0 : next;\r\n return siblings[next].unsupported ? this.getNextSibling(siblings[next]) : siblings[next];\r\n }\r\n else {\r\n return branch;\r\n }\r\n };\r\n /**\r\n * Returns previous sibling in the same menu branch. If there is no next\r\n * sibling, the first one is returned. If there is just one item, that item is\r\n * returned. Unsupported menu items are skipped.\r\n *\r\n * @ignore Exclude from docs\r\n * @param branch Menu item to search siblings for\r\n * @return Menu item\r\n */\r\n ExportMenu.prototype.getPrevSibling = function (branch) {\r\n var siblings = this.getSiblings(branch);\r\n if (siblings.length > 1) {\r\n var prev = siblings.indexOf(branch) - 1;\r\n prev = prev == -1 ? siblings.length - 1 : prev;\r\n return siblings[prev].unsupported ? this.getPrevSibling(siblings[prev]) : siblings[prev];\r\n }\r\n else {\r\n return branch;\r\n }\r\n };\r\n /**\r\n * Attempts to set focus on particular menu element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param branch Menu item\r\n */\r\n ExportMenu.prototype.setFocus = function (branch) {\r\n if (branch.interactions) {\r\n try {\r\n branch.interactions.element.focus();\r\n }\r\n catch (e) {\r\n // nothing\r\n }\r\n }\r\n };\r\n /**\r\n * Attempts to remove focus from the menu element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param branch Menu item\r\n */\r\n ExportMenu.prototype.setBlur = function (branch) {\r\n if (branch.interactions) {\r\n try {\r\n branch.interactions.element.blur();\r\n }\r\n catch (e) {\r\n // nothing\r\n }\r\n }\r\n };\r\n /**\r\n * Hides the whole branch of menu.\r\n *\r\n * @param branch branch\r\n */\r\n ExportMenu.prototype.hideBranch = function (branch) {\r\n branch.element.style.display = \"none\";\r\n };\r\n /**\r\n * Show the branch of menu.\r\n *\r\n * @param branch branch\r\n */\r\n ExportMenu.prototype.showBranch = function (branch) {\r\n branch.element.style.display = \"\";\r\n };\r\n Object.defineProperty(ExportMenu.prototype, \"element\", {\r\n /**\r\n * The main element o fthe menu - usually `<ul>`.\r\n *\r\n * @since 4.10.6\r\n * @return Menu element\r\n */\r\n get: function () {\r\n return this._element;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return ExportMenu;\r\n}(Validatable));\r\nexport { ExportMenu };\r\n","/**\r\n * Handles date and time formatting\r\n */\r\nimport { __extends } from \"tslib\";\r\nimport { Language } from \"../utils/Language\";\r\nimport { BaseObject } from \"../Base\";\r\nimport { getTextFormatter } from \"../formatters/TextFormatter\";\r\nimport { registry } from \"../Registry\";\r\nimport * as $strings from \"../utils/Strings\";\r\nimport * as $utils from \"../utils/Utils\";\r\nimport * as $type from \"../utils/Type\";\r\nimport * as $time from \"../utils/Time\";\r\n/**\r\n * Handles date and time formatting.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/formatters/formatting-date-time/} Tutorial on date/time formatting\r\n * @todo Better type casting of passed in date?\r\n * @todo Quarter support?\r\n * @todo When parsing named months make the search case-insensitive\r\n * @todo Escape a.m./p.m. properly when used in RegEx\r\n */\r\nvar DateFormatter = /** @class */ (function (_super) {\r\n __extends(DateFormatter, _super);\r\n /**\r\n * Constructor\r\n */\r\n function DateFormatter() {\r\n var _this = _super.call(this) || this;\r\n /**\r\n * Date format.\r\n */\r\n _this._dateFormat = \"yyyy-MM-dd\";\r\n /**\r\n * Input date format.\r\n */\r\n _this._inputDateFormat = \"yyyy-MM-dd\";\r\n /**\r\n * Assume UTC time zone.\r\n */\r\n _this._utc = false;\r\n /**\r\n * If `timezone` is set, this will hold minute fraction of the timezone.\r\n *\r\n * @readonly\r\n * @ignore\r\n */\r\n _this.timezoneMinutes = 0;\r\n /**\r\n * First day of week.\r\n *\r\n * 0 - Sunday\r\n * 1 - Monday\r\n *\r\n * Etc.\r\n */\r\n _this._firstDayOfWeek = 1;\r\n /**\r\n * A list of month names.\r\n */\r\n _this.months = [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"];\r\n /**\r\n * A list of short month names.\r\n */\r\n _this.monthsShort = [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May(short)\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"];\r\n /**\r\n * A list of weekday names.\r\n */\r\n _this.weekdays = [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"];\r\n /**\r\n * A list of short weekday names.\r\n */\r\n _this.weekdaysShort = [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"];\r\n /**\r\n * Output format to produce. If the format calls for applying color to the\r\n * formatted value, this setting will determine what markup to use: SVG or\r\n * HTML.\r\n *\r\n * Available options: svg, html.\r\n *\r\n * @default \"svg\"\r\n */\r\n _this._outputFormat = \"svg\";\r\n /**\r\n * Should the first letter of the formatted date be capitalized?\r\n *\r\n * @default true\r\n */\r\n _this.capitalize = true;\r\n _this.className = \"DateFormatter\";\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n Object.defineProperty(DateFormatter.prototype, \"language\", {\r\n /**\r\n * @return Language\r\n */\r\n get: function () {\r\n return this._language;\r\n },\r\n /**\r\n * A reference to [[Language]] object.\r\n *\r\n * @param value Language\r\n */\r\n set: function (value) {\r\n this._language = value;\r\n this.dateFormat = this._language.translate(\"_date\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Formats the date value according to specified format.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/formatters/formatting-date-time/} Tutorial on date/time formatting\r\n * @param source Date value\r\n * @param format Format\r\n * @return Formatted date string\r\n */\r\n DateFormatter.prototype.format = function (source, format, applyTimezone) {\r\n // No language?\r\n if (!this.language) {\r\n if (this.sprite) {\r\n this.language = this.sprite.language;\r\n }\r\n else {\r\n this.language = new Language();\r\n }\r\n }\r\n // No format passed in or it's empty\r\n if (typeof format === \"undefined\" || format === \"\") {\r\n format = this._dateFormat;\r\n }\r\n // Init return value\r\n var formatted;\r\n // Do casting if required\r\n // This will take care of timestamps as well as Date objects\r\n var date;\r\n if ($type.isString(source)) {\r\n // If it's a string, let's try parsing it using our own functionality\r\n date = this.parse(source);\r\n }\r\n else {\r\n date = $utils.anyToDate(source);\r\n }\r\n // Is it a built-in format or Intl.DateTimeFormat\r\n if ($type.isObject(format)) {\r\n try {\r\n if (this.intlLocales) {\r\n return new Intl.DateTimeFormat(this.intlLocales, format).format(date);\r\n }\r\n else {\r\n return new Intl.DateTimeFormat(undefined, format).format(date);\r\n }\r\n }\r\n catch (e) {\r\n return \"Invalid\";\r\n }\r\n }\r\n else {\r\n // Clean format\r\n format = $utils.cleanFormat(format);\r\n // get format info (it will also deal with parser caching)\r\n var info = this.parseFormat(format);\r\n // Should we apply custom time zone?\r\n if ($type.hasValue(this.timezoneOffset)) {\r\n date.setMinutes(date.getMinutes() + date.getTimezoneOffset() - this.timezoneOffset);\r\n }\r\n else if ($type.hasValue(this.timezone) && applyTimezone !== false) {\r\n date = $time.setTimezone(date, this.timezone);\r\n }\r\n // Check if it's a valid date\r\n if (!$type.isNumber(date.getTime())) {\r\n return this.language.translate(\"Invalid date\");\r\n }\r\n // Apply format\r\n formatted = this.applyFormat(date, info, this.language);\r\n // Capitalize\r\n if (this.capitalize) {\r\n formatted = formatted.replace(/^.{1}/, formatted.substr(0, 1).toUpperCase());\r\n }\r\n }\r\n // We're done\r\n return formatted;\r\n };\r\n /**\r\n * Parses format into structured infromation.\r\n *\r\n * @param format Format template\r\n */\r\n DateFormatter.prototype.parseFormat = function (format) {\r\n // Check cache\r\n var cached = this.getCache(format);\r\n if ($type.hasValue(cached)) {\r\n return cached;\r\n }\r\n // Init format parse info holder\r\n var info = {\r\n \"template\": \"\",\r\n \"parts\": []\r\n };\r\n // Let TextFormatter split into chunks\r\n var chunks = getTextFormatter().chunk(format, true);\r\n for (var i = 0; i < chunks.length; i++) {\r\n var chunk = chunks[i];\r\n if (chunk.type === \"value\") {\r\n // Just \"Date\"?\r\n if (chunk.text.match(/^date$/i) && $type.isString(this._dateFormat)) {\r\n chunk.text = this._dateFormat;\r\n }\r\n // Find all possible parts\r\n var matches = chunk.text.match(/G|yyyy|yyy|yy|y|YYYY|YYY|YY|Y|u|q|MMMMM|MMMM|MMM|MM|M|ww|w|W|dd|d|DDD|DD|D|F|g|EEEEE|EEEE|EEE|EE|E|eeeee|eeee|eee|ee|e|aaa|aa|a|hh|h|HH|H|KK|K|kk|k|mm|m|ss|s|SSS|SS|S|A|zzzz|zzz|zz|z|ZZ|Z|t|x|nnn|nn|n|i|I/g);\r\n // Found?\r\n if (matches) {\r\n // Populate template\r\n for (var x = 0; x < matches.length; x++) {\r\n info.parts.push(matches[x]);\r\n chunk.text = chunk.text.replace(matches[x], $strings.PLACEHOLDER);\r\n }\r\n }\r\n }\r\n // Apply to template\r\n info.template += chunk.text;\r\n }\r\n // Apply style formatting\r\n //info.template = getTextFormatter().format(info.template, this.outputFormat);\r\n // Save cache\r\n this.setCache(format, info);\r\n return info;\r\n };\r\n /**\r\n * Applies format to Date.\r\n *\r\n * @param date Date object\r\n * @param info Parsed format information\r\n * @param language Language\r\n * @return Formatted date string\r\n */\r\n DateFormatter.prototype.applyFormat = function (date, info, language) {\r\n // Init return value\r\n var res = info.template;\r\n // Get values\r\n var fullYear, month, weekday, day, hours, minutes, seconds, milliseconds, offset = date.getTimezoneOffset(), timestamp = date.getTime();\r\n if (this.utc) {\r\n fullYear = date.getUTCFullYear();\r\n month = date.getUTCMonth();\r\n weekday = date.getUTCDay();\r\n day = date.getUTCDate();\r\n hours = date.getUTCHours();\r\n minutes = date.getUTCMinutes();\r\n seconds = date.getUTCSeconds();\r\n milliseconds = date.getUTCMilliseconds();\r\n }\r\n else {\r\n fullYear = date.getFullYear();\r\n month = date.getMonth();\r\n weekday = date.getDay();\r\n day = date.getDate();\r\n hours = date.getHours();\r\n minutes = date.getMinutes();\r\n seconds = date.getSeconds();\r\n milliseconds = date.getMilliseconds();\r\n }\r\n // Go through each part and format/replace it in template\r\n for (var i = 0, len = info.parts.length; i < len; i++) {\r\n var value = \"\";\r\n switch (info.parts[i]) {\r\n case \"G\":\r\n value = language.translate(fullYear < 0\r\n ? \"_era_bc\"\r\n : \"_era_ad\");\r\n break;\r\n case \"yyyy\":\r\n value = Math.abs(fullYear).toString();\r\n if (fullYear < 0) {\r\n value += language.translate(\"_era_bc\");\r\n }\r\n break;\r\n case \"yyy\":\r\n case \"yy\":\r\n case \"y\":\r\n value = Math.abs(fullYear).toString().substr(-info.parts[i].length);\r\n if (fullYear < 0) {\r\n value += language.translate(\"_era_bc\");\r\n }\r\n break;\r\n case \"YYYY\":\r\n case \"YYY\":\r\n case \"YY\":\r\n case \"Y\":\r\n var week = $utils.getWeek(date);\r\n var year = fullYear;\r\n if (week == 1 && (weekday > 4)) {\r\n year--;\r\n }\r\n if (info.parts[i] == \"YYYY\") {\r\n value = Math.abs(year).toString();\r\n }\r\n else {\r\n value = Math.abs(year).toString().substr(-info.parts[i].length);\r\n }\r\n if (year < 0) {\r\n value += language.translate(\"_era_bc\");\r\n }\r\n break;\r\n case \"u\":\r\n // @todo\r\n break;\r\n case \"q\":\r\n value = \"\" + Math.ceil((date.getMonth() + 1) / 3);\r\n break;\r\n case \"MMMMM\":\r\n value = language.translate(this.months[month]).substr(0, 1);\r\n break;\r\n case \"MMMM\":\r\n value = language.translate(this.months[month]);\r\n break;\r\n case \"MMM\":\r\n value = language.translate(this.monthsShort[month]);\r\n break;\r\n case \"MM\":\r\n value = $utils.padString(month + 1, 2, \"0\");\r\n break;\r\n case \"M\":\r\n value = (month + 1).toString();\r\n break;\r\n case \"ww\":\r\n value = $utils.padString($utils.getWeek(date, this.utc), 2, \"0\");\r\n break;\r\n case \"w\":\r\n value = $utils.getWeek(date, this.utc).toString();\r\n break;\r\n case \"W\":\r\n value = $utils.getMonthWeek(date, this.utc).toString();\r\n break;\r\n case \"dd\":\r\n value = $utils.padString(day, 2, \"0\");\r\n break;\r\n case \"d\":\r\n value = day.toString();\r\n break;\r\n case \"DD\":\r\n case \"DDD\":\r\n value = $utils.padString($utils.getYearDay(date, this.utc).toString(), info.parts[i].length, \"0\");\r\n break;\r\n case \"D\":\r\n value = $utils.getYearDay(date, this.utc).toString();\r\n break;\r\n case \"F\":\r\n // @todo\r\n break;\r\n case \"g\":\r\n // @todo\r\n break;\r\n case \"t\":\r\n value = language.translateFunc(\"_dateOrd\").call(this, day);\r\n break;\r\n case \"E\":\r\n value = (weekday || 7).toString();\r\n break;\r\n case \"EE\":\r\n value = $utils.padString((weekday || 7).toString(), 2, \"0\");\r\n break;\r\n case \"EEE\":\r\n case \"eee\":\r\n value = language.translate(this.weekdaysShort[weekday]);\r\n break;\r\n case \"EEEE\":\r\n case \"eeee\":\r\n value = language.translate(this.weekdays[weekday]);\r\n break;\r\n case \"EEEEE\":\r\n case \"eeeee\":\r\n value = language.translate(this.weekdays[weekday]).substr(0, 1);\r\n break;\r\n case \"e\":\r\n case \"ee\":\r\n value = (weekday - this.firstDayOfWeek + 1).toString();\r\n if (info.parts[i] == \"ee\") {\r\n value = $utils.padString(value, 2, \"0\");\r\n }\r\n break;\r\n case \"a\":\r\n if (hours >= 12) {\r\n value = language.translate(\"PM\");\r\n }\r\n else {\r\n value = language.translate(\"AM\");\r\n }\r\n break;\r\n case \"aa\":\r\n if (hours >= 12) {\r\n value = language.translate(\"P.M.\");\r\n }\r\n else {\r\n value = language.translate(\"A.M.\");\r\n }\r\n break;\r\n case \"aaa\":\r\n if (hours >= 12) {\r\n value = language.translate(\"P\");\r\n }\r\n else {\r\n value = language.translate(\"A\");\r\n }\r\n break;\r\n case \"h\":\r\n value = $utils.get12Hours(hours).toString();\r\n break;\r\n case \"hh\":\r\n value = $utils.padString($utils.get12Hours(hours), 2, \"0\");\r\n break;\r\n case \"H\":\r\n value = hours.toString();\r\n break;\r\n case \"HH\":\r\n value = $utils.padString(hours, 2, \"0\");\r\n break;\r\n case \"K\":\r\n value = $utils.get12Hours(hours, 0).toString();\r\n break;\r\n case \"KK\":\r\n value = $utils.padString($utils.get12Hours(hours, 0), 2, \"0\");\r\n break;\r\n case \"k\":\r\n value = (hours + 1).toString();\r\n break;\r\n case \"kk\":\r\n value = $utils.padString(hours + 1, 2, \"0\");\r\n break;\r\n case \"m\":\r\n value = minutes.toString();\r\n break;\r\n case \"mm\":\r\n value = $utils.padString(minutes, 2, \"0\");\r\n break;\r\n case \"s\":\r\n value = seconds.toString();\r\n break;\r\n case \"ss\":\r\n value = $utils.padString(seconds, 2, \"0\");\r\n break;\r\n case \"S\":\r\n case \"SS\":\r\n case \"SSS\":\r\n value = Math.round((milliseconds / 1000) * Math.pow(10, info.parts[i].length)).toString();\r\n break;\r\n case \"x\":\r\n value = timestamp.toString();\r\n break;\r\n case \"n\":\r\n case \"nn\":\r\n case \"nnn\":\r\n value = $utils.padString(milliseconds, info.parts[i].length, \"0\");\r\n break;\r\n case \"z\":\r\n value = $utils.getTimeZone(date, false, false, this.utc);\r\n break;\r\n case \"zz\":\r\n value = $utils.getTimeZone(date, true, false, this.utc);\r\n break;\r\n case \"zzz\":\r\n value = $utils.getTimeZone(date, false, true, this.utc);\r\n break;\r\n case \"zzzz\":\r\n value = $utils.getTimeZone(date, true, true, this.utc);\r\n break;\r\n case \"Z\":\r\n case \"ZZ\":\r\n var tz = Math.abs(offset) / 60;\r\n var tzh = Math.floor(tz);\r\n var tzm = tz * 60 - tzh * 60;\r\n if (this.utc) {\r\n tzh = 0;\r\n tzm = 0;\r\n }\r\n if (info.parts[i] == \"Z\") {\r\n value = \"GMT\";\r\n value += offset > 0 ? \"-\" : \"+\";\r\n value += $utils.padString(tzh, 2) + \":\" + $utils.padString(tzm, 2);\r\n }\r\n else {\r\n value = offset > 0 ? \"-\" : \"+\";\r\n value += $utils.padString(tzh, 2) + $utils.padString(tzm, 2);\r\n }\r\n break;\r\n case \"i\":\r\n value = date.toISOString();\r\n break;\r\n case \"I\":\r\n value = date.toUTCString();\r\n break;\r\n }\r\n res = res.replace($strings.PLACEHOLDER, value);\r\n }\r\n return res;\r\n };\r\n /**\r\n * Parses any input value into Date object.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/formatters/formatting-date-time/#Parsing_Dates} Tutorial on date/time parsing\r\n * @param source Source value\r\n * @param format Source format\r\n * @return Date object\r\n */\r\n DateFormatter.prototype.parse = function (source, format) {\r\n // Format set?\r\n if (!$type.hasValue(format)) {\r\n format = this.inputDateFormat;\r\n }\r\n // Is it already a Date\r\n if (source instanceof Date) {\r\n return source;\r\n }\r\n // Is it a numeric timestamp\r\n if (typeof source === \"number\") {\r\n return new Date(source);\r\n }\r\n // No? Let's check if it's string, and try converting to it if nec\r\n if (typeof source !== \"string\") {\r\n source = source.toString();\r\n }\r\n // no language?\r\n if (!this.language) {\r\n if (this.sprite) {\r\n this.language = this.sprite.language;\r\n }\r\n else {\r\n this.language = new Language;\r\n }\r\n }\r\n // Init return value\r\n var res;\r\n // Init RegEx for parsing\r\n var reg = \"\";\r\n // Clean format\r\n format = $utils.cleanFormat(format);\r\n // Clip format to length of the source string\r\n format = format.substr(0, source.length);\r\n // Parse format\r\n var info = this.parseFormat(format);\r\n // Init parsed items holder\r\n var parsedIndexes = {\r\n \"year\": -1,\r\n \"year3\": -1,\r\n \"year2\": -1,\r\n \"year1\": -1,\r\n \"month\": -1,\r\n \"monthShort\": -1,\r\n \"monthLong\": -1,\r\n \"weekdayShort\": -1,\r\n \"weekdayLong\": -1,\r\n \"day\": -1,\r\n \"yearDay\": -1,\r\n \"week\": -1,\r\n \"hourBase0\": -1,\r\n \"hour12Base0\": -1,\r\n \"hourBase1\": -1,\r\n \"hour12Base1\": -1,\r\n \"minute\": -1,\r\n \"second\": -1,\r\n \"millisecond\": -1,\r\n \"millisecondDigits\": -1,\r\n \"am\": -1,\r\n \"zone\": -1,\r\n \"timestamp\": -1,\r\n \"iso\": -1\r\n };\r\n // Init values\r\n var resValues = {\r\n \"year\": 1970,\r\n \"month\": 0,\r\n \"day\": 1,\r\n \"hour\": 0,\r\n \"minute\": 0,\r\n \"second\": 0,\r\n \"millisecond\": 0,\r\n \"timestamp\": null,\r\n \"offset\": 0,\r\n \"utc\": this.utc\r\n };\r\n // Index adjuster\r\n var indexAdjust = 0, index = 0;\r\n // Iterate through all of the parts\r\n for (var i = 0; i < info.parts.length; i++) {\r\n // Set current match index\r\n index = i + indexAdjust + 1;\r\n switch (info.parts[i]) {\r\n case \"yyyy\":\r\n case \"YYYY\":\r\n reg += \"([0-9]{4})\";\r\n parsedIndexes.year = index;\r\n break;\r\n case \"yyy\":\r\n case \"YYY\":\r\n reg += \"([0-9]{3})\";\r\n parsedIndexes.year3 = index;\r\n break;\r\n case \"yy\":\r\n case \"YY\":\r\n reg += \"([0-9]{2})\";\r\n parsedIndexes.year2 = index;\r\n break;\r\n case \"y\":\r\n case \"Y\":\r\n reg += \"([0-9]{1})\";\r\n parsedIndexes.year1 = index;\r\n break;\r\n case \"MMMM\":\r\n reg += \"(\" + this.getStringList(this.months).join(\"|\") + \")\";\r\n parsedIndexes.monthLong = index;\r\n break;\r\n case \"MMM\":\r\n reg += \"(\" + this.getStringList(this.monthsShort).join(\"|\") + \")\";\r\n parsedIndexes.monthShort = index;\r\n break;\r\n case \"MM\":\r\n case \"M\":\r\n reg += \"([0-9]{2}|[0-9]{1})\";\r\n parsedIndexes.month = index;\r\n break;\r\n case \"ww\":\r\n case \"w\":\r\n reg += \"([0-9]{2}|[0-9]{1})\";\r\n parsedIndexes.week = index;\r\n break;\r\n case \"dd\":\r\n case \"d\":\r\n reg += \"([0-9]{2}|[0-9]{1})\";\r\n parsedIndexes.day = index;\r\n break;\r\n case \"DDD\":\r\n case \"DD\":\r\n case \"D\":\r\n reg += \"([0-9]{3}|[0-9]{2}|[0-9]{1})\";\r\n parsedIndexes.yearDay = index;\r\n break;\r\n case \"dddd\":\r\n reg += \"(\" + this.getStringList(this.weekdays).join(\"|\") + \")\";\r\n parsedIndexes.weekdayLong = index;\r\n break;\r\n case \"ddd\":\r\n reg += \"(\" + this.getStringList(this.weekdaysShort).join(\"|\") + \")\";\r\n parsedIndexes.weekdayShort = index;\r\n break;\r\n case \"aaa\":\r\n case \"aa\":\r\n case \"a\":\r\n // TODO: fix (escape regex)\r\n reg += \"(\" + this.getStringList([\"AM\", \"PM\", \"A\\.M\\.\", \"P\\.M\\.\", \"A\", \"P\"]).join(\"|\") + \")\";\r\n parsedIndexes.am = index;\r\n break;\r\n case \"hh\":\r\n case \"h\":\r\n reg += \"([0-9]{2}|[0-9]{1})\";\r\n parsedIndexes.hour12Base1 = index;\r\n break;\r\n case \"HH\":\r\n case \"H\":\r\n reg += \"([0-9]{2}|[0-9]{1})\";\r\n parsedIndexes.hourBase0 = index;\r\n break;\r\n case \"KK\":\r\n case \"K\":\r\n reg += \"([0-9]{2}|[0-9]{1})\";\r\n parsedIndexes.hour12Base0 = index;\r\n break;\r\n case \"kk\":\r\n case \"k\":\r\n reg += \"([0-9]{2}|[0-9]{1})\";\r\n parsedIndexes.hourBase1 = index;\r\n break;\r\n case \"mm\":\r\n case \"m\":\r\n reg += \"([0-9]{2}|[0-9]{1})\";\r\n parsedIndexes.minute = index;\r\n break;\r\n case \"ss\":\r\n case \"s\":\r\n reg += \"([0-9]{2}|[0-9]{1})\";\r\n parsedIndexes.second = index;\r\n break;\r\n case \"SSS\":\r\n case \"SS\":\r\n case \"S\":\r\n reg += \"([0-9]{3}|[0-9]{2}|[0-9]{1})\";\r\n parsedIndexes.millisecond = index;\r\n parsedIndexes.millisecondDigits = info.parts[i].length;\r\n break;\r\n case \"nnn\":\r\n case \"nn\":\r\n case \"n\":\r\n reg += \"([0-9]{3}|[0-9]{2}|[0-9]{1})\";\r\n parsedIndexes.millisecond = index;\r\n break;\r\n case \"x\":\r\n reg += \"([0-9]{1,})\";\r\n parsedIndexes.timestamp = index;\r\n break;\r\n case \"Z\":\r\n reg += \"GMT([-+]+[0-9]{2}:[0-9]{2})\";\r\n parsedIndexes.zone = index;\r\n break;\r\n case \"ZZ\":\r\n reg += \"([\\\\-+]+[0-9]{2}[0-9]{2})\";\r\n parsedIndexes.zone = index;\r\n break;\r\n case \"i\":\r\n reg += \"([0-9]{4})-?([0-9]{2})-?([0-9]{2})T?([0-9]{2}):?([0-9]{2}):?([0-9]{2})\\.?([0-9]{0,3})([zZ]|[+\\-][0-9]{2}:?[0-9]{2}|$)\";\r\n parsedIndexes.iso = index;\r\n indexAdjust += 7;\r\n break;\r\n case \"G\":\r\n case \"YYYY\":\r\n case \"YYY\":\r\n case \"YY\":\r\n case \"Y\":\r\n case \"MMMMM\":\r\n case \"W\":\r\n case \"EEEEE\":\r\n case \"EEEE\":\r\n case \"EEE\":\r\n case \"EE\":\r\n case \"E\":\r\n case \"eeeee\":\r\n case \"eeee\":\r\n case \"eee\":\r\n case \"ee\":\r\n case \"e\":\r\n case \"zzzz\":\r\n case \"zzz\":\r\n case \"zz\":\r\n case \"z\":\r\n case \"t\":\r\n // Ignore\r\n indexAdjust--;\r\n break;\r\n }\r\n reg += \"[^0-9]*\";\r\n }\r\n // Try matching\r\n var regex = new RegExp(reg);\r\n var matches = source.match(regex);\r\n if (matches) {\r\n // Populate the date object\r\n // Full year\r\n if (parsedIndexes.year > -1) {\r\n resValues.year = parseInt(matches[parsedIndexes.year]);\r\n }\r\n // 3-digit year\r\n if (parsedIndexes.year3 > -1) {\r\n var val = parseInt(matches[parsedIndexes.year3]);\r\n val += 1000;\r\n resValues.year = val;\r\n }\r\n // 2-digit year\r\n if (parsedIndexes.year2 > -1) {\r\n var val = parseInt(matches[parsedIndexes.year2]);\r\n if (val > 50) {\r\n val += 1000;\r\n }\r\n else {\r\n val += 2000;\r\n }\r\n resValues.year = val;\r\n }\r\n // 1-digit year\r\n if (parsedIndexes.year1 > -1) {\r\n var val = parseInt(matches[parsedIndexes.year1]);\r\n val = Math.floor((new Date().getFullYear()) / 10) * 10 + val;\r\n resValues.year = val;\r\n }\r\n // Full month\r\n if (parsedIndexes.monthLong > -1) {\r\n resValues.month = this.resolveMonth(matches[parsedIndexes.monthLong]);\r\n }\r\n // Short month\r\n if (parsedIndexes.monthShort > -1) {\r\n resValues.month = this.resolveShortMonth(matches[parsedIndexes.monthShort]);\r\n }\r\n // Numeric month\r\n if (parsedIndexes.month > -1) {\r\n resValues.month = parseInt(matches[parsedIndexes.month]) - 1;\r\n }\r\n // Weekday\r\n // @todo\r\n // Week\r\n if ((parsedIndexes.week > -1) && (parsedIndexes.day === -1)) {\r\n // We parse weeks ONLY if day is not explicitly set\r\n // TODO: this needs work\r\n // (but maybe later - I can hardly imagine anyone passing their dates in weeks)\r\n resValues.month = 0;\r\n resValues.day = $utils.getDayFromWeek(parseInt(matches[parsedIndexes.week]), resValues.year, 1, this.utc);\r\n }\r\n // Day\r\n if (parsedIndexes.day > -1) {\r\n resValues.day = parseInt(matches[parsedIndexes.day]);\r\n }\r\n // Year day\r\n if (parsedIndexes.yearDay > -1) {\r\n resValues.month = 0;\r\n resValues.day = parseInt(matches[parsedIndexes.yearDay]);\r\n }\r\n // 24 Hour (0-23)\r\n if (parsedIndexes.hourBase0 > -1) {\r\n resValues.hour = parseInt(matches[parsedIndexes.hourBase0]);\r\n }\r\n // 24 Hour (1-24)\r\n if (parsedIndexes.hourBase1 > -1) {\r\n resValues.hour = parseInt(matches[parsedIndexes.hourBase1]) - 1;\r\n }\r\n // 12 Hour (0-11)\r\n if (parsedIndexes.hour12Base0 > -1) {\r\n var val = parseInt(matches[parsedIndexes.hour12Base0]);\r\n if (val == 11) {\r\n val = 0;\r\n }\r\n if ((parsedIndexes.am > -1) && !this.isAm(matches[parsedIndexes.am])) {\r\n val += 12;\r\n }\r\n resValues.hour = val;\r\n }\r\n // 12 Hour (1-12)\r\n if (parsedIndexes.hour12Base1 > -1) {\r\n var val = parseInt(matches[parsedIndexes.hour12Base1]);\r\n if (val == 12) {\r\n val = 0;\r\n }\r\n if ((parsedIndexes.am > -1) && !this.isAm(matches[parsedIndexes.am])) {\r\n val += 12;\r\n }\r\n resValues.hour = val;\r\n }\r\n // Minute\r\n if (parsedIndexes.minute > -1) {\r\n resValues.minute = parseInt(matches[parsedIndexes.minute]);\r\n }\r\n // Second\r\n if (parsedIndexes.second > -1) {\r\n resValues.second = parseInt(matches[parsedIndexes.second]);\r\n }\r\n // Millisecond\r\n if (parsedIndexes.millisecond > -1) {\r\n var val = parseInt(matches[parsedIndexes.millisecond]);\r\n if (parsedIndexes.millisecondDigits == 2) {\r\n val *= 10;\r\n }\r\n else if (parsedIndexes.millisecondDigits == 1) {\r\n val *= 100;\r\n }\r\n resValues.millisecond = val;\r\n }\r\n // Timestamp\r\n if (parsedIndexes.timestamp > -1) {\r\n resValues.timestamp = parseInt(matches[parsedIndexes.timestamp]);\r\n var ts = new Date(resValues.timestamp);\r\n resValues.year = ts.getUTCFullYear();\r\n resValues.month = ts.getUTCMonth();\r\n resValues.day = ts.getUTCDate();\r\n resValues.hour = ts.getUTCHours();\r\n resValues.minute = ts.getUTCMinutes();\r\n resValues.second = ts.getUTCSeconds();\r\n resValues.millisecond = ts.getUTCMilliseconds();\r\n }\r\n // Adjust time zone\r\n if (parsedIndexes.zone > -1) {\r\n resValues.offset = this.resolveTimezoneOffset(new Date(resValues.year, resValues.month, resValues.day), matches[parsedIndexes.zone]);\r\n }\r\n // ISO\r\n if (parsedIndexes.iso > -1) {\r\n resValues.year = $type.toNumber(matches[parsedIndexes.iso + 0]);\r\n resValues.month = $type.toNumber(matches[parsedIndexes.iso + 1]) - 1;\r\n resValues.day = $type.toNumber(matches[parsedIndexes.iso + 2]);\r\n resValues.hour = $type.toNumber(matches[parsedIndexes.iso + 3]);\r\n resValues.minute = $type.toNumber(matches[parsedIndexes.iso + 4]);\r\n resValues.second = $type.toNumber(matches[parsedIndexes.iso + 5]);\r\n resValues.millisecond = $type.toNumber(matches[parsedIndexes.iso + 6]);\r\n if (matches[parsedIndexes.iso + 7] == \"Z\" || matches[parsedIndexes.iso + 7] == \"z\") {\r\n resValues.utc = true;\r\n }\r\n else if (matches[parsedIndexes.iso + 7] != \"\") {\r\n resValues.offset = this.resolveTimezoneOffset(new Date(resValues.year, resValues.month, resValues.day), matches[parsedIndexes.iso + 7]);\r\n }\r\n }\r\n // Create Date object\r\n if (resValues.utc) {\r\n res = new Date(Date.UTC(resValues.year, resValues.month, resValues.day, resValues.hour, resValues.minute, resValues.second, resValues.millisecond));\r\n }\r\n else {\r\n res = new Date(resValues.year, resValues.month, resValues.day, resValues.hour, resValues.minute + resValues.offset, resValues.second, resValues.millisecond);\r\n }\r\n }\r\n else {\r\n // Didn't match anything\r\n // Let's try dropping it into Date constructor and hope for the best\r\n res = new Date(source);\r\n }\r\n return res;\r\n };\r\n DateFormatter.prototype.resolveTimezoneOffset = function (date, zone) {\r\n var value = zone.match(/([+\\-]?)([0-9]{2}):?([0-9]{2})/);\r\n if (value) {\r\n var match = $type.getValue(zone.match(/([+\\-]?)([0-9]{2}):?([0-9]{2})/));\r\n var dir = match[1];\r\n var hour = match[2];\r\n var minute = match[3];\r\n var offset = parseInt(hour) * 60 + parseInt(minute);\r\n // Adjust offset\r\n // Making it negative does not seem to make sense, but it's right\r\n // because of how JavaScript calculates GMT offsets\r\n if (dir == \"+\") {\r\n offset *= -1;\r\n }\r\n // Check the difference in offset\r\n var originalOffset = (date || new Date()).getTimezoneOffset();\r\n var diff = offset - originalOffset;\r\n return diff;\r\n }\r\n return 0;\r\n };\r\n /**\r\n * Resolves month name (i.e. \"December\") into a month number (11).\r\n *\r\n * @param value Month name\r\n * @return Month number\r\n */\r\n DateFormatter.prototype.resolveMonth = function (value) {\r\n // Let's try English first\r\n var month = this.months.indexOf(value);\r\n if (month > -1) {\r\n return month;\r\n }\r\n // Try the translation\r\n if (this.language && !this.language.isDefault()) {\r\n month = this.language.translateAll(this.months).indexOf(value);\r\n if (month > -1) {\r\n return month;\r\n }\r\n }\r\n return 0;\r\n };\r\n /**\r\n * Resolves short month name (i.e. \"Dec\") into a month number.\r\n *\r\n * @param value Short month name\r\n * @return Month number\r\n */\r\n DateFormatter.prototype.resolveShortMonth = function (value) {\r\n // Let's try English first\r\n var month = this.monthsShort.indexOf(value);\r\n if (month > -1) {\r\n return month;\r\n }\r\n // Maybe long month (workaround for May)\r\n month = this.months.indexOf(value);\r\n if (month > -1) {\r\n return month;\r\n }\r\n // Try the translation\r\n if (this.language && !this.language.isDefault()) {\r\n month = this.language.translateAll(this.monthsShort).indexOf(value);\r\n if (month > -1) {\r\n return month;\r\n }\r\n }\r\n return 0;\r\n };\r\n /**\r\n * Checks if passed in string represents AM/PM notation in many of its\r\n * versions.\r\n *\r\n * @param value Source string\r\n * @return Is it AM/PM?\r\n */\r\n DateFormatter.prototype.isAm = function (value) {\r\n var list = this.getStringList([\"AM\", \"A.M.\", \"A\"]);\r\n return list.indexOf(value.toUpperCase()) > -1;\r\n };\r\n /**\r\n * Invalidates related [[Sprite]] causing it to redraw.\r\n */\r\n DateFormatter.prototype.invalidateSprite = function () {\r\n if (this.sprite) {\r\n this.sprite.invalidate();\r\n }\r\n };\r\n /**\r\n * Translates list of strings.\r\n *\r\n * @param list Source strings\r\n * @return Translated strings\r\n */\r\n DateFormatter.prototype.getStringList = function (list) {\r\n var res = [];\r\n for (var i = 0; i < list.length; i++) {\r\n // translate?\r\n if (this.language) {\r\n res.push($utils.escapeForRgex(this.language.translate(list[i])));\r\n }\r\n else {\r\n res.push($utils.escapeForRgex(list[i]));\r\n }\r\n }\r\n return res;\r\n };\r\n Object.defineProperty(DateFormatter.prototype, \"dateFormat\", {\r\n /**\r\n * @return Date format\r\n */\r\n get: function () {\r\n return this._dateFormat;\r\n },\r\n /**\r\n * Date format to use.\r\n *\r\n * If format is not supplied in-line in the string, this setting will be\r\n * used.\r\n *\r\n * @default \"yyyy-MM-dd\"\r\n * @param value Date format\r\n */\r\n set: function (value) {\r\n this._dateFormat = value;\r\n this.invalidateSprite();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DateFormatter.prototype, \"inputDateFormat\", {\r\n /**\r\n * @return Date format\r\n */\r\n get: function () {\r\n return this._inputDateFormat;\r\n },\r\n /**\r\n * Date format to use when parsing dates.\r\n *\r\n * @default \"yyyy-MM-dd\"\r\n * @param value Date format\r\n */\r\n set: function (value) {\r\n this._inputDateFormat = value;\r\n this.invalidateSprite();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DateFormatter.prototype, \"intlLocales\", {\r\n /**\r\n * @return Date format\r\n */\r\n get: function () {\r\n return this._intlLocales;\r\n },\r\n /**\r\n * Locales if you are using date formats in `Intl.DateTimeFormatOptions` syntax.\r\n *\r\n * @param value Locales\r\n */\r\n set: function (value) {\r\n this._intlLocales = value;\r\n this.invalidateSprite();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DateFormatter.prototype, \"utc\", {\r\n /**\r\n * @return Use UTC?\r\n */\r\n get: function () {\r\n return this._utc;\r\n },\r\n /**\r\n * Should formatter use UTC functions?\r\n *\r\n * If UTC is used, all date/time values will be independent on client's\r\n * time zone.\r\n *\r\n * @param value Use UTC?\r\n */\r\n set: function (value) {\r\n this._utc = value;\r\n this.invalidateSprite();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DateFormatter.prototype, \"timezoneOffset\", {\r\n /**\r\n * @return Offset (minutes)\r\n */\r\n get: function () {\r\n return this._timezoneOffset;\r\n },\r\n /**\r\n * If set, will apply specific offset in minutes before formatting the date\r\n * text.\r\n *\r\n * The value is a number of minutes from target time zone to UTC.\r\n *\r\n * E.g. `300` will recalculate Dates in \"GMT-5\" time zone.\r\n *\r\n * @param value Offset (minutes)\r\n */\r\n set: function (value) {\r\n if (this._timezoneOffset != value) {\r\n this._timezoneOffset = value;\r\n this.invalidateSprite();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DateFormatter.prototype, \"timezone\", {\r\n /**\r\n * @return Timezone\r\n */\r\n get: function () {\r\n return this._timezone;\r\n },\r\n /**\r\n * If set, will format date/time in specific time zone.\r\n *\r\n * The value should be named time zone, e.g.:\r\n * `\"America/Vancouver\"`, `\"Australia/Sydney\"`, `\"UTC\"`.\r\n *\r\n * @since 4.10.1\r\n * @param value Timezone\r\n */\r\n set: function (value) {\r\n if (this._timezone != value) {\r\n this._timezone = value;\r\n this.timezoneMinutes = $time.getTimezoneMinutes(value);\r\n this.invalidateSprite();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DateFormatter.prototype, \"firstDayOfWeek\", {\r\n /**\r\n * @return First day of week\r\n */\r\n get: function () {\r\n return this._firstDayOfWeek;\r\n },\r\n /**\r\n * First day of the week:\r\n *\r\n * * 0 - Sunday\r\n * * 1 - Monday\r\n * * 2 - Tuesday\r\n *\r\n * Etc.\r\n *\r\n * @param value First day of week\r\n */\r\n set: function (value) {\r\n this._firstDayOfWeek = value;\r\n this.invalidateSprite();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DateFormatter.prototype, \"outputFormat\", {\r\n /**\r\n * @ignore Exclude from docs\r\n * @return Format\r\n */\r\n get: function () {\r\n return this._outputFormat;\r\n },\r\n /**\r\n * Output format for the formatted date.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Format\r\n */\r\n set: function (value) {\r\n this._outputFormat = value.toLowerCase();\r\n this.invalidateSprite();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return DateFormatter;\r\n}(BaseObject));\r\nexport { DateFormatter };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"DateFormatter\"] = DateFormatter;\r\n","/**\r\n * Duration formatting functionality.\r\n */\r\nimport { __extends } from \"tslib\";\r\nimport { Language } from \"../utils/Language\";\r\nimport { BaseObject } from \"../Base\";\r\nimport { getTextFormatter } from \"../formatters/TextFormatter\";\r\nimport { registry } from \"../Registry\";\r\nimport * as $strings from \"../utils/Strings\";\r\nimport * as $object from \"../utils/Object\";\r\nimport * as $utils from \"../utils/Utils\";\r\nimport * as $type from \"../utils/Type\";\r\nimport * as $math from \"../utils/Math\";\r\n/**\r\n * DurationFormatter class. Formats numbers as durations.\r\n *\r\n * `1000` as `16:40`\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/formatters/formatting-duration/} Tutorial on duration formatting\r\n */\r\nvar DurationFormatter = /** @class */ (function (_super) {\r\n __extends(DurationFormatter, _super);\r\n /**\r\n * Constructor\r\n */\r\n function DurationFormatter() {\r\n var _this = _super.call(this) || this;\r\n /**\r\n * A base value for negative numbers. Will treat all numbers below this value\r\n * as negative numbers.\r\n */\r\n _this._negativeBase = 0;\r\n /**\r\n * A base unit to consider values are in.\r\n *\r\n * @default \"s\"\r\n */\r\n _this._baseUnit = \"second\";\r\n /**\r\n * Output format to produce. If the format calls for applying color to the\r\n * formatted value, this setting will determine what markup to use: SVG or\r\n * HTML.\r\n *\r\n * Available options: svg, html.\r\n *\r\n * @default \"svg\"\r\n */\r\n _this._outputFormat = \"svg\";\r\n /**\r\n * How many milliseconds each unit represents.\r\n */\r\n _this._unitValues = {\r\n \"millisecond\": 1,\r\n \"second\": 1000,\r\n \"minute\": 60000,\r\n \"hour\": 3600000,\r\n \"day\": 86400000,\r\n \"week\": 604800000,\r\n \"month\": 2592000000,\r\n \"year\": 31536000000,\r\n };\r\n /**\r\n * Collection of aliases for units.\r\n */\r\n _this._unitAliases = {\r\n \"Y\": \"y\",\r\n \"D\": \"d\",\r\n \"H\": \"h\",\r\n \"K\": \"h\",\r\n \"k\": \"h\",\r\n \"n\": \"S\"\r\n };\r\n _this.className = \"DurationFormatter\";\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * Formats the number according as duration.\r\n *\r\n * For example `1000` (base unit seconds) would be converted to `16:40` as in\r\n * 16 minutes and 40 seconds.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/formatters/formatting-duration/} Tutorial on duration formatting\r\n * @param value Value to format\r\n * @param format Format to apply\r\n * @param base Override base unit\r\n * @return Formatted number\r\n */\r\n DurationFormatter.prototype.format = function (value, format, base) {\r\n // no language?\r\n if (!this.language) {\r\n if (this.sprite) {\r\n this.language = this.sprite.language;\r\n }\r\n else {\r\n this.language = new Language;\r\n }\r\n }\r\n // no base unit?\r\n var baseUnit = base || this._baseUnit;\r\n // no format passed in or empty\r\n if (typeof format === \"undefined\" || format === \"\") {\r\n if ($type.hasValue(this.durationFormat)) {\r\n format = this.durationFormat;\r\n }\r\n else {\r\n format = this.getFormat($type.toNumber(value), null, baseUnit);\r\n }\r\n }\r\n // Clean format\r\n format = $utils.cleanFormat(format);\r\n // get format info (it will also deal with parser caching)\r\n var info = this.parseFormat(format, baseUnit);\r\n // cast to number just in case\r\n // TODO: maybe use better casting\r\n var source = Number(value);\r\n // format and replace the number\r\n var details;\r\n if (source > this._negativeBase) {\r\n details = info.positive;\r\n }\r\n else if (source < this._negativeBase) {\r\n details = info.negative;\r\n }\r\n else {\r\n details = info.zero;\r\n }\r\n // Format\r\n var formatted = this.applyFormat(source, details);\r\n // Apply color?\r\n if (details.color !== \"\") {\r\n if (this._outputFormat === \"svg\") {\r\n formatted = \"<tspan fill='\" + details.color + \"'>\" + formatted + \"</tspan>\";\r\n }\r\n else if (this._outputFormat === \"html\") {\r\n formatted = \"<span style='color: \" + details.color + \";'>\" + formatted + \"</span>\";\r\n }\r\n }\r\n return formatted;\r\n };\r\n /**\r\n * Parses supplied format into structured object which can be used to format\r\n * the number.\r\n *\r\n * @param format Format string, i.e. \"#,###.00\"\r\n * @param base Override base unit\r\n * @return Parsed information\r\n */\r\n DurationFormatter.prototype.parseFormat = function (format, base) {\r\n var _this = this;\r\n // Check cache\r\n var cached = this.getCache(format);\r\n if ($type.hasValue(cached)) {\r\n return cached;\r\n }\r\n // no base unit?\r\n var baseUnit = base || this._baseUnit;\r\n // Initialize duration parsing info\r\n var info = {\r\n \"positive\": {\r\n \"color\": \"\",\r\n \"template\": \"\",\r\n \"parts\": [],\r\n \"source\": \"\",\r\n \"baseUnit\": baseUnit,\r\n \"parsed\": false,\r\n \"absolute\": false\r\n },\r\n \"negative\": {\r\n \"color\": \"\",\r\n \"template\": \"\",\r\n \"parts\": [],\r\n \"source\": \"\",\r\n \"baseUnit\": baseUnit,\r\n \"parsed\": false,\r\n \"absolute\": false\r\n },\r\n \"zero\": {\r\n \"color\": \"\",\r\n \"template\": \"\",\r\n \"parts\": [],\r\n \"source\": \"\",\r\n \"baseUnit\": baseUnit,\r\n \"parsed\": false,\r\n \"absolute\": false\r\n }\r\n };\r\n // Escape double vertical bars (that mean display one vertical bar)\r\n format = format.replace(\"||\", $strings.PLACEHOLDER2);\r\n // Split it up and deal with different formats\r\n var parts = format.split(\"|\");\r\n info.positive.source = parts[0];\r\n if (typeof parts[2] === \"undefined\") {\r\n info.zero = info.positive;\r\n }\r\n else {\r\n info.zero.source = parts[2];\r\n }\r\n if (typeof parts[1] === \"undefined\") {\r\n info.negative = info.positive;\r\n }\r\n else {\r\n info.negative.source = parts[1];\r\n }\r\n // Parse each\r\n $object.each(info, function (part, item) {\r\n // Already parsed\r\n if (item.parsed) {\r\n return;\r\n }\r\n // Check cached\r\n if (typeof _this.getCache(item.source) !== \"undefined\") {\r\n info[part] = _this.getCache(item.source);\r\n return;\r\n }\r\n // Begin parsing\r\n var partFormat = item.source;\r\n // Check for [] directives\r\n var dirs = [];\r\n dirs = item.source.match(/^\\[([^\\]]*)\\]/);\r\n if (dirs && dirs.length && dirs[0] !== \"\") {\r\n partFormat = item.source.substr(dirs[0].length);\r\n item.color = dirs[1];\r\n }\r\n // Let TextFormatter split into chunks\r\n var chunks = getTextFormatter().chunk(partFormat, true);\r\n for (var i = 0; i < chunks.length; i++) {\r\n var chunk = chunks[i];\r\n // replace back double vertical bar\r\n chunk.text = chunk.text.replace($strings.PLACEHOLDER2, \"|\");\r\n if (chunk.type === \"value\") {\r\n // Just \"Duration\"?\r\n // if (chunk.text.toLowerCase() === \"duration\") {\r\n // \tchunk.text = durationFormat;\r\n // }\r\n // Check for \"a\" (absolute) modifier\r\n if (chunk.text.match(/[yYMdDwhHKkmsSn]+a/)) {\r\n item.absolute = true;\r\n chunk.text = chunk.text.replace(/([yYMdDwhHKkmsSn]+)a/, \"$1\");\r\n }\r\n // Find all possible parts\r\n var matches = chunk.text.match(/y+|Y+|M+|d+|D+|w+|h+|H+|K+|k+|m+|s+|S+|n+/g);\r\n if (matches) {\r\n // Populate template\r\n for (var x = 0; x < matches.length; x++) {\r\n // Is it an alias?\r\n if (!$type.hasValue(matches[x])) {\r\n matches[x] = _this._unitAliases[matches[x]];\r\n }\r\n item.parts.push(matches[x]);\r\n chunk.text = chunk.text.replace(matches[x], $strings.PLACEHOLDER);\r\n }\r\n }\r\n }\r\n // Apply to template\r\n item.template += chunk.text;\r\n }\r\n // Apply style formatting\r\n //item.template = getTextFormatter().format(item.template, this.outputFormat);\r\n // Save cache\r\n _this.setCache(item.source, item);\r\n // Mark this as parsed\r\n item.parsed = true;\r\n });\r\n // Save cache (the whole thing)\r\n this.setCache(format, info);\r\n return info;\r\n };\r\n /**\r\n * Applies parsed format to a numeric value.\r\n *\r\n * @param value Value\r\n * @param details Parsed format as returned by {parseFormat}\r\n * @return Formatted duration\r\n */\r\n DurationFormatter.prototype.applyFormat = function (value, details) {\r\n // Use absolute values\r\n var negative = !details.absolute && (value < this._negativeBase);\r\n value = Math.abs(value);\r\n // Recalculate to milliseconds\r\n var tstamp = this.toTimeStamp(value, details.baseUnit);\r\n // Init return value\r\n var res = details.template;\r\n // Iterate through duration parts\r\n for (var i = 0, len = details.parts.length; i < len; i++) {\r\n // Gather the part\r\n var part = details.parts[i];\r\n var unit = this.toTimeUnit(part.substr(0, 1));\r\n var digits = part.length;\r\n // Calculate current unit value\r\n var ints = Math.floor(tstamp / this._unitValues[unit]);\r\n res = res.replace($strings.PLACEHOLDER, $utils.padString(ints, digits, \"0\"));\r\n // Reduce timestamp\r\n tstamp -= ints * this._unitValues[unit];\r\n }\r\n // Reapply negative sign\r\n if (negative) {\r\n res = \"-\" + res;\r\n }\r\n return res;\r\n };\r\n /**\r\n * Converts numeric value to timestamp in milliseconds.\r\n *\r\n * @param value A source value\r\n * @param baseUnit Base unit the source value is in: \"q\", \"s\", \"i\", \"h\", \"d\", \"w\", \"m\", \"y\"\r\n * @return Value representation as a timestamp in milliseconds\r\n */\r\n DurationFormatter.prototype.toTimeStamp = function (value, baseUnit) {\r\n return value * this._unitValues[baseUnit];\r\n };\r\n DurationFormatter.prototype.toTimeUnit = function (code) {\r\n switch (code) {\r\n case \"S\":\r\n return \"millisecond\";\r\n case \"s\":\r\n return \"second\";\r\n case \"m\":\r\n return \"minute\";\r\n case \"h\":\r\n return \"hour\";\r\n case \"d\":\r\n return \"day\";\r\n case \"w\":\r\n return \"week\";\r\n case \"M\":\r\n return \"month\";\r\n case \"y\":\r\n return \"year\";\r\n }\r\n ;\r\n };\r\n /**\r\n * Invalidates the parent [[Sprite]] object.\r\n */\r\n DurationFormatter.prototype.invalidateSprite = function () {\r\n if (this.sprite) {\r\n this.sprite.invalidate();\r\n }\r\n };\r\n Object.defineProperty(DurationFormatter.prototype, \"baseUnit\", {\r\n /**\r\n * @return Base unit\r\n */\r\n get: function () {\r\n return this._baseUnit;\r\n },\r\n /**\r\n * Base unit the values are in.\r\n *\r\n * A base unit will be used to recalculate the numeric value to millisecond\r\n * timestamps.\r\n *\r\n * Available options:\r\n *\r\n * * \"millisecond\"\r\n * * \"second\"\r\n * * \"minute\"\r\n * * \"hour\"\r\n * * \"day\"\r\n * * \"week\"\r\n * * \"month\"\r\n * * \"year\"\r\n *\r\n * @default \"s\"\r\n * @param baseUnit A base unit\r\n */\r\n set: function (baseUnit) {\r\n this._baseUnit = baseUnit;\r\n this.invalidateSprite();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DurationFormatter.prototype, \"outputFormat\", {\r\n /**\r\n * Getter for output format.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Output format\r\n */\r\n get: function () {\r\n return this._outputFormat;\r\n },\r\n /**\r\n * Setter for output format: \"svg\" or \"html.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Output format\r\n */\r\n set: function (outputFormat) {\r\n this._outputFormat = outputFormat.toLowerCase();\r\n this.invalidateSprite();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Returns appropriate default format for the value.\r\n *\r\n * If `maxValue` is sepcified, it will use that value to determine the time\r\n * unit for the format.\r\n *\r\n * For example if your `baseUnit` is `\"second\"` and you pass in `10`, you\r\n * will get `\"10\"`.\r\n *\r\n * However, you might want it to be formatted in the context of bigger scale,\r\n * say 10 minutes (600 seconds). If you pass in `600` as `maxValue`, all\r\n * values, including small ones will use format with minutes, e.g.:\r\n * `00:10`, `00:50`, `12: 30`, etc.\r\n *\r\n * @param value Value to format\r\n * @param maxValue Maximum value to be used to determine format\r\n * @param baseUnit Base unit of the value\r\n * @return Format\r\n */\r\n DurationFormatter.prototype.getFormat = function (value, maxValue, baseUnit) {\r\n // Is format override set?\r\n if ($type.hasValue(this.durationFormat)) {\r\n return this.durationFormat;\r\n }\r\n // Get base unit\r\n if (!baseUnit) {\r\n baseUnit = this.baseUnit;\r\n }\r\n if ($type.hasValue(maxValue) && value != maxValue) {\r\n value = Math.abs(value);\r\n maxValue = Math.abs(maxValue);\r\n var maxUnit = this.getValueUnit($math.max(value, maxValue), baseUnit);\r\n //let diffUnit = this.getValueUnit(Math.abs(maxValue - value), baseUnit);\r\n //console.log(maxUnit, diffUnit);\r\n return this.durationFormats[baseUnit][maxUnit];\r\n }\r\n else {\r\n var unit = this.getValueUnit(value, baseUnit);\r\n return this.durationFormats[baseUnit][unit];\r\n }\r\n };\r\n /**\r\n * Returns value's closest denominator time unit, e.g 100 seconds is\r\n * `\"minute\"`, while 59 seconds would still be `second`.\r\n *\r\n * @param value Source duration value\r\n * @param baseUnit Base unit\r\n * @return Denominator\r\n */\r\n DurationFormatter.prototype.getValueUnit = function (value, baseUnit) {\r\n // Get base unit\r\n if (!baseUnit) {\r\n baseUnit = this.baseUnit;\r\n }\r\n // Convert to milliseconds\r\n var currentUnit;\r\n var ms = this.getMilliseconds(value, baseUnit);\r\n $object.eachContinue(this._unitValues, function (key, val) {\r\n if (key == baseUnit || currentUnit) {\r\n var num = ms / val;\r\n if (num <= 1) {\r\n if (!currentUnit) {\r\n currentUnit = key;\r\n }\r\n return false;\r\n }\r\n currentUnit = key;\r\n }\r\n return true;\r\n });\r\n return currentUnit;\r\n };\r\n /**\r\n * Converts value to milliseconds according to `baseUnit`.\r\n *\r\n * @param value Source duration value\r\n * @param baseUnit Base unit\r\n * @return Value in milliseconds\r\n */\r\n DurationFormatter.prototype.getMilliseconds = function (value, baseUnit) {\r\n // Get base unit\r\n if (!baseUnit) {\r\n baseUnit = this.baseUnit;\r\n }\r\n return value * this._unitValues[baseUnit];\r\n };\r\n Object.defineProperty(DurationFormatter.prototype, \"durationFormat\", {\r\n /**\r\n * @return Format\r\n */\r\n get: function () {\r\n return this._durationFormat;\r\n },\r\n /**\r\n * If set, this format will be used instead of the one determined dynamically\r\n * based on the basedUnit and range of values.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/formatters/formatting-duration/} Available fomatting codes\r\n * @param value Format\r\n */\r\n set: function (value) {\r\n if (this._durationFormat != value) {\r\n this._durationFormat = value;\r\n this.invalidateSprite();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DurationFormatter.prototype, \"durationFormats\", {\r\n /**\r\n * @return Formats\r\n */\r\n get: function () {\r\n if (!this._durationFormats) {\r\n this._durationFormats = {\r\n \"millisecond\": {\r\n \"millisecond\": this.language.translate(\"_duration_millisecond\"),\r\n \"second\": this.language.translate(\"_duration_millisecond_second\"),\r\n \"minute\": this.language.translate(\"_duration_millisecond_minute\"),\r\n \"hour\": this.language.translate(\"_duration_millisecond_hour\"),\r\n \"day\": this.language.translate(\"_duration_millisecond_day\"),\r\n \"week\": this.language.translate(\"_duration_millisecond_week\"),\r\n \"month\": this.language.translate(\"_duration_millisecond_month\"),\r\n \"year\": this.language.translate(\"_duration_millisecond_year\")\r\n },\r\n \"second\": {\r\n \"second\": this.language.translate(\"_duration_second\"),\r\n \"minute\": this.language.translate(\"_duration_second_minute\"),\r\n \"hour\": this.language.translate(\"_duration_second_hour\"),\r\n \"day\": this.language.translate(\"_duration_second_day\"),\r\n \"week\": this.language.translate(\"_duration_second_week\"),\r\n \"month\": this.language.translate(\"_duration_second_month\"),\r\n \"year\": this.language.translate(\"_duration_second_year\")\r\n },\r\n \"minute\": {\r\n \"minute\": this.language.translate(\"_duration_minute\"),\r\n \"hour\": this.language.translate(\"_duration_minute_hour\"),\r\n \"day\": this.language.translate(\"_duration_minute_day\"),\r\n \"week\": this.language.translate(\"_duration_minute_week\"),\r\n \"month\": this.language.translate(\"_duration_minute_month\"),\r\n \"year\": this.language.translate(\"_duration_minute_year\")\r\n },\r\n \"hour\": {\r\n \"hour\": this.language.translate(\"_duration_hour\"),\r\n \"day\": this.language.translate(\"_duration_hour_day\"),\r\n \"week\": this.language.translate(\"_duration_hour_week\"),\r\n \"month\": this.language.translate(\"_duration_hour_month\"),\r\n \"year\": this.language.translate(\"_duration_hour_year\")\r\n },\r\n \"day\": {\r\n \"day\": this.language.translate(\"_duration_day\"),\r\n \"week\": this.language.translate(\"_duration_day_week\"),\r\n \"month\": this.language.translate(\"_duration_day_month\"),\r\n \"year\": this.language.translate(\"_duration_day_year\")\r\n },\r\n \"week\": {\r\n \"week\": this.language.translate(\"_duration_week\"),\r\n \"month\": this.language.translate(\"_duration_week_month\"),\r\n \"year\": this.language.translate(\"_duration_week_year\")\r\n },\r\n \"month\": {\r\n \"month\": this.language.translate(\"_duration_month\"),\r\n \"year\": this.language.translate(\"_duration_month_year\")\r\n },\r\n \"year\": {\r\n \"year\": this.language.translate(\"_duration_year\")\r\n }\r\n };\r\n }\r\n return this._durationFormats;\r\n },\r\n /**\r\n * Duration formats for various combination of base units.\r\n *\r\n * @param value Formats\r\n */\r\n set: function (value) {\r\n this._durationFormats = value;\r\n this.invalidateSprite();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return DurationFormatter;\r\n}(BaseObject));\r\nexport { DurationFormatter };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"DurationFormatter\"] = DurationFormatter;\r\n","/**\r\n * Number formatting-related functionality.\r\n */\r\nimport { __extends } from \"tslib\";\r\nimport { Language } from \"../utils/Language\";\r\nimport { BaseObject } from \"../Base\";\r\nimport { getTextFormatter } from \"../formatters/TextFormatter\";\r\nimport { registry } from \"../Registry\";\r\nimport * as $strings from \"../utils/Strings\";\r\nimport * as $object from \"../utils/Object\";\r\nimport * as $utils from \"../utils/Utils\";\r\nimport * as $type from \"../utils/Type\";\r\nimport * as $math from \"../utils/Math\";\r\n/**\r\n * NumberFormatter class. Formats numbers according to specified formats.\r\n *\r\n * @todo Apply translations to suffixes/prefixes\r\n */\r\nvar NumberFormatter = /** @class */ (function (_super) {\r\n __extends(NumberFormatter, _super);\r\n /**\r\n * Constructor\r\n */\r\n function NumberFormatter() {\r\n var _this = _super.call(this) || this;\r\n /**\r\n * A base value for negative numbers. Will treat all numbers below this value\r\n * as negative numbers.\r\n */\r\n _this._negativeBase = 0;\r\n /**\r\n * Holds number format.\r\n *\r\n * @default #,###.#####\r\n */\r\n _this._numberFormat = \"#,###.#####\";\r\n /**\r\n * Output format to produce. If the format calls for applying color to the\r\n * formatted value, this setting will determine what markup to use: SVG or\r\n * HTML.\r\n *\r\n * Available options: svg, html.\r\n *\r\n * @default \"svg\"\r\n */\r\n _this._outputFormat = \"svg\";\r\n /**\r\n * Any number smaller than this will be considered \"small\" number, which will\r\n * trigger special formatting if \"a\" format modifier is used.\r\n */\r\n _this._smallNumberThreshold = 1.00;\r\n _this._forceLTR = false;\r\n _this.className = \"NumberFormatter\";\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n NumberFormatter.prototype.dispose = function () {\r\n _super.prototype.dispose.call(this);\r\n if (this.language) {\r\n this.language.dispose();\r\n }\r\n };\r\n Object.defineProperty(NumberFormatter.prototype, \"language\", {\r\n /**\r\n * @return Language\r\n */\r\n get: function () {\r\n if (!this._language) {\r\n if (this.sprite) {\r\n this._language = this.sprite.language;\r\n }\r\n else {\r\n this._language = new Language;\r\n }\r\n }\r\n return this._language;\r\n },\r\n /**\r\n * A reference to [[Language]] instance.\r\n *\r\n * Formatter will use language to translate various items, like number\r\n * suffixes, etc.\r\n *\r\n * @param value Language\r\n */\r\n set: function (value) {\r\n this._language = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Formats the number according to specific format.\r\n *\r\n * @param value Value to format\r\n * @param format Format to apply\r\n * @return Formatted number\r\n */\r\n NumberFormatter.prototype.format = function (value, format, precision) {\r\n // no format passed in or \"Number\"\r\n if (typeof format === \"undefined\" || ($type.isString(format) && format.toLowerCase() === \"number\")) {\r\n format = this._numberFormat;\r\n }\r\n // Init return value\r\n var formatted;\r\n // Cast to number just in case\r\n // TODO: maybe use better casting\r\n var source = Number(value);\r\n // Is it a built-in format or Intl.NumberFormatOptions\r\n if ($type.isObject(format)) {\r\n try {\r\n if (this.intlLocales) {\r\n return new Intl.NumberFormat(this.intlLocales, format).format(source);\r\n }\r\n else {\r\n return new Intl.NumberFormat(undefined, format).format(source);\r\n }\r\n }\r\n catch (e) {\r\n return \"Invalid\";\r\n }\r\n }\r\n else {\r\n // Clean format\r\n format = $utils.cleanFormat(format);\r\n // Get format info (it will also deal with parser caching)\r\n var info = this.parseFormat(format, this.language);\r\n // format and replace the number\r\n var details = void 0;\r\n if (source > this._negativeBase) {\r\n details = info.positive;\r\n }\r\n else if (source < this._negativeBase) {\r\n details = info.negative;\r\n }\r\n else {\r\n details = info.zero;\r\n }\r\n // Adjust precision\r\n if ($type.hasValue(precision) && !details.mod) {\r\n details = $object.clone(details);\r\n details.decimals.active = source == 0 ? 0 : precision;\r\n }\r\n // Format\r\n formatted = details.template.split($strings.PLACEHOLDER).join(this.applyFormat(source, details));\r\n }\r\n if (this.forceLTR) {\r\n formatted = \"‎\" + formatted;\r\n }\r\n return formatted;\r\n };\r\n /**\r\n * Parses supplied format into structured object which can be used to format\r\n * the number.\r\n *\r\n * @param format Format string, i.e. \"#,###.00\"\r\n * @param language Language\r\n */\r\n NumberFormatter.prototype.parseFormat = function (format, language) {\r\n var _this = this;\r\n // Check cache\r\n var cached = this.getCache(format);\r\n if ($type.hasValue(cached)) {\r\n return cached;\r\n }\r\n // init format parse info holder\r\n var info = {\r\n \"positive\": {\r\n \"thousands\": {\r\n \"active\": -1,\r\n \"passive\": -1,\r\n \"interval\": -1,\r\n \"separator\": language.translateEmpty(\"_thousandSeparator\")\r\n },\r\n \"decimals\": {\r\n \"active\": -1,\r\n \"passive\": -1,\r\n \"separator\": language.translateEmpty(\"_decimalSeparator\")\r\n },\r\n \"template\": \"\",\r\n \"source\": \"\",\r\n \"parsed\": false\r\n },\r\n \"negative\": {\r\n \"thousands\": {\r\n \"active\": -1,\r\n \"passive\": -1,\r\n \"interval\": -1,\r\n \"separator\": language.translateEmpty(\"_thousandSeparator\")\r\n },\r\n \"decimals\": {\r\n \"active\": -1,\r\n \"passive\": -1,\r\n \"separator\": language.translateEmpty(\"_decimalSeparator\")\r\n },\r\n \"template\": \"\",\r\n \"source\": \"\",\r\n \"parsed\": false\r\n },\r\n \"zero\": {\r\n \"thousands\": {\r\n \"active\": -1,\r\n \"passive\": -1,\r\n \"interval\": -1,\r\n \"separator\": language.translateEmpty(\"_thousandSeparator\")\r\n },\r\n \"decimals\": {\r\n \"active\": -1,\r\n \"passive\": -1,\r\n \"separator\": language.translateEmpty(\"_decimalSeparator\")\r\n },\r\n \"template\": \"\",\r\n \"source\": \"\",\r\n \"parsed\": false\r\n }\r\n };\r\n // Escape double vertical bars (that mean display one vertical bar)\r\n format = format.replace(\"||\", $strings.PLACEHOLDER2);\r\n // Split it up and deal with different formats\r\n var parts = format.split(\"|\");\r\n info.positive.source = parts[0];\r\n if (typeof parts[2] === \"undefined\") {\r\n info.zero = info.positive;\r\n }\r\n else {\r\n info.zero.source = parts[2];\r\n }\r\n if (typeof parts[1] === \"undefined\") {\r\n info.negative = info.positive;\r\n }\r\n else {\r\n info.negative.source = parts[1];\r\n }\r\n // Parse each\r\n $object.each(info, function (part, item) {\r\n // Already parsed\r\n if (item.parsed) {\r\n return;\r\n }\r\n // Check cached\r\n if (typeof _this.getCache(item.source) !== \"undefined\") {\r\n info[part] = _this.getCache(item.source);\r\n return;\r\n }\r\n // Begin parsing\r\n var partFormat = item.source;\r\n // Just \"Number\"?\r\n if (partFormat.toLowerCase() === \"number\") {\r\n partFormat = $type.isString(_this._numberFormat) ? _this._numberFormat : \"#,###.#####\";\r\n }\r\n // Let TextFormatter split into chunks\r\n var chunks = getTextFormatter().chunk(partFormat, true);\r\n for (var i = 0; i < chunks.length; i++) {\r\n var chunk = chunks[i];\r\n // replace back double vertical bar\r\n chunk.text = chunk.text.replace($strings.PLACEHOLDER2, \"|\");\r\n if (chunk.type === \"value\") {\r\n // Parse format\r\n // Look for codes\r\n var matches = chunk.text.match(/[#0.,]+[ ]?[abespABESP%!]?[abespABESP‰!]?/);\r\n if (matches) {\r\n if (matches === null || matches[0] === \"\") {\r\n // no codes here - assume string\r\n // nothing to do here\r\n item.template += chunk.text;\r\n }\r\n else {\r\n // look for the format modifiers at the end\r\n var mods = matches[0].match(/[abespABESP%‰!]{2}|[abespABESP%‰]{1}$/);\r\n if (mods) {\r\n item.mod = mods[0].toLowerCase();\r\n item.modSpacing = matches[0].match(/[ ]{1}[abespABESP%‰!]{1}$/) ? true : false;\r\n }\r\n // break the format up\r\n var a = matches[0].split(\".\");\r\n // Deal with thousands\r\n if (a[0] === \"\") {\r\n // No directives for thousands\r\n // Leave default settings (no formatting)\r\n }\r\n else {\r\n // Counts\r\n item.thousands.active = (a[0].match(/0/g) || []).length;\r\n item.thousands.passive = (a[0].match(/\\#/g) || []).length + item.thousands.active;\r\n // Separator interval\r\n var b = a[0].split(\",\");\r\n if (b.length === 1) {\r\n // No thousands separators\r\n // Do nothing\r\n }\r\n else {\r\n // Use length fo the last chunk as thousands length\r\n item.thousands.interval = $type.getValue(b.pop()).length;\r\n if (item.thousands.interval === 0) {\r\n item.thousands.interval = -1;\r\n }\r\n }\r\n }\r\n // Deal with decimals\r\n if (typeof (a[1]) === \"undefined\") {\r\n // No directives for decimals\r\n // Leave at defaults (no formatting)\r\n }\r\n else {\r\n // Counts\r\n item.decimals.active = (a[1].match(/0/g) || []).length;\r\n item.decimals.passive = (a[1].match(/\\#/g) || []).length + item.decimals.active;\r\n }\r\n // Add special code to template\r\n item.template += chunk.text.split(matches[0]).join($strings.PLACEHOLDER);\r\n }\r\n }\r\n }\r\n else {\r\n // Quoted string - take it as it is\r\n item.template += chunk.text;\r\n }\r\n }\r\n // Apply style formatting\r\n //item.template = getTextFormatter().format(item.template, this.outputFormat);\r\n // Save cache\r\n _this.setCache(item.source, item);\r\n // Mark this as parsed\r\n item.parsed = true;\r\n });\r\n // Save cache (the whole thing)\r\n this.setCache(format, info);\r\n return info;\r\n };\r\n /**\r\n * Applies parsed format to a numeric value.\r\n *\r\n * @param value Value\r\n * @param details Parsed format as returned by parseFormat()\r\n * @return Formatted number\r\n */\r\n NumberFormatter.prototype.applyFormat = function (value, details) {\r\n // Use absolute values\r\n var negative = value < 0;\r\n value = Math.abs(value);\r\n // Recalculate according to modifier\r\n var prefix = \"\", suffix = \"\";\r\n var mods = details.mod ? details.mod.split(\"\") : [];\r\n if (mods.indexOf(\"b\") !== -1) {\r\n var a_1 = this.applyPrefix(value, this.bytePrefixes, mods.indexOf(\"!\") !== -1);\r\n value = a_1[0];\r\n prefix = a_1[1];\r\n suffix = a_1[2];\r\n if (details.modSpacing) {\r\n suffix = \" \" + suffix;\r\n }\r\n }\r\n else if (mods.indexOf(\"a\") !== -1) {\r\n var a_2 = this.applyPrefix(value, value < this.smallNumberThreshold ? this.smallNumberPrefixes : this.bigNumberPrefixes, mods.indexOf(\"!\") !== -1);\r\n value = a_2[0];\r\n prefix = a_2[1];\r\n suffix = a_2[2];\r\n if (details.modSpacing) {\r\n suffix = \" \" + suffix;\r\n }\r\n }\r\n else if (mods.indexOf(\"p\") !== -1) {\r\n var ol = Math.min(value.toString().length + 2, 21);\r\n //value *= 100;\r\n value = parseFloat(value.toPrecision(ol));\r\n prefix = this.language.translate(\"_percentPrefix\") || \"\";\r\n suffix = this.language.translate(\"_percentSuffix\") || \"\";\r\n if (prefix == \"\" && suffix == \"\") {\r\n suffix = \"%\";\r\n }\r\n }\r\n else if (mods.indexOf(\"%\") !== -1) {\r\n var ol = $math.min(value.toString().length + 2, 21);\r\n value *= 100;\r\n value = parseFloat(value.toPrecision(ol));\r\n suffix = \"%\";\r\n }\r\n else if (mods.indexOf(\"‰\") !== -1) {\r\n var ol = $math.min(value.toString().length + 3, 21);\r\n value *= 1000;\r\n value = parseFloat(value.toPrecision(ol));\r\n suffix = \"‰\";\r\n }\r\n // Round to passive\r\n if (mods.indexOf(\"e\") !== -1) {\r\n // convert the value to exponential\r\n var exp = void 0;\r\n if (details.decimals.passive >= 0) {\r\n exp = value.toExponential(details.decimals.passive).split(\"e\");\r\n }\r\n else {\r\n exp = value.toExponential().split(\"e\");\r\n }\r\n value = Number(exp[0]);\r\n suffix = \"e\" + exp[1];\r\n if (details.modSpacing) {\r\n suffix = \" \" + suffix;\r\n }\r\n }\r\n else if (details.decimals.passive === 0) {\r\n value = Math.round(value);\r\n }\r\n else if (details.decimals.passive > 0) {\r\n var d = Math.pow(10, details.decimals.passive);\r\n value = Math.round(value * d) / d;\r\n }\r\n // Init return value\r\n var res = \"\";\r\n // Calc integer and decimal parts\r\n var a = $utils.numberToString(value).split(\".\");\r\n // Format integers\r\n var ints = a[0];\r\n // Pad integers to active length\r\n if (ints.length < details.thousands.active) {\r\n ints = Array(details.thousands.active - ints.length + 1).join(\"0\") + ints;\r\n }\r\n // Insert thousands separators\r\n if (details.thousands.interval > 0) {\r\n var ip = [];\r\n var intsr = ints.split(\"\").reverse().join(\"\");\r\n for (var i = 0, len = ints.length; i <= len; i += details.thousands.interval) {\r\n var c = intsr.substr(i, details.thousands.interval).split(\"\").reverse().join(\"\");\r\n if (c !== \"\") {\r\n ip.unshift(c);\r\n }\r\n }\r\n ints = ip.join(details.thousands.separator);\r\n }\r\n // Add integers\r\n res += ints;\r\n // Add decimals\r\n if (a.length === 1) {\r\n a.push(\"\");\r\n }\r\n var decs = a[1];\r\n // Fill zeros?\r\n if (decs.length < details.decimals.active) {\r\n decs += Array(details.decimals.active - decs.length + 1).join(\"0\");\r\n }\r\n if (decs !== \"\") {\r\n res += details.decimals.separator + decs;\r\n }\r\n // Can't have empty return value\r\n if (res === \"\") {\r\n res = \"0\";\r\n }\r\n // Add minus sign back\r\n if (value !== 0 && negative && (mods.indexOf(\"s\") === -1)) {\r\n res = \"-\" + res;\r\n }\r\n // Add suffixes/prefixes\r\n if (prefix) {\r\n res = prefix + res;\r\n }\r\n if (suffix) {\r\n res += suffix;\r\n }\r\n return res;\r\n };\r\n /**\r\n * Chooses appropriate prefix and suffix based on the passed in rules.\r\n *\r\n * @param value Value\r\n * @param prefixes Prefix array\r\n * @param force Force application of a first prefix (@sice 4.5.4)\r\n * @return Result\r\n */\r\n NumberFormatter.prototype.applyPrefix = function (value, prefixes, force) {\r\n if (force === void 0) { force = false; }\r\n var newvalue = value;\r\n var prefix = \"\";\r\n var suffix = \"\";\r\n var applied = false;\r\n var k = 1;\r\n for (var i = 0, len = prefixes.length; i < len; i++) {\r\n if (prefixes[i].number <= value) {\r\n if (prefixes[i].number === 0) {\r\n newvalue = 0;\r\n }\r\n else {\r\n newvalue = value / prefixes[i].number;\r\n k = prefixes[i].number;\r\n }\r\n prefix = prefixes[i].prefix;\r\n suffix = prefixes[i].suffix;\r\n applied = true;\r\n }\r\n }\r\n if (!applied && force && prefixes.length && value != 0) {\r\n // Prefix was not applied. Use the first prefix.\r\n newvalue = value / prefixes[0].number;\r\n prefix = prefixes[0].prefix;\r\n suffix = prefixes[0].suffix;\r\n applied = true;\r\n }\r\n if (applied) {\r\n newvalue = parseFloat(newvalue.toPrecision($math.min(k.toString().length + Math.floor(newvalue).toString().replace(/[^0-9]*/g, \"\").length, 21)));\r\n }\r\n return [newvalue, prefix, suffix];\r\n };\r\n /**\r\n * Invalidates the parent [[Sprite]] object.\r\n */\r\n NumberFormatter.prototype.invalidateSprite = function () {\r\n if (this.sprite) {\r\n this.sprite.invalidate();\r\n }\r\n };\r\n Object.defineProperty(NumberFormatter.prototype, \"numberFormat\", {\r\n /**\r\n * @return A format to use for number formatting\r\n */\r\n get: function () {\r\n return this._numberFormat;\r\n },\r\n /**\r\n * Number format.\r\n *\r\n * @default \"#,###.#####\"\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/formatters/formatting-numbers/} Tutorial on number formatting\r\n * @param format A format to use for number formatting\r\n */\r\n set: function (format) {\r\n this._numberFormat = format;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(NumberFormatter.prototype, \"intlLocales\", {\r\n /**\r\n * @return Date format\r\n */\r\n get: function () {\r\n return this._intlLocales;\r\n },\r\n /**\r\n * Locales if you are using date formats in `Intl.NumberFormatOptions` syntax.\r\n *\r\n * @see (@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NumberFormat) about using Intl for number formatting\r\n * @param value Locales\r\n */\r\n set: function (value) {\r\n this._intlLocales = value;\r\n this.invalidateSprite();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(NumberFormatter.prototype, \"negativeBase\", {\r\n /**\r\n * @return A format to use for number formatting\r\n */\r\n get: function () {\r\n return this._negativeBase;\r\n },\r\n /**\r\n * Negative base for negative numbers.\r\n *\r\n * @default 0\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/formatters/formatting-numbers/} Tutorial on number formatting\r\n * @param format A format to use for number formatting\r\n */\r\n set: function (value) {\r\n this._negativeBase = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(NumberFormatter.prototype, \"bigNumberPrefixes\", {\r\n /**\r\n * @return Prefixes for big numbers\r\n */\r\n get: function () {\r\n if (!$type.hasValue(this._bigNumberPrefixes)) {\r\n this._bigNumberPrefixes = [\r\n { \"number\": 1e+3, \"suffix\": this.language.translate(\"_big_number_suffix_3\") },\r\n { \"number\": 1e+6, \"suffix\": this.language.translate(\"_big_number_suffix_6\") },\r\n { \"number\": 1e+9, \"suffix\": this.language.translate(\"_big_number_suffix_9\") },\r\n { \"number\": 1e+12, \"suffix\": this.language.translate(\"_big_number_suffix_12\") },\r\n { \"number\": 1e+15, \"suffix\": this.language.translate(\"_big_number_suffix_15\") },\r\n { \"number\": 1e+18, \"suffix\": this.language.translate(\"_big_number_suffix_18\") },\r\n { \"number\": 1e+21, \"suffix\": this.language.translate(\"_big_number_suffix_21\") },\r\n { \"number\": 1e+24, \"suffix\": this.language.translate(\"_big_number_suffix_24\") }\r\n ];\r\n }\r\n return this._bigNumberPrefixes;\r\n },\r\n /**\r\n * Prefixes for big numbers.\r\n *\r\n * It's an array of objects of number/prefix pairs.\r\n *\r\n * ```JSON\r\n * [\r\n * { \"number\": 1e+3, \"suffix\": \"K\" },\r\n * { \"number\": 1e+6, \"suffix\": \"M\" },\r\n * { \"number\": 1e+9, \"suffix\": \"G\" },\r\n * { \"number\": 1e+12, \"suffix\": \"T\" },\r\n * { \"number\": 1e+15, \"suffix\": \"P\" },\r\n * { \"number\": 1e+18, \"suffix\": \"E\" },\r\n * { \"number\": 1e+21, \"suffix\": \"Z\" },\r\n * { \"number\": 1e+24, \"suffix\": \"Y\" }\r\n * ]\r\n * ```\r\n *\r\n * If the number is bigger than the `number` ir will be converted to the\r\n * appropriate bigger number with prefix.\r\n *\r\n * E.g. as per above `1500` will be converted to `1.5K`.\r\n *\r\n * Please note that for this transformation to be enabled, you need to\r\n * enable it specific modifier in your format setting.\r\n *\r\n * The modifier for big/small number modification is \"a\":\r\n *\r\n * ```Text\r\n * {myfield.formatNumber(\"#,###.00a\")}\r\n * ```\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/formatters/formatting-numbers/} Tutorial on number formatting\r\n * @param prefixes Prefixes for big numbers\r\n */\r\n set: function (prefixes) {\r\n this._bigNumberPrefixes = prefixes;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(NumberFormatter.prototype, \"smallNumberPrefixes\", {\r\n /**\r\n * @return Prefixes for small numbers\r\n */\r\n get: function () {\r\n if (!$type.hasValue(this._smallNumberPrefixes)) {\r\n this._smallNumberPrefixes = [\r\n { \"number\": 1e-24, \"suffix\": this.language.translate(\"_small_number_suffix_24\") },\r\n { \"number\": 1e-21, \"suffix\": this.language.translate(\"_small_number_suffix_21\") },\r\n { \"number\": 1e-18, \"suffix\": this.language.translate(\"_small_number_suffix_18\") },\r\n { \"number\": 1e-15, \"suffix\": this.language.translate(\"_small_number_suffix_15\") },\r\n { \"number\": 1e-12, \"suffix\": this.language.translate(\"_small_number_suffix_12\") },\r\n { \"number\": 1e-9, \"suffix\": this.language.translate(\"_small_number_suffix_9\") },\r\n { \"number\": 1e-6, \"suffix\": this.language.translate(\"_small_number_suffix_6\") },\r\n { \"number\": 1e-3, \"suffix\": this.language.translate(\"_small_number_suffix_3\") }\r\n ];\r\n }\r\n return this._smallNumberPrefixes;\r\n },\r\n /**\r\n * Prefixes for big numbers.\r\n *\r\n * It's an array of objects of number/prefix pairs.\r\n *\r\n * ```JSON\r\n * [\r\n * { \"number\": 1e-24, \"suffix\": \"y\" },\r\n * { \"number\": 1e-21, \"suffix\": \"z\" },\r\n * { \"number\": 1e-18, \"suffix\": \"a\" },\r\n * { \"number\": 1e-15, \"suffix\": \"f\" },\r\n * { \"number\": 1e-12, \"suffix\": \"p\" },\r\n * { \"number\": 1e-9, \"suffix\": \"n\" },\r\n * { \"number\": 1e-6, \"suffix\": \"μ\" },\r\n * { \"number\": 1e-3, \"suffix\": \"m\" }\r\n * ]\r\n * ```\r\n *\r\n * If the number is smaller than the `number` ir will be converted to the\r\n * appropriate smaller number with prefix.\r\n *\r\n * E.g. as per above `0.0015` will be converted to `1.5m`.\r\n *\r\n * Please note that for this transformation to be enabled, you need to\r\n * enable it specific modifier in your format setting.\r\n *\r\n * The modifier for big/small number modification is \"a\":\r\n *\r\n * ```Text\r\n * {myfield.formatNumber(\"#,###.00a\")}\r\n * ```\r\n *\r\n * IMPORTANT: The order of the suffixes is important. The list must start\r\n * from the smallest number and work towards bigger ones.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/formatters/formatting-numbers/} Tutorial on number formatting\r\n * @param prefixes Prefixes for small numbers\r\n */\r\n set: function (prefixes) {\r\n this._smallNumberPrefixes = prefixes;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(NumberFormatter.prototype, \"smallNumberThreshold\", {\r\n /**\r\n * @return Small number threshold\r\n */\r\n get: function () {\r\n return this._smallNumberThreshold;\r\n },\r\n /**\r\n * Any number smaller than this will be considered \"small\" number, which will\r\n * trigger special formatting if \"a\" format modifier is used.\r\n *\r\n * @since 4.6.8\r\n * @param value Small number threshold\r\n */\r\n set: function (value) {\r\n this._smallNumberThreshold = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(NumberFormatter.prototype, \"bytePrefixes\", {\r\n /**\r\n * @return Prefixes for byte-size formatting\r\n */\r\n get: function () {\r\n if (!$type.hasValue(this._bytePrefixes)) {\r\n this._bytePrefixes = [\r\n { \"number\": 1, suffix: this.language.translate(\"_byte_suffix_B\") },\r\n { \"number\": 1024, suffix: this.language.translate(\"_byte_suffix_KB\") },\r\n { \"number\": 1048576, suffix: this.language.translate(\"_byte_suffix_MB\") },\r\n { \"number\": 1073741824, suffix: this.language.translate(\"_byte_suffix_GB\") },\r\n { \"number\": 1099511627776, suffix: this.language.translate(\"_byte_suffix_TB\") },\r\n { \"number\": 1125899906842624, suffix: this.language.translate(\"_byte_suffix_PB\") }\r\n ];\r\n }\r\n return this._bytePrefixes;\r\n },\r\n /**\r\n * Basically the same as `bigNumberPrefixes`, except base for calculation\r\n * is not thousand but byte (1024).\r\n *\r\n * The modifier is \"b\".\r\n *\r\n * ```Text\r\n * {myfield.formatNumber(\"#,###.00b\")}\r\n * ```\r\n *\r\n * The above `2048` will change to `2K`.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/formatters/formatting-numbers/} Tutorial on number formatting\r\n * @param prefixes Prefixes for byte-size formatting\r\n */\r\n set: function (prefixes) {\r\n this._bytePrefixes = prefixes;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(NumberFormatter.prototype, \"outputFormat\", {\r\n /**\r\n * @ignore Exclude from docs\r\n * @return Output format\r\n */\r\n get: function () {\r\n return this._outputFormat;\r\n },\r\n /**\r\n * Ooutput format: \"svg\" or \"html\".\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Output format\r\n */\r\n set: function (outputFormat) {\r\n this._outputFormat = outputFormat.toLowerCase();\r\n this.invalidateSprite();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(NumberFormatter.prototype, \"forceLTR\", {\r\n get: function () {\r\n return this._forceLTR;\r\n },\r\n set: function (value) {\r\n this._forceLTR = value;\r\n this.invalidateSprite();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Replaces brackets with temporary placeholders.\r\n *\r\n * @ignore Exclude from docs\r\n * @param text Input text\r\n * @return Escaped text\r\n */\r\n NumberFormatter.prototype.escape = function (text) {\r\n return text.replace(\"||\", $strings.PLACEHOLDER2);\r\n };\r\n /**\r\n * Replaces placeholders back to brackets.\r\n *\r\n * @ignore Exclude from docs\r\n * @param text Escaped text\r\n * @return Unescaped text\r\n */\r\n NumberFormatter.prototype.unescape = function (text) {\r\n return text.replace($strings.PLACEHOLDER2, \"|\");\r\n };\r\n return NumberFormatter;\r\n}(BaseObject));\r\nexport { NumberFormatter };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"NumberFormatter\"] = NumberFormatter;\r\n","/**\r\n * Handles formatting of pseudo-markup in text.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { BaseObject } from \"../Base\";\r\nimport { AMElement } from \"../rendering/AMElement\";\r\nimport { Adapter } from \"../utils/Adapter\";\r\nimport { registry } from \"../Registry\";\r\nimport * as $strings from \"../utils/Strings\";\r\nimport * as $type from \"../utils/Type\";\r\n/**\r\n * Handles formatting of pseudo-markdown in text.\r\n *\r\n * @todo Encode < > in output\r\n * @todo Add more adapters\r\n * @important\r\n */\r\nvar TextFormatter = /** @class */ (function (_super) {\r\n __extends(TextFormatter, _super);\r\n /**\r\n * Constructor\r\n */\r\n function TextFormatter() {\r\n var _this = _super.call(this) || this;\r\n /**\r\n * Adapter.\r\n */\r\n _this.adapter = new Adapter(_this);\r\n _this.className = \"TextFormatter\";\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n TextFormatter.prototype.debug = function () { };\r\n /**\r\n * Formats the text according to specifications passed in.\r\n *\r\n * @param text Text to format\r\n * @param output Output format (svg, html)\r\n * @return Formatted text\r\n */\r\n TextFormatter.prototype.format = function (text, output) {\r\n // Apply default\r\n if (!$type.hasValue(output)) {\r\n output = \"svg\";\r\n }\r\n // Init return value\r\n var formatted = \"\";\r\n // Replace double (escaped) square spaces with remporary codes\r\n text = this.escape(text);\r\n // Divvy up the string by style tags\r\n var styles = text.match(/\\[([^\\]]*?)\\]/gm);\r\n if (!styles) {\r\n // Nothing to do here - no formatting elements\r\n return this.wrap(text, \"\", output);\r\n }\r\n // Get pure text - no style tags\r\n var texts = text.split(/\\[[^\\[\\]]*\\]/);\r\n // Go through each of the texts and wrap it in style tags\r\n for (var i = 0, len = texts.length; i < len; i++) {\r\n // Get text bit\r\n var t = texts[i];\r\n // Check if string is empty\r\n if (t === \"\") {\r\n continue;\r\n }\r\n // Run through an adapter\r\n t = this.adapter.apply(\"chunk\", t);\r\n // Get related style\r\n var s = \"\";\r\n if (i > 0) {\r\n s = styles[i - 1].replace('[', '').replace(']', '');\r\n }\r\n // Wrap text in tag\r\n formatted += this.wrap(t, s, output);\r\n }\r\n // Replace placeholders back\r\n formatted = this.unescape(formatted);\r\n // Return result\r\n return this.cleanUp(formatted);\r\n };\r\n /**\r\n * Replaces brackets with temporary placeholders.\r\n *\r\n * @ignore Exclude from docs\r\n * @param text Input text\r\n * @return Escaped text\r\n */\r\n TextFormatter.prototype.escape = function (text) {\r\n return text.\r\n replace(/\\[\\[/g, registry.getPlaceholder(\"1\")).\r\n replace(/([^\\/\\]]{1})\\]\\]/g, \"$1\" + registry.getPlaceholder(\"2\")).\r\n replace(/\\]\\]/g, registry.getPlaceholder(\"2\")).\r\n replace(/\\{\\{/g, registry.getPlaceholder(\"3\")).\r\n replace(/\\}\\}/g, registry.getPlaceholder(\"4\")).\r\n replace(/\\'\\'/g, registry.getPlaceholder(\"5\"));\r\n };\r\n /**\r\n * Replaces placeholders back to brackets.\r\n *\r\n * @ignore Exclude from docs\r\n * @param text Escaped text\r\n * @return Unescaped text\r\n */\r\n TextFormatter.prototype.unescape = function (text) {\r\n return text.\r\n replace(new RegExp(registry.getPlaceholder(\"1\"), \"g\"), \"[[\").\r\n replace(new RegExp(registry.getPlaceholder(\"2\"), \"g\"), \"]]\").\r\n replace(new RegExp(registry.getPlaceholder(\"3\"), \"g\"), \"{{\").\r\n replace(new RegExp(registry.getPlaceholder(\"4\"), \"g\"), \"}}\").\r\n replace(new RegExp(registry.getPlaceholder(\"5\"), \"g\"), \"''\");\r\n };\r\n /**\r\n * Cleans up the text text for leftover double square brackets.\r\n *\r\n * @ignore Exclude from docs\r\n * @param text Input text\r\n * @return Cleaned up text\r\n */\r\n TextFormatter.prototype.cleanUp = function (text) {\r\n return text.\r\n replace(/\\[\\[/g, \"[\").\r\n replace(/\\]\\]/g, \"]\").\r\n replace(/\\{\\{/g, \"{\").\r\n replace(/\\}\\}/g, \"}\").\r\n replace(/\\'\\'/g, \"'\");\r\n };\r\n /**\r\n * Wraps text into corresponding tags.\r\n *\r\n * @ignore Exclude from docs\r\n * @param text Text to wrap\r\n * @param style Styles\r\n * @param output Format to output in (svg, html)\r\n * @return Formatted string\r\n */\r\n TextFormatter.prototype.wrap = function (text, style, output) {\r\n if (style === \"\" || style === \"/\") {\r\n //return text;\r\n style = \"\";\r\n }\r\n switch (output) {\r\n case \"html\":\r\n return this.wrapHtml(text, this.translateStyleShortcuts(style));\r\n default:\r\n return this.wrapSvg(text, this.translateStyleShortcuts(style));\r\n }\r\n };\r\n /**\r\n * Wraps text in styled SVG tag.\r\n *\r\n * @ignore Exclude from docs\r\n * @param text Text to wrap\r\n * @param style Style property\r\n * @return Formatted tag\r\n */\r\n TextFormatter.prototype.wrapSvg = function (text, style) {\r\n if (style === \"\") {\r\n return \"<tspan>\" + text + \"</tspan>\";\r\n }\r\n else {\r\n return \"<tspan style='\" + style + \"'>\" + text + \"</tspan>\";\r\n }\r\n };\r\n /**\r\n * Returns an SVG `<tspan>` element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param text Text\r\n * @param style Style\r\n * @return Element\r\n */\r\n TextFormatter.prototype.getSvgElement = function (text, style) {\r\n var element = new AMElement(\"tspan\");\r\n element.textContent = text;\r\n if (style) {\r\n element.node.setAttribute(\"style\", style);\r\n }\r\n return element;\r\n };\r\n /**\r\n * Wraps text in HTML <span> tag.\r\n *\r\n * @ignore Exclude from docs\r\n * @param text Text to wrap\r\n * @param style Style property\r\n * @return Formatted tag\r\n * @todo Translate SVG styles into HTML ones\r\n */\r\n TextFormatter.prototype.wrapHtml = function (text, style) {\r\n if (style === \"\") {\r\n return \"<span>\" + text + \"</span>\";\r\n }\r\n else {\r\n return \"<span style='\" + this.styleSvgToHtml(style) + \"'>\" + text + \"</span>\";\r\n }\r\n };\r\n /**\r\n * Returns an HTML `<span>` element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param text Text/HTML\r\n * @param style Style definition\r\n * @return HTML element\r\n */\r\n TextFormatter.prototype.getHtmlElement = function (text, style) {\r\n var element = document.createElement(\"span\");\r\n element.innerHTML = text;\r\n if (style) {\r\n element.setAttribute(\"style\", style);\r\n }\r\n return element;\r\n };\r\n /**\r\n * Trabslates SVG CSS into HTML CSS.\r\n *\r\n * @ignore Exclude from docs\r\n * @param style SVG CSS\r\n * @return HTML CSS\r\n * @todo Implement actual translation\r\n */\r\n TextFormatter.prototype.styleSvgToHtml = function (style) {\r\n style = style.replace(/fill:/, \"color:\");\r\n return style;\r\n };\r\n /**\r\n * Translates style shortcuts into full styles, i.e.:\r\n * \"bold\" => \"font-weight: bold\"\r\n * \"#f00\" => \"fill: #f00\"\r\n *\r\n * @ignore Exclude from docs\r\n * @param style Untranslated style\r\n * @return Translated style\r\n * @todo Implement actual translation\r\n */\r\n TextFormatter.prototype.translateStyleShortcuts = function (style) {\r\n if (style == \"\" || style == \"[ ]\") {\r\n return \"\";\r\n }\r\n var cached = registry.getCache(\"translateStyleShortcuts_\" + style);\r\n if (cached) {\r\n return cached;\r\n }\r\n // Pre-process quoted text\r\n var q = style.match(/('[^']*')|(\"[^\"]*\")/gi);\r\n if (q) {\r\n for (var i = 0; i < q.length; i++) {\r\n style = style.replace(q[i], q[i].replace(/['\"]*/g, \"\").replace(/[ ]+/g, \"+\"));\r\n }\r\n }\r\n // Get style parts\r\n var b = style.match(/([\\w\\-]*:[\\s]?[^;\\s\\]]*)|(\\#[\\w]{1,6})|([\\w]+)|(\\/)/gi);\r\n // Empty?\r\n if (!b) {\r\n return style;\r\n }\r\n // Check each part\r\n for (var i = 0; i < b.length; i++) {\r\n if (b[i].match(/^bold$/i)) {\r\n // Bold\r\n b[i] = \"font-weight:\" + b[i];\r\n }\r\n else if (b[i] == \"/\") {\r\n // Just closing tag\r\n // Do nothing\r\n b[i] = \"\";\r\n }\r\n else if (!b[i].match(/:/)) {\r\n // Color\r\n b[i] = \"fill:\" + b[i];\r\n }\r\n else {\r\n b[i] = b[i].replace(/\\+/g, \" \");\r\n }\r\n }\r\n var res = b.join(';');\r\n registry.setCache(\"translateStyleShortcuts_\" + style, res);\r\n return res;\r\n };\r\n /**\r\n * Splits string into chunks. (style blocks, quoted blocks, regular blocks)\r\n *\r\n * If the second parameter `quotedBlocks` is set to `true` this method will\r\n * also single out text blocks enclosed within single quotes that no\r\n * formatting should be applied to, and they should be displayed as is.\r\n *\r\n * Default for the above is `false`, so that you can use single quote in text\r\n * without escaping it.\r\n *\r\n * If enabled, single quotes can be escaped by doubling it - adding two\r\n * single quotes, which will be replaced by a one single quote in the final\r\n * output.\r\n *\r\n * @ignore Exclude from docs\r\n * @param text Text to chunk\r\n * @param quotedBlocks Use quoted blocks\r\n * @param noFormatting Formatting blocks will be treated as regular text\r\n * @return Array of string chunks\r\n */\r\n TextFormatter.prototype.chunk = function (text, quotedBlocks, noFormatting) {\r\n if (quotedBlocks === void 0) { quotedBlocks = false; }\r\n if (noFormatting === void 0) { noFormatting = false; }\r\n // Init result\r\n var res = [];\r\n // Replace double (escaped) square spaces and quotes with temporary codes\r\n text = this.escape(text);\r\n // Deal with style blocks\r\n var chunks = quotedBlocks ? text.split(\"'\") : [text];\r\n for (var i = 0; i < chunks.length; i++) {\r\n var chunk = chunks[i];\r\n // Empty?\r\n if (chunk === \"\") {\r\n continue;\r\n }\r\n if ((i % 2) === 0) {\r\n // Text outside quotes\r\n // Parse for style blocks which are \"text\" chunks, the rest chunks are\r\n // \"value\"\r\n chunk = chunk.replace(/\\]\\[/g, \"]\" + $strings.PLACEHOLDER + \"[\");\r\n chunk = chunk.replace(/\\[\\]/g, \"[ ]\");\r\n var chunks2 = chunk.split(/[\\[\\]]+/);\r\n for (var i2 = 0; i2 < chunks2.length; i2++) {\r\n var chunk2 = this.cleanUp(this.unescape(chunks2[i2]));\r\n // Placeholder?\r\n if (chunk2 === $strings.PLACEHOLDER) {\r\n continue;\r\n }\r\n // Empty?\r\n if (chunk2 === \"\") {\r\n continue;\r\n }\r\n // Block or value\r\n if ((i2 % 2) === 0) {\r\n res.push({\r\n \"type\": \"value\",\r\n \"text\": this.adapter.apply(\"chunk\", chunk2)\r\n });\r\n }\r\n else {\r\n res.push({\r\n \"type\": noFormatting ? \"value\" : \"format\",\r\n \"text\": \"[\" + chunk2 + \"]\"\r\n });\r\n }\r\n }\r\n }\r\n else {\r\n // A text within doublequotes\r\n // All chunks are \"text\"\r\n var chunks2 = chunk.split(/[\\[\\]]+/);\r\n for (var i2 = 0; i2 < chunks2.length; i2++) {\r\n var chunk2 = this.cleanUp(this.unescape(chunks2[i2]));\r\n // Empty?\r\n if (chunk2 === \"\") {\r\n continue;\r\n }\r\n // Block or text\r\n if ((i2 % 2) === 0) {\r\n res.push({\r\n \"type\": \"text\",\r\n \"text\": chunk2\r\n });\r\n }\r\n else if (this.isImage(chunk2)) {\r\n res.push({\r\n \"type\": \"image\",\r\n \"text\": \"[\" + chunk2 + \"]\"\r\n });\r\n }\r\n else {\r\n res.push({\r\n \"type\": \"format\",\r\n \"text\": \"[\" + chunk2 + \"]\"\r\n });\r\n }\r\n }\r\n }\r\n }\r\n return res;\r\n };\r\n /**\r\n * Checks if supplied format contains image information and should be\r\n * formatted as such.\r\n * I.e.: `[img: myImage.png]`\r\n *\r\n * @ignore Exclude from docs\r\n * @param text Format\r\n * @return `true` if it is an image\r\n */\r\n TextFormatter.prototype.isImage = function (text) {\r\n return text.match(/img[ ]?:/) ? true : false;\r\n };\r\n return TextFormatter;\r\n}(BaseObject));\r\nexport { TextFormatter };\r\nvar formatter;\r\n/**\r\n * Returns the global instance of [[TextFormatter]].\r\n *\r\n * All classes and instances should reuse this universal text formatter,\r\n * rather than create their own instance of it.\r\n */\r\nexport function getTextFormatter() {\r\n if (formatter == null) {\r\n formatter = new TextFormatter();\r\n }\r\n return formatter;\r\n}\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"TextFormatter\"] = TextFormatter;\r\n","/**\r\n * Functionality related to inertia\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { BaseObject } from \"../Base\";\r\nimport { getInteraction } from \"./Interaction\";\r\nimport { AnimationDisposer } from \"../utils/Animation\";\r\nimport * as $type from \"../utils/Type\";\r\n/**\r\n * A point of inertia is to simulate gradually drecreasing motion even after\r\n * actual interaction by user, that caused it, has already ended.\r\n *\r\n * [[Inertia]] object will continue triggering the same [[Sprite]] handlers\r\n * as if the interaction was still happening, gradually reducing\r\n * shift/angle/scale values until full stop.\r\n *\r\n * Basically, from the target element's point of view, while inertia is\r\n * playing, it is still being interacted with by user, albeit with a\r\n * decreasing speed.\r\n */\r\nvar Inertia = /** @class */ (function (_super) {\r\n __extends(Inertia, _super);\r\n /**\r\n * Constructor\r\n */\r\n function Inertia(interaction, type, point, startPoint) {\r\n var _this = \r\n // Init\r\n _super.call(this) || this;\r\n /**\r\n * List of animations currently playing.\r\n */\r\n _this.animations = [];\r\n _this.className = \"Inertia\";\r\n _this.interaction = interaction;\r\n _this.type = type;\r\n _this.point = point;\r\n _this.startPoint = startPoint;\r\n // Make animations disposable\r\n _this._disposers.push(new AnimationDisposer(_this.animations));\r\n return _this;\r\n }\r\n Object.defineProperty(Inertia.prototype, \"x\", {\r\n /**\r\n * Returns current X coordinate.\r\n *\r\n * @return X\r\n */\r\n get: function () {\r\n return this.point.x;\r\n },\r\n /**\r\n * Sets current X coordinate.\r\n *\r\n * Will trigger \"drag\" event for the target element.\r\n *\r\n * @param value X\r\n */\r\n set: function (value) {\r\n if ($type.isNumber(value)) {\r\n this.point.x = value;\r\n this.handleMove();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Inertia.prototype, \"y\", {\r\n /**\r\n * Returns current Y coordinate.\r\n *\r\n * @return Y\r\n */\r\n get: function () {\r\n return this.point.y;\r\n },\r\n /**\r\n * Sets current Y coordinate.\r\n *\r\n * Will trigger \"drag\" event for the target element.\r\n *\r\n * @param value Y\r\n */\r\n set: function (value) {\r\n if ($type.isNumber(value)) {\r\n this.point.y = value;\r\n this.handleMove();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Simulates dragging of element.\r\n */\r\n Inertia.prototype.handleMove = function () {\r\n // Prepare {InteractionEvent} object\r\n if (this.interaction.events.isEnabled(\"drag\")) {\r\n var imev = {\r\n type: \"drag\",\r\n target: this.interaction,\r\n shift: {\r\n x: this.x - this.startPoint.x,\r\n y: this.y - this.startPoint.y\r\n },\r\n startPoint: this.startPoint,\r\n point: {\r\n x: this.x,\r\n y: this.y\r\n },\r\n touch: false\r\n };\r\n // Call handler\r\n this.interaction.events.dispatchImmediately(\"drag\", imev);\r\n }\r\n };\r\n /**\r\n * Finishes up the inertia animation. (removes reference to this animation\r\n * object)\r\n */\r\n Inertia.prototype.done = function () {\r\n // Remove inertia animation from the object\r\n this.interaction.inertias.removeKey(this.type);\r\n // Move ended\r\n if (this.type === \"move\") {\r\n getInteraction().processDragStop(this.interaction);\r\n }\r\n // Destroy\r\n this.dispose();\r\n };\r\n return Inertia;\r\n}(BaseObject));\r\nexport { Inertia };\r\n","/**\r\n * Interaction manages all aspects of user interaction - mouse move,\r\n * click, hover, drag events, touch gestures.\r\n *\r\n * [[InteractionObject]] elements that want to use certain events, must attach event\r\n * listeners to Interaction instance.\r\n *\r\n * Interaction itself will not modify [[InteractionObject]] elements, it will be up to\r\n * those elements to handle interaction information received via event triggers.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { BaseObjectEvents } from \"../Base\";\r\nimport { List } from \"../utils/List\";\r\nimport { Animation } from \"../utils/Animation\";\r\nimport { MultiDisposer } from \"../utils/Disposer\";\r\nimport { InteractionObject } from \"./InteractionObject\";\r\nimport { InteractionKeyboardObject } from \"./InteractionKeyboardObject\";\r\nimport { Dictionary } from \"../utils/Dictionary\";\r\nimport { Inertia } from \"./Inertia\";\r\nimport { addEventListener } from \"../utils/DOM\";\r\nimport { keyboard } from \"../utils/Keyboard\";\r\nimport { system } from \"./../System\";\r\nimport { options } from \"./../Options\";\r\nimport * as $ease from \"../utils/Ease\";\r\nimport * as $math from \"../utils/Math\";\r\nimport * as $array from \"../utils/Array\";\r\nimport * as $dom from \"../utils/DOM\";\r\nimport * as $iter from \"../utils/Iterator\";\r\nimport * as $type from \"../utils/Type\";\r\nimport * as $time from \"../utils/Time\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n* Interaction manages all aspects of user interaction - mouse move,\r\n* click, hover, drag events, touch gestures.\r\n*\r\n* [[InteractionObject]] elements that want to use certain events, must attach event\r\n* listeners to Interaction instance.\r\n*\r\n* Interaction itself will not modify [[InteractionObject]] elements, it will be up to\r\n* those elements to handle interaction information received via event triggers.\r\n*\r\n* @see {@link IInteractionEvents} for a list of available events\r\n*/\r\nvar Interaction = /** @class */ (function (_super) {\r\n __extends(Interaction, _super);\r\n /**\r\n * Constructor. Sets up universal document-wide move events to handle stuff\r\n * outside particular chart container.\r\n */\r\n function Interaction() {\r\n var _this = \r\n // Call super\r\n _super.call(this) || this;\r\n /**\r\n * An indicator of global events were already initialized.\r\n */\r\n _this._globalEventsAdded = false;\r\n /**\r\n * Holds which mouse event listeners to use.\r\n */\r\n _this._pointerEvents = {\r\n \"pointerdown\": \"mousedown\",\r\n \"pointerup\": \"mouseup\",\r\n \"pointermove\": \"mousemove\",\r\n \"pointercancel\": \"mouseup\",\r\n \"pointerover\": \"mouseover\",\r\n \"pointerout\": \"mouseout\",\r\n \"wheel\": \"wheel\"\r\n };\r\n /**\r\n * Indicates if Interaction should use only \"pointer\" type events, like\r\n * \"pointermove\", available in all modern browsers, ignoring \"legacy\"\r\n * events, like \"touchmove\".\r\n */\r\n _this._usePointerEventsOnly = false;\r\n /**\r\n * Use only touch events (for touch only devices such as tablets and phones)\r\n */\r\n _this._useTouchEventsOnly = false;\r\n /**\r\n * Add special hover events. Normally, touch device tap will also simulate\r\n * hover event. On some devices (ahem iOS) we want to prevent that so that\r\n * over/out events are not duplicated.\r\n */\r\n _this._addHoverEvents = true;\r\n /**\r\n * Indicates if passive mode options is supported by this browser.\r\n */\r\n _this._passiveSupported = false;\r\n /**\r\n * Holds list of delayed events\r\n */\r\n _this._delayedEvents = { out: [] };\r\n /**\r\n * List of objects that current have a pointer hovered over them.\r\n */\r\n _this.overObjects = new List();\r\n /**\r\n * List of objects that currently has a pressed pointer.\r\n */\r\n _this.downObjects = new List();\r\n /**\r\n * List of objects that need mouse position to be reported to them.\r\n */\r\n _this.trackedObjects = new List();\r\n /**\r\n * List of objects that are currently being dragged.\r\n */\r\n _this.transformedObjects = new List();\r\n /**\r\n * Holds all known pointers.\r\n */\r\n _this.pointers = new Dictionary();\r\n /**\r\n * Inertia options that need to be applied to after element drag, if it's\r\n * `inert = true`.\r\n *\r\n * This is just a default, which can and probably will be overridden by\r\n * actual elements.\r\n */\r\n _this.inertiaOptions = new Dictionary();\r\n /**\r\n * Default options for click events. These can be overridden in\r\n * [[InteractionObject]].\r\n */\r\n _this.hitOptions = {\r\n \"doubleHitTime\": 300,\r\n //\"delayFirstHit\": false,\r\n \"hitTolerance\": 10,\r\n \"noFocus\": true\r\n };\r\n /**\r\n * Default options for hover events. These can be overridden in\r\n * [[InteractionObject]].\r\n */\r\n _this.hoverOptions = {\r\n \"touchOutBehavior\": \"leave\",\r\n \"touchOutDelay\": 1000\r\n };\r\n /**\r\n * Default options for detecting a swipe gesture. These can be overridden in\r\n * [[InteractionObject]].\r\n */\r\n _this.swipeOptions = {\r\n \"time\": 500,\r\n \"verticalThreshold\": 75,\r\n \"horizontalThreshold\": 30\r\n };\r\n /**\r\n * Default options for keyboard operations. These can be overridden in\r\n * [[InteractionObject]].\r\n */\r\n _this.keyboardOptions = {\r\n \"speed\": 0.1,\r\n \"accelleration\": 1.2,\r\n \"accellerationDelay\": 2000\r\n };\r\n /**\r\n * Default options for keyboard operations. These can be overridden in\r\n * [[InteractionObject]].\r\n *\r\n * @since 4.5.14\r\n */\r\n _this.mouseOptions = {\r\n \"sensitivity\": 1\r\n };\r\n // Set class name\r\n _this.className = \"Interaction\";\r\n // Create InteractionObject for <body>\r\n _this.body = _this.getInteraction(document.body);\r\n _this._disposers.push(_this.body);\r\n // Detect browser capabilities and determine what event listeners to use\r\n if (window.hasOwnProperty(\"PointerEvent\")) {\r\n // IE10+/Edge without touch controls enabled\r\n _this._pointerEvents.pointerdown = \"pointerdown\";\r\n _this._pointerEvents.pointerup = \"pointerup\";\r\n _this._pointerEvents.pointermove = \"pointermove\";\r\n _this._pointerEvents.pointercancel = \"pointercancel\";\r\n _this._pointerEvents.pointerover = \"pointerover\";\r\n _this._pointerEvents.pointerout = \"pointerout\";\r\n //this._usePointerEventsOnly = true;\r\n }\r\n else if (window.hasOwnProperty(\"MSPointerEvent\")) {\r\n // IE9\r\n _this._pointerEvents.pointerdown = \"MSPointerDown\";\r\n _this._pointerEvents.pointerup = \"MSPointerUp\";\r\n _this._pointerEvents.pointermove = \"MSPointerMove\";\r\n _this._pointerEvents.pointercancel = \"MSPointerUp\";\r\n _this._pointerEvents.pointerover = \"MSPointerOver\";\r\n _this._pointerEvents.pointerout = \"MSPointerOut\";\r\n //this._usePointerEventsOnly = true;\r\n }\r\n else if ((typeof matchMedia !== \"undefined\") && matchMedia('(pointer:fine)').matches) {\r\n // This is only for Safari as it does not support PointerEvent\r\n // Do nothing and let it use regular `mouse*` events\r\n // Hi Apple ;)\r\n // Additionally disable hover events for iOS devices\r\n if ('ontouchstart' in window) {\r\n _this._addHoverEvents = false;\r\n _this._useTouchEventsOnly = true;\r\n }\r\n }\r\n else if (window.navigator.userAgent.match(/MSIE /)) {\r\n // Oh looky, an MSIE that does not support PointerEvent. Hi granpa IE9!\r\n _this._usePointerEventsOnly = true;\r\n }\r\n else if (_this.fullFF()) {\r\n // Old FF, let's use regular events.\r\n // (Newer FFs would be detected by the PointerEvent availability check)\r\n _this._usePointerEventsOnly = true;\r\n }\r\n else {\r\n // Uses defaults for normal browsers\r\n // We also assume that this must be a touch device that does not have\r\n // any pointer events\r\n _this._useTouchEventsOnly = true;\r\n }\r\n // Detect if device has a mouse\r\n // This is turning out to be not reliable\r\n // @todo remove\r\n /*if (!window.navigator.msPointerEnabled && (typeof matchMedia !== \"undefined\") && !matchMedia('(pointer:fine)').matches && !this.fullFF()) {\r\n this._useTouchEventsOnly = true;\r\n }*/\r\n // Detect proper mouse wheel events\r\n if (\"onwheel\" in document.createElement(\"div\")) {\r\n // Modern browsers\r\n _this._pointerEvents.wheel = \"wheel\";\r\n }\r\n else if ($type.hasValue(document.onmousewheel)) {\r\n // Webkit and IE support at least \"mousewheel\"\r\n _this._pointerEvents.wheel = \"mousewheel\";\r\n }\r\n // Set up default inertia options\r\n _this.inertiaOptions.setKey(\"move\", {\r\n \"time\": 100,\r\n \"duration\": 500,\r\n \"factor\": 1,\r\n \"easing\": $ease.polyOut3\r\n });\r\n _this.inertiaOptions.setKey(\"resize\", {\r\n \"time\": 100,\r\n \"duration\": 500,\r\n \"factor\": 1,\r\n \"easing\": $ease.polyOut3\r\n });\r\n // Set the passive mode support\r\n _this._passiveSupported = Interaction.passiveSupported;\r\n // Apply theme\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * This is a nasty detection for Firefox. The reason why we have is that\r\n * Firefox ESR version does not support matchMedia correctly.\r\n *\r\n * On iOS, Firefox uses different userAgent, so we don't have to detect iOS.\r\n *\r\n * @return Full Firefox?\r\n */\r\n Interaction.prototype.fullFF = function () {\r\n return (window.navigator.userAgent.match(/Firefox/)) && !(window.navigator.userAgent.match(/Android/));\r\n };\r\n Interaction.prototype.debug = function () { };\r\n /**\r\n * ==========================================================================\r\n * Processing\r\n * ==========================================================================\r\n * @hidden\r\n */\r\n /**\r\n * Sets up global events.\r\n *\r\n * We need this so that we can track drag movement beyond chart's container.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Interaction.prototype.addGlobalEvents = function () {\r\n var _this = this;\r\n if (!this._globalEventsAdded) {\r\n if (!this._useTouchEventsOnly) {\r\n this._disposers.push(addEventListener(document, this._pointerEvents.pointerdown, function (ev) { _this.handleGlobalPointerDown(ev); }));\r\n this._disposers.push(addEventListener(document, this._pointerEvents.pointermove, function (ev) { _this.handleGlobalPointerMove(ev); }));\r\n this._disposers.push(addEventListener(document, this._pointerEvents.pointerup, function (ev) { _this.handleGlobalPointerUp(ev); }));\r\n this._disposers.push(addEventListener(document, this._pointerEvents.pointercancel, function (ev) { _this.handleGlobalPointerUp(ev, true); }));\r\n this._disposers.push(addEventListener(document, \"mouseenter\", function (ev) {\r\n if (!$type.hasValue(ev.relatedTarget) && (ev.buttons == 0 || ev.which == 0)) {\r\n _this.handleDocumentLeave(ev);\r\n }\r\n }));\r\n }\r\n // No need to duplicate events for hubrid systems that support both\r\n // pointer events and touch events. Touch events are need only for\r\n // some touch-only systems, like Mobile Safari.\r\n if (!this._usePointerEventsOnly) {\r\n this._disposers.push(addEventListener(document, \"touchstart\", function (ev) { _this.handleGlobalTouchStart(ev); }));\r\n this._disposers.push(addEventListener(document, \"touchmove\", function (ev) { _this.handleGlobalTouchMove(ev); }));\r\n this._disposers.push(addEventListener(document, \"touchend\", function (ev) { _this.handleGlobalTouchEnd(ev); }));\r\n }\r\n this._disposers.push(addEventListener(document, \"keydown\", function (ev) { _this.handleGlobalKeyDown(ev); }));\r\n this._disposers.push(addEventListener(document, \"keyup\", function (ev) { _this.handleGlobalKeyUp(ev); }));\r\n this._globalEventsAdded = true;\r\n }\r\n };\r\n /**\r\n * Sets if [[InteractionObject]] is clickable.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io [[InteractionObject]] instance\r\n */\r\n Interaction.prototype.processClickable = function (io) {\r\n // Add or remove touch events\r\n this.processTouchable(io);\r\n };\r\n /**\r\n * Sets if [[InteractionObject]] will display context menu when right-clicked.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io [[InteractionObject]] instance\r\n */\r\n Interaction.prototype.processContextMenu = function (io) {\r\n if (io.contextMenuDisabled) {\r\n if (!io.eventDisposers.hasKey(\"contextMenuDisabled\")) {\r\n io.eventDisposers.setKey(\"contextMenuDisabled\", addEventListener(io.element, \"contextmenu\", function (e) {\r\n e.preventDefault();\r\n }));\r\n }\r\n }\r\n else {\r\n if (io.eventDisposers.hasKey(\"contextMenuDisabled\")) {\r\n io.eventDisposers.getKey(\"contextMenuDisabled\").dispose();\r\n }\r\n }\r\n };\r\n /**\r\n * Sets if [[InteractionObject]] is hoverable.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io [[InteractionObject]] instance\r\n */\r\n Interaction.prototype.processHoverable = function (io) {\r\n var _this = this;\r\n if (io.hoverable || io.trackable) {\r\n // Add global events\r\n this.addGlobalEvents();\r\n // Add hover styles\r\n this.applyCursorOverStyle(io);\r\n // Add local events\r\n if (!io.eventDisposers.hasKey(\"hoverable\") && this._addHoverEvents) {\r\n io.eventDisposers.setKey(\"hoverable\", new MultiDisposer([\r\n addEventListener(io.element, this._pointerEvents.pointerout, function (e) { return _this.handlePointerOut(io, e); }),\r\n addEventListener(io.element, this._pointerEvents.pointerover, function (e) { return _this.handlePointerOver(io, e); })\r\n ]));\r\n }\r\n if (io.trackable) {\r\n //sprite.addEventListener(\"touchmove\", this.handleTouchMove, false, this);\r\n }\r\n }\r\n else {\r\n var disposer = io.eventDisposers.getKey(\"hoverable\");\r\n if (disposer != null) {\r\n disposer.dispose();\r\n io.eventDisposers.removeKey(\"hoverable\");\r\n }\r\n }\r\n // Add or remove touch events\r\n this.processTouchable(io);\r\n };\r\n /**\r\n * Sets up [[InteractionObject]] as movable. Movable can be any\r\n * transformation, e.g. drag, swipe, resize, track.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n */\r\n Interaction.prototype.processMovable = function (io) {\r\n // Add unified events\r\n if (io.draggable || io.swipeable || io.trackable || io.resizable) {\r\n // Prep the element\r\n if (!this.isGlobalElement(io) && !io.isTouchProtected) {\r\n this.prepElement(io);\r\n }\r\n // Add hover styles\r\n this.applyCursorOverStyle(io);\r\n }\r\n // Add or remove touch events\r\n this.processTouchable(io);\r\n };\r\n /**\r\n * Checks if [[InteractionObject]] is trackable and sets relative events.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n */\r\n Interaction.prototype.processTrackable = function (io) {\r\n this.processHoverable(io);\r\n this.processMovable(io);\r\n if (io.trackable) {\r\n this.trackedObjects.moveValue(io);\r\n }\r\n else {\r\n this.trackedObjects.removeValue(io);\r\n }\r\n };\r\n /**\r\n * Checks if [[InteractionObject]] is draggable.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n */\r\n Interaction.prototype.processDraggable = function (io) {\r\n this.processMovable(io);\r\n };\r\n /**\r\n * Checks if [[InteractionObject]] is swipeable and sets relative events.\r\n *\r\n * A swipe event is triggered when a horizontal drag of 75px or more (and\r\n * less than 30px vertically) occurs within 700 milliseconds. This can be\r\n * overridden in sprites [[swipeOptions]].\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n */\r\n Interaction.prototype.processSwipeable = function (io) {\r\n this.processMovable(io);\r\n };\r\n /**\r\n * Checks if [[InteractionObject]] is resizable and attaches required events\r\n * to it.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n */\r\n Interaction.prototype.processResizable = function (io) {\r\n this.processMovable(io);\r\n };\r\n /**\r\n * Checks if [[InteractionObject]] is supposed to capture mouse wheel events\r\n * and prepares it to catch those events.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n */\r\n Interaction.prototype.processWheelable = function (io) {\r\n var _this = this;\r\n if (io.wheelable) {\r\n //io.hoverable = true;\r\n if (!io.eventDisposers.hasKey(\"wheelable\")) {\r\n io.eventDisposers.setKey(\"wheelable\", new MultiDisposer([\r\n addEventListener(io.element, this._pointerEvents.wheel, function (e) { return _this.handleMouseWheel(io, e); }, this._passiveSupported ? { passive: false } : false),\r\n io.events.on(\"out\", function (e) {\r\n if (io.wheelable) {\r\n _this.unlockWheel();\r\n }\r\n }),\r\n io.events.on(\"over\", function (e) {\r\n //console.log(\"whelab over\")\r\n if (io.wheelable) {\r\n _this.lockWheel();\r\n }\r\n })\r\n ]));\r\n }\r\n }\r\n else {\r\n var disposer = io.eventDisposers.getKey(\"wheelable\");\r\n if (disposer != null) {\r\n disposer.dispose();\r\n io.eventDisposers.removeKey(\"wheelable\");\r\n }\r\n }\r\n };\r\n /**\r\n * Checks if [[InteractionObject]] is focusable. A focusable element is an\r\n * element that will be highlighted when users presses TAB key. If the\r\n * element is focusable, this function will attach relative focus/blur\r\n * events to it.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n */\r\n Interaction.prototype.processFocusable = function (io) {\r\n var _this = this;\r\n if (io.focusable === true && (io.tabindex > -1) && !this._useTouchEventsOnly) {\r\n if (!io.eventDisposers.hasKey(\"focusable\")) {\r\n io.eventDisposers.setKey(\"focusable\", new MultiDisposer([\r\n addEventListener(io.element, \"focus\", function (e) { return _this.handleFocus(io, e); }),\r\n addEventListener(io.element, \"blur\", function (e) { return _this.handleBlur(io, e); }),\r\n addEventListener(io.element, this._pointerEvents.pointerdown, function (e) { return _this.handleFocusBlur(io, e); }),\r\n addEventListener(io.element, \"touchstart\", function (e) { return _this.handleFocusBlur(io, e); }, this._passiveSupported ? { passive: false } : false)\r\n ]));\r\n }\r\n }\r\n else {\r\n var disposer = io.eventDisposers.getKey(\"focusable\");\r\n if (disposer != null) {\r\n disposer.dispose();\r\n io.eventDisposers.removeKey(\"focusable\");\r\n }\r\n }\r\n };\r\n /**\r\n * Checks if [[InteractionObject]] is \"touchable\". It means any interaction\r\n * whatsoever: mouse click, touch screen tap, swipe, drag, resize, etc.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n */\r\n Interaction.prototype.processTouchable = function (io) {\r\n var _this = this;\r\n // Add unified events\r\n if (io.clickable || io.hoverable || io.trackable || io.draggable || io.swipeable || io.resizable) {\r\n // Add global events\r\n this.addGlobalEvents();\r\n // Add local events\r\n if (!io.eventDisposers.hasKey(\"touchable\")) {\r\n if (!this._useTouchEventsOnly && !this._usePointerEventsOnly) {\r\n io.eventDisposers.setKey(\"touchable\", new MultiDisposer([\r\n addEventListener(io.element, this._pointerEvents.pointerdown, function (e) { return _this.handlePointerDown(io, e); }),\r\n addEventListener(io.element, \"touchstart\", function (e) { return _this.handleTouchDown(io, e); }, this._passiveSupported ? { passive: false } : false)\r\n ]));\r\n }\r\n else if (!this._useTouchEventsOnly) {\r\n io.eventDisposers.setKey(\"touchable\", addEventListener(io.element, this._pointerEvents.pointerdown, function (e) { return _this.handlePointerDown(io, e); }));\r\n }\r\n else if (!this._usePointerEventsOnly) {\r\n io.eventDisposers.setKey(\"touchable\", addEventListener(io.element, \"touchstart\", function (e) { return _this.handleTouchDown(io, e); }, this._passiveSupported ? { passive: false } : false));\r\n }\r\n }\r\n }\r\n else {\r\n var disposer = io.eventDisposers.getKey(\"touchable\");\r\n if (disposer != null) {\r\n disposer.dispose();\r\n io.eventDisposers.removeKey(\"touchable\");\r\n }\r\n }\r\n };\r\n /**\r\n * ==========================================================================\r\n * Non-pointer events\r\n * ==========================================================================\r\n * @hidden\r\n */\r\n /**\r\n * Dispatches \"focus\" event when element gains focus.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n * @param ev Original event\r\n */\r\n Interaction.prototype.handleFocus = function (io, ev) {\r\n if (!io.focusable) {\r\n ev.preventDefault();\r\n return;\r\n }\r\n io.isFocused = true;\r\n if (io.events.isEnabled(\"focus\") && !system.isPaused) {\r\n var imev = {\r\n type: \"focus\",\r\n target: io,\r\n event: ev\r\n };\r\n io.events.dispatchImmediately(\"focus\", imev);\r\n }\r\n };\r\n /**\r\n * Used by regular click events to prevent focus if \"noFocus\" is set.\r\n *\r\n * This should not be called by \"focus\" handlers.\r\n *\r\n * @param io Element\r\n * @param ev Original event\r\n */\r\n Interaction.prototype.handleFocusBlur = function (io, ev) {\r\n if (io.focusable !== false && this.getHitOption(io, \"noFocus\")) {\r\n io.events.once(\"focus\", function () {\r\n io.events.disableType(\"blur\");\r\n $dom.blur();\r\n if (io.sprite) {\r\n io.sprite.handleBlur();\r\n }\r\n io.events.enableType(\"blur\");\r\n });\r\n }\r\n };\r\n /**\r\n * Dispatches \"blur\" event when element loses focus.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n * @param ev Original event\r\n */\r\n Interaction.prototype.handleBlur = function (io, ev) {\r\n if (!io.focusable) {\r\n ev.preventDefault();\r\n return;\r\n }\r\n io.isFocused = false;\r\n if (io.events.isEnabled(\"blur\") && !system.isPaused) {\r\n var imev = {\r\n type: \"blur\",\r\n target: io,\r\n event: ev\r\n };\r\n io.events.dispatchImmediately(\"blur\", imev);\r\n }\r\n };\r\n /**\r\n * ==========================================================================\r\n * Global keyboard-related even handlers\r\n * ==========================================================================\r\n * @hidden\r\n */\r\n /**\r\n * Checks if there is an item that has currently focus and that they key is\r\n * one of the directional keys. If both of the conditions are true, it\r\n * creates an object to simulate movement of dragable element with keyboard.\r\n *\r\n * @ignore Exclude from docs\r\n * @param ev An original keyboard event\r\n */\r\n Interaction.prototype.handleGlobalKeyDown = function (ev) {\r\n if (this.focusedObject) {\r\n if (keyboard.isKey(ev, \"esc\")) {\r\n // ESC removes focus\r\n $dom.blur();\r\n }\r\n else if (this.focusedObject.draggable && keyboard.isKey(ev, [\"up\", \"down\", \"left\", \"right\"])) {\r\n // Prevent scrolling of the document\r\n ev.preventDefault();\r\n // Get focused object\r\n var io = this.focusedObject;\r\n // Get particular key\r\n var disposerKey = \"interactionKeyboardObject\";\r\n // If such disposer already exists we know the event is going on so we\r\n // just move on\r\n if (io.eventDisposers.hasKey(disposerKey)) {\r\n return;\r\n }\r\n // Create a keyboard mover\r\n var ko = new InteractionKeyboardObject(io, ev);\r\n io.eventDisposers.setKey(disposerKey, ko);\r\n switch (keyboard.getEventKey(ev)) {\r\n case \"up\":\r\n ko.directionY = -1;\r\n break;\r\n case \"down\":\r\n ko.directionY = 1;\r\n break;\r\n case \"left\":\r\n ko.directionX = -1;\r\n break;\r\n case \"right\":\r\n ko.directionX = 1;\r\n break;\r\n }\r\n }\r\n }\r\n };\r\n /**\r\n * Dispatches related events when the keyboard key is realeasd.\r\n *\r\n * @ignore Exclude from docs\r\n * @param ev An original keyboard event\r\n */\r\n Interaction.prototype.handleGlobalKeyUp = function (ev) {\r\n var disposerKey = \"interactionKeyboardObject\";\r\n if (this.focusedObject) {\r\n var disposer = this.focusedObject.eventDisposers.getKey(disposerKey);\r\n if (disposer != null) {\r\n // Prevent scrolling of the document\r\n ev.preventDefault();\r\n // Dispose stuff\r\n disposer.dispose();\r\n this.focusedObject.eventDisposers.removeKey(disposerKey);\r\n }\r\n // Does focused object have \"hit\" event?\r\n var sprite = this.focusedObject.sprite;\r\n if (keyboard.isKey(ev, \"enter\") && sprite) {\r\n if (sprite.events.isEnabled(\"hit\") || sprite.events.isEnabled(\"toggled\")) {\r\n this.focusedObject.dispatchImmediately(\"hit\");\r\n }\r\n else if (sprite.showTooltipOn == \"hit\") {\r\n this.focusedObject.dispatchImmediately(\"up\");\r\n }\r\n }\r\n }\r\n };\r\n /**\r\n * ==========================================================================\r\n * Global pointer-related even handlers\r\n * ==========================================================================\r\n * @hidden\r\n */\r\n /**\r\n * Handler for a global \"pointermove\" event.\r\n *\r\n * @ignore Exclude from docs\r\n * @param ev Event object\r\n */\r\n Interaction.prototype.handleGlobalPointerMove = function (ev) {\r\n // Get pointer\r\n var pointer = this.getPointer(ev);\r\n // Update current point position\r\n pointer.point = this.getPointerPoint(ev);\r\n // Prepare and fire global event\r\n if (this.events.isEnabled(\"track\") && !system.isPaused) {\r\n var imev = {\r\n type: \"track\",\r\n target: this,\r\n event: ev,\r\n pointer: pointer,\r\n touch: pointer.touch\r\n };\r\n this.events.dispatchImmediately(\"track\", imev);\r\n }\r\n // Track\r\n this.addBreadCrumb(pointer, pointer.point);\r\n // Process further\r\n this.handleGlobalMove(pointer, ev);\r\n };\r\n /**\r\n * Handler for a global \"pointerdown\" event.\r\n *\r\n * @ignore Exclude from docs\r\n * @param ev Event object\r\n */\r\n Interaction.prototype.handleGlobalPointerDown = function (ev) {\r\n // Remove delayed hovers\r\n this.processDelayed();\r\n // Get pointer\r\n var pointer = this.getPointer(ev);\r\n // Prepare and fire global event\r\n if (this.events.isEnabled(\"down\") && !system.isPaused) {\r\n var imev = {\r\n type: \"down\",\r\n target: this,\r\n event: ev,\r\n pointer: pointer,\r\n touch: pointer.touch\r\n };\r\n this.events.dispatchImmediately(\"down\", imev);\r\n }\r\n };\r\n /**\r\n * Prevents touch action from firing.\r\n *\r\n * @ignore Exclude from docs\r\n * @param ev Event\r\n */\r\n Interaction.prototype.preventTouchAction = function (ev) {\r\n if (!ev.defaultPrevented) {\r\n ev.preventDefault();\r\n }\r\n };\r\n /**\r\n * Handler for a global \"pointerup\" event.\r\n *\r\n * @ignore Exclude from docs\r\n * @param ev Event object\r\n */\r\n Interaction.prototype.handleGlobalPointerUp = function (ev, cancelled) {\r\n if (cancelled === void 0) { cancelled = false; }\r\n // Get pointer\r\n var pointer = this.getPointer(ev);\r\n // Prepare and fire global event\r\n if (this.events.isEnabled(\"up\") && !system.isPaused) {\r\n var imev = {\r\n type: \"up\",\r\n target: this,\r\n event: ev,\r\n pointer: pointer,\r\n touch: pointer.touch\r\n };\r\n this.events.dispatchImmediately(\"up\", imev);\r\n }\r\n // Process further\r\n this.handleGlobalUp(pointer, ev, cancelled);\r\n };\r\n /**\r\n * ==========================================================================\r\n * Global touch-related even handlers\r\n * ==========================================================================\r\n */\r\n /**\r\n * Handler for a global \"touchmove\" event.\r\n *\r\n * @ignore Exclude from docs\r\n * @param ev Event object\r\n */\r\n Interaction.prototype.handleGlobalTouchMove = function (ev) {\r\n // Process each changed touch point\r\n for (var i = 0; i < ev.changedTouches.length; i++) {\r\n // Get pointer\r\n var pointer = this.getPointer(ev.changedTouches[i]);\r\n // Update current point position\r\n pointer.point = this.getPointerPoint(ev.changedTouches[i]);\r\n // Prepare and fire global event\r\n if (this.events.isEnabled(\"track\") && !system.isPaused) {\r\n var imev = {\r\n type: \"track\",\r\n target: this,\r\n event: ev,\r\n pointer: pointer,\r\n touch: pointer.touch\r\n };\r\n this.events.dispatchImmediately(\"track\", imev);\r\n }\r\n // Track\r\n this.addBreadCrumb(pointer, pointer.point);\r\n // Process further\r\n this.handleGlobalMove(pointer, ev);\r\n }\r\n };\r\n /**\r\n * Handler for a global \"touchstart\" event.\r\n *\r\n * @ignore Exclude from docs\r\n * @param ev Event object\r\n */\r\n Interaction.prototype.handleGlobalTouchStart = function (ev) {\r\n // Remove delayed hovers\r\n this.processDelayed();\r\n // Process each changed touch point\r\n for (var i = 0; i < ev.changedTouches.length; i++) {\r\n // Get pointer\r\n var pointer = this.getPointer(ev.changedTouches[i]);\r\n // Prepare and fire global event\r\n if (!this._usePointerEventsOnly && this.events.isEnabled(\"down\") && !system.isPaused) {\r\n var imev = {\r\n type: \"down\",\r\n target: this,\r\n event: ev,\r\n pointer: pointer,\r\n touch: pointer.touch\r\n };\r\n this.events.dispatchImmediately(\"down\", imev);\r\n }\r\n }\r\n };\r\n /**\r\n * Handler for a global \"touchend\" event.\r\n *\r\n * @ignore Exclude from docs\r\n * @param ev Event object\r\n */\r\n Interaction.prototype.handleGlobalTouchEnd = function (ev) {\r\n // Process each changed touch point\r\n for (var i = 0; i < ev.changedTouches.length; i++) {\r\n // Get pointer\r\n var pointer = this.getPointer(ev.changedTouches[i]);\r\n // Prepare and fire global event\r\n if (this.events.isEnabled(\"up\") && !system.isPaused) {\r\n var imev = {\r\n type: \"up\",\r\n target: this,\r\n event: ev,\r\n pointer: pointer,\r\n touch: pointer.touch\r\n };\r\n this.events.dispatchImmediately(\"up\", imev);\r\n }\r\n // Handle element-related events\r\n this.handleGlobalUp(pointer, ev);\r\n }\r\n };\r\n /**\r\n * ==========================================================================\r\n * Element-specific pointer-related even handlers\r\n * ==========================================================================\r\n * @hidden\r\n */\r\n /**\r\n * Handles event when pointer is over [[InteractionObject]] and button is\r\n * pressed.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n * @param ev Original event\r\n */\r\n Interaction.prototype.handlePointerDown = function (io, ev) {\r\n // Stop further propagation so we don't get multiple triggers on hybrid\r\n // devices (both mouse and touch capabilities)\r\n //ev.preventDefault();\r\n //ev.stopPropagation();\r\n //if (ev.defaultPrevented) {\r\n //}\r\n // Get pointer\r\n var pointer = this.getPointer(ev);\r\n // Ignore if it's anything but mouse's primary button\r\n if (!pointer.touch && ev.which != 1 && ev.which != 3) {\r\n return;\r\n }\r\n // Set mouse button\r\n pointer.button = ev.which;\r\n // Reset pointer\r\n this.resetPointer(pointer, ev);\r\n // Process down\r\n this.handleDown(io, pointer, ev);\r\n };\r\n /**\r\n * Handles event when [[InteractionObject]] is hovered by a mouse pointer.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n * @param ev Original event\r\n */\r\n Interaction.prototype.handlePointerOver = function (io, ev) {\r\n // Get pointer\r\n var pointer = this.getPointer(ev);\r\n // Process down\r\n this.handleOver(io, pointer, ev);\r\n };\r\n /**\r\n * Handles event when [[InteractionObject]] loses hover from a mouse pointer.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n * @param ev Original event\r\n */\r\n Interaction.prototype.handlePointerOut = function (io, ev) {\r\n // Get pointer\r\n var pointer = this.getPointer(ev);\r\n // Process down\r\n this.handleOut(io, pointer, ev);\r\n };\r\n /**\r\n * Handles event when mouse wheel is crolled over the [[InteractionObject]].\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n * @param ev Original event\r\n * @todo Investigate more-cross browser stuff https://developer.mozilla.org/en-US/docs/Web/Events/wheel\r\n */\r\n Interaction.prototype.handleMouseWheel = function (io, ev) {\r\n // Get pointer\r\n var pointer = this.getPointer(ev);\r\n // Update current point position\r\n pointer.point = this.getPointerPoint(ev);\r\n // Init delta values\r\n var deltaX = 0, deltaY = 0;\r\n // Set up modifier\r\n // This is needed because FireFox reports wheel deltas in \"lines\" instead\r\n // of pixels so we have to approximate pixel value\r\n var mod = 1;\r\n if (ev.deltaMode == 1) {\r\n mod = 50;\r\n }\r\n // Adjust configurable sensitivity\r\n mod *= this.getMouseOption(io, \"sensitivity\");\r\n // Calculate deltas\r\n if (ev instanceof WheelEvent) {\r\n deltaX = Math.round((-1 * ev.wheelDeltaX) || (ev.deltaX * mod));\r\n deltaY = Math.round((-1 * ev.wheelDeltaY) || (ev.deltaY * mod));\r\n }\r\n else {\r\n throw new Error(\"Invalid event type\");\r\n }\r\n // Handle the event\r\n this.handleWheel(io, pointer, deltaX, deltaY, ev);\r\n };\r\n /**\r\n * ==========================================================================\r\n * Element-specific touch-related even handlers\r\n * ==========================================================================\r\n * @hidden\r\n */\r\n /**\r\n * Handles an event when an [[InteractionObject]] is touched on a touch\r\n * device.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n * @param ev Original event\r\n */\r\n Interaction.prototype.handleTouchDown = function (io, ev) {\r\n // Stop further propagation so we don't get multiple triggers on hybrid\r\n // devices (both mouse and touch capabilities)\r\n //this.maybePreventDefault(io, ev);\r\n //return;\r\n // Process each changed touch point\r\n for (var i = 0; i < ev.changedTouches.length; i++) {\r\n // Get pointer\r\n var pointer = this.getPointer(ev.changedTouches[i]);\r\n this.maybePreventDefault(io, ev, pointer);\r\n // Reset pointer\r\n this.resetPointer(pointer, ev.changedTouches[i]);\r\n // Process down\r\n this.handleDown(io, pointer, ev);\r\n }\r\n };\r\n /**\r\n * ==========================================================================\r\n * Universal handlers\r\n * ==========================================================================\r\n * @hidden\r\n */\r\n /**\r\n * Handles click/tap. Checks for doublehit.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Interaction object\r\n * @param pointer Pointer\r\n * @param ev Original event\r\n */\r\n Interaction.prototype.handleHit = function (io, pointer, ev) {\r\n // Check if this is a double-hit\r\n var now = $time.getTime();\r\n if (io.lastHit && (io.lastHit >= (now - this.getHitOption(io, \"doubleHitTime\")))) {\r\n // Yup - it's a double-hit\r\n // Cancel the hit\r\n //clearTimeout(io.lastHitPointer.hitTimeout);\r\n // If it happened too fast it probably means that hybrid device just\r\n // generated two events for the same tap\r\n if ((now - io.lastHit) < 100) {\r\n // Ignore\r\n return;\r\n }\r\n // Clear last hit\r\n io.lastHit = undefined;\r\n io.lastHitPointer = undefined;\r\n // Dispatch event\r\n if (io.events.isEnabled(\"doublehit\") && !system.isPaused) {\r\n var imev = {\r\n type: \"doublehit\",\r\n target: io,\r\n point: pointer.point,\r\n event: ev,\r\n touch: pointer.touch\r\n };\r\n io.events.dispatchImmediately(\"doublehit\", imev);\r\n }\r\n }\r\n else {\r\n // Log last hit\r\n io.lastHit = now;\r\n io.lastHitPointer = pointer;\r\n if (pointer.button === 3) {\r\n // Execute HIT now\r\n if (io.events.isEnabled(\"rightclick\") && !system.isPaused) {\r\n var imev = {\r\n type: \"rightclick\",\r\n target: io,\r\n event: ev\r\n };\r\n io.events.dispatchImmediately(\"rightclick\", imev);\r\n }\r\n }\r\n else {\r\n if (io.events.isEnabled(\"hit\") && !system.isPaused) {\r\n var imev = {\r\n type: \"hit\",\r\n target: io,\r\n event: ev,\r\n point: pointer.point,\r\n touch: pointer.touch\r\n };\r\n io.events.dispatchImmediately(\"hit\", imev);\r\n }\r\n }\r\n }\r\n };\r\n /**\r\n * Handles pointer hovering over [[InteractionObject]].\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Interaction object\r\n * @param pointer Pointer\r\n * @param ev Original event\r\n * @param soft Invoked by helper function\r\n */\r\n Interaction.prototype.handleOver = function (io, pointer, ev, soft) {\r\n if (soft === void 0) { soft = false; }\r\n if (!io.hoverable) {\r\n return;\r\n }\r\n var hoversPaused = false;\r\n if (this.shouldCancelHovers(pointer) && this.areTransformed() && this.moved(pointer, this.getHitOption(io, \"hitTolerance\"))) {\r\n hoversPaused = true;\r\n this.cancelAllHovers(ev);\r\n }\r\n // Remove any delayed outs\r\n this.processDelayed();\r\n // Add pointer\r\n io.overPointers.moveValue(pointer);\r\n // Check if object is not yet hovered\r\n if (!io.isRealHover) {\r\n // Set element as hovered\r\n if (!hoversPaused) {\r\n io.isHover = true;\r\n io.isRealHover = true;\r\n this.overObjects.moveValue(io);\r\n }\r\n // Generate body track event. This is needed so that if element loads\r\n // under unmoved mouse cursor, we still need all the actions that are\r\n // required to happen to kick in.\r\n this.handleTrack(this.body, pointer, ev, true);\r\n // Event\r\n if (io.events.isEnabled(\"over\") && !system.isPaused && !hoversPaused) {\r\n var imev = {\r\n type: \"over\",\r\n target: io,\r\n event: ev,\r\n pointer: pointer,\r\n touch: pointer.touch\r\n };\r\n io.events.dispatchImmediately(\"over\", imev);\r\n }\r\n }\r\n };\r\n /**\r\n * Handles when [[InteractionObject]] is no longer hovered.\r\n *\r\n * If `soft = true`, this means that method is being invoked by some other\r\n * code, not hard \"out\" function, like `handleUp` which implies we need to\r\n * run additional checks before unhovering the object.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Interaction object\r\n * @param pointer Pointer\r\n * @param ev Original event\r\n * @param soft Invoked by helper function\r\n * @param force Force imediate out\r\n */\r\n Interaction.prototype.handleOut = function (io, pointer, ev, soft, force) {\r\n var _this = this;\r\n if (soft === void 0) { soft = false; }\r\n if (force === void 0) { force = false; }\r\n if (!io.hoverable) {\r\n return;\r\n }\r\n // Remove pointer\r\n io.overPointers.removeValue(pointer);\r\n // Check if element is still hovered\r\n if (io.isHover && (!io.hasDelayedOut || force)) {\r\n // Should we run additional checks?\r\n if (soft && io.overPointers.length) {\r\n // There are still pointers hovering - don't do anything else and\r\n // wait until either no over pointers are there or we get a hard out\r\n // event.\r\n return;\r\n }\r\n // Should we delay \"out\" if this is happening on a touch device?\r\n if (pointer && pointer.touch && !force && !this.old(pointer)) {\r\n // This is a touch pointer, and it hasn't moved, let's pretend\r\n // the object is still hovered, and act as per \"behavior\" setting\r\n var behavior = this.getHoverOption(io, \"touchOutBehavior\");\r\n if (behavior == \"leave\") {\r\n // Set to \"leave\", so we do not execute any \"out\" event.\r\n // It will be handled by any other interaction that happens\r\n // afterwards.\r\n this._delayedEvents.out.push({\r\n type: \"out\",\r\n io: io,\r\n pointer: pointer,\r\n event: ev,\r\n keepUntil: $time.getTime() + 500\r\n });\r\n io.hasDelayedOut = true;\r\n return;\r\n }\r\n else if (behavior == \"delay\" && this.getHoverOption(io, \"touchOutDelay\")) {\r\n this._delayedEvents.out.push({\r\n type: \"out\",\r\n io: io,\r\n pointer: pointer,\r\n event: ev,\r\n keepUntil: $time.getTime() + 500,\r\n timeout: this.setTimeout(function () {\r\n _this.handleOut(io, pointer, ev, true);\r\n }, this.getHoverOption(io, \"touchOutDelay\"))\r\n });\r\n return;\r\n }\r\n else {\r\n // Nothing for \"remove\" - that's how it works \"out-of-the-box\"\r\n }\r\n }\r\n // Set element as not hovered\r\n io.isHover = false;\r\n this.overObjects.removeValue(io);\r\n // Invoke event\r\n if (!io.isDisposed() && io.events.isEnabled(\"out\") && !system.isPaused) {\r\n var imev = {\r\n type: \"out\",\r\n target: io,\r\n event: ev,\r\n pointer: pointer,\r\n touch: pointer.touch\r\n };\r\n io.events.dispatchImmediately(\"out\", imev);\r\n }\r\n // Reset object from lefover delayed outs, pointers\r\n io.overPointers.clear();\r\n io.hasDelayedOut = false;\r\n // @todo (clean delayed)\r\n }\r\n };\r\n /**\r\n * Processes dalyed events, such as \"out\" event that was initiated for\r\n * elements by touch.\r\n */\r\n Interaction.prototype.processDelayed = function () {\r\n var delayedEvent;\r\n while (true) {\r\n delayedEvent = this._delayedEvents.out.pop();\r\n if (!delayedEvent) {\r\n break;\r\n }\r\n if (delayedEvent.timeout) {\r\n delayedEvent.timeout.dispose();\r\n }\r\n this.handleOut(delayedEvent.io, delayedEvent.pointer, delayedEvent.event, false, true);\r\n }\r\n };\r\n /**\r\n * Performs tasks on pointer down.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n * @param pointer Pointer\r\n * @param ev Original event\r\n */\r\n Interaction.prototype.handleDown = function (io, pointer, ev) {\r\n // Need to prevent default event from happening on transformable objects\r\n this.maybePreventDefault(io, ev, pointer);\r\n // Stop inertia animations if they're currently being played out\r\n if (io.inert) {\r\n this.stopInertia(io);\r\n }\r\n // Trigger hover because some touch devices won't trigger over events\r\n // on their own\r\n this.handleOver(io, pointer, ev, true);\r\n // Add pointer to list\r\n io.downPointers.moveValue(pointer);\r\n // Apply styles if necessary\r\n this.applyCursorDownStyle(io, pointer);\r\n // Check if object is already down\r\n if (!io.isDown) {\r\n // Lose focus if needed\r\n if (io.focusable !== false && this.getHitOption(io, \"noFocus\") && this.focusedObject) {\r\n $dom.blur();\r\n }\r\n // Set object as hovered\r\n io.isDown = true;\r\n this.downObjects.moveValue(io);\r\n // Prep object for dragging and/or resizing\r\n if (io.draggable) {\r\n this.processDragStart(io, pointer, ev);\r\n }\r\n if (io.resizable) {\r\n this.processResizeStart(io, pointer, ev);\r\n }\r\n }\r\n // Dispatch \"down\" event\r\n if (io.events.isEnabled(\"down\") && !system.isPaused) {\r\n var imev = {\r\n type: \"down\",\r\n target: io,\r\n event: ev,\r\n pointer: pointer,\r\n touch: pointer.touch\r\n };\r\n io.events.dispatchImmediately(\"down\", imev);\r\n }\r\n };\r\n /**\r\n * Performs tasks on pointer up.\r\n *\r\n * @ignore Exclude from docs\r\n * @param pointer Pointer\r\n * @param ev Original event\r\n */\r\n Interaction.prototype.handleGlobalUp = function (pointer, ev, cancelled) {\r\n var _this = this;\r\n if (cancelled === void 0) { cancelled = false; }\r\n var sorted = this.downObjects.values.slice();\r\n sorted.sort(function (x, y) {\r\n if (x && y) {\r\n var pos = x.element.compareDocumentPosition(y.element);\r\n if (pos & Node.DOCUMENT_POSITION_CONTAINED_BY) {\r\n return 1;\r\n }\r\n else if (pos & Node.DOCUMENT_POSITION_CONTAINS) {\r\n return -1;\r\n }\r\n else {\r\n return 0;\r\n }\r\n }\r\n else {\r\n return 0;\r\n }\r\n });\r\n // Process all down objects\r\n $array.each(sorted, function (io) {\r\n // Check if this particular pointer is pressing down\r\n // on object\r\n if (io && io.downPointers.contains(pointer)) {\r\n _this.handleUp(io, pointer, ev, cancelled);\r\n }\r\n });\r\n };\r\n /**\r\n * Simulates all pointers being up once mouse leaves document area.\r\n *\r\n * @ignore Exclude from docs\r\n * @param ev Original event\r\n */\r\n Interaction.prototype.handleDocumentLeave = function (ev) {\r\n var _this = this;\r\n // Process all down objects\r\n $iter.each(this.downObjects.backwards().iterator(), function (io) {\r\n io.downPointers.each(function (pointer) {\r\n _this.handleUp(io, pointer, ev);\r\n });\r\n });\r\n };\r\n /**\r\n * Handles when [[InteractionObject]] is no longer hovered.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Interaction object\r\n * @param pointer Pointer\r\n * @param ev Original event\r\n */\r\n Interaction.prototype.handleUp = function (io, pointer, ev, cancelled) {\r\n if (cancelled === void 0) { cancelled = false; }\r\n // Restore cursor style\r\n this.restoreCursorDownStyle(io, pointer);\r\n // Remove pointer from the list\r\n io.downPointers.removeValue(pointer);\r\n // Trigger out because some touch devices won't trigger out events\r\n // on their own\r\n if (pointer.touch || this._useTouchEventsOnly) {\r\n this.handleOut(io, pointer, ev, true);\r\n }\r\n // Check if object still down\r\n if (io.isDown) {\r\n // Check if there are no other pointers hovering this element\r\n if (io.downPointers.length == 0) {\r\n // Set element as no longer down\r\n io.isDown = false;\r\n this.downObjects.removeValue(io);\r\n }\r\n // Dispatch \"up\" event\r\n if (io.events.isEnabled(\"up\") && !system.isPaused) {\r\n var imev = {\r\n type: \"up\",\r\n target: io,\r\n event: ev,\r\n pointer: pointer,\r\n touch: pointer.touch\r\n };\r\n io.events.dispatchImmediately(\"up\", imev);\r\n }\r\n // Check if this was not a cancelled event.\r\n // If event was canelled (which might happen if gesture resulted in\r\n // navigation or page scroll) there's no point in triggering hit and\r\n // other actions.\r\n if (!cancelled) {\r\n // Handle swiping-related stuff\r\n if (io.swipeable && this.swiped(io, pointer)) {\r\n // Swiped - nothing else should happen\r\n this.handleSwipe(io, pointer, ev);\r\n }\r\n else {\r\n // Check if it maybe a click\r\n if (io.clickable && !this.moved(pointer, this.getHitOption(io, \"hitTolerance\"))) {\r\n this.handleHit(io, pointer, ev);\r\n }\r\n // Handle inertia\r\n if (io.inert && this.moved(pointer, this.getHitOption(io, \"hitTolerance\"))) {\r\n this.handleInertia(io, pointer);\r\n }\r\n else if (io.draggable) {\r\n this.processDragStop(io, pointer, ev);\r\n }\r\n if (io.resizable) {\r\n this.processResizeStop(io, pointer, ev);\r\n }\r\n }\r\n }\r\n }\r\n };\r\n /**\r\n * Checks if event needs to be prevented on draggable and such items, so that\r\n * touch gestures like navigation and scroll do not kick in.\r\n *\r\n * @param io Object\r\n * @param ev Event\r\n */\r\n Interaction.prototype.maybePreventDefault = function (io, ev, pointer) {\r\n if ($type.hasValue(ev)\r\n && (io.draggable || io.swipeable || io.trackable || io.resizable)\r\n && !this.isGlobalElement(io)\r\n && ev.cancelable !== false\r\n && (!io.isTouchProtected || !pointer || !pointer.touch)) {\r\n ev.preventDefault();\r\n }\r\n };\r\n /**\r\n * Cancels all hovers on all currently hovered objects.\r\n *\r\n * @param pointer Pointer\r\n * @param ev Event\r\n */\r\n Interaction.prototype.cancelAllHovers = function (ev) {\r\n var _this = this;\r\n //this.overObjects.each((io) => {\r\n $iter.each(this.overObjects.backwards().iterator(), function (io) {\r\n if (io) {\r\n var pointer = io.overPointers.getIndex(0);\r\n _this.handleOut(io, pointer, ev, true, true);\r\n }\r\n });\r\n };\r\n /**\r\n * Checks if hovers should be cancelled on transform as per global options.\r\n * @param pointer Pointer\r\n * @return Cancel?\r\n */\r\n Interaction.prototype.shouldCancelHovers = function (pointer) {\r\n return options.disableHoverOnTransform == \"always\" || (options.disableHoverOnTransform == \"touch\" && pointer.touch);\r\n };\r\n /**\r\n * Handles pointer move.\r\n *\r\n * @ignore Exclude from docs\r\n * @param pointer Pointer\r\n * @param ev Original event\r\n */\r\n Interaction.prototype.handleGlobalMove = function (pointer, ev) {\r\n var _this = this;\r\n // Process hovered elements\r\n // We check if the element became unhovered without reporting the mouseout\r\n // event. (it happens in some cases)\r\n if (!pointer.touch) {\r\n var target_1 = $dom.eventTarget(pointer.lastEvent);\r\n $iter.each(this.overObjects.backwards().iterator(), function (io) {\r\n // Is this pointer relevant to element?\r\n if (io && io.overPointers.contains(pointer) && io.hoverable) {\r\n // Check if the element is still hovered\r\n var reset = false;\r\n if (io.element && pointer.lastEvent) {\r\n if (!$dom.contains(io.element, target_1)) {\r\n reset = true;\r\n }\r\n }\r\n else {\r\n reset = true;\r\n }\r\n if (reset) {\r\n _this.handleOut(io, pointer, ev, true);\r\n }\r\n }\r\n });\r\n }\r\n // Process down elements\r\n $iter.each(this.transformedObjects.backwards().iterator(), function (io) {\r\n // Is this pointer relevant to element?\r\n if (io.downPointers.contains(pointer) &&\r\n // Swipe still happening?\r\n !(io.swipeable && _this.swiping(io, pointer)) &&\r\n (io.draggable || io.resizable)) {\r\n _this.handleTransform(io, ev);\r\n }\r\n });\r\n // Process tracked elements\r\n $iter.each(this.trackedObjects.backwards().iterator(), function (io) {\r\n // Is this pointer relevant to element?\r\n if (!io.overPointers.contains(pointer)) {\r\n _this.handleTrack(io, pointer, ev);\r\n }\r\n });\r\n };\r\n /**\r\n * Handles reporting of pointer movement.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n * @param pointer Pointer\r\n * @param ev Original event\r\n * @param skipCheck Sould we skip check if cursor actually moved\r\n */\r\n Interaction.prototype.handleTrack = function (io, pointer, ev, skipCheck) {\r\n if (skipCheck === void 0) { skipCheck = false; }\r\n // Do nothing if the cursor did not actually move\r\n if (!skipCheck && !this.moved(pointer, 0)) {\r\n return;\r\n }\r\n // Initiate TRACK event\r\n if (io.events.isEnabled(\"track\") && !system.isPaused) {\r\n var imev = {\r\n type: \"track\",\r\n target: io,\r\n event: ev,\r\n point: pointer.point,\r\n pointer: pointer,\r\n touch: pointer.touch\r\n };\r\n io.events.dispatchImmediately(\"track\", imev);\r\n }\r\n };\r\n /**\r\n * Handles swipe action.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n * @param pointer Pointer\r\n * @param ev Original event\r\n */\r\n Interaction.prototype.handleSwipe = function (io, pointer, ev) {\r\n // We pass in InteractionEvent with shift in mouse coordinates\r\n // between when the drag started and ended\r\n if (io.events.isEnabled(\"swipe\") && !system.isPaused) {\r\n var imev = {\r\n type: \"swipe\",\r\n target: io,\r\n event: ev,\r\n touch: pointer.touch\r\n };\r\n io.events.dispatchImmediately(\"swipe\", imev);\r\n }\r\n if (pointer.startPoint.x < pointer.point.x) {\r\n if (io.events.isEnabled(\"swiperight\") && !system.isPaused) {\r\n var imev = {\r\n type: \"swiperight\",\r\n target: io,\r\n event: ev,\r\n touch: pointer.touch\r\n };\r\n io.events.dispatchImmediately(\"swiperight\", imev);\r\n }\r\n }\r\n else {\r\n if (io.events.isEnabled(\"swipeleft\") && !system.isPaused) {\r\n var imev = {\r\n type: \"swipeleft\",\r\n target: io,\r\n event: ev,\r\n touch: pointer.touch\r\n };\r\n io.events.dispatchImmediately(\"swipeleft\", imev);\r\n }\r\n }\r\n };\r\n /**\r\n * Handles event triggering for wheel rotation.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n * @param pointer Pointer\r\n * @param deltaX Horizontal shift\r\n * @param deltaY Vertical shift\r\n * @param ev Original event\r\n */\r\n Interaction.prototype.handleWheel = function (io, pointer, deltaX, deltaY, ev) {\r\n var shift = {\r\n x: deltaX,\r\n y: deltaY\r\n };\r\n // Trigger generic WHEEL event\r\n if (io.events.isEnabled(\"wheel\") && !system.isPaused) {\r\n io.events.dispatchImmediately(\"wheel\", {\r\n type: \"wheel\",\r\n target: io,\r\n event: ev,\r\n point: pointer.point,\r\n shift: shift\r\n });\r\n }\r\n // Trigger direction-specific events\r\n // Horizontal\r\n if (deltaX < 0) {\r\n if (io.events.isEnabled(\"wheelleft\") && !system.isPaused) {\r\n io.events.dispatchImmediately(\"wheelleft\", {\r\n type: \"wheelleft\",\r\n target: io,\r\n event: ev,\r\n point: pointer.point,\r\n shift: shift\r\n });\r\n }\r\n }\r\n else if (deltaX > 0) {\r\n if (io.events.isEnabled(\"swiperight\") && !system.isPaused) {\r\n io.events.dispatchImmediately(\"wheelright\", {\r\n type: \"wheelright\",\r\n target: io,\r\n event: ev,\r\n point: pointer.point,\r\n shift: shift\r\n });\r\n }\r\n // Vertical\r\n }\r\n else if (deltaY < 0) {\r\n if (io.events.isEnabled(\"wheelup\") && !system.isPaused) {\r\n io.events.dispatchImmediately(\"wheelup\", {\r\n type: \"wheelup\",\r\n target: io,\r\n event: ev,\r\n point: pointer.point,\r\n shift: shift\r\n });\r\n }\r\n }\r\n else if (deltaY > 0) {\r\n if (io.events.isEnabled(\"wheeldown\") && !system.isPaused) {\r\n io.events.dispatchImmediately(\"wheeldown\", {\r\n type: \"wheeldown\",\r\n target: io,\r\n event: ev,\r\n point: pointer.point,\r\n shift: shift\r\n });\r\n }\r\n }\r\n };\r\n /**\r\n * Initiates inertia checking sub-routines for different movement types:\r\n * drag, resize.\r\n *\r\n * @ignore Exclude from docs\r\n * @param sprite\r\n * @param pointer\r\n */\r\n Interaction.prototype.handleInertia = function (io, pointer) {\r\n if (io.draggable && io.downPointers.length === 0) {\r\n this.handleMoveInertia(io, pointer);\r\n }\r\n if (io.resizable && io.downPointers.length > 1) {\r\n this.handleResizeInertia(io, pointer);\r\n }\r\n };\r\n /**\r\n * Continues moving the element to simulate the effect of inertia. Happens\r\n * when `inert` and `draggable` object is dragged and then released.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n * @param pointer Pointer\r\n */\r\n Interaction.prototype.handleMoveInertia = function (io, pointer) {\r\n var interaction = io;\r\n var type = \"move\";\r\n var point = {\r\n \"x\": pointer.point.x,\r\n \"y\": pointer.point.y\r\n };\r\n var startPoint = {\r\n \"x\": pointer.startPoint.x,\r\n \"y\": pointer.startPoint.y\r\n };\r\n // Init inertia object\r\n var inertia = new Inertia(interaction, type, point, startPoint);\r\n // Get inertia data\r\n var ref = this.getTrailPoint(pointer, $time.getTime() - this.getInertiaOption(io, \"move\", \"time\"));\r\n if (typeof ref === \"undefined\") {\r\n this.processDragStop(io, pointer, pointer.lastUpEvent);\r\n return;\r\n }\r\n // Init animation options\r\n var factor = this.getInertiaOption(io, \"move\", \"factor\");\r\n var animationOptions = [{\r\n \"to\": pointer.point.x + (pointer.point.x - ref.point.x) * factor,\r\n \"property\": \"x\"\r\n }, {\r\n \"to\": pointer.point.y + (pointer.point.y - ref.point.y) * factor,\r\n \"property\": \"y\"\r\n }];\r\n // Start animation\r\n var animation = new Animation(inertia, animationOptions, this.getInertiaOption(io, \"move\", \"duration\"), this.getInertiaOption(io, \"move\", \"easing\")).start();\r\n this._disposers.push(animation.events.on(\"animationended\", function (ev) {\r\n inertia.done();\r\n }));\r\n // Add inertia object\r\n io.inertias.setKey(\"move\", inertia);\r\n };\r\n /**\r\n * Continues resizing of a `resizable` element after it is resized and\r\n * released.\r\n *\r\n * **NOTE:** this is is just a placeholder function. No actual fucntionality\r\n * is implemented, yet.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n * @param pointer Pointer\r\n */\r\n Interaction.prototype.handleResizeInertia = function (io, pointer) {\r\n // Some day, folks. Some day...\r\n };\r\n /**\r\n * Recalculates element's position and size based on position of\r\n * all its related pointers.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n * @param ev Original event\r\n */\r\n Interaction.prototype.handleTransform = function (io, ev) {\r\n // Get primary pointer and its respective points\r\n var pointer1 = io.downPointers.getIndex(0);\r\n var point1 = null;\r\n var startPoint1 = null;\r\n if (pointer1) {\r\n point1 = pointer1.point;\r\n startPoint1 = pointer1.startPoint;\r\n }\r\n // Init secondary pointer\r\n var pointer2;\r\n var point2;\r\n var startPoint2;\r\n // Use center of the sprite to simulate \"second\" point of touch\r\n point2 = {\r\n \"x\": io.originalPosition.x,\r\n \"y\": io.originalPosition.y\r\n };\r\n startPoint2 = point2;\r\n // Determine if it's a sinngle pointer or multi\r\n var singlePoint = true;\r\n for (var i = 1; i < io.downPointers.length; i++) {\r\n // Get pointer\r\n var nextPointer = io.downPointers.getIndex(i);\r\n // Doublecheck if it's not the same pointer by comparing original position\r\n if (startPoint1.x != nextPointer.startPoint.x && startPoint1.y != nextPointer.startPoint.y) {\r\n // Several pointers down\r\n singlePoint = false;\r\n // Get second pointer\r\n pointer2 = nextPointer;\r\n point2 = pointer2.point;\r\n startPoint2 = pointer2.startPoint;\r\n // Stop looking\r\n break;\r\n }\r\n }\r\n // Primary touch point moved?\r\n var pointer1Moved = pointer1 && this.moved(pointer1, 0);\r\n // Report DRAG_START if necessary\r\n if (io.draggable && pointer1 && pointer1.dragStartEvents && pointer1.dragStartEvents.length && pointer1Moved) {\r\n if (io.events.isEnabled(\"dragstart\") && !system.isPaused) {\r\n io.events.dispatchImmediately(\"dragstart\", pointer1.dragStartEvents.shift());\r\n }\r\n //delete pointer1.dragStartEvents;\r\n }\r\n // Determine what we do in order of superiority\r\n if (singlePoint && io.draggable) {\r\n // We have only one pointer and the Sprite is draggable\r\n // There's nothing else to be done - just move it\r\n this.handleTransformMove(io, point1, startPoint1, ev, pointer1Moved, pointer1.touch);\r\n if (this.shouldCancelHovers(pointer1) && this.moved(pointer1, this.getHitOption(io, \"hitTolerance\"))) {\r\n this.cancelAllHovers(ev);\r\n }\r\n }\r\n else {\r\n // Check if second touch point moved\r\n var pointer2Moved = pointer2 && this.moved(pointer2, 0);\r\n if ((this.shouldCancelHovers(pointer1) && this.moved(pointer1, this.getHitOption(io, \"hitTolerance\")))\r\n ||\r\n (this.shouldCancelHovers(pointer2) && this.moved(pointer2, this.getHitOption(io, \"hitTolerance\")))) {\r\n this.cancelAllHovers(ev);\r\n }\r\n if (io.draggable && io.resizable) {\r\n //this.handleTransformAll(io, point1, startPoint1, point2, startPoint2, ev, pointer1Moved && pointer2Moved);\r\n this.handleTransformMove(io, point1, startPoint1, ev, pointer1Moved && pointer2Moved, pointer1.touch);\r\n this.handleTransformResize(io, point1, startPoint1, point2, startPoint2, ev, pointer1Moved && pointer2Moved, pointer1.touch);\r\n }\r\n else {\r\n if (io.draggable) {\r\n this.handleTransformMove(io, point1, startPoint1, ev, pointer1Moved, pointer1.touch);\r\n }\r\n if (io.resizable && (!singlePoint || ev.ctrlKey)) {\r\n this.handleTransformResize(io, point1, startPoint1, point2, startPoint2, ev, pointer1Moved && pointer2Moved, pointer1.touch);\r\n }\r\n }\r\n }\r\n };\r\n /**\r\n * Handles movement of the dragged element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n * @param point Current point of the pointer\r\n * @param startPoint Starting point of the pointer\r\n * @param ev Original event\r\n * @param pointerMoved Did pointer move?\r\n */\r\n Interaction.prototype.handleTransformMove = function (io, point, startPoint, ev, pointerMoved, touch) {\r\n if (pointerMoved) {\r\n if (io.events.isEnabled(\"drag\") && !system.isPaused && (!io.isTouchProtected || !touch)) {\r\n var imev = {\r\n type: \"drag\",\r\n target: io,\r\n event: ev,\r\n shift: {\r\n \"x\": point.x - startPoint.x,\r\n \"y\": point.y - startPoint.y\r\n },\r\n startPoint: startPoint,\r\n point: point,\r\n touch: touch\r\n };\r\n io.events.dispatchImmediately(\"drag\", imev);\r\n }\r\n }\r\n };\r\n /**\r\n * Handles resizing of the element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n * @param point1 Current position of reference point #1\r\n * @param startPoint1 Original position of reference point #1\r\n * @param point2 Current position of reference point #2\r\n * @param startPoint2 Original position of reference point #2\r\n * @param ev Original event\r\n * @param pointerMoved Did pointer move?\r\n */\r\n Interaction.prototype.handleTransformResize = function (io, point1, startPoint1, point2, startPoint2, ev, pointerMoved, touch) {\r\n if (io.events.isEnabled(\"resize\") && !system.isPaused && (!io.isTouchProtected || !touch)) {\r\n var imev = {\r\n type: \"resize\",\r\n target: io,\r\n event: ev,\r\n scale: $math.getScale(point1, startPoint1, point2, startPoint2),\r\n startPoint1: startPoint1,\r\n point1: point1,\r\n startPoint2: startPoint2,\r\n point2: point2,\r\n touch: touch\r\n };\r\n io.events.dispatchImmediately(\"resize\", imev);\r\n }\r\n };\r\n /**\r\n * Handles all the preparations of the element when it starts to be dragged.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n * @param pointer Pointer\r\n * @param ev Original event\r\n */\r\n Interaction.prototype.processDragStart = function (io, pointer, ev) {\r\n // Add to draggedObjects\r\n this.transformedObjects.moveValue(io);\r\n if (this.shouldCancelHovers(pointer)) {\r\n this.cancelAllHovers(ev);\r\n }\r\n // Report \"dragstart\"\r\n var imev = {\r\n type: \"dragstart\",\r\n target: io,\r\n event: ev,\r\n touch: pointer ? pointer.touch : false\r\n };\r\n // Log object that we are starting to drag, so we can check against and\r\n // avoid hovers on other objects that might be in the path of movement.\r\n if (pointer) {\r\n pointer.dragTarget = io;\r\n //pointer.startPoint = pointer.point;\r\n }\r\n /**\r\n * If pointer is set we will not fire the event until the pointer has\r\n * actually moved. If it's not set we don't have to wait for anything, so we\r\n * just fire off the event right away.\r\n */\r\n if (pointer && pointer.dragStartEvents) {\r\n pointer.dragStartEvents.push(imev);\r\n }\r\n else {\r\n if (!system.isPaused) {\r\n io.dispatchImmediately(\"dragstart\", imev);\r\n }\r\n }\r\n };\r\n /**\r\n * Finishes up element drag operation.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n * @param pointer Pointer\r\n * @param ev Original event\r\n */\r\n Interaction.prototype.processDragStop = function (io, pointer, ev) {\r\n // Pointer set?\r\n if (!pointer) {\r\n pointer = this.getDragPointer(io);\r\n }\r\n // Unset drag object\r\n if (pointer) {\r\n pointer.dragTarget = undefined;\r\n }\r\n // Removed from transformedObjects\r\n this.transformedObjects.removeValue(io);\r\n // Unlock document\r\n //this.unlockDocument();\r\n // Report dragstop\r\n if (!pointer || this.moved(pointer, 0)) {\r\n if (io.events.isEnabled(\"dragstop\") && !system.isPaused) {\r\n var imev = {\r\n type: \"dragstop\",\r\n target: io,\r\n touch: pointer ? pointer.touch : false\r\n };\r\n io.events.dispatchImmediately(\"dragstop\", imev);\r\n }\r\n }\r\n };\r\n /**\r\n * Handles all the preparations of the element when it starts to be resized.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n * @param pointer Pointer\r\n * @param ev Original event\r\n */\r\n Interaction.prototype.processResizeStart = function (io, pointer, ev) {\r\n // Add to draggedObjects\r\n this.transformedObjects.moveValue(io);\r\n };\r\n /**\r\n * Finishes up element drag operation.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n * @param pointer Pointer\r\n * @param ev Original event\r\n */\r\n Interaction.prototype.processResizeStop = function (io, pointer, ev) {\r\n // Removed from transformedObjects\r\n this.transformedObjects.removeValue(io);\r\n };\r\n /**\r\n * ==========================================================================\r\n * Controls for InteractionObjects initiating directly\r\n * ==========================================================================\r\n * @hidden\r\n */\r\n /**\r\n * Manually triggers drag start on the element. Could be useful in cases\r\n * where tracking or dragging one element can also influence dragging another\r\n * element.\r\n *\r\n * Passing in `pointer` reference is advisable. If not passed in it will try\r\n * to determine which pointer to attach to. However, it's better to specify\r\n * it explicitly.\r\n *\r\n * @param io Element\r\n * @param pointer Pointer\r\n */\r\n Interaction.prototype.dragStart = function (io, pointer) {\r\n if (!pointer) {\r\n pointer = this.getDragPointer(io);\r\n }\r\n if (pointer) {\r\n this.handleDown(io, pointer, pointer.lastDownEvent);\r\n }\r\n };\r\n /**\r\n * Manually ends drag on the element.\r\n *\r\n * @param io Element\r\n * @param pointer Pointer\r\n */\r\n Interaction.prototype.dragStop = function (io, pointer, cancelled) {\r\n if (!pointer) {\r\n pointer = this.getDragPointer(io);\r\n }\r\n if (pointer && !cancelled) {\r\n this.handleGlobalUp(pointer, pointer.lastUpEvent, cancelled);\r\n }\r\n };\r\n /**\r\n * This method uses a fuzzy logic to find the pointer to be used for dragging.\r\n * Beware that this is not a rock-solid solution. If there are a few objects\r\n * being dragged at the same time, you may get unexepected results.\r\n *\r\n * @param io InteractionObject to get pointers from\r\n * @return Pointer currently being used for dragging\r\n */\r\n Interaction.prototype.getDragPointer = function (io) {\r\n if (io) {\r\n // InteractionObject is supplied\r\n // Use it's first down pointer\r\n return io.downPointers.getIndex(0);\r\n }\r\n else if (this.transformedObjects.length) {\r\n // Use first dragged object\r\n return this.getDragPointer(this.transformedObjects.getIndex(0));\r\n }\r\n else {\r\n return undefined;\r\n }\r\n };\r\n /**\r\n * ==========================================================================\r\n * Utils\r\n * ==========================================================================\r\n * @hidden\r\n */\r\n /**\r\n * Returns pointer id for the given event object.\r\n *\r\n * @param ev Event\r\n * @return Pointer ID\r\n */\r\n Interaction.prototype.getPointerId = function (ev) {\r\n var id = \"\";\r\n if ($type.hasValue(ev.identifier)) {\r\n id = \"\" + ev.identifier;\r\n }\r\n else if ($type.hasValue(ev.pointerId)) {\r\n id = \"\" + ev.pointerId;\r\n }\r\n else {\r\n id = \"m\";\r\n }\r\n return id.replace(\"-\", \"\");\r\n };\r\n /**\r\n * Returns a cursor position of the event.\r\n *\r\n * @param ev Original event\r\n * @return Event point\r\n */\r\n Interaction.prototype.getPointerPoint = function (ev) {\r\n return {\r\n \"x\": ev.clientX,\r\n \"y\": ev.clientY\r\n };\r\n };\r\n /**\r\n * Returns [[Pointer]] object that is associated with the Event.\r\n *\r\n * If no such [[Pointer]] object exists, it is created.\r\n *\r\n * @param ev Event\r\n * @return Pointer\r\n */\r\n Interaction.prototype.getPointer = function (ev) {\r\n // Get pointer id\r\n var id = this.getPointerId(ev);\r\n // Get current coordinates\r\n var point = this.getPointerPoint(ev);\r\n // Look for the pointer in the Dictionary if it maybe already exists\r\n var pointer;\r\n if (this.pointers.hasKey(id)) {\r\n // We already have such pointer\r\n pointer = this.pointers.getKey(id);\r\n // We need this, because Edge reuses pointer ids across touch and mouse\r\n pointer.touch = this.isPointerTouch(ev);\r\n // Reset pointer\r\n //pointer.point = point;\r\n }\r\n else {\r\n // Init pointer\r\n pointer = {\r\n \"id\": id,\r\n //\"touch\": !(ev instanceof MouseEvent) || ((<any>ev).pointerType && (<any>ev).pointerType != \"pointer\"),\r\n //\"touch\": !(ev instanceof MouseEvent) || ((<any>ev).pointerType && (<any>ev).pointerType != \"mouse\"),\r\n \"touch\": this.isPointerTouch(ev),\r\n \"startPoint\": point,\r\n \"startTime\": $time.getTime(),\r\n \"point\": point,\r\n \"track\": [],\r\n \"swipeCanceled\": false,\r\n \"dragStartEvents\": []\r\n };\r\n // Add first breadcrumb\r\n this.addBreadCrumb(pointer, point);\r\n // Add for re-use later\r\n this.pointers.setKey(id, pointer);\r\n }\r\n // Log last event\r\n pointer.lastEvent = ev;\r\n this.lastPointer = pointer;\r\n return pointer;\r\n };\r\n /**\r\n * Determines if pointer event originated from a touch pointer or mouse.\r\n *\r\n * @param ev Original event\r\n * @return Touch pointer?\r\n */\r\n Interaction.prototype.isPointerTouch = function (ev) {\r\n if (typeof Touch !== \"undefined\" && ev instanceof Touch) {\r\n return true;\r\n }\r\n else if (typeof PointerEvent !== \"undefined\" && ev instanceof PointerEvent && $type.hasValue(ev.pointerType)) {\r\n switch (ev.pointerType) {\r\n case \"touch\":\r\n case \"pen\":\r\n case 2:\r\n return true;\r\n case \"mouse\":\r\n case 4:\r\n return false;\r\n default:\r\n return !(ev instanceof MouseEvent);\r\n }\r\n }\r\n else if ($type.hasValue(ev.type)) {\r\n if (ev.type.match(/^mouse/)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n };\r\n /**\r\n * Resets the poiner to original state, i.e. cleans movement information,\r\n * starting point, etc.\r\n *\r\n * @param pointer Pointer\r\n */\r\n Interaction.prototype.resetPointer = function (pointer, ev) {\r\n // Get current coordinates\r\n var point = this.getPointerPoint(ev);\r\n ;\r\n pointer.startTime = $time.getTime();\r\n pointer.startPoint = { x: point.x, y: point.y };\r\n pointer.point = { x: point.x, y: point.y };\r\n pointer.track = [];\r\n pointer.swipeCanceled = false;\r\n //clearTimeout(pointer.swipeTimeout);\r\n //clearTimeout(pointer.holdTimeout);\r\n };\r\n /**\r\n * Adds a \"breadcrumb\" point to the [[Pointer]] to log its movement path.\r\n *\r\n * @param pointer Pointer\r\n * @param point Point coordinates\r\n */\r\n Interaction.prototype.addBreadCrumb = function (pointer, point) {\r\n pointer.track.push({\r\n \"timestamp\": $time.getTime(),\r\n \"point\": point\r\n });\r\n };\r\n /**\r\n * Prepares the document for various touch-related operations.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Interaction.prototype.lockDocument = function () {\r\n this.prepElement(this.body);\r\n };\r\n /**\r\n * Restores document functionality.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Interaction.prototype.unlockDocument = function () {\r\n if (this.transformedObjects.length == 0) {\r\n this.restoreAllStyles(this.body);\r\n }\r\n };\r\n /**\r\n * Lock element (disable all touch)\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Interaction.prototype.lockElement = function (io) {\r\n this.prepElement(io);\r\n };\r\n /**\r\n * Restores element's functionality.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Interaction.prototype.unlockElement = function (io) {\r\n this.restoreAllStyles(io);\r\n };\r\n /**\r\n * Locks document's wheel scroll.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Interaction.prototype.lockWheel = function () {\r\n window.addEventListener(this._pointerEvents.wheel, this.wheelLockEvent, this._passiveSupported ? { passive: false } : false);\r\n };\r\n /**\r\n * Unlocks document's wheel scroll.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Interaction.prototype.unlockWheel = function () {\r\n window.removeEventListener(this._pointerEvents.wheel, this.wheelLockEvent);\r\n };\r\n /**\r\n * Checks if top element at pointer's position belongs to the SVG.\r\n *\r\n * @ignore Exlude from docs\r\n * @param pointer Pointer\r\n * @param svg The <svg> element\r\n * @param id A unique identifier of the object that is checking for locality\r\n * @return Belongs to SVG\r\n */\r\n Interaction.prototype.isLocalElement = function (pointer, svg, id) {\r\n var cached = this.getCache(\"local_pointer_\" + pointer.id);\r\n if ($type.hasValue(cached)) {\r\n return cached;\r\n }\r\n var doc = ($dom.getRoot(svg) || document);\r\n if (doc.elementFromPoint) {\r\n var target = doc.elementFromPoint(pointer.point.x, pointer.point.y);\r\n var local = target && $dom.contains(svg, target);\r\n this.setCache(\"local_pointer_\" + pointer.id + \"_\" + id, local, 100);\r\n return local;\r\n }\r\n return false;\r\n };\r\n /**\r\n * A function that cancels mouse wheel scroll.\r\n *\r\n * @ignore Exclude from docs\r\n * @param ev Event object\r\n * @return Returns `false` to cancel\r\n */\r\n Interaction.prototype.wheelLockEvent = function (ev) {\r\n ev.preventDefault();\r\n return false;\r\n };\r\n /**\r\n * Applies a set of styles to an element. Stores the original styles so they\r\n * can be restored later.\r\n *\r\n * @ignore\r\n * @param io Element\r\n */\r\n Interaction.prototype.prepElement = function (io) {\r\n var el = io.element;\r\n if (el) {\r\n // Define possible props\r\n var props = [\r\n \"touchAction\", \"webkitTouchAction\", \"MozTouchAction\", \"MSTouchAction\", \"msTouchAction\", \"oTouchAction\",\r\n \"userSelect\", \"webkitUserSelect\", \"MozUserSelect\", \"MSUserSelect\", \"msUserSelect\", \"oUserSelect\",\r\n \"touchSelect\", \"webkitTouchSelect\", \"MozTouchSelect\", \"MSTouchSelect\", \"msTouchSelect\", \"oTouchSelect\",\r\n \"touchCallout\", \"webkitTouchCallout\", \"MozTouchCallout\", \"MSTouchCallout\", \"msTouchCallout\", \"oTouchCallout\",\r\n \"contentZooming\", \"webkitContentZooming\", \"MozContentZooming\", \"MSContentZooming\", \"msContentZooming\", \"oContentZooming\",\r\n \"userDrag\", \"webkitUserDrag\", \"MozUserDrag\", \"MSUserDrag\", \"msUserDrag\", \"oUserDrag\"\r\n ];\r\n for (var i = 0; i < props.length; i++) {\r\n if (props[i] in el.style) {\r\n this.setTemporaryStyle(io, props[i], \"none\");\r\n }\r\n }\r\n // Remove iOS-specific selection;\r\n this.setTemporaryStyle(io, \"tapHighlightColor\", \"rgba(0, 0, 0, 0)\");\r\n //this.setTemporaryStyle(io, \"webkitOverflowScrolling\", \"none\");\r\n }\r\n };\r\n /**\r\n * Restores replaced styles\r\n *\r\n * @ignore\r\n * @param io Element\r\n */\r\n Interaction.prototype.unprepElement = function (io) {\r\n var el = io.element;\r\n if (el) {\r\n // Define possible props\r\n var props = [\r\n \"touchAction\", \"webkitTouchAction\", \"MozTouchAction\", \"MSTouchAction\", \"msTouchAction\", \"oTouchAction\",\r\n \"userSelect\", \"webkitUserSelect\", \"MozUserSelect\", \"MSUserSelect\", \"msUserSelect\", \"oUserSelect\",\r\n \"touchSelect\", \"webkitTouchSelect\", \"MozTouchSelect\", \"MSTouchSelect\", \"msTouchSelect\", \"oTouchSelect\",\r\n \"touchCallout\", \"webkitTouchCallout\", \"MozTouchCallout\", \"MSTouchCallout\", \"msTouchCallout\", \"oTouchCallout\",\r\n \"contentZooming\", \"webkitContentZooming\", \"MozContentZooming\", \"MSContentZooming\", \"msContentZooming\", \"oContentZooming\",\r\n \"userDrag\", \"webkitUserDrag\", \"MozUserDrag\", \"MSUserDrag\", \"msUserDrag\", \"oUserDrag\"\r\n ];\r\n for (var i = 0; i < props.length; i++) {\r\n if (props[i] in el.style) {\r\n this.restoreStyle(io, props[i]);\r\n }\r\n }\r\n // Remove iOS-specific selection;\r\n this.restoreStyle(io, \"tapHighlightColor\");\r\n //this.restoreStyle(io, \"webkitOverflowScrolling\");\r\n }\r\n };\r\n /**\r\n * Returns an option associated with hit events.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n * @param option Option key\r\n * @return Option value\r\n */\r\n Interaction.prototype.getHitOption = function (io, option) {\r\n var res = io.hitOptions[option];\r\n if (typeof res === \"undefined\") {\r\n res = this.hitOptions[option];\r\n }\r\n return res;\r\n };\r\n /**\r\n * Returns an option associated with hover events.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n * @param option Option key\r\n * @return Option value\r\n */\r\n Interaction.prototype.getHoverOption = function (io, option) {\r\n var res = io.hoverOptions[option];\r\n if (typeof res === \"undefined\") {\r\n res = this.hoverOptions[option];\r\n }\r\n return res;\r\n };\r\n /**\r\n * Returns an option associated with swipe events.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n * @param option Option key\r\n * @return Option value\r\n */\r\n Interaction.prototype.getSwipeOption = function (io, option) {\r\n var res = io.swipeOptions[option];\r\n if (typeof res === \"undefined\") {\r\n res = this.swipeOptions[option];\r\n }\r\n return res;\r\n };\r\n /**\r\n * Returns an option for keyboard.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n * @param option Option key\r\n * @return Option value\r\n */\r\n Interaction.prototype.getKeyboardOption = function (io, option) {\r\n var res = io.keyboardOptions[option];\r\n if (typeof res === \"undefined\") {\r\n res = this.keyboardOptions[option];\r\n }\r\n return res;\r\n };\r\n /**\r\n * Returns an option for mouse.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n * @param option Option key\r\n * @return Option value\r\n */\r\n Interaction.prototype.getMouseOption = function (io, option) {\r\n var res = io.mouseOptions[option];\r\n if (typeof res === \"undefined\") {\r\n res = this.mouseOptions[option];\r\n }\r\n return res;\r\n };\r\n /**\r\n * Returns an option associated with inertia.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n * @param type Inertia type\r\n * @param option Option key\r\n * @return Option value\r\n */\r\n Interaction.prototype.getInertiaOption = function (io, type, option) {\r\n var options = io.inertiaOptions.getKey(type);\r\n var res;\r\n if (options && $type.hasValue(options[option])) {\r\n res = options[option];\r\n }\r\n else {\r\n res = this.inertiaOptions.getKey(type)[option];\r\n }\r\n return res;\r\n };\r\n /**\r\n * Stops currently going on inertia. Useful if inertia is currently being\r\n * animated and the object is being interacted with.\r\n *\r\n * @param io Element\r\n */\r\n Interaction.prototype.stopInertia = function (io) {\r\n var x;\r\n var inertias = [\"move\", \"resize\"];\r\n for (var i = 0; i < inertias.length; i++) {\r\n x = inertias[i];\r\n if (io.inertias.hasKey(x)) {\r\n var inertia = io.inertias.getKey(x);\r\n if (inertia) {\r\n inertia.dispose();\r\n //io.inertiaAnimations.removeKey(x);\r\n //this.processDragStop(io);\r\n continue;\r\n }\r\n }\r\n }\r\n };\r\n /**\r\n * Check if swiping is currently being performed on an object.\r\n *\r\n * @param io Element\r\n * @param pointer Pointer to check\r\n * @return `true` if swiping\r\n */\r\n Interaction.prototype.swiping = function (io, pointer) {\r\n var now = $time.getTime();\r\n if (pointer.swipeCanceled || !io.swipeable) {\r\n return false;\r\n }\r\n else if ((Math.abs(pointer.startPoint.y - pointer.point.y) < this.getSwipeOption(io, \"verticalThreshold\")) &&\r\n (pointer.startTime > (now - this.getSwipeOption(io, \"time\")))) {\r\n return true;\r\n }\r\n else {\r\n return false;\r\n }\r\n };\r\n /**\r\n * Returns `true` if a successfull swipe action was performed on an element.\r\n *\r\n * @param io Element\r\n * @param pointer Pointer\r\n * @return Swiped?\r\n */\r\n Interaction.prototype.swiped = function (io, pointer) {\r\n var now = $time.getTime();\r\n if (pointer.swipeCanceled) {\r\n return false;\r\n }\r\n else if ((Math.abs(pointer.startPoint.x - pointer.point.x) > this.getSwipeOption(io, \"horizontalThreshold\")) &&\r\n (Math.abs(pointer.startPoint.y - pointer.point.y) < this.getSwipeOption(io, \"verticalThreshold\")) &&\r\n (pointer.startTime > (now - this.getSwipeOption(io, \"time\")))) {\r\n return true;\r\n }\r\n else {\r\n return false;\r\n }\r\n };\r\n /**\r\n * Applies style to mouse cursor based on its stage in relation to\r\n * [[InteractionObject]].\r\n *\r\n * @ignore Exclude from docs\r\n * @param Element\r\n */\r\n Interaction.prototype.applyCursorOverStyle = function (io) {\r\n // Get sprite's cursor ooptions\r\n var options = io.cursorOptions;\r\n if (!$type.hasValue(options.overStyle)) {\r\n return;\r\n }\r\n // Apply cursor down styles\r\n for (var i = 0; i < options.overStyle.length; i++) {\r\n $dom.setStyle(io.element, options.overStyle[i].property, options.overStyle[i].value);\r\n }\r\n };\r\n /**\r\n * Applies style to mouse cursor based on its stage in relation to\r\n * [[InteractionObject]].\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n * @param pointer Pointer\r\n */\r\n Interaction.prototype.applyCursorDownStyle = function (io, pointer) {\r\n // Not applicable for touch pointers since they don't display a cursor\r\n if (pointer && pointer.touch) {\r\n return;\r\n }\r\n var downStyle = io.cursorOptions.downStyle;\r\n // Is down?\r\n if (io.downPointers.contains(pointer) && $type.hasValue(downStyle)) {\r\n // Apply cursor down styles\r\n for (var i = 0; i < downStyle.length; i++) {\r\n this.setTemporaryStyle(this.body, downStyle[i].property, downStyle[i].value);\r\n this.setTemporaryStyle(io, downStyle[i].property, downStyle[i].value);\r\n }\r\n }\r\n };\r\n /**\r\n * Restores original cursor style for the element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n * @param pointer Pointer\r\n */\r\n Interaction.prototype.restoreCursorDownStyle = function (io, pointer) {\r\n // Not applicable for touch pointers since they don't display a cursor\r\n if (pointer && pointer.touch) {\r\n return;\r\n }\r\n var downStyle = io.cursorOptions.downStyle;\r\n // Is down?\r\n if (io.downPointers.contains(pointer) && $type.hasValue(downStyle)) {\r\n // Apply cursor down styles\r\n for (var i = 0; i < downStyle.length; i++) {\r\n this.restoreStyle(this.body, downStyle[i].property);\r\n this.restoreStyle(io, downStyle[i].property);\r\n }\r\n }\r\n };\r\n /**\r\n * Sets style on the body of the document.\r\n *\r\n * @ignore Exclude from docs\r\n * @param style Style definitions\r\n */\r\n Interaction.prototype.setGlobalStyle = function (style) {\r\n var body = getInteraction().body;\r\n var styles = ($type.isArray(style) ? style : [style]);\r\n for (var i = 0; i < styles.length; i++) {\r\n this.setTemporaryStyle(body, styles[i].property, styles[i].value);\r\n }\r\n };\r\n /**\r\n * Restores style on the body of the document.\r\n *\r\n * @ignore Exclude from docs\r\n * @param style Style definitions\r\n */\r\n Interaction.prototype.restoreGlobalStyle = function (style) {\r\n var body = getInteraction().body;\r\n var styles = ($type.isArray(style) ? style : [style]);\r\n for (var i = 0; i < styles.length; i++) {\r\n this.restoreStyle(body, styles[i].property);\r\n }\r\n };\r\n /**\r\n * Checks if element is a non-cahrt element.\r\n *\r\n * @param io InteractionObject\r\n * @return Global element?\r\n */\r\n Interaction.prototype.isGlobalElement = function (io) {\r\n return document.body === io.element;\r\n };\r\n /**\r\n * Checks if pointer has moved since it was created.\r\n *\r\n * @param pointer Pointer\r\n * @param tolerance Tolerance in pixels\r\n * @param minTime Minimum time required for the pointer to be down to be considered moved\r\n * @return `true` if the pointer has moved\r\n */\r\n Interaction.prototype.moved = function (pointer, tolerance, minTime) {\r\n /*// If there was more time, we don't care if cursor actually moved\r\n let duration = $time.getTime() - pointer.startTime;\r\n if ($type.hasValue(minTime) && (minTime > duration)) {\r\n return false;\r\n }*/\r\n if (minTime === void 0) { minTime = 300; }\r\n // That was quick measure shift\r\n var shift = this.getShift(pointer);\r\n return (Math.abs(shift.x) > tolerance) || (Math.abs(shift.y) > tolerance);\r\n };\r\n /**\r\n * Returns if pointer is \"old\", meaning it has been pressing for more than\r\n * X milliseconds.\r\n *\r\n * @ignore\r\n * @param pointer Pointer\r\n * @param minTime Minimum time to consider pointer old\r\n * @return {boolean}\r\n */\r\n Interaction.prototype.old = function (pointer, minTime) {\r\n if (minTime === void 0) { minTime = 300; }\r\n return $time.getTime() - pointer.startTime > minTime;\r\n };\r\n /**\r\n * Returns total a shift in pointers coordinates between its original\r\n * position and now.\r\n *\r\n * @param pointer Pointer\r\n * @return Shift in coordinates (x/y)\r\n */\r\n Interaction.prototype.getShift = function (pointer) {\r\n return {\r\n \"x\": pointer.startPoint.x - pointer.point.x,\r\n \"y\": pointer.startPoint.y - pointer.point.y\r\n };\r\n };\r\n /**\r\n * Returns a point from [[Pointer]]'s move history at a certain timetamp.\r\n *\r\n * @param pointer Pointer\r\n * @param timestamp Timestamp\r\n * @return Point\r\n */\r\n Interaction.prototype.getTrailPoint = function (pointer, timestamp) {\r\n var res;\r\n for (var i = 0; i < pointer.track.length; i++) {\r\n if (pointer.track[i].timestamp >= timestamp) {\r\n res = pointer.track[i];\r\n break;\r\n }\r\n }\r\n return res;\r\n };\r\n /**\r\n * Checks if same pointer already exists in the list.\r\n *\r\n * @param list List to check agains\r\n * @param pointer Pointer\r\n * @return Exists?\r\n */\r\n Interaction.prototype.pointerExists = function (list, pointer) {\r\n var exists = false;\r\n list.each(function (item) {\r\n if (item == pointer) {\r\n return;\r\n }\r\n exists = item.point.x == pointer.point.x && item.point.y == pointer.point.y;\r\n });\r\n return exists;\r\n };\r\n /**\r\n * Returns an [[InteractionObject]] representation of a DOM element.\r\n *\r\n * You can use this on any HTML or SVG element, to add interactive features\r\n * to it.\r\n *\r\n * @param element Element\r\n * @return InteractionObject\r\n */\r\n Interaction.prototype.getInteraction = function (element) {\r\n return new InteractionObject(element);\r\n };\r\n /**\r\n * Sets a style property on an element. Stores original value to be restored\r\n * later with [[restoreStyle]].\r\n *\r\n * @see {@link restoreStyle}\r\n * @param io Element\r\n * @param property Property\r\n * @param value Value\r\n */\r\n Interaction.prototype.setTemporaryStyle = function (io, property, value) {\r\n // Get element\r\n //let el = io.element.tagName == \"g\" ? <SVGSVGElement>io.element.parentNode : io.element;\r\n var el = io.element;\r\n // Save original property if it is set and hasn't been saved before already\r\n if ($type.hasValue(el.style[property]) && !io.replacedStyles.hasKey(property)) {\r\n io.replacedStyles.setKey(property, el.style[property]);\r\n }\r\n // Replace with the new one\r\n $dom.setStyle(el, property, value);\r\n };\r\n /**\r\n * Restores specific style on an element.\r\n *\r\n * @param io Element\r\n * @param property Style property\r\n */\r\n Interaction.prototype.restoreStyle = function (io, property) {\r\n // Reset style\r\n if (io.replacedStyles.hasKey(property)) {\r\n io.element.style[property] = io.replacedStyles.getKey(property);\r\n io.replacedStyles.removeKey(property);\r\n }\r\n else {\r\n delete io.element.style[property];\r\n }\r\n };\r\n /**\r\n * Restore temporarily reset styles on an element.\r\n *\r\n * @param io Element\r\n */\r\n Interaction.prototype.restoreAllStyles = function (io) {\r\n $iter.each(io.replacedStyles.iterator(), function (a) {\r\n var key = a[0];\r\n var value = a[1];\r\n io.element.style[key] = value;\r\n io.replacedStyles.removeKey(key);\r\n });\r\n };\r\n /**\r\n * Disposes this object and cleans up after itself.\r\n */\r\n Interaction.prototype.dispose = function () {\r\n if (!this.isDisposed()) {\r\n _super.prototype.dispose.call(this);\r\n this.restoreAllStyles(this.body);\r\n this.unlockWheel();\r\n }\r\n };\r\n // @ts-ignore Used for debugging\r\n Interaction.prototype.log = function (text, ev, io) {\r\n var show = true;\r\n if (show) {\r\n // Touchlist?\r\n if (ev.changedTouches) {\r\n for (var i = 0; i < ev.changedTouches.length; i++) {\r\n this.logTouch(text, ev.type, ev.changedTouches[i]);\r\n }\r\n return;\r\n }\r\n // Get type\r\n var type = \"\";\r\n if (ev.pointerType) {\r\n switch (ev.pointerType) {\r\n case 2:\r\n type = \"touch\";\r\n break;\r\n case 4:\r\n type = \"mouse\";\r\n break;\r\n default:\r\n type = ev.pointerType;\r\n break;\r\n }\r\n }\r\n else if (typeof TouchEvent != \"undefined\" && ev instanceof TouchEvent) {\r\n type = \"touch\";\r\n }\r\n else if (ev.type.match(/^mouse/)) {\r\n type = \"mouse\";\r\n }\r\n else {\r\n type = \"???\";\r\n }\r\n // Get ID\r\n var id = \"\";\r\n if ($type.hasValue(ev.identifier)) {\r\n id = ev.identifier;\r\n }\r\n else if ($type.hasValue(ev.pointerId)) {\r\n id = ev.pointerId;\r\n }\r\n else {\r\n id = \"???\";\r\n }\r\n if (io) {\r\n console.log(text + \" (\" + io.uid + \") \" + ev.type + \" \" + type + \" \" + id);\r\n }\r\n else {\r\n console.log(text + \" \" + ev.type + \" \" + type + \" \" + id);\r\n }\r\n }\r\n };\r\n /**\r\n * Checks whether there are currently any objects being transformed (dragged\r\n * or resized).\r\n *\r\n * If `except` is set, that object will be ignored.\r\n *\r\n * @since 4.9.3\r\n * @param except Ignore this object(s)\r\n * @return Objects are being transformed\r\n */\r\n Interaction.prototype.areTransformed = function (except) {\r\n var count = this.transformedObjects.length;\r\n if (except) {\r\n var ex = $type.isArray(except) ? except : [except];\r\n for (var i = 0; i < ex.length; i++) {\r\n if (this.transformedObjects.contains(ex[i])) {\r\n count--;\r\n }\r\n }\r\n }\r\n return count > 0;\r\n };\r\n /**\r\n * Log.\r\n */\r\n Interaction.prototype.logTouch = function (text, type, ev) {\r\n console.log(text + \" \" + type + \" \" + \"touch\" + \" \" + ev.identifier);\r\n };\r\n Object.defineProperty(Interaction, \"passiveSupported\", {\r\n /**\r\n * Indicates if passive mode options is supported by this browser.\r\n */\r\n get: function () {\r\n var _this = this;\r\n if (this._passiveSupported == null) {\r\n // Check for passive mode support\r\n try {\r\n var options_1 = Object.defineProperty({}, \"passive\", {\r\n get: function () {\r\n _this._passiveSupported = true;\r\n }\r\n });\r\n window.addEventListener(\"test\", options_1, options_1);\r\n window.removeEventListener(\"test\", options_1, options_1);\r\n }\r\n catch (err) {\r\n this._passiveSupported = false;\r\n }\r\n }\r\n return this._passiveSupported;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return Interaction;\r\n}(BaseObjectEvents));\r\nexport { Interaction };\r\nvar interaction = null;\r\n/**\r\n * Returns a single unified global instance of [[Interaction]].\r\n *\r\n * All code should use this function, rather than create their own instances\r\n * of [[Interaction]].\r\n */\r\nexport function getInteraction() {\r\n if (interaction == null) {\r\n interaction = new Interaction();\r\n }\r\n return interaction;\r\n}\r\n","/**\r\n * Functionality related simulating of dragging of elements using keyboard.\r\n */\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { getInteraction } from \"./Interaction\";\r\nimport { system } from \"../System\";\r\nimport * as $array from \"../utils/Array\";\r\n/**\r\n * [[InteractionKeyboardObject]] is used to simulate dragging of the `draggable`\r\n * element using keyboard arrows.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\nvar InteractionKeyboardObject = /** @class */ (function () {\r\n /**\r\n * Constructor.\r\n *\r\n * @param io An InteractionObject\r\n */\r\n function InteractionKeyboardObject(io, ev) {\r\n /**\r\n * Indicates if this object has already been deleted. Any\r\n * destruction/disposal code should take this into account when deciding\r\n * wheter to run potentially costly disposal operations if they already have\r\n * been run.\r\n */\r\n this._disposed = false;\r\n /**\r\n * Indicates direction of current horizontal movement.\r\n *\r\n * 0 - not moving horizontally\r\n * 1 - moving right\r\n * -1 - moving left\r\n */\r\n this.directionX = 0;\r\n /**\r\n * Indicates direction of current vertical movement.\r\n *\r\n * 0 - not moving vertically\r\n * 1 - moving down\r\n * -1 - moving up\r\n */\r\n this.directionY = 0;\r\n this.interaction = io;\r\n this.keyboardEvent = ev;\r\n this._startedOn = new Date().getTime();\r\n getInteraction().processDragStart(io);\r\n system.animations.push(this);\r\n this.update();\r\n }\r\n /**\r\n * It's an update method which is called by the system if\r\n * [[InteractionObject]] is used as animation.\r\n *\r\n * This will update coordinates of the element based on the movement\r\n * directions.\r\n */\r\n InteractionKeyboardObject.prototype.update = function () {\r\n // Init and get settings\r\n var io = this.interaction;\r\n var speed = getInteraction().getKeyboardOption(io, \"speed\"), accelleration = getInteraction().getKeyboardOption(io, \"accelleration\"), accellerationDelay = getInteraction().getKeyboardOption(io, \"accellerationDelay\"), shift = {\r\n x: 0,\r\n y: 0\r\n };\r\n // If SHIFT key is pressed we slash speed by half and disable accelleration\r\n if (this.keyboardEvent.shiftKey) {\r\n speed *= 0.5;\r\n accelleration = 1;\r\n }\r\n // If CTRL is pressed we increase speed by x2\r\n else if (this.keyboardEvent.ctrlKey) {\r\n speed *= 2;\r\n }\r\n // Get elapsed time\r\n var ms = new Date().getTime() - this._startedOn;\r\n var accelleratedMs = ms - accellerationDelay;\r\n // Add accellerated movement\r\n if ((accelleration > 0) && (accelleratedMs > 0)) {\r\n var accellerationFactor = ms / accellerationDelay;\r\n ms = accellerationDelay;\r\n shift.x += this.directionX * (speed * accelleration * accellerationFactor * accelleratedMs);\r\n shift.y += this.directionY * (speed * accelleration * accellerationFactor * accelleratedMs);\r\n }\r\n // Calculate position\r\n shift.x += this.directionX * (speed * ms);\r\n shift.y += this.directionY * (speed * ms);\r\n // Simulate move on Interaction\r\n getInteraction().handleTransformMove(io, shift, { x: 0, y: 0 }, this.keyboardEvent, true, false);\r\n };\r\n /**\r\n * Returns if this object has been already been disposed.\r\n *\r\n * @return Is disposed?\r\n */\r\n InteractionKeyboardObject.prototype.isDisposed = function () {\r\n return this._disposed;\r\n };\r\n /**\r\n * Disposes this object. Removes from system animations.\r\n */\r\n InteractionKeyboardObject.prototype.dispose = function () {\r\n if (!this._disposed) {\r\n getInteraction().processDragStop(this.interaction);\r\n $array.remove(system.animations, this);\r\n }\r\n };\r\n return InteractionKeyboardObject;\r\n}());\r\nexport { InteractionKeyboardObject };\r\n","/**\r\n * Interaction Object module\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { InteractionObjectEventDispatcher } from \"./InteractionObjectEvents\";\r\nimport { BaseObjectEvents } from \"../Base\";\r\nimport { List } from \"../utils/List\";\r\nimport { Dictionary, DictionaryDisposer } from \"../utils/Dictionary\";\r\nimport { getInteraction } from \"./Interaction\";\r\nimport * as $type from \"../utils/Type\";\r\n/**\r\n * Re-exports\r\n */\r\nexport { InteractionObjectEventDispatcher };\r\n/**\r\n * Interaction object represents an object that is subject for any kind of\r\n * interaction with it with any input devices: mouse, touch or keyboard.\r\n *\r\n * Any DOM element can be wrapped into an Internaction object which in turn\r\n * enables attaching various interaction events to it, such as: hit, drag,\r\n * swipe, etc.\r\n *\r\n * To create an [[InteractionObject]] out of a [[Sprite]], use:\r\n * `interaction.getInteractionFromSprite(sprite: Sprite)`\r\n *\r\n * To create an [[InteractionObject]] out of a a regular element:\r\n * `interaction.getInteraction(element: HTMLElement)`\r\n */\r\nvar InteractionObject = /** @class */ (function (_super) {\r\n __extends(InteractionObject, _super);\r\n /**\r\n * Constructor\r\n */\r\n function InteractionObject(element) {\r\n var _this = _super.call(this) || this;\r\n /**\r\n * @ignore\r\n * An [[EventDispatcher]] instance which holds events for this object\r\n */\r\n _this._eventDispatcher = new InteractionObjectEventDispatcher(_this);\r\n /**\r\n * Collection of Disposers for various events. (so that those get disposed\r\n * when the whole InteractionObject is disposed)\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n _this.eventDisposers = new Dictionary();\r\n /**\r\n * A [[Dictionary]] that holds temporarily replaced original style values for\r\n * HTML element, so that they can be restored when the functionality that\r\n * replaced them is done.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n _this.replacedStyles = new Dictionary();\r\n _this._clickable = false;\r\n _this._contextMenuDisabled = false;\r\n _this._hoverable = false;\r\n _this._trackable = false;\r\n _this._draggable = false;\r\n _this._swipeable = false;\r\n _this._resizable = false;\r\n _this._wheelable = false;\r\n _this._inert = false;\r\n /**\r\n * Is element currently hovered?\r\n */\r\n _this._isHover = false;\r\n /**\r\n * Was this element hovered via pointer or is it just \"pretenting\" to be\r\n * hovered.\r\n *\r\n * @ignore\r\n */\r\n _this.isRealHover = false;\r\n /**\r\n * Is the element hovered by touch pointer?\r\n */\r\n _this._isHoverByTouch = false;\r\n /**\r\n * Has element got any pointers currently pressing down on it?\r\n */\r\n _this._isDown = false;\r\n /**\r\n * Does element have focus?\r\n */\r\n _this._isFocused = false;\r\n /**\r\n * Is element currently protected from touch interactions?\r\n */\r\n _this._isTouchProtected = false;\r\n /**\r\n * Options used for inertia functionality.\r\n */\r\n _this._inertiaOptions = new Dictionary();\r\n /**\r\n * A collection of different inertia types, currently playing out.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n _this.inertias = new Dictionary();\r\n /**\r\n * Click/tap options.\r\n */\r\n _this._hitOptions = {};\r\n /**\r\n * Hover options.\r\n */\r\n _this._hoverOptions = {};\r\n /**\r\n * Swipe gesture options.\r\n */\r\n _this._swipeOptions = {};\r\n /**\r\n * Keyboard options.\r\n */\r\n _this._keyboardOptions = {};\r\n /**\r\n * Mouse options.\r\n */\r\n _this._mouseOptions = {};\r\n /**\r\n * Cursor options.\r\n */\r\n _this._cursorOptions = {\r\n \"defaultStyle\": [{\r\n \"property\": \"cursor\",\r\n \"value\": \"default\"\r\n }]\r\n };\r\n _this._disposers.push(_this._eventDispatcher);\r\n _this._element = element;\r\n _this.className = \"InteractionObject\";\r\n _this._disposers.push(new DictionaryDisposer(_this.inertias));\r\n _this._disposers.push(new DictionaryDisposer(_this.eventDisposers));\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n ;\r\n Object.defineProperty(InteractionObject.prototype, \"events\", {\r\n /**\r\n * An [[EventDispatcher]] instance which holds events for this object\r\n */\r\n get: function () {\r\n return this._eventDispatcher;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(InteractionObject.prototype, \"isHover\", {\r\n /**\r\n * @return Hovered?\r\n */\r\n get: function () {\r\n return this._isHover;\r\n },\r\n /**\r\n * Indicates if this element is currently hovered.\r\n *\r\n * @param value Hovered?\r\n */\r\n set: function (value) {\r\n if (this.isHover != value) {\r\n this._isHover = value;\r\n if (value) {\r\n getInteraction().overObjects.moveValue(this);\r\n }\r\n else {\r\n this.isRealHover = false;\r\n getInteraction().overObjects.removeValue(this);\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(InteractionObject.prototype, \"isHoverByTouch\", {\r\n /**\r\n * @return Hovered?\r\n */\r\n get: function () {\r\n return this._isHoverByTouch;\r\n },\r\n /**\r\n * Indicates if this element is currently hovered.\r\n *\r\n * @param value Hovered?\r\n */\r\n set: function (value) {\r\n if (this.isHoverByTouch != value) {\r\n this._isHoverByTouch = value;\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(InteractionObject.prototype, \"overPointers\", {\r\n /**\r\n * A list of pointers currently over the element.\r\n *\r\n * @see {@link Pointer}\r\n * @return List if pointers currently hovering the element\r\n */\r\n get: function () {\r\n if (!this._overPointers) {\r\n this._overPointers = new List();\r\n }\r\n return this._overPointers;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(InteractionObject.prototype, \"isDown\", {\r\n /**\r\n * @return Has down pointers?\r\n */\r\n get: function () {\r\n return this._isDown;\r\n },\r\n /**\r\n * Indicates if this element has currently any pointers pressing on it.\r\n *\r\n * @param value Has down pointers?\r\n */\r\n set: function (value) {\r\n if (this.isDown != value) {\r\n this._isDown = value;\r\n if (value) {\r\n getInteraction().downObjects.moveValue(this);\r\n }\r\n else {\r\n getInteraction().downObjects.removeValue(this);\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(InteractionObject.prototype, \"downPointers\", {\r\n /**\r\n * A list of pointers currently pressing down on this element.\r\n *\r\n * @see {@link Pointer}\r\n * @return List of down pointers\r\n */\r\n get: function () {\r\n if (!this._downPointers) {\r\n this._downPointers = new List();\r\n }\r\n return this._downPointers;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(InteractionObject.prototype, \"isFocused\", {\r\n /**\r\n * @return Focused?\r\n */\r\n get: function () {\r\n return this._isFocused;\r\n },\r\n /**\r\n * Indicates if this element is currently focused.\r\n *\r\n * @param value Focused?\r\n */\r\n set: function (value) {\r\n if (this.isFocused != value) {\r\n this._isFocused = value;\r\n if (value) {\r\n getInteraction().focusedObject = this;\r\n }\r\n else {\r\n getInteraction().focusedObject = undefined;\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(InteractionObject.prototype, \"isTouchProtected\", {\r\n /**\r\n * @ignore\r\n * @return Touch protected?\r\n */\r\n get: function () {\r\n return this._isTouchProtected;\r\n },\r\n /**\r\n * Indicates if this element is currently being protected from touch actions.\r\n *\r\n * @ignore\r\n * @param value Touch protected?\r\n */\r\n set: function (value) {\r\n if (this._isTouchProtected != value) {\r\n this._isTouchProtected = value;\r\n if (value) {\r\n getInteraction().unprepElement(this);\r\n }\r\n else if (this.draggable || this.swipeable || this.trackable || this.resizable) {\r\n getInteraction().prepElement(this);\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(InteractionObject.prototype, \"clickable\", {\r\n /**\r\n * @return Clickable?\r\n */\r\n get: function () {\r\n return this._clickable;\r\n },\r\n /**\r\n * Is element clickable? Clickable elements will generate \"hit\" events when\r\n * clicked or tapped.\r\n *\r\n * @param value Clickable?\r\n */\r\n set: function (value) {\r\n if (this._clickable !== value) {\r\n this._clickable = value;\r\n getInteraction().processClickable(this);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(InteractionObject.prototype, \"contextMenuDisabled\", {\r\n /**\r\n * @return Context menu disabled?\r\n */\r\n get: function () {\r\n return this._contextMenuDisabled;\r\n },\r\n /**\r\n * Should element prevent context menu to be displayed, e.g. when\r\n * right-clicked?\r\n *\r\n * @default false\r\n * @param value Context menu disabled?\r\n */\r\n set: function (value) {\r\n if (this._contextMenuDisabled !== value) {\r\n this._contextMenuDisabled = value;\r\n getInteraction().processContextMenu(this);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(InteractionObject.prototype, \"hoverable\", {\r\n /**\r\n * @return Hoverable?\r\n */\r\n get: function () {\r\n return this._hoverable;\r\n },\r\n /**\r\n * Indicates if element should generate hover events.\r\n *\r\n * @param value Hoverable?\r\n */\r\n set: function (value) {\r\n if (this._hoverable !== value) {\r\n this._hoverable = value;\r\n getInteraction().processHoverable(this);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(InteractionObject.prototype, \"trackable\", {\r\n /**\r\n * @return Track pointer?\r\n */\r\n get: function () {\r\n return this._trackable;\r\n },\r\n /**\r\n * Indicates if pointer movement over element should be tracked.\r\n *\r\n * @param value Track pointer?\r\n */\r\n set: function (value) {\r\n if (this._trackable !== value) {\r\n this._trackable = value;\r\n getInteraction().processTrackable(this);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(InteractionObject.prototype, \"draggable\", {\r\n /**\r\n * @return Draggable?\r\n */\r\n get: function () {\r\n return this._draggable;\r\n },\r\n /**\r\n * Indicates if element can be dragged. (moved)\r\n *\r\n * @param value Draggable?\r\n */\r\n set: function (value) {\r\n if (this._draggable !== value) {\r\n this._draggable = value;\r\n getInteraction().processDraggable(this);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(InteractionObject.prototype, \"swipeable\", {\r\n /**\r\n * @return Track swipe?\r\n */\r\n get: function () {\r\n return this._swipeable;\r\n },\r\n /**\r\n * Indicates whether element should react to swipe gesture.\r\n *\r\n * @param value Track swipe?\r\n */\r\n set: function (value) {\r\n if (this._swipeable !== value) {\r\n this._swipeable = value;\r\n getInteraction().processSwipeable(this);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(InteractionObject.prototype, \"resizable\", {\r\n /**\r\n * @return Resizeble?\r\n */\r\n get: function () {\r\n return this._resizable;\r\n },\r\n /**\r\n * Indicates if element can be resized.\r\n *\r\n * @param value Resizeable?\r\n */\r\n set: function (value) {\r\n if (this._resizable !== value) {\r\n this._resizable = value;\r\n getInteraction().processResizable(this);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(InteractionObject.prototype, \"wheelable\", {\r\n /**\r\n * @return Track wheel?\r\n */\r\n get: function () {\r\n return this._wheelable;\r\n },\r\n /**\r\n * Indicates whether track moouse wheel rotation over element.\r\n *\r\n * @param value Track wheel?\r\n */\r\n set: function (value) {\r\n if (this._wheelable !== value) {\r\n this._wheelable = value;\r\n getInteraction().processWheelable(this);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(InteractionObject.prototype, \"inert\", {\r\n /**\r\n * @return Inert?\r\n */\r\n get: function () {\r\n return this._inert;\r\n },\r\n /**\r\n * Indicates if element is inert, i.e. if it should carry movement momentum\r\n * after it is dragged and released.\r\n *\r\n * @param value Inert?\r\n */\r\n set: function (value) {\r\n if (this._inert !== value) {\r\n this._inert = value;\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(InteractionObject.prototype, \"focusable\", {\r\n /**\r\n * @return Focusable?\r\n */\r\n get: function () {\r\n return this._focusable;\r\n },\r\n /**\r\n * Indicates if element can gain focus.\r\n *\r\n * @param value Focusable?\r\n */\r\n set: function (value) {\r\n if (this._focusable !== value) {\r\n this._focusable = value;\r\n if (this._focusable && this.tabindex == -1) {\r\n this._tabindex = 1;\r\n }\r\n getInteraction().processFocusable(this);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(InteractionObject.prototype, \"tabindex\", {\r\n /**\r\n * @return Tab index\r\n */\r\n get: function () {\r\n return $type.getValueDefault(this._tabindex, -1);\r\n },\r\n /**\r\n * Element's tab index.\r\n *\r\n * @param value Tab index\r\n */\r\n set: function (value) {\r\n if (this._tabindex !== value) {\r\n this._tabindex = value;\r\n if (value > -1) {\r\n this.focusable = true;\r\n }\r\n getInteraction().processFocusable(this);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(InteractionObject.prototype, \"element\", {\r\n /**\r\n * @return Element\r\n */\r\n get: function () {\r\n return this._element;\r\n },\r\n /**\r\n * A DOM element associated with this element.\r\n *\r\n * @param element Element\r\n */\r\n set: function (element) {\r\n this._element = element;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(InteractionObject.prototype, \"originalPosition\", {\r\n /**\r\n * @ignore Exclude from docs\r\n * @return Position.\r\n */\r\n get: function () {\r\n return this._originalPosition || { x: 0, y: 0 };\r\n },\r\n /**\r\n * Element's original position.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Position\r\n */\r\n set: function (value) {\r\n this._originalPosition = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(InteractionObject.prototype, \"originalScale\", {\r\n /**\r\n * @return Scale\r\n */\r\n get: function () {\r\n return $type.getValueDefault(this._originalScale, 1);\r\n },\r\n /**\r\n * Element's original scale.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Scale\r\n */\r\n set: function (value) {\r\n if (this._originalScale !== value) {\r\n this._originalScale = value;\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(InteractionObject.prototype, \"originalAngle\", {\r\n /**\r\n * @return Angle\r\n */\r\n get: function () {\r\n return $type.getValueDefault(this._originalAngle, 0);\r\n },\r\n /**\r\n * Element's original angle.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Angle\r\n */\r\n set: function (value) {\r\n if (this._originalAngle !== value) {\r\n this._originalAngle = value;\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(InteractionObject.prototype, \"inertiaOptions\", {\r\n /**\r\n * @return Options\r\n */\r\n get: function () {\r\n if (this.sprite && this.sprite._adapterO) {\r\n return this.sprite._adapterO.apply(\"inertiaOptions\", this._inertiaOptions);\r\n }\r\n else {\r\n return this._inertiaOptions;\r\n }\r\n },\r\n /**\r\n * Inertia options.\r\n *\r\n * @param value Options\r\n */\r\n set: function (value) {\r\n this._inertiaOptions = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(InteractionObject.prototype, \"hitOptions\", {\r\n /**\r\n * @return Options\r\n */\r\n get: function () {\r\n if (this.sprite && this.sprite._adapterO) {\r\n return this.sprite._adapterO.apply(\"hitOptions\", this._hitOptions);\r\n }\r\n else {\r\n return this._hitOptions;\r\n }\r\n },\r\n /**\r\n * Hit options.\r\n *\r\n * @param value Options\r\n */\r\n set: function (value) {\r\n this._hitOptions = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(InteractionObject.prototype, \"hoverOptions\", {\r\n /**\r\n * @return Options\r\n */\r\n get: function () {\r\n if (this.sprite && this.sprite._adapterO) {\r\n return this.sprite._adapterO.apply(\"hoverOptions\", this._hoverOptions);\r\n }\r\n else {\r\n return this._hoverOptions;\r\n }\r\n },\r\n /**\r\n * Hover options.\r\n *\r\n * @param value Options\r\n */\r\n set: function (value) {\r\n this._hoverOptions = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(InteractionObject.prototype, \"swipeOptions\", {\r\n /**\r\n * @return Options\r\n */\r\n get: function () {\r\n if (this.sprite && this.sprite._adapterO) {\r\n return this.sprite._adapterO.apply(\"swipeOptions\", this._swipeOptions);\r\n }\r\n else {\r\n return this._swipeOptions;\r\n }\r\n },\r\n /**\r\n * Swipe options.\r\n *\r\n * @param value Options\r\n */\r\n set: function (value) {\r\n this._swipeOptions = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(InteractionObject.prototype, \"keyboardOptions\", {\r\n /**\r\n * @return Options\r\n */\r\n get: function () {\r\n if (this.sprite && this.sprite._adapterO) {\r\n return this.sprite._adapterO.apply(\"keyboardOptions\", this._keyboardOptions);\r\n }\r\n else {\r\n return this._keyboardOptions;\r\n }\r\n },\r\n /**\r\n * Keyboard options.\r\n *\r\n * @param value Options\r\n */\r\n set: function (value) {\r\n this._keyboardOptions = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(InteractionObject.prototype, \"mouseOptions\", {\r\n /**\r\n * @return Options\r\n */\r\n get: function () {\r\n if (this.sprite && this.sprite._adapterO) {\r\n return this.sprite._adapterO.apply(\"mouseOptions\", this._mouseOptions);\r\n }\r\n else {\r\n return this._mouseOptions;\r\n }\r\n },\r\n /**\r\n * Mouse options.\r\n *\r\n * Enables controlling options related to the mouse, for example sensitivity\r\n * of its mouse wheel.\r\n *\r\n * E.g. the below will reduce chart's wheel-zoom speed to half its default\r\n * speed:\r\n *\r\n * ```TypeScript\r\n * chart.plotContainer.mouseOptions.sensitivity = 0.5;\r\n * ```\r\n * ```JavaScript\r\n * chart.plotContainer.mouseOptions.sensitivity = 0.5;\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"plotContainer\": {\r\n * \"mouseOptions\": {\r\n * \"sensitivity\": 0.5\r\n * }\r\n * }\r\n * }\r\n * ```\r\n *\r\n * @since 4.5.14\r\n * @param value Options\r\n */\r\n set: function (value) {\r\n this._mouseOptions = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(InteractionObject.prototype, \"cursorOptions\", {\r\n /**\r\n * @return Options\r\n */\r\n get: function () {\r\n if (this.sprite && this.sprite._adapterO) {\r\n return this.sprite._adapterO.apply(\"cursorOptions\", this._cursorOptions);\r\n }\r\n else {\r\n return this._cursorOptions;\r\n }\r\n },\r\n /**\r\n * Cursor options.\r\n *\r\n * @param value Options\r\n */\r\n set: function (value) {\r\n this._cursorOptions = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Copies all properties and related assets from another object of the same\r\n * type.\r\n *\r\n * @param source Source object\r\n */\r\n InteractionObject.prototype.copyFrom = function (source) {\r\n _super.prototype.copyFrom.call(this, source);\r\n this.inertiaOptions = source.inertiaOptions;\r\n this.hitOptions = source.hitOptions;\r\n this.hoverOptions = source.hoverOptions;\r\n this.swipeOptions = source.swipeOptions;\r\n this.keyboardOptions = source.keyboardOptions;\r\n this.cursorOptions = source.cursorOptions;\r\n this.contextMenuDisabled = source.contextMenuDisabled;\r\n getInteraction().applyCursorOverStyle(this);\r\n };\r\n /**\r\n * @ignore Exclude from docs\r\n */\r\n InteractionObject.prototype.setEventDisposer = function (key, value, f) {\r\n var disposer = this.eventDisposers.getKey(key);\r\n if (value) {\r\n if (disposer == null) {\r\n this.eventDisposers.setKey(key, f());\r\n }\r\n }\r\n else {\r\n if (disposer != null) {\r\n disposer.dispose();\r\n this.eventDisposers.removeKey(key);\r\n }\r\n }\r\n };\r\n /**\r\n * Disposes object.\r\n */\r\n InteractionObject.prototype.dispose = function () {\r\n _super.prototype.dispose.call(this);\r\n // Remove from all interaction registries\r\n var interaction = getInteraction();\r\n interaction.overObjects.removeValue(this);\r\n interaction.downObjects.removeValue(this);\r\n interaction.trackedObjects.removeValue(this);\r\n interaction.transformedObjects.removeValue(this);\r\n // Unlock document wheel\r\n if (this.isHover && this.wheelable) {\r\n interaction.unlockWheel();\r\n }\r\n if (interaction.focusedObject === this) {\r\n interaction.focusedObject = undefined;\r\n }\r\n };\r\n return InteractionObject;\r\n}(BaseObjectEvents));\r\nexport { InteractionObject };\r\n","import { __extends } from \"tslib\";\r\nimport { TargetedEventDispatcher } from \"../utils/EventDispatcher\";\r\nimport { MultiDisposer, CounterDisposer } from \"../utils/Disposer\";\r\n/**\r\n * Represents an Event Dispatcher for [[InteractionObject]].\r\n *\r\n * Besides regular [[EventDispatcher]] functionality it adds new events with\r\n * direct application to DOM nodes. Primarily used to handle keyboard events,\r\n * but can turn into something else moving forward.\r\n */\r\nvar InteractionObjectEventDispatcher = /** @class */ (function (_super) {\r\n __extends(InteractionObjectEventDispatcher, _super);\r\n function InteractionObjectEventDispatcher() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n /**\r\n * Holds a list of Disposers for DOM events added.\r\n */\r\n _this._domEvents = {};\r\n return _this;\r\n }\r\n /**\r\n * Adds a DOM event and returns Disposer.\r\n *\r\n * @return Disposer\r\n */\r\n InteractionObjectEventDispatcher.prototype._addDOMEvent = function (type, key, listener, context) {\r\n var _this = this;\r\n if (!this._domEvents[type]) {\r\n var callback_1 = function (e) {\r\n listener.call(context, key, e);\r\n };\r\n this.target.element.addEventListener(type, callback_1, false);\r\n this._domEvents[type] = new CounterDisposer(function () {\r\n delete _this._domEvents[type];\r\n _this.target.element.removeEventListener(type, callback_1, false);\r\n });\r\n }\r\n return this._domEvents[type].increment();\r\n };\r\n InteractionObjectEventDispatcher.prototype._dispatchKeyboardEvent = function (key, ev) {\r\n // TODO use this.dispatchImmediately ?\r\n if (this.target.events.isEnabled(key)) {\r\n this.target.events.dispatchImmediately(key, {\r\n type: key,\r\n target: this.target,\r\n event: ev\r\n });\r\n }\r\n };\r\n InteractionObjectEventDispatcher.prototype._on = function (once, type, callback, context, shouldClone, dispatch) {\r\n var info = _super.prototype._on.call(this, once, type, callback, context, shouldClone, dispatch);\r\n var disposers = [info.disposer];\r\n switch (type) {\r\n case \"hit\":\r\n case \"doublehit\":\r\n case \"rightclick\":\r\n case \"down\":\r\n case \"up\":\r\n this.target.clickable = true;\r\n break;\r\n case \"drag\":\r\n case \"dragstart\":\r\n case \"dragstop\":\r\n this.target.draggable = true;\r\n break;\r\n case \"track\":\r\n this.target.trackable = true;\r\n break;\r\n case \"resize\":\r\n this.target.resizable = true;\r\n break;\r\n case \"swipe\":\r\n case \"swipeleft\":\r\n case \"swiperight\":\r\n this.target.swipeable = true;\r\n break;\r\n case \"wheel\":\r\n case \"wheelup\":\r\n case \"wheeldown\":\r\n case \"wheelleft\":\r\n case \"wheelright\":\r\n this.target.wheelable = true;\r\n break;\r\n case \"over\":\r\n case \"out\":\r\n this.target.hoverable = true;\r\n break;\r\n case \"focus\":\r\n case \"blur\":\r\n case \"focusin\":\r\n case \"focusout\":\r\n this.target.focusable = true;\r\n break;\r\n case \"keydown\":\r\n disposers.push(this._addDOMEvent(type, type, this._dispatchKeyboardEvent, this));\r\n break;\r\n case \"keyup\":\r\n disposers.push(this._addDOMEvent(type, type, this._dispatchKeyboardEvent, this));\r\n break;\r\n case \"keypress\":\r\n disposers.push(this._addDOMEvent(type, type, this._dispatchKeyboardEvent, this));\r\n break;\r\n case \"input\":\r\n disposers.push(this._addDOMEvent(type, type, this._dispatchKeyboardEvent, this));\r\n break;\r\n }\r\n info.disposer = new MultiDisposer(disposers);\r\n return info;\r\n };\r\n return InteractionObjectEventDispatcher;\r\n}(TargetedEventDispatcher));\r\nexport { InteractionObjectEventDispatcher };\r\n","/**\r\n * Mouse-related functionality\r\n */\r\n/**\r\n * Defines static methods that hold style list for various mouse cursor styles,\r\n * maintaining browser compatibility.\r\n */\r\nvar MouseCursorStyle = /** @class */ (function () {\r\n function MouseCursorStyle() {\r\n }\r\n /**\r\n * Styles for \"grab\" mouse cursor.\r\n */\r\n MouseCursorStyle.grab = [{\r\n \"property\": \"cursor\",\r\n \"value\": \"move\"\r\n }, {\r\n \"property\": \"cursor\",\r\n \"value\": \"grab\"\r\n }, {\r\n \"property\": \"cursor\",\r\n \"value\": \"-webkit-grab\"\r\n }];\r\n /**\r\n * Styles for \"grabbing\" mouse cursor.\r\n */\r\n MouseCursorStyle.grabbing = [{\r\n \"property\": \"cursor\",\r\n \"value\": \"move\"\r\n }, {\r\n \"property\": \"cursor\",\r\n \"value\": \"grabbing\"\r\n }, {\r\n \"property\": \"cursor\",\r\n \"value\": \"-webkit-grabbing\"\r\n }];\r\n /**\r\n * Styles for \"pointer\" mouse cursor. (usually used for links)\r\n */\r\n MouseCursorStyle.pointer = [{\r\n \"property\": \"cursor\",\r\n \"value\": \"pointer\"\r\n }];\r\n /**\r\n * Styles for default mouse cursor. (browser determines style)\r\n */\r\n MouseCursorStyle.default = [{\r\n \"property\": \"cursor\",\r\n \"value\": \"default\"\r\n }];\r\n /**\r\n * Styles for horizontal bi-directional resize mouse cursor.\r\n */\r\n MouseCursorStyle.horizontalResize = [{\r\n \"property\": \"cursor\",\r\n \"value\": \"ew-resize\"\r\n }];\r\n /**\r\n * Styles for vertical bi-directional mouse cursor.\r\n */\r\n MouseCursorStyle.verticalResize = [{\r\n \"property\": \"cursor\",\r\n \"value\": \"ns-resize\"\r\n }];\r\n /**\r\n * Styles for \"no-allowed\" cursor.\r\n * @since 4.7.15\r\n */\r\n MouseCursorStyle.notAllowed = [{\r\n \"property\": \"cursor\",\r\n \"value\": \"not-allowed\"\r\n }];\r\n /**\r\n * Styles for \"text\" cursor.\r\n * @since 4.9.12\r\n */\r\n MouseCursorStyle.text = [{\r\n \"property\": \"cursor\",\r\n \"value\": \"text\"\r\n }];\r\n return MouseCursorStyle;\r\n}());\r\nexport { MouseCursorStyle };\r\n","/**\r\n * [[AMElement]] represents any SVG element and related functionality.\r\n */\r\nimport * as $dom from \"../utils/DOM\";\r\nimport * as $object from \"../utils/Object\";\r\nimport * as $type from \"../utils/Type\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * A base class for all SVG elements. Provides low-level DOM functionality.\r\n *\r\n * All visual elements extend this class.\r\n */\r\nvar AMElement = /** @class */ (function () {\r\n /**\r\n * Constructor creates a new element or uses the one that was passed in.\r\n *\r\n * @param element Element reference node type\r\n */\r\n function AMElement(element) {\r\n /**\r\n * Indicates if the element was already disposed.\r\n */\r\n this._isDisposed = false;\r\n /**\r\n * Current X coordinate.\r\n */\r\n this._x = 0;\r\n /**\r\n * Current Y coordinate.\r\n */\r\n this._y = 0;\r\n /**\r\n *\r\n */\r\n this._rotationY = 0;\r\n /**\r\n *\r\n */\r\n this._rotationX = 0;\r\n /**\r\n * Current rotation.\r\n */\r\n this._rotation = 0;\r\n /**\r\n * Current scale.\r\n */\r\n this._scale = 1;\r\n if (typeof element === \"string\") {\r\n this.node = document.createElementNS($dom.SVGNS, element);\r\n }\r\n else {\r\n this.node = element;\r\n }\r\n }\r\n /**\r\n * Removes element's node from DOM.\r\n */\r\n AMElement.prototype.removeNode = function () {\r\n if (this.node) {\r\n if (this.node.parentNode) {\r\n this.node.parentNode.removeChild(this.node);\r\n }\r\n }\r\n };\r\n Object.defineProperty(AMElement.prototype, \"transformString\", {\r\n /**\r\n * Returns `transform` attribute of the element.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Transform attribute value\r\n */\r\n get: function () {\r\n if (this.node) {\r\n return this._transformString;\r\n /*\r\n const value = this.node.getAttribute(\"transform\");\r\n \r\n if (value !== null) {\r\n return value;\r\n }*/\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Appply position, rotation and scale properties via elemen's `transform`\r\n * property\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n AMElement.prototype.transform = function () {\r\n var transfromString = \"translate(\" + this._x + \",\" + this._y + \")\";\r\n if (this._scale != 1) {\r\n transfromString += ((transfromString ? \" \" : \"\") + \"scale(\" + this._scale + \")\");\r\n }\r\n if (this._rotation != 0) {\r\n var rotateString = \"rotate(\" + this._rotation + \")\";\r\n if (this._rotationX && this._rotationY) {\r\n rotateString = \"rotate(\" + this._rotation + \" \" + this._rotationX + \" \" + this._rotationY + \")\";\r\n }\r\n transfromString += ((transfromString ? \" \" : \"\") + rotateString);\r\n }\r\n this._transformString = transfromString;\r\n this.node.setAttribute(\"transform\", transfromString);\r\n };\r\n /**\r\n * Returns bounding box of the element.\r\n *\r\n * ATTENTION: Bounding box calculations are extremely costly so should be\r\n * used sparingly and cached whenever possible.\r\n *\r\n * @return Bounding rectangle\r\n */\r\n AMElement.prototype.getBBox = function () {\r\n var bbox = {\r\n width: 0,\r\n height: 0,\r\n x: 0,\r\n y: 0\r\n };\r\n // FF would fail if getBBox() is called without node added to parent\r\n if (this.node && this.node.parentNode) {\r\n try { // again for ff. TODO: check if this doesn't slow down\r\n var svgbbox = this.node.getBBox();\r\n bbox.x = svgbbox.x;\r\n bbox.y = svgbbox.y;\r\n bbox.width = svgbbox.width;\r\n bbox.height = svgbbox.height;\r\n }\r\n catch (err) { }\r\n }\r\n return bbox;\r\n };\r\n /**\r\n * Moves the element to new coordinates.\r\n *\r\n * @param x Target X\r\n * @param y Target Y\r\n */\r\n AMElement.prototype.moveTo = function (point) {\r\n if (point) {\r\n var x = point.x;\r\n var y = point.y;\r\n if (this._x != x || this._y != y) {\r\n this._x = x;\r\n this._y = y;\r\n this.transform();\r\n }\r\n }\r\n };\r\n Object.defineProperty(AMElement.prototype, \"content\", {\r\n /**\r\n * Returns element's contents as SVG markup.\r\n *\r\n * @return Contents\r\n */\r\n get: function () {\r\n // @todo Do not use `innerHTML` as this is not reliable and will not work on all browsers\r\n return this.node.innerHTML || \"\";\r\n },\r\n /**\r\n * Element's SVG contents.\r\n *\r\n * @param value Contents\r\n */\r\n set: function (value) {\r\n // @todo Do not use `innerHTML` as this is not reliable and will not work on all browsers\r\n this.node.innerHTML = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(AMElement.prototype, \"textContent\", {\r\n /**\r\n * @return Text contents\r\n */\r\n get: function () {\r\n return this.node.textContent || \"\";\r\n },\r\n /**\r\n * Text contents of the SVG element.\r\n *\r\n * @param value Text contents\r\n */\r\n set: function (value) {\r\n this.node.textContent = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(AMElement.prototype, \"x\", {\r\n /**\r\n * @return X coordinate (px)\r\n */\r\n get: function () {\r\n return this._x;\r\n },\r\n /**\r\n * Element's X position in pixels.\r\n *\r\n * @param value X coordinate (px)\r\n */\r\n set: function (value) {\r\n if (this._x != value) {\r\n this._x = value;\r\n this.transform();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(AMElement.prototype, \"y\", {\r\n /**\r\n * @return Y coordinate (px)\r\n */\r\n get: function () {\r\n return this._y;\r\n },\r\n /**\r\n * Element's Y position in pixels.\r\n *\r\n * @param value Y coordinate (px)\r\n */\r\n set: function (value) {\r\n if (this._y != value) {\r\n this._y = value;\r\n this.transform();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(AMElement.prototype, \"rotation\", {\r\n /**\r\n * @return Rotation\r\n */\r\n get: function () {\r\n return this._rotation;\r\n },\r\n /**\r\n * Element's rotation in degrees.\r\n *\r\n * @param value Rotation\r\n */\r\n set: function (angle) {\r\n if (this._rotation != angle) {\r\n this._rotation = angle;\r\n this.transform();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(AMElement.prototype, \"rotationX\", {\r\n /**\r\n * @ignore\r\n */\r\n get: function () {\r\n return this._rotationX;\r\n },\r\n /**\r\n * @ignore\r\n */\r\n set: function (x) {\r\n if (this._rotationX != x) {\r\n this._rotationX = x;\r\n this.transform();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(AMElement.prototype, \"rotationY\", {\r\n /**\r\n * @ignore\r\n */\r\n get: function () {\r\n return this._rotationY;\r\n },\r\n /**\r\n * @ignore\r\n */\r\n set: function (y) {\r\n if (this._rotationY != y) {\r\n this._rotationY = y;\r\n this.transform();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(AMElement.prototype, \"scale\", {\r\n /**\r\n * @return Scale\r\n */\r\n get: function () {\r\n return this._scale;\r\n },\r\n /**\r\n * Element's scale where 1 is original size.\r\n *\r\n * Setting to 0.5 will reduce element's size by 50%, 2 will make element\r\n * twice as large, etc.\r\n *\r\n * @param value Scale\r\n */\r\n set: function (value) {\r\n if (this._scale != value) {\r\n this._scale = value;\r\n this.transform();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Removes an attribute from element.\r\n *\r\n * @param attribute Attribute to remove\r\n */\r\n AMElement.prototype.removeAttr = function (attribute) {\r\n this.node.removeAttribute(attribute);\r\n };\r\n /**\r\n * Sets a set of attributes on a element.\r\n *\r\n * @param attributes An object with attribute names (key) and values\r\n * @return The same element\r\n */\r\n AMElement.prototype.attr = function (attributes) {\r\n var _this = this;\r\n $object.each(attributes, function (attributeName, attributeValue) {\r\n if (!$type.hasValue(attributeValue)) {\r\n _this.node.removeAttribute(attributeName);\r\n }\r\n else {\r\n // this is for performance testing\r\n //if(attributeValue == this.node.getAttribute(attributeName)){\r\n //\tconsole.log(attributeName, attributeValue)\r\n //}\r\n _this.node.setAttribute(attributeName, attributeValue);\r\n }\r\n });\r\n return this;\r\n };\r\n /**\r\n * Returns a value of a node attribute.\r\n *\r\n * @param attribute Attribute name\r\n * @return Attribute value\r\n */\r\n AMElement.prototype.getAttr = function (attribute) {\r\n return this.node.getAttribute(attribute);\r\n };\r\n /**\r\n * Sets a single attribute of the element's node using namesspace.\r\n *\r\n * @param ns Namespace\r\n * @param attribute Attribute\r\n * @param value Value\r\n * @return The same element\r\n */\r\n AMElement.prototype.attrNS = function (ns, attribute, value) {\r\n this.node.setAttributeNS(ns, attribute, value);\r\n return this;\r\n };\r\n /**\r\n * Returns a namespaced attribute value from node.\r\n *\r\n * @param ns Namespace\r\n * @param attribute Attribute\r\n * @return Attribute value\r\n */\r\n AMElement.prototype.getAttrNS = function (ns, attribute) {\r\n return this.node.getAttributeNS(ns, attribute);\r\n };\r\n /**\r\n * Removes `style` attribute from node.\r\n *\r\n * @param attribute Attribute to remove\r\n */\r\n AMElement.prototype.removeStyle = function (attribute) {\r\n // @todo Review because it's a bit messy and maybe not needed (pratically not used)\r\n this.node.style[attribute] = null;\r\n delete this.node.style[attribute];\r\n };\r\n /**\r\n * Returns style attribute value.\r\n *\r\n * @param attribute Style attribute value\r\n * @return Attribute value\r\n */\r\n AMElement.prototype.getStyle = function (attribute) {\r\n // @todo Review because it's a bit messy and maybe not needed (pratically not used)\r\n return this.node.style[attribute];\r\n };\r\n /**\r\n * Adds style attributes to element's node.\r\n *\r\n * @param attributes Object containing attribute: value pairs\r\n * @return The same element\r\n */\r\n AMElement.prototype.addStyle = function (attributes) {\r\n var _this = this;\r\n // @todo Review because it's a bit messy and maybe not needed (pratically not used)\r\n $object.each(attributes, function (attributeName, attributeValue) {\r\n if (!$type.hasValue(attributeValue)) {\r\n _this.removeStyle(attributeName);\r\n }\r\n else {\r\n _this.node.style[attributeName] = attributeValue;\r\n }\r\n });\r\n return this;\r\n };\r\n /**\r\n * Adds a class to element.\r\n *\r\n * @param name Class name\r\n */\r\n AMElement.prototype.addClass = function (name) {\r\n $dom.addClass(this.node, name);\r\n };\r\n /**\r\n * Removes a class from element.\r\n *\r\n * @param name Class name\r\n */\r\n AMElement.prototype.removeClass = function (name) {\r\n $dom.removeClass(this.node, name);\r\n };\r\n /**\r\n * Sets a class name on element.\r\n *\r\n * @param name Class name\r\n */\r\n AMElement.prototype.setClass = function (name) {\r\n this.node.setAttribute(\"class\", name);\r\n };\r\n /**\r\n * Removes all element's child nodes, basically leaving it empty.\r\n */\r\n AMElement.prototype.removeChildNodes = function () {\r\n // remove all children\r\n while (this.node.childNodes.length > 0) {\r\n this.node.removeChild(this.node.firstChild);\r\n }\r\n };\r\n /**\r\n * Was this element already been disposed?\r\n *\r\n * @return Disposed?\r\n */\r\n AMElement.prototype.isDisposed = function () {\r\n return this._isDisposed;\r\n };\r\n /**\r\n * Disposes element.\r\n */\r\n AMElement.prototype.dispose = function () {\r\n this.removeNode();\r\n };\r\n return AMElement;\r\n}());\r\nexport { AMElement };\r\n","import { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { AMElement } from \"./AMElement\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Creates an SVG `<g>` element.\r\n *\r\n * SVG groups are used for elements that need more elements just one.\r\n *\r\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/SVG/Element/g} About `<g>` element\r\n */\r\nvar Group = /** @class */ (function (_super) {\r\n __extends(Group, _super);\r\n /**\r\n * Constructor.\r\n *\r\n * @param elementName Element type (should be \"g\")\r\n */\r\n function Group(elementName) {\r\n return _super.call(this, elementName) || this;\r\n }\r\n /**\r\n * Adds an element to group.\r\n *\r\n * This will manipulate DOM. `element` will be physically moved into group.\r\n *\r\n * @param element Element\r\n */\r\n Group.prototype.add = function (element) {\r\n if (element) {\r\n this.node.appendChild(element.node);\r\n }\r\n };\r\n /**\r\n * Adds an element to group.\r\n *\r\n * This will manipulate DOM. `element` will be physically moved into group.\r\n *\r\n * @param element Element\r\n */\r\n Group.prototype.addToBack = function (element) {\r\n if (element) {\r\n var first = this.node.childNodes[0];\r\n if (first) {\r\n if (first != element.node) {\r\n this.node.insertBefore(element.node, first);\r\n }\r\n }\r\n else {\r\n this.node.appendChild(element.node);\r\n }\r\n }\r\n };\r\n /**\r\n * Removes the `element` from group.\r\n *\r\n * Please note that this will not dispose the element itself, it will just\r\n * remove it from the group.\r\n *\r\n * @param element Element\r\n */\r\n Group.prototype.removeElement = function (element) {\r\n // todo: not sure about the speed, need to investigate, maybe it's faster to check if node is a child\r\n if (element) {\r\n try {\r\n if (element.node && element.node.parentNode == this.node) {\r\n this.node.removeChild(element.node);\r\n }\r\n }\r\n catch (err) {\r\n }\r\n }\r\n };\r\n /**\r\n * Checks if this group already has the child element added\r\n *\r\n * @param element\r\n * @return {boolean}\r\n */\r\n Group.prototype.hasChild = function (element) {\r\n for (var i = 0; i < this.node.childNodes.length; i++) {\r\n if (this.node.childNodes[i] == element.node) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n };\r\n Object.defineProperty(Group.prototype, \"content\", {\r\n /**\r\n * @return SVG markup\r\n */\r\n get: function () {\r\n return this.node.innerHTML;\r\n },\r\n /**\r\n * Content of the group element.\r\n *\r\n * Can be used to add a lot of proprietary SVG markup into group.\r\n *\r\n * @param value SVG markup\r\n */\r\n set: function (value) {\r\n this.node.innerHTML = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Removes all children from the group.\r\n */\r\n Group.prototype.removeChildren = function () {\r\n if (this.node.childNodes) {\r\n while (this.node.childNodes.length > 0) {\r\n var childNode = this.node.firstChild;\r\n if (childNode && childNode.parentNode) {\r\n childNode.parentNode.removeChild(childNode);\r\n }\r\n }\r\n }\r\n };\r\n Group.prototype.removeChildrenByTag = function (tag) {\r\n if (this.node.childNodes) {\r\n var remove = this.node.getElementsByTagName(tag);\r\n for (var i = 0; i < remove.length; i++) {\r\n this.node.removeChild(remove[i]);\r\n }\r\n }\r\n };\r\n return Group;\r\n}(AMElement));\r\nexport { Group };\r\n","/**\r\n * Paper class just like the white sheet of pressed fiber it draws its name\r\n * inspiration from is used as a starting point to start a drawing.\r\n *\r\n * Before we can start adding elements (drawing) we need to take out a new sheet\r\n * of paper, or in this instance create a blank SVG element.\r\n *\r\n * This class creates such element, as well as implements methods needed to\r\n * start adding elements to it.\r\n */\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { AMElement } from \"./AMElement\";\r\nimport { Group } from \"./Group\";\r\nimport { SVGContainer } from \"./SVGContainer\";\r\nimport * as $dom from \"../utils/DOM\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Paper class which when instantiated will create an SVG element as well as\r\n * some of the sub-elements like `<desc>`, `<defs>`.\r\n *\r\n * Use its methods like `addGroup` and `append` to add elements to the paper.\r\n */\r\nvar Paper = /** @class */ (function () {\r\n /**\r\n * Creates main `<svg>` container and related elements.\r\n *\r\n * @param container A reference to HTML element to create `<svg>` in\r\n */\r\n function Paper(container, id) {\r\n // Store container reference\r\n this.container = container;\r\n this.id = id;\r\n // Create SVG element\r\n var svg = document.createElementNS($dom.SVGNS, \"svg\");\r\n svg.setAttribute(\"version\", \"1.1\");\r\n svg.setAttributeNS($dom.XMLNS, \"xmlns\", $dom.SVGNS);\r\n svg.setAttributeNS($dom.XMLNS, \"xmlns:xlink\", $dom.XLINK);\r\n svg.setAttribute(\"role\", \"group\");\r\n this.container.appendChild(svg);\r\n // Add description\r\n //let desc: SVGElement = <SVGElement>document.createElementNS($dom.SVGNS, \"desc\");\r\n //desc.appendChild(document.createTextNode(\"JavaScript chart by amCharts\"));\r\n //svg.appendChild(desc);\r\n // Add defs\r\n this.defs = document.createElementNS($dom.SVGNS, \"defs\");\r\n svg.appendChild(this.defs);\r\n // Set width and height to fit container\r\n svg.style.width = \"100%\";\r\n svg.style.height = \"100%\";\r\n svg.style.overflow = \"visible\";\r\n // Store variable\r\n this.svg = svg;\r\n }\r\n /**\r\n * Creates and returns a new element. Does not attach it to Paper yet.\r\n *\r\n * @param elementName Element name\r\n * @return New element\r\n */\r\n Paper.prototype.add = function (elementName) {\r\n return new AMElement(elementName);\r\n };\r\n /**\r\n * Creates and returns a new Group element. Does not attach it to Paper.\r\n *\r\n * @param groupName Element name\r\n * @return New Group\r\n */\r\n Paper.prototype.addGroup = function (groupName) {\r\n return new Group(groupName);\r\n };\r\n /**\r\n * Appends an element to Paper.\r\n *\r\n * @param element Element to append\r\n */\r\n Paper.prototype.append = function (element) {\r\n if (element) {\r\n this.svg.appendChild(element.node);\r\n }\r\n };\r\n /**\r\n * Appends an element to `<defs>` block of the Paper.\r\n *\r\n * @param element Element\r\n */\r\n Paper.prototype.appendDef = function (element) {\r\n if (element) {\r\n this.defs.appendChild(element.node);\r\n }\r\n };\r\n /**\r\n * Creates and returns new `<foreignObject>` element. Does not append it to\r\n * Paper.\r\n *\r\n * @return A foreignObject element\r\n */\r\n Paper.prototype.foreignObject = function () {\r\n var element = new AMElement(\"foreignObject\");\r\n //this.append(element);\r\n return element;\r\n };\r\n /**\r\n * Checks if browser supports `<foreignObject>` elements.\r\n *\r\n * @return Supports `foreignObject`?\r\n */\r\n Paper.prototype.supportsForeignObject = function () {\r\n return document.implementation.hasFeature(\"http://www.w3.org/TR/SVG11/feature#Extensibility\", \"1.1\");\r\n };\r\n return Paper;\r\n}());\r\nexport { Paper };\r\nvar ghostPaper = null;\r\n/**\r\n * A [[Paper]] instance to create elements, that are not yet ready to be\r\n * placed in visible DOM.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\nexport function getGhostPaper() {\r\n if (ghostPaper === null) {\r\n // ghost is used to draw elements while real paper is not yet created or Sprite doesn't know parent yet\r\n var ghostDiv = document.createElement(\"div\");\r\n ghostDiv.hidden = true;\r\n ghostDiv.style.width = \"1px\";\r\n ghostDiv.style.height = \"1px\";\r\n ghostDiv.style.position = \"absolute\";\r\n ghostDiv.style.zIndex = \"-1000000\";\r\n document.body.appendChild(ghostDiv);\r\n var ghostSvgContainer = new SVGContainer(ghostDiv, true);\r\n ghostPaper = new Paper(ghostSvgContainer.SVGContainer, \"ghost\");\r\n }\r\n return ghostPaper;\r\n}\r\n","/**\r\n * A collection of functions that deals with path calculations.\r\n */\r\nimport * as $math from \"../utils/Math\";\r\nimport * as $type from \"../utils/Type\";\r\nimport { getGhostPaper } from \"../rendering/Paper\";\r\nimport { options } from \"../Options\";\r\n/**\r\n * ============================================================================\r\n * PATH FUNCTIONS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Returns an SVG path from a number of points.\r\n *\r\n * @ignore Exclude from docs\r\n * @param points An array of line elbow points\r\n * @return SVG path\r\n */\r\nexport function polyline(points) {\r\n var path = lineTo(points[0]);\r\n var prevPoint = { x: 0, y: 0 };\r\n var minStep = options.minPolylineStep;\r\n if (!$type.isNumber(minStep)) {\r\n minStep = 0.5;\r\n }\r\n for (var i = 0, len = points.length; i < len; i++) {\r\n var point = points[i];\r\n if ($math.getDistance(point, prevPoint) > minStep) {\r\n path += lineTo(point);\r\n prevPoint = point;\r\n }\r\n }\r\n return path;\r\n}\r\n/**\r\n * Returns a starting point of an SVG path.\r\n *\r\n * @ignore Exclude from docs\r\n * @param point Starting point\r\n * @return SVG path\r\n */\r\nexport function moveTo(point) {\r\n return \" M\" + $math.round(point.x, 4) + \",\" + $math.round(point.y, 4) + \" \";\r\n}\r\n/**\r\n * Returns a line part of SVG path.\r\n *\r\n * @ignore Exclude from docs\r\n * @param point SVG path\r\n * @return SVG path\r\n */\r\nexport function lineTo(point) {\r\n return \" L\" + $math.round(point.x, 4) + \",\" + $math.round(point.y, 4) + \" \";\r\n}\r\n/**\r\n * Returns a quadratic curve part of an SVG path.\r\n *\r\n * @ignore Exclude from docs\r\n * @param point End point of the curve\r\n * @param controlPoint Control point\r\n * @return SVG path\r\n */\r\nexport function quadraticCurveTo(point, controlPoint) {\r\n return \" Q\" + $math.round(controlPoint.x, 4)\r\n + \",\" + $math.round(controlPoint.y, 4) + \" \" + $math.round(point.x, 4)\r\n + \",\" + $math.round(point.y, 4);\r\n}\r\n/**\r\n * Returns a cubic curve part of an SVG path.\r\n *\r\n * @ignore Exclude from docs\r\n * @param point End point of the curve\r\n * @param controlPointA Control point A\r\n * @param controlPointB Control point B\r\n * @return SVG path\r\n */\r\nexport function cubicCurveTo(point, controlPointA, controlPointB) {\r\n return \" C\" + $math.round(controlPointA.x, 4)\r\n + \",\" + $math.round(controlPointA.y, 4) + \" \" + $math.round(controlPointB.x, 4)\r\n + \",\" + $math.round(controlPointB.y, 4) + \" \" + $math.round(point.x, 4)\r\n + \",\" + $math.round(point.y, 4);\r\n}\r\n/**\r\n * Returns a terminator for an SVG path.\r\n *\r\n * @ignore Exclude from docs\r\n * @return SVG path\r\n */\r\nexport function closePath() {\r\n return \" Z\";\r\n}\r\n/**\r\n * Returns an arc part of an SVG path.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Better parameter descriptions\r\n * @param startAngle Starting angle\r\n * @param arc Arc\r\n * @param radius Radius\r\n * @param radiusY Vertical radius\r\n * @return SVG path\r\n */\r\nexport function arcTo(startAngle, arc, radius, radiusY) {\r\n if (arc == 0) {\r\n return \"\";\r\n }\r\n if (!$type.isNumber(radiusY)) {\r\n radiusY = radius;\r\n }\r\n var path = \"\";\r\n var c = \",\";\r\n var segments = Math.ceil(Math.abs(arc) / 180);\r\n var l = 1;\r\n if (arc < 0) {\r\n l = 0;\r\n }\r\n // previous, as we use a not A\r\n var pax = 0;\r\n var pay = 0;\r\n // center\r\n var cx = -$math.cos(startAngle) * radius;\r\n var cy = -$math.sin(startAngle) * radiusY;\r\n // foir very short angles and big radius, solves artefacts\r\n if (arc < 0.5 && radius > 3000) {\r\n var endAngle = startAngle + arc;\r\n var ax = $math.round($math.cos(endAngle) * radius, 4);\r\n var ay = $math.round($math.sin(endAngle) * radiusY, 4);\r\n return lineTo({ x: ax, y: ay });\r\n }\r\n for (var i = 0; i < segments; i++) {\r\n var endAngle = startAngle + arc / segments * (i + 1);\r\n var ax = $math.round($math.cos(endAngle) * radius + cx - pax, 4);\r\n var ay = $math.round($math.sin(endAngle) * radiusY + cy - pay, 4);\r\n path += \" a\" + radius + c + radiusY + c + 0 + c + 0 + c + l + c + ax + c + ay;\r\n pax = ax;\r\n pay = ay;\r\n }\r\n return path;\r\n}\r\n/**\r\n * Creates an arc path.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param startAngle [description]\r\n * @param arc [description]\r\n * @param radius [description]\r\n * @param innerRadius [description]\r\n * @param radiusY [description]\r\n * @param cornerRadius [description]\r\n * @param innerCornerRadius [description]\r\n * @return SVG path\r\n */\r\nexport function arc(startAngle, arc, radius, innerRadius, radiusY, cornerRadius, innerCornerRadius) {\r\n if (arc == 0) {\r\n return \"\";\r\n }\r\n if (!$type.isNumber(innerRadius)) {\r\n innerRadius = 0;\r\n }\r\n if (radius == 0 && innerRadius <= 0) {\r\n return \"\";\r\n }\r\n if (radius < innerRadius) {\r\n var temp = radius;\r\n radius = innerRadius;\r\n innerRadius = temp;\r\n if ($type.isNumber(radiusY)) {\r\n radiusY = radiusY / innerRadius * radius;\r\n }\r\n }\r\n arc = $math.min(arc, 360);\r\n if (arc == 360) {\r\n cornerRadius = 0;\r\n innerCornerRadius = 0;\r\n }\r\n var endAngle = startAngle + arc;\r\n var crSin = $math.sin($math.min(arc, 45) / 2);\r\n radiusY = $type.isNumber(radiusY) ? radiusY : radius;\r\n cornerRadius = cornerRadius || 0;\r\n innerCornerRadius = $type.isNumber(innerCornerRadius) ? innerCornerRadius : cornerRadius;\r\n var innerRadiusY = (radiusY / radius) * innerRadius;\r\n var cornerRadiusY = (radiusY / radius) * cornerRadius;\r\n var innerCornerRadiusY = (radiusY / radius) * innerCornerRadius;\r\n cornerRadius = $math.fitToRange(cornerRadius, 0, (radius - innerRadius) / 2);\r\n cornerRadiusY = $math.fitToRange(cornerRadiusY, 0, (radiusY - innerRadiusY) / 2);\r\n innerCornerRadius = $math.fitToRange(innerCornerRadius, 0, (radius - innerRadius) / 2);\r\n innerCornerRadiusY = $math.fitToRange(innerCornerRadiusY, 0, (radiusY - innerRadiusY) / 2);\r\n cornerRadius = $math.round($math.fitToRange(cornerRadius, 0, radius * crSin), 4);\r\n cornerRadiusY = $math.round($math.fitToRange(cornerRadiusY, 0, radiusY * crSin), 4);\r\n innerCornerRadius = $math.round($math.fitToRange(innerCornerRadius, 0, innerRadius * crSin), 4);\r\n innerCornerRadiusY = $math.round($math.fitToRange(innerCornerRadiusY, 0, innerRadiusY * crSin), 4);\r\n var crAngle = Math.asin(cornerRadius / radius / 2) * $math.DEGREES * 2;\r\n var crAngleY = Math.asin(cornerRadiusY / radiusY / 2) * $math.DEGREES * 2;\r\n if (innerRadius < innerCornerRadius) {\r\n innerRadius = innerCornerRadius;\r\n }\r\n if (innerRadiusY < innerCornerRadiusY) {\r\n innerRadiusY = innerCornerRadiusY;\r\n }\r\n var crInnerAngle = Math.asin(innerCornerRadius / innerRadius / 2) * $math.DEGREES * 2;\r\n var crInnerAngleY = Math.asin(innerCornerRadiusY / innerRadiusY / 2) * $math.DEGREES * 2;\r\n if (!$type.isNumber(crInnerAngle)) {\r\n crInnerAngle = 0;\r\n }\r\n if (!$type.isNumber(crInnerAngleY)) {\r\n crInnerAngleY = 0;\r\n }\r\n var middleAngle = startAngle + arc / 2;\r\n var mPoint = { x: $math.round($math.cos(middleAngle) * innerRadius, 4), y: $math.sin(middleAngle) * innerRadiusY };\r\n var a0 = { x: $math.cos(startAngle) * (innerRadius + innerCornerRadius), y: $math.sin(startAngle) * (innerRadiusY + innerCornerRadiusY) };\r\n var b0 = { x: $math.cos(startAngle) * (radius - cornerRadius), y: $math.sin(startAngle) * (radiusY - cornerRadiusY) };\r\n var c0 = { x: $math.cos(endAngle) * (radius - cornerRadius), y: $math.sin(endAngle) * (radiusY - cornerRadiusY) };\r\n var d0 = { x: $math.cos(endAngle) * (innerRadius + innerCornerRadius), y: $math.sin(endAngle) * (innerRadiusY + innerCornerRadiusY) };\r\n var b1 = { x: $math.cos(startAngle + crAngle) * radius, y: $math.sin(startAngle + crAngleY) * radiusY };\r\n var d1 = { x: $math.cos(endAngle - crInnerAngle) * innerRadius, y: $math.sin(endAngle - crInnerAngleY) * innerRadiusY };\r\n // some magic math\r\n innerCornerRadius += innerCornerRadius * $math.sin(crInnerAngle / 2);\r\n innerCornerRadiusY += innerCornerRadiusY * $math.sin(crInnerAngleY / 2);\r\n if (crInnerAngle > (endAngle - startAngle) / 2) {\r\n d1 = mPoint;\r\n }\r\n var path = \"\";\r\n // start from b if this is full circle\r\n if (arc == 360) {\r\n path = moveTo(b0);\r\n }\r\n // otherwise start from a\r\n else {\r\n path = moveTo(a0);\r\n path += lineTo(b0);\r\n path += arcToPoint(b1, cornerRadius, cornerRadiusY, true);\r\n }\r\n // draw arc\r\n path += arcTo(startAngle + crAngle, arc - 2 * crAngle, radius, radiusY);\r\n // draw inner arc\r\n if ($type.isNumber(innerRadius) && innerRadius != 0) {\r\n // move to B if this is full circle\r\n if (arc == 360 && cornerRadius == 0) {\r\n path += moveTo(d0);\r\n }\r\n // draw line otherwise\r\n else {\r\n path += arcToPoint(c0, cornerRadius, cornerRadiusY, true);\r\n path += lineTo(d0);\r\n path += arcToPoint(d1, innerCornerRadius, innerCornerRadiusY, true);\r\n }\r\n path += arcTo(endAngle - crInnerAngle, -(arc - 2 * crInnerAngle), innerRadius, innerRadiusY);\r\n if (arc < 360 || cornerRadius > 0) {\r\n path += arcToPoint(a0, innerCornerRadius, innerCornerRadiusY, true);\r\n }\r\n path += lineTo(a0);\r\n }\r\n else {\r\n path += arcToPoint(c0, cornerRadius, cornerRadiusY, true);\r\n if (arc < 360) {\r\n path += lineTo(a0);\r\n }\r\n }\r\n return path;\r\n}\r\n/**\r\n * Creates a path for an arc to specific coordinate.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param point Reference point\r\n * @param radius Radius\r\n * @param radiusY Vertical radius (for skewed arcs)\r\n * @param sweepFlag [description]\r\n * @param largeArcFlag [description]\r\n * @param xAxisRotation [description]\r\n * @return Arc path\r\n */\r\nexport function arcToPoint(point, radius, radiusY, sweepFlag, largeArcFlag, xAxisRotation) {\r\n if (radius == 0) {\r\n return \"\";\r\n }\r\n xAxisRotation = xAxisRotation || 0;\r\n largeArcFlag = Boolean(largeArcFlag);\r\n sweepFlag = Boolean(sweepFlag);\r\n var c = \",\";\r\n var sweepFlagValue = +sweepFlag; // converts to 1 or 0\r\n var largeArcFlagValue = +largeArcFlag; // converts to 1 or 0\r\n return \" A\" + radius + c + radiusY + c + xAxisRotation + c + largeArcFlagValue + c + sweepFlagValue + c + $math.round(point.x, 4) + c + $math.round(point.y, 4);\r\n}\r\n/**\r\n * Creates a new rectangle.\r\n *\r\n * @ignore Exclude from docs\r\n * @param width Width (px)\r\n * @param height Height (px)\r\n * @param x X position\r\n * @param y Y position\r\n * @return Rectangle\r\n */\r\nexport function rectangle(width, height, x, y) {\r\n if (!$type.isNumber(x)) {\r\n x = 0;\r\n }\r\n if (!$type.isNumber(y)) {\r\n y = 0;\r\n }\r\n return moveTo({ x: x, y: y }) + lineTo({ x: x + width, y: y }) + lineTo({ x: x + width, y: y + height }) + lineTo({ x: x, y: y + height }) + closePath();\r\n}\r\n/**\r\n * Converts a rectangle to an SVG path.\r\n *\r\n * @ignore Exclude from docs\r\n * @param rect Rectangle\r\n * @param ccw Counter-clockwise?\r\n * @return SVG path\r\n */\r\nexport function rectToPath(rect, ccw) {\r\n var c = \",\";\r\n var L = \" L\";\r\n if (ccw) {\r\n return \"M\" + rect.x\r\n + c + rect.y + L + rect.x\r\n + c + (rect.y + rect.height) + L + (rect.x + rect.width)\r\n + c + (rect.y + rect.height) + L + (rect.x + rect.width)\r\n + c + rect.y + L + rect.x\r\n + c + rect.y;\r\n }\r\n else {\r\n return \"M\" + rect.x\r\n + c + rect.y + L + (rect.x + rect.width)\r\n + c + rect.y + L + (rect.x + rect.width)\r\n + c + (rect.y + rect.height) + L + rect.x\r\n + c + (rect.y + rect.height) + L + rect.x\r\n + c + rect.y;\r\n }\r\n}\r\n/**\r\n * Converts SVG path to array of points.\r\n *\r\n * Note, this is experimental feature based on method which is deprecated\r\n * on some browsers and some browsers do not support it at all.\r\n *\r\n * You can save the output of this function, but not rely on it completely.\r\n */\r\nexport function pathToPoints(path, pointCount) {\r\n var paper = getGhostPaper();\r\n var svgPath = paper.add(\"path\").node;\r\n svgPath.setAttribute(\"d\", path);\r\n if (svgPath.getPointAtLength && svgPath.getTotalLength) {\r\n var length_1 = svgPath.getTotalLength();\r\n var toPoints = [];\r\n for (var i = 0; i < pointCount; i++) {\r\n var point = svgPath.getPointAtLength(i / pointCount * length_1);\r\n toPoints.push({ x: point.x, y: point.y });\r\n }\r\n return toPoints;\r\n }\r\n svgPath.remove();\r\n}\r\nexport function spiralPoints(cx, cy, radius, radiusY, innerRadius, step, radiusStep, startAngle, endAngle) {\r\n if (!$type.isNumber(startAngle)) {\r\n startAngle = 0;\r\n }\r\n if (!$type.isNumber(startAngle)) {\r\n endAngle = startAngle;\r\n }\r\n var r = innerRadius + 0.01;\r\n var angle = startAngle * $math.RADIANS;\r\n var points = [];\r\n while (r < radius + radiusStep) {\r\n var stepSize = step;\r\n if (stepSize / 2 > r) {\r\n stepSize = 2 * r;\r\n }\r\n angle += 2 * Math.asin(stepSize / 2 / r);\r\n if (angle * $math.DEGREES > endAngle + ((radius - innerRadius) / radiusStep) * 360) {\r\n break;\r\n }\r\n var degrees = angle * $math.DEGREES;\r\n var point = { x: cx + r * Math.cos(angle), y: cy + r * radiusY / radius * Math.sin(angle) };\r\n points.push(point);\r\n r = innerRadius + degrees / 360 * radiusStep;\r\n }\r\n points.shift();\r\n return points;\r\n}\r\nexport function pointsToPath(points) {\r\n if (!points || points.length == 0) {\r\n return \"\";\r\n }\r\n var path = moveTo(points[0]);\r\n if (points && points.length > 0) {\r\n for (var i = 1; i < points.length; i++) {\r\n path += lineTo(points[i]);\r\n }\r\n }\r\n return path;\r\n}\r\n","import * as $array from \"./Array\";\r\nimport * as $log from \"./Log\";\r\nvar Native = /** @class */ (function () {\r\n function Native() {\r\n var _this = this;\r\n this._targets = [];\r\n this._observer = new ResizeObserver(function (entries) {\r\n $array.each(entries, function (entry) {\r\n $array.each(_this._targets, function (x) {\r\n if (x.target === entry.target) {\r\n x.callback();\r\n }\r\n });\r\n });\r\n });\r\n }\r\n Native.prototype.addTarget = function (target, callback) {\r\n this._observer.observe(target, { box: \"content-box\" });\r\n this._targets.push({ target: target, callback: callback });\r\n };\r\n Native.prototype.removeTarget = function (target) {\r\n this._observer.unobserve(target);\r\n $array.keepIf(this._targets, function (x) {\r\n return x.target !== target;\r\n });\r\n };\r\n return Native;\r\n}());\r\nvar Raf = /** @class */ (function () {\r\n function Raf() {\r\n this._targets = [];\r\n }\r\n Raf.prototype.addTarget = function (target, callback) {\r\n var _this = this;\r\n if (this._targets.length === 0) {\r\n var lastTime_1 = null;\r\n var loop_1 = function () {\r\n var currentTime = Date.now();\r\n if (lastTime_1 === null || currentTime > (lastTime_1 + Raf.delay)) {\r\n lastTime_1 = currentTime;\r\n $array.each(_this._targets, function (x) {\r\n var newSize = x.target.getBoundingClientRect();\r\n if (newSize.width !== x.size.width || newSize.height !== x.size.height) {\r\n x.size = newSize;\r\n x.callback();\r\n }\r\n });\r\n }\r\n _this._timer = requestAnimationFrame(loop_1);\r\n };\r\n this._timer = requestAnimationFrame(loop_1);\r\n }\r\n var size = target.getBoundingClientRect();\r\n this._targets.push({ target: target, callback: callback, size: size });\r\n };\r\n Raf.prototype.removeTarget = function (target) {\r\n $array.keepIf(this._targets, function (x) {\r\n return x.target !== target;\r\n });\r\n if (this._targets.length === 0) {\r\n cancelAnimationFrame(this._timer);\r\n }\r\n };\r\n Raf.delay = 200;\r\n return Raf;\r\n}());\r\nvar observer = null;\r\nfunction makeSensor() {\r\n if (observer === null) {\r\n if (typeof ResizeObserver !== \"undefined\") {\r\n observer = new Native();\r\n }\r\n else {\r\n observer = new Raf();\r\n }\r\n }\r\n return observer;\r\n}\r\nvar ResizeSensor = /** @class */ (function () {\r\n function ResizeSensor(element, callback) {\r\n this._disposed = false;\r\n this._sensor = makeSensor();\r\n this._element = element;\r\n this._sensor.addTarget(element, callback);\r\n }\r\n ResizeSensor.prototype.isDisposed = function () {\r\n return this._disposed;\r\n };\r\n ResizeSensor.prototype.dispose = function () {\r\n if (!this._disposed) {\r\n this._disposed = true;\r\n this._sensor.removeTarget(this._element);\r\n }\r\n };\r\n Object.defineProperty(ResizeSensor.prototype, \"sensor\", {\r\n get: function () {\r\n return this._sensor;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Deprecated: do not use.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n ResizeSensor.prototype.reset = function () {\r\n $log.warn(\"resizeSensor.reset() is no longer needed and can be removed\");\r\n };\r\n return ResizeSensor;\r\n}());\r\nexport { ResizeSensor };\r\n","/**\r\n * This functionality is related to the HTML wrapper that houses `<svg>` tag.\r\n */\r\nimport { Popup } from \"../elements/Popup\";\r\nimport { Modal } from \"../elements/Modal\";\r\nimport { ListTemplate, ListDisposer } from \"../utils/List\";\r\nimport * as $utils from \"../utils/Utils\";\r\nimport * as $dom from \"../utils/DOM\";\r\nimport * as $array from \"../utils/Array\";\r\nimport * as $type from \"../utils/Type\";\r\nimport { ResizeSensor } from \"../utils/ResizeSensor\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * A array of all SVG Containers (one SVG container per chart instance).\r\n *\r\n * @ignore Exclude from docs\r\n */\r\nexport var svgContainers = [];\r\n/**\r\n * A class used to create an HTML wrapper for the SVG contents.\r\n */\r\nvar SVGContainer = /** @class */ (function () {\r\n /**\r\n * Constructor\r\n *\r\n * * Creates an HTML wrapper for SVG\r\n */\r\n function SVGContainer(htmlElement, ghost) {\r\n var _this = this;\r\n /**\r\n * Indicates if this object has already been deleted. Any\r\n * destruction/disposal code should take this into account when deciding\r\n * wheter to run potentially costly disposal operations if they already have\r\n * been run.\r\n */\r\n this._disposed = false;\r\n /**\r\n * If this component is in a separate HTML container, `autoResize` means the\r\n * module will constantly measure container's size and adopt contents to it.\r\n */\r\n this.autoResize = true;\r\n /**\r\n * Holds list of references to [[Sprite]] objects that should not be exported\r\n * when exporting chart to an image.\r\n *\r\n * @ignore\r\n */\r\n this.nonExportableSprites = [];\r\n /**\r\n * List of objects that need to be disposed when this one is disposed.\r\n */\r\n this._disposers = [];\r\n this.cssScale = 1;\r\n // This is needed so that it won't resize while printing, so that way printing works correctly.\r\n this._printing = false;\r\n // Log parent HTML element\r\n this.htmlElement = htmlElement;\r\n if (!ghost) {\r\n this._printing = false;\r\n this.initSensor();\r\n this._disposers.push($dom.addEventListener(window, \"beforeprint\", function () {\r\n _this._printing = true;\r\n }));\r\n this._disposers.push($dom.addEventListener(window, \"afterprint\", function () {\r\n _this._printing = false;\r\n }));\r\n }\r\n // Adds to containers array\r\n svgContainers.push(this);\r\n /**\r\n * Create child div for the container - it will have svg node\r\n * It might seem that this container is not necessay, however having it solves\r\n * a problems with mouse position detection and some other.\r\n */\r\n var svgContainer = document.createElement(\"div\");\r\n var style = svgContainer.style;\r\n style.width = \"100%\";\r\n style.height = \"100%\";\r\n style.position = \"relative\";\r\n htmlElement.appendChild(svgContainer);\r\n this.SVGContainer = svgContainer;\r\n }\r\n /**\r\n * (Re)Initializes a resize sensor.\r\n */\r\n SVGContainer.prototype.initSensor = function () {\r\n var _this = this;\r\n if (this.resizeSensor) {\r\n this.resizeSensor.dispose();\r\n }\r\n var callback = function () {\r\n if (_this.autoResize && !_this._printing) {\r\n _this.measure();\r\n }\r\n };\r\n this.resizeSensor = new ResizeSensor(this.htmlElement, callback);\r\n this._disposers.push(this.resizeSensor);\r\n };\r\n /**\r\n * Measures size of parent HTML element.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n SVGContainer.prototype.measure = function () {\r\n var width = $utils.width(this.htmlElement);\r\n var height = $utils.height(this.htmlElement);\r\n var container = this.container;\r\n if (container) {\r\n if (this.width != width || this.height != height) {\r\n this.width = width;\r\n this.height = height;\r\n if (width > 0) {\r\n container.maxWidth = width;\r\n }\r\n if (height > 0) {\r\n container.maxHeight = height;\r\n }\r\n $dom.fixPixelPerfect(this.SVGContainer);\r\n }\r\n if (!container.maxWidth) {\r\n container.maxWidth = 0;\r\n }\r\n if (!container.maxHeight) {\r\n container.maxHeight = 0;\r\n }\r\n this.cssScale = 1;\r\n this.checkTransform(this.htmlElement);\r\n }\r\n };\r\n Object.defineProperty(SVGContainer.prototype, \"container\", {\r\n /**\r\n * @return Container\r\n */\r\n get: function () {\r\n return this._container;\r\n },\r\n /**\r\n * A [[Container]] element which is placed into container.\r\n *\r\n * @param container Container\r\n */\r\n set: function (container) {\r\n this._container = container;\r\n this.measure();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Returns if this object has been already been disposed.\r\n *\r\n * @return Is disposed?\r\n */\r\n SVGContainer.prototype.isDisposed = function () {\r\n return this._disposed;\r\n };\r\n /**\r\n * Removes this container from SVG container list in system, which\r\n * effectively disables size change monitoring for it.\r\n */\r\n SVGContainer.prototype.dispose = function () {\r\n if (!this._disposed) {\r\n $array.remove(svgContainers, this);\r\n }\r\n $array.each(this._disposers, function (item) {\r\n item.dispose();\r\n });\r\n };\r\n Object.defineProperty(SVGContainer.prototype, \"hideOverflow\", {\r\n /**\r\n * Indicates if chart container should have its style set\r\n * to `overflow: hidden`.\r\n *\r\n * Normally, we don't want that, so that certain elements, such as tooltips,\r\n * would be able to go outside chart area.\r\n *\r\n * There is one issue though. Some browsers ignore SVG masks and would\r\n * display scrollbars if chart elements, that go outside chart area extend\r\n * outside window.\r\n *\r\n * This is especially true for [[MapChart]], which can have its elements\r\n * extend very widely when zoomed in. Even if those parts are not visible\r\n * because of SVG masks, some browsers might still display window scrollbars.\r\n *\r\n * This is why we set this setting to `true` in [[MapChart]].\r\n *\r\n * Other charts use default of `false`.\r\n */\r\n set: function (value) {\r\n if (value) {\r\n this.SVGContainer.style.overflow = \"hidden\";\r\n }\r\n else {\r\n this.SVGContainer.style.overflow = \"\";\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(SVGContainer.prototype, \"modal\", {\r\n /**\r\n * ==========================================================================\r\n * MODAL/POPUP RELATED STUFF\r\n * ==========================================================================\r\n * @hidden\r\n */\r\n /**\r\n * Returns a [[Modal]] instance, associated with this chart.\r\n * (elements top parent)\r\n *\r\n * Accessing modal does not make it appear. To make a modal appear, use\r\n * `showModal()` method.\r\n *\r\n * @see {@link Modal} for more information about using Modal windows\r\n * @return Modal instance\r\n */\r\n get: function () {\r\n if (!$type.hasValue(this._modal)) {\r\n // Create new modal\r\n this._modal = new Modal();\r\n this._modal.container = this.SVGContainer;\r\n // Add to disposers\r\n this._disposers.push(this._modal);\r\n }\r\n return this._modal;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Opens a modal window with specific content (`text` parameter) and,\r\n * optionally, `title`.\r\n *\r\n * The `text` parameter can contain HTML content.\r\n *\r\n * @see {@link Modal} for more information about using Modal windows\r\n * @param text Modal contents\r\n * @param title Title for the modal window\r\n */\r\n SVGContainer.prototype.openModal = function (text, title) {\r\n // Hide previous modal\r\n this.closeModal();\r\n // Create modal\r\n var modal = this.modal;\r\n modal.content = text;\r\n modal.readerTitle = title || \"\";\r\n modal.title = title || \"\";\r\n modal.open();\r\n return modal;\r\n };\r\n /**\r\n * Hides modal window if there is one currently open.\r\n */\r\n SVGContainer.prototype.closeModal = function () {\r\n if (this._modal) {\r\n this.modal.close();\r\n }\r\n };\r\n Object.defineProperty(SVGContainer.prototype, \"popups\", {\r\n /**\r\n * A list of popups for this chart.\r\n *\r\n * @return Popups\r\n */\r\n get: function () {\r\n if (!$type.hasValue(this._popups)) {\r\n // Create popup template\r\n var popupTemplate = new Popup();\r\n popupTemplate.container = this.SVGContainer;\r\n // Create the list\r\n this._popups = new ListTemplate(popupTemplate);\r\n // Add to disposers\r\n this._disposers.push(new ListDisposer(this._popups));\r\n this._disposers.push(this._popups.template);\r\n }\r\n return this._popups;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Creates, opens, and returns a new [[Popup]] window.\r\n *\r\n * `text` can be any valid HTML.\r\n *\r\n * `title` is currently not supported.\r\n *\r\n * @param text Popup contents\r\n * @param title Popup title\r\n * @return Popup instance\r\n */\r\n SVGContainer.prototype.openPopup = function (text, title) {\r\n var popup = this.popups.create();\r\n popup.content = text;\r\n if ($type.hasValue(title)) {\r\n popup.title = title;\r\n }\r\n popup.open();\r\n return popup;\r\n };\r\n /**\r\n * Closes all currently open popup windows\r\n */\r\n SVGContainer.prototype.closeAllPopups = function () {\r\n this.popups.each(function (popup) {\r\n popup.close();\r\n });\r\n };\r\n Object.defineProperty(SVGContainer.prototype, \"readerAlertElement\", {\r\n /**\r\n * ==========================================================================\r\n * ACCESSIBILITY STUFF\r\n * ==========================================================================\r\n * @hidden\r\n */\r\n /**\r\n * A `<div>` element used as as placeholder to trigger screen alerts.\r\n *\r\n * @sunce 4.9.2\r\n * @return Element\r\n */\r\n get: function () {\r\n if (!$type.hasValue(this._readerAlertElement)) {\r\n // Create element\r\n var div = document.createElement(\"div\");\r\n div.setAttribute(\"role\", \"alert\");\r\n div.style.zIndex = \"-100000\";\r\n div.style.opacity = \"0\";\r\n div.style.position = \"absolute\";\r\n div.style.top = \"0\";\r\n this.SVGContainer.appendChild(div);\r\n this._readerAlertElement = div;\r\n }\r\n return this._readerAlertElement;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Triggers screen reader read out a message.\r\n *\r\n * @since 4.9.2\r\n * @param text Alert text\r\n */\r\n SVGContainer.prototype.readerAlert = function (text) {\r\n this.readerAlertElement.innerHTML = text;\r\n };\r\n /**\r\n * ==========================================================================\r\n * OTHER STUFF\r\n * ==========================================================================\r\n * @hidden\r\n */\r\n SVGContainer.prototype.checkTransform = function (div) {\r\n if (window.getComputedStyle) {\r\n if (div && div.style) {\r\n var style = window.getComputedStyle(div, null);\r\n if (style) {\r\n var matrix = style.getPropertyValue(\"-webkit-transform\") ||\r\n style.getPropertyValue(\"-moz-transform\") ||\r\n style.getPropertyValue(\"-ms-transform\") ||\r\n style.getPropertyValue(\"-o-transform\") ||\r\n style.getPropertyValue(\"transform\");\r\n if (matrix && matrix !== \"none\") {\r\n var values = matrix.split('(')[1].split(')')[0].split(',');\r\n var a = Number(values[0]);\r\n var b = Number(values[1]);\r\n var scale = Math.sqrt(a * a + b * b);\r\n if (!isNaN(scale)) {\r\n this.cssScale *= scale;\r\n }\r\n }\r\n }\r\n }\r\n if (div.parentNode && div.parentNode instanceof HTMLElement) {\r\n this.checkTransform(div.parentNode);\r\n }\r\n }\r\n };\r\n return SVGContainer;\r\n}());\r\nexport { SVGContainer };\r\n","import { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { registry } from \"../Registry\";\r\nimport * as $path from \"./Path\";\r\nimport * as $array from \"../utils/Array\";\r\nimport * as $utils from \"../utils/Utils\";\r\nimport * as $math from \"../utils/Math\";\r\n/**\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\r\nvar Tension = /** @class */ (function () {\r\n /**\r\n * Constructor.\r\n *\r\n * @param tensionX [description]\r\n * @param tensionY [description]\r\n */\r\n function Tension(tensionX, tensionY) {\r\n this._tensionX = tensionX;\r\n this._tensionY = tensionY;\r\n }\r\n /**\r\n * [smooth description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param points [description]\r\n * @return [description]\r\n */\r\n Tension.prototype.smooth = function (points) {\r\n for (var i = points.length - 1; i > 0; i--) {\r\n var p0 = points[i];\r\n var p1 = points[i - 1];\r\n if (Math.abs(p0.x - p1.x) < 0.1 && Math.abs(p0.y - p1.y) < 0.1) {\r\n points.splice(i - 1, 1);\r\n }\r\n }\r\n var tensionX = this._tensionX;\r\n var tensionY = this._tensionY;\r\n if (points.length < 3 || (tensionX >= 1 && tensionY >= 1)) {\r\n return $path.polyline(points);\r\n }\r\n var first = points[0];\r\n var last = points[points.length - 1];\r\n var closed = false;\r\n if ($math.round(first.x, 3) == $math.round(last.x) && $math.round(first.y) == $math.round(last.y)) {\r\n closed = true;\r\n }\r\n // Can't moveTo here, as it wont be possible to have fill then.\r\n var path = \"\";\r\n for (var i = 0, len = points.length - 1; i < len; i++) {\r\n var p0 = points[i - 1];\r\n var p1 = points[i];\r\n var p2 = points[i + 1];\r\n var p3 = points[i + 2];\r\n if (i === 0) {\r\n if (closed) {\r\n p0 = points[points.length - 2];\r\n }\r\n else {\r\n p0 = points[i];\r\n }\r\n }\r\n else if (i == points.length - 2) {\r\n if (closed) {\r\n p3 = points[1];\r\n }\r\n else {\r\n p3 = points[i + 1];\r\n }\r\n }\r\n var controlPointA = $math.getCubicControlPointA(p0, p1, p2, p3, tensionX, tensionY);\r\n var controlPointB = $math.getCubicControlPointB(p0, p1, p2, p3, tensionX, tensionY);\r\n path += $path.cubicCurveTo(p2, controlPointA, controlPointB);\r\n }\r\n return path;\r\n };\r\n return Tension;\r\n}());\r\nexport { Tension };\r\n/**\r\n * Returns a waved line SVG path between two points.\r\n *\r\n * @ignore Exclude from docs\r\n * @param point1 Starting point\r\n * @param point2 Ending point\r\n * @param waveLength Wave length\r\n * @param waveHeight Wave height\r\n * @param adjustWaveLength Adjust wave length based on the actual line length\r\n * @return SVG path\r\n */\r\nexport function wavedLine(point1, point2, waveLength, waveHeight, tension, adjustWaveLength) {\r\n var x1 = point1.x;\r\n var y1 = point1.y;\r\n var x2 = point2.x;\r\n var y2 = point2.y;\r\n var distance = $math.getDistance(point1, point2);\r\n if (adjustWaveLength) {\r\n waveLength = distance / Math.round(distance / waveLength);\r\n }\r\n var d = registry.getCache($utils.stringify([\"wavedLine\", point1.x, point2.x, point1.y, point2.y, waveLength, waveHeight]));\r\n if (!d) {\r\n if (distance > 0) {\r\n var angle = Math.atan2(y2 - y1, x2 - x1);\r\n var cos = Math.cos(angle);\r\n var sin = Math.sin(angle);\r\n var waveLengthX = waveLength * cos;\r\n var waveLengthY = waveLength * sin;\r\n if (waveLength <= 1 || waveHeight <= 1) {\r\n d = $path.lineTo(point2);\r\n }\r\n else {\r\n var halfWaveCount = Math.round(2 * distance / waveLength);\r\n var points = [];\r\n var sign_1 = 1;\r\n if (x2 < x1) {\r\n sign_1 *= -1;\r\n }\r\n if (y2 < y1) {\r\n sign_1 *= -1;\r\n }\r\n for (var i = 0; i <= halfWaveCount; i++) {\r\n sign_1 *= -1;\r\n var x = x1 + i * waveLengthX / 2 + sign_1 * waveHeight / 2 * sin;\r\n var y = y1 + i * waveLengthY / 2 - sign_1 * waveHeight / 2 * cos;\r\n points.push({ x: x, y: y });\r\n }\r\n d = new Tension(tension, tension).smooth(points);\r\n }\r\n }\r\n else {\r\n d = \"\";\r\n }\r\n registry.setCache($utils.stringify([\"wavedLine\", point1.x, point2.x, point1.y, point2.y, waveLength, waveHeight]), d);\r\n }\r\n return d;\r\n}\r\nvar Monotone = /** @class */ (function () {\r\n function Monotone(reversed, info) {\r\n this._reversed = reversed;\r\n this._closed = info.closed;\r\n }\r\n // According to https://en.wikipedia.org/wiki/Cubic_Hermite_spline#Representations\r\n // \"you can express cubic Hermite interpolation in terms of cubic Bézier curves\r\n // with respect to the four values p0, p0 + m0 / 3, p1 - m1 / 3, p1\".\r\n Monotone.prototype._curve = function (x0, x1, y0, y1, t0, t1) {\r\n var dx = (x1 - x0) / 3;\r\n if (this._reversed) {\r\n return $path.cubicCurveTo({ x: y1, y: x1 }, { x: y0 + dx * t0, y: x0 + dx }, { x: y1 - dx * t1, y: x1 - dx });\r\n }\r\n else {\r\n return $path.cubicCurveTo({ x: x1, y: y1 }, { x: x0 + dx, y: y0 + dx * t0 }, { x: x1 - dx, y: y1 - dx * t1 });\r\n }\r\n };\r\n Monotone.prototype.smooth = function (points) {\r\n var _this = this;\r\n var x0 = NaN;\r\n var x1 = NaN;\r\n var y0 = NaN;\r\n var y1 = NaN;\r\n var t0 = NaN;\r\n var point = 0;\r\n var output = \"\";\r\n $array.each(points, function (_a) {\r\n var x = _a.x, y = _a.y;\r\n if (_this._reversed) {\r\n var temp = x;\r\n x = y;\r\n y = temp;\r\n }\r\n var t1 = NaN;\r\n if (!(x === x1 && y === y1)) {\r\n switch (point) {\r\n case 0:\r\n point = 1;\r\n if (_this._reversed) {\r\n output += $path.lineTo({ x: y, y: x });\r\n }\r\n else {\r\n output += $path.lineTo({ x: x, y: y });\r\n }\r\n break;\r\n case 1:\r\n point = 2;\r\n break;\r\n case 2:\r\n point = 3;\r\n output += _this._curve(x0, x1, y0, y1, slope2(x0, x1, y0, y1, t1 = slope3(x0, x1, y0, y1, x, y)), t1);\r\n break;\r\n default:\r\n output += _this._curve(x0, x1, y0, y1, t0, t1 = slope3(x0, x1, y0, y1, x, y));\r\n break;\r\n }\r\n x0 = x1;\r\n x1 = x;\r\n y0 = y1;\r\n y1 = y;\r\n t0 = t1;\r\n }\r\n });\r\n switch (point) {\r\n case 2:\r\n if (this._reversed) {\r\n output += $path.lineTo({ x: y1, y: x1 });\r\n }\r\n else {\r\n output += $path.lineTo({ x: x1, y: y1 });\r\n }\r\n break;\r\n case 3:\r\n output += this._curve(x0, x1, y0, y1, t0, slope2(x0, x1, y0, y1, t0));\r\n break;\r\n }\r\n if (this._closed) {\r\n output += $path.closePath();\r\n }\r\n return output;\r\n };\r\n return Monotone;\r\n}());\r\nexport { Monotone };\r\n// TODO move this someplace else\r\nfunction sign(x) {\r\n return x < 0 ? -1 : 1;\r\n}\r\nfunction slope2(x0, x1, y0, y1, t) {\r\n var h = x1 - x0;\r\n return h ? (3 * (y1 - y0) / h - t) / 2 : t;\r\n}\r\nfunction slope3(x0, x1, y0, y1, x2, y2) {\r\n var h0 = x1 - x0;\r\n var h1 = x2 - x1;\r\n var s0 = (y1 - y0) / (h0 || h1 < 0 && -0);\r\n var s1 = (y2 - y1) / (h1 || h0 < 0 && -0);\r\n var p = (s0 * h1 + s1 * h0) / (h0 + h1);\r\n return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0;\r\n}\r\nvar MonotoneX = /** @class */ (function (_super) {\r\n __extends(MonotoneX, _super);\r\n function MonotoneX(info) {\r\n return _super.call(this, false, info) || this;\r\n }\r\n return MonotoneX;\r\n}(Monotone));\r\nexport { MonotoneX };\r\nvar MonotoneY = /** @class */ (function (_super) {\r\n __extends(MonotoneY, _super);\r\n function MonotoneY(info) {\r\n return _super.call(this, true, info) || this;\r\n }\r\n return MonotoneY;\r\n}(Monotone));\r\nexport { MonotoneY };\r\n/**\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\r\nvar Basis = /** @class */ (function () {\r\n /**\r\n * Constructor.\r\n *\r\n * @param info [description]\r\n */\r\n function Basis(info) {\r\n this._closed = info.closed;\r\n }\r\n /**\r\n * [smooth description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param points [description]\r\n * @return [description]\r\n */\r\n Basis.prototype.smooth = function (points) {\r\n var _this = this;\r\n var x0 = NaN;\r\n var x1 = NaN;\r\n var x2 = NaN;\r\n var x3 = NaN;\r\n var x4 = NaN;\r\n var y0 = NaN;\r\n var y1 = NaN;\r\n var y2 = NaN;\r\n var y3 = NaN;\r\n var y4 = NaN;\r\n var point = 0;\r\n var output = \"\";\r\n var pushCurve = function (x, y) {\r\n output += $path.cubicCurveTo({\r\n x: (x0 + 4 * x1 + x) / 6,\r\n y: (y0 + 4 * y1 + y) / 6\r\n }, {\r\n x: (2 * x0 + x1) / 3,\r\n y: (2 * y0 + y1) / 3\r\n }, {\r\n x: (x0 + 2 * x1) / 3,\r\n y: (y0 + 2 * y1) / 3\r\n });\r\n };\r\n var pushPoint = function (_a) {\r\n var x = _a.x, y = _a.y;\r\n switch (point) {\r\n case 0:\r\n point = 1;\r\n if (_this._closed) {\r\n x2 = x;\r\n y2 = y;\r\n }\r\n else {\r\n output += $path.lineTo({ x: x, y: y });\r\n }\r\n break;\r\n case 1:\r\n point = 2;\r\n if (_this._closed) {\r\n x3 = x;\r\n y3 = y;\r\n }\r\n break;\r\n case 2:\r\n point = 3;\r\n if (_this._closed) {\r\n x4 = x;\r\n y4 = y;\r\n output += $path.moveTo({ x: (x0 + 4 * x1 + x) / 6, y: (y0 + 4 * y1 + y) / 6 });\r\n break;\r\n }\r\n else {\r\n output += $path.lineTo({ x: (5 * x0 + x1) / 6, y: (5 * y0 + y1) / 6 });\r\n // fall-through\r\n }\r\n default:\r\n pushCurve(x, y);\r\n break;\r\n }\r\n x0 = x1;\r\n x1 = x;\r\n y0 = y1;\r\n y1 = y;\r\n };\r\n $array.each(points, pushPoint);\r\n if (this._closed) {\r\n switch (point) {\r\n case 1:\r\n output += $path.moveTo({ x: x2, y: y2 });\r\n output += $path.closePath();\r\n break;\r\n case 2:\r\n output += $path.moveTo({ x: (x2 + 2 * x3) / 3, y: (y2 + 2 * y3) / 3 });\r\n output += $path.lineTo({ x: (x3 + 2 * x2) / 3, y: (y3 + 2 * y2) / 3 });\r\n output += $path.closePath();\r\n break;\r\n case 3:\r\n pushPoint({ x: x2, y: y2 });\r\n pushPoint({ x: x3, y: y3 });\r\n pushPoint({ x: x4, y: y4 });\r\n break;\r\n }\r\n }\r\n else {\r\n switch (point) {\r\n case 3:\r\n pushCurve(x1, y1);\r\n // fall-through\r\n case 2:\r\n output += $path.lineTo({ x: x1, y: y1 });\r\n break;\r\n }\r\n output += $path.closePath();\r\n }\r\n return output;\r\n };\r\n return Basis;\r\n}());\r\nexport { Basis };\r\n","/**\r\n * Contains code and logic for generating linear gradients.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { BaseObject } from \"../../Base\";\r\nimport { List } from \"../../utils/List\";\r\nimport { getGhostPaper } from \"../Paper\";\r\nimport { registry } from \"../../Registry\";\r\nimport * as $iter from \"../../utils/Iterator\";\r\nimport * as $math from \"../../utils/Math\";\r\nimport * as $type from \"../../utils/Type\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Linear gradient class.\r\n */\r\nvar LinearGradient = /** @class */ (function (_super) {\r\n __extends(LinearGradient, _super);\r\n /**\r\n * Constructor.\r\n */\r\n function LinearGradient() {\r\n var _this = \r\n // Init\r\n _super.call(this) || this;\r\n /**\r\n * List of colors switch definitions in a gradient.\r\n */\r\n _this._stops = new List();\r\n /**\r\n * Gradient direction.\r\n */\r\n _this._rotation = 0;\r\n _this.className = \"LinearGradient\";\r\n _this._stops.events.on(\"setIndex\", _this.validate, _this);\r\n _this._stops.events.on(\"inserted\", _this.validate, _this);\r\n // Create element\r\n _this.element = _this.paper.addGroup(\"linearGradient\");\r\n _this.id = \"gradient-\" + registry.getUniqueId();\r\n _this.element.attr({ \"id\": _this.id });\r\n _this._disposers.push(_this.element);\r\n // Apply theme\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * Draws gradient.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n LinearGradient.prototype.validate = function () {\r\n var _this = this;\r\n var rotation = (this._rotation + 90) * $math.RADIANS;\r\n var x1 = Math.round(50 + Math.sin(rotation + Math.PI) * 50) + '%';\r\n var y1 = Math.round(50 + Math.cos(rotation) * 50) + '%';\r\n var x2 = Math.round(50 + Math.sin(rotation) * 50) + '%';\r\n var y2 = Math.round(50 + Math.cos(rotation + Math.PI) * 50) + '%';\r\n var gradientElement = this.element;\r\n gradientElement.removeChildNodes();\r\n gradientElement.attr({ \"x1\": x1, \"x2\": x2, \"y1\": y1, \"y2\": y2 });\r\n $iter.each($iter.indexed(this._stops.iterator()), function (a) {\r\n var i = a[0];\r\n var stop = a[1];\r\n var offset = stop.offset;\r\n if (!$type.isNumber(offset)) {\r\n offset = i / (_this._stops.length - 1);\r\n }\r\n var gradientStop = _this.paper.add(\"stop\");\r\n if ($type.hasValue(stop.color)) {\r\n gradientStop.attr({ \"stop-color\": stop.color.toString() });\r\n }\r\n if ($type.isNumber(stop.opacity)) {\r\n gradientStop.attr({ \"stop-opacity\": stop.opacity });\r\n }\r\n if ($type.isNumber(offset)) {\r\n gradientStop.attr({ \"offset\": offset });\r\n }\r\n gradientElement.add(gradientStop);\r\n });\r\n };\r\n /**\r\n * Clears the gradient.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n LinearGradient.prototype.clear = function () {\r\n this._stops.clear();\r\n };\r\n /**\r\n * Adds a color step to the gradient.\r\n *\r\n * @param color Color (hex code or named color)\r\n * @param opacity Opacity (value from 0 to 1; 0 completely transaprent, 1 fully opaque)\r\n * @param offset Position of color in the gradient (value 0 to 1; 0 meaning start of the gradient and 1 end)\r\n */\r\n LinearGradient.prototype.addColor = function (color, opacity, offset) {\r\n this._stops.push({ color: color, opacity: opacity, offset: offset });\r\n };\r\n Object.defineProperty(LinearGradient.prototype, \"stops\", {\r\n /**\r\n * A list of color stops in the gradient.\r\n *\r\n * @return Stops\r\n */\r\n get: function () {\r\n return this._stops;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LinearGradient.prototype, \"paper\", {\r\n /**\r\n * @ignore Exclude from docs\r\n * @return Paper\r\n */\r\n get: function () {\r\n if (this._paper) {\r\n return this._paper;\r\n }\r\n return getGhostPaper();\r\n },\r\n /**\r\n * [[Paper]] instace to use for the gradient.\r\n *\r\n * @ignore Exclude from docs\r\n * @param paper Paper\r\n */\r\n set: function (paper) {\r\n if (this._paper != paper) {\r\n this._paper = paper;\r\n this.validate();\r\n paper.appendDef(this.element);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LinearGradient.prototype, \"rotation\", {\r\n /**\r\n * @return Rotation\r\n */\r\n get: function () {\r\n return this._rotation;\r\n },\r\n /**\r\n * Rotation (direction) of the gradient in degrees.\r\n *\r\n * @param value Rotation\r\n */\r\n set: function (value) {\r\n //this.element.attr({ \"gradientTransform\": \"rotate(\" + value + \" 10 100)\" });\r\n this._rotation = value;\r\n this.validate();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n LinearGradient.prototype.copyFrom = function (source) {\r\n _super.prototype.copyFrom.call(this, source);\r\n this.stops.copyFrom(source.stops);\r\n this._rotation = source.rotation;\r\n };\r\n Object.defineProperty(LinearGradient.prototype, \"gradientUnits\", {\r\n /**\r\n * Which units are used when drawing gradient filter.\r\n *\r\n * Use `\"userSpaceOnUse\"` when applying gradient on a perfectly straight line.\r\n *\r\n * @since 4.9.17\r\n * @default objectBoundingBox\r\n * @param value Filter units\r\n */\r\n set: function (value) {\r\n this.element.attr({ gradientUnits: value });\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return LinearGradient;\r\n}(BaseObject));\r\nexport { LinearGradient };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"LinearGradient\"] = LinearGradient;\r\n","/**\r\n * Pattern module.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { BaseObject } from \"../../Base\";\r\nimport { getGhostPaper } from \"../Paper\";\r\nimport { List, ListDisposer } from \"../../utils/List\";\r\nimport { Animation, AnimationDisposer } from \"../../utils/Animation\";\r\nimport { registry } from \"../../Registry\";\r\nimport { InterfaceColorSet } from \"../../utils/InterfaceColorSet\";\r\nimport * as $iter from \"../../utils/Iterator\";\r\nimport * as $object from \"../../utils/Object\";\r\nimport * as $type from \"../../utils/Type\";\r\n;\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Base class to define patterns.\r\n */\r\nvar Pattern = /** @class */ (function (_super) {\r\n __extends(Pattern, _super);\r\n //public propertyValues = new Dictionary<PatternProperties, any>();\r\n /**\r\n * Constructor\r\n */\r\n function Pattern() {\r\n var _this = \r\n // Init\r\n _super.call(this) || this;\r\n /**\r\n * List of elements the pattern consists of.\r\n */\r\n _this._elements = new List();\r\n /**\r\n * A storage for Filter property/value pairs.\r\n *\r\n * @ignore Exclude from docs\r\n * @see {@link PatternProperties}\r\n */\r\n _this.properties = {};\r\n _this.className = \"Pattern\";\r\n // Set defaults\r\n _this.width = 10;\r\n _this.height = 10;\r\n _this.x = 0;\r\n _this.y = 0;\r\n _this.patternUnits = \"userSpaceOnUse\";\r\n var interfaceColors = new InterfaceColorSet();\r\n _this.backgroundFill = interfaceColors.getFor(\"background\");\r\n _this.backgroundOpacity = 0;\r\n _this.fillOpacity = 1;\r\n _this.fill = interfaceColors.getFor(\"alternativeBackground\");\r\n _this.stroke = interfaceColors.getFor(\"alternativeBackground\");\r\n _this.strokeOpacity = 1;\r\n _this.strokeWidth = 1;\r\n _this.shapeRendering = \"crispEdges\";\r\n _this.rotation = 0;\r\n // Create main group to store pattern elements inelements\r\n _this.element = _this.paper.addGroup(\"pattern\");\r\n _this.id = \"pattern-\" + registry.getUniqueId();\r\n _this.element.attr({ \"id\": _this.id });\r\n _this._disposers.push(_this.element);\r\n // Make elements disposable\r\n _this._disposers.push(new ListDisposer(_this._elements));\r\n // Request again to trigger getter/setter code\r\n _this.patternUnits = _this.patternUnits;\r\n _this.width = _this.width;\r\n _this.height = _this.height;\r\n // Apply theme\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * Draws the pattern.\r\n */\r\n Pattern.prototype.draw = function () {\r\n var _this = this;\r\n var patternElement = this.element;\r\n if (patternElement) {\r\n patternElement.removeChildNodes();\r\n var background = this.paper.add(\"rect\");\r\n background.attr({ \"width\": this.width, \"height\": this.height, \"shape-rendering\": \"crispEdges\", \"fill\": this.backgroundFill.hex, \"fill-opacity\": this.backgroundOpacity, \"stroke\": this.backgroundFill.hex, \"stroke-opacity\": 0 });\r\n patternElement.add(background);\r\n patternElement.attr({ \"x\": this.x, \"y\": this.y, \"width\": this.width, \"height\": this.height, \"stroke\": this.stroke.hex, \"fill\": this.fill.hex, \"fill-opacity\": this.fillOpacity, \"stroke-opacity\": this.strokeOpacity, \"stroke-width\": this.strokeWidth, \"shape-rendering\": this.shapeRendering, \"patternUnits\": this.patternUnits, \"stroke-dasharray\": this.strokeDasharray });\r\n $iter.each(this._elements.iterator(), function (element) {\r\n element.rotation = _this.rotation;\r\n element.rotationX = _this.properties[\"rotationX\"];\r\n element.rotationY = _this.properties[\"rotationY\"];\r\n _this.element.add(element);\r\n });\r\n }\r\n };\r\n /**\r\n * Animate pattern properties.\r\n *\r\n * @see {@link Animation}\r\n * @param animationOptions Animation options\r\n * @param duration Duration (ms)\r\n * @param easing Easing function\r\n * @return Animation instance\r\n */\r\n Pattern.prototype.animate = function (animationOptions, duration, easing) {\r\n return new Animation(this, animationOptions, duration, easing).start();\r\n };\r\n /**\r\n * Adds an element to the pattern.\r\n *\r\n * @param element Element\r\n */\r\n Pattern.prototype.addElement = function (element) {\r\n this._elements.push(element);\r\n this._disposers.push(element);\r\n };\r\n /**\r\n * Remove an element from the pattern.\r\n *\r\n * @param element Element\r\n */\r\n Pattern.prototype.removeElement = function (element) {\r\n this._elements.removeValue(element);\r\n this.removeDispose(element);\r\n };\r\n Object.defineProperty(Pattern.prototype, \"elements\", {\r\n /**\r\n * Returns the list of SVG elements comprising the pattern.\r\n *\r\n * @return Pattern elements\r\n */\r\n get: function () {\r\n return this._elements;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Pattern.prototype, \"fillOpacity\", {\r\n /**\r\n * @return Opacity (0-1)\r\n */\r\n get: function () {\r\n return this.properties[\"fillOpacity\"];\r\n },\r\n /**\r\n * Pattern fill opacity. (0-1)\r\n *\r\n * @param value Opacity (0-1)\r\n */\r\n set: function (value) {\r\n this.properties[\"fillOpacity\"] = value;\r\n this.draw();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Pattern.prototype, \"fill\", {\r\n /**\r\n * @return Fill color\r\n */\r\n get: function () {\r\n return this.properties[\"fill\"];\r\n },\r\n /**\r\n * Fill color of the pattern.\r\n *\r\n * @param value Fill color\r\n */\r\n set: function (value) {\r\n this.properties[\"fill\"] = value;\r\n this.draw();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Pattern.prototype, \"backgroundFill\", {\r\n /**\r\n * @return Background color\r\n */\r\n get: function () {\r\n return this.properties[\"backgroundFill\"];\r\n },\r\n /**\r\n * Pattern background fill color.\r\n *\r\n * @param value Background color\r\n */\r\n set: function (value) {\r\n this.properties[\"backgroundFill\"] = value;\r\n this.draw();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Pattern.prototype, \"backgroundOpacity\", {\r\n /**\r\n * @return Background opacity (0-1)\r\n */\r\n get: function () {\r\n return this.properties[\"backgroundOpacity\"];\r\n },\r\n /**\r\n * Pattern backgorund opacity. (0-1)\r\n *\r\n * @param value Background opacity (0-1)\r\n */\r\n set: function (value) {\r\n this.properties[\"backgroundOpacity\"] = value;\r\n this.draw();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Pattern.prototype, \"stroke\", {\r\n /**\r\n * @return Color\r\n */\r\n get: function () {\r\n return this.properties[\"stroke\"];\r\n },\r\n /**\r\n * Pattern stroke (border) color.\r\n *\r\n * @param value Color\r\n */\r\n set: function (value) {\r\n this.properties[\"stroke\"] = value;\r\n this.draw();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Pattern.prototype, \"strokeOpacity\", {\r\n /**\r\n * @return Opacity (0-1)\r\n */\r\n get: function () {\r\n return this.properties[\"strokeOpacity\"];\r\n },\r\n /**\r\n * Pattern stroke opacity. (0-1)\r\n *\r\n * @param value Opacity (0-1)\r\n */\r\n set: function (value) {\r\n this.properties[\"strokeOpacity\"] = value;\r\n this.draw();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Pattern.prototype, \"strokeWidth\", {\r\n /**\r\n * @return Stroke thickness (px)\r\n */\r\n get: function () {\r\n return this.properties[\"strokeWidth\"];\r\n },\r\n /**\r\n * Pattern stroke thickness in pixels.\r\n *\r\n * @param value Stroke thickness (px)\r\n */\r\n set: function (value) {\r\n this.properties[\"strokeWidth\"] = value;\r\n this.draw();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Pattern.prototype, \"shapeRendering\", {\r\n get: function () {\r\n return this.properties[\"shapeRendering\"];\r\n },\r\n /**\r\n * Shape rendering\r\n * @param value [description]\r\n */\r\n set: function (value) {\r\n this.properties[\"shapeRendering\"] = value;\r\n this.draw();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Pattern.prototype, \"rotation\", {\r\n /**\r\n * @return Rotation\r\n */\r\n get: function () {\r\n return this.properties[\"rotation\"];\r\n },\r\n /**\r\n * Pattern rotation in degrees.\r\n *\r\n * @param value Rotation\r\n */\r\n set: function (value) {\r\n this.properties[\"rotation\"] = value;\r\n this.draw();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Pattern.prototype, \"patternUnits\", {\r\n /**\r\n * @return Units\r\n */\r\n get: function () {\r\n return this.properties[\"patternUnits\"];\r\n },\r\n /**\r\n * Pattern measuring units.\r\n *\r\n * Available options: \"userSpaceOnUse\" | \"objectBoundingBox\".\r\n *\r\n * @param value Units\r\n */\r\n set: function (value) {\r\n this.properties[\"patternUnits\"] = value;\r\n this.draw();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Pattern.prototype, \"width\", {\r\n /**\r\n * @return Width (px)\r\n */\r\n get: function () {\r\n return this.properties[\"width\"];\r\n },\r\n /**\r\n * Pattern width in pixels.\r\n *\r\n * @param value Width (px)\r\n */\r\n set: function (value) {\r\n this.properties[\"width\"] = value;\r\n this.draw();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Pattern.prototype, \"height\", {\r\n /**\r\n * @return Height (px)\r\n */\r\n get: function () {\r\n return this.properties[\"height\"];\r\n },\r\n /**\r\n * Pattern height in pixels.\r\n *\r\n * @param value Height (px)\r\n */\r\n set: function (value) {\r\n this.properties[\"height\"] = value;\r\n this.draw();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Pattern.prototype, \"x\", {\r\n /**\r\n * @return X (px)\r\n */\r\n get: function () {\r\n return this.properties[\"x\"];\r\n },\r\n /**\r\n * X position. (pixels)\r\n *\r\n * @param value X (px)\r\n */\r\n set: function (value) {\r\n this.properties[\"x\"] = value;\r\n this.draw();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Pattern.prototype, \"y\", {\r\n /**\r\n * @return Y (px)\r\n */\r\n get: function () {\r\n return this.properties[\"y\"];\r\n },\r\n /**\r\n * Y position (px).\r\n *\r\n * @param value Y (px)\r\n */\r\n set: function (value) {\r\n this.properties[\"y\"] = value;\r\n this.draw();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Pattern.prototype, \"paper\", {\r\n /**\r\n * @ignore Exclude from docs\r\n * @return Paper\r\n */\r\n get: function () {\r\n if (this._paper) {\r\n return this._paper;\r\n }\r\n return getGhostPaper();\r\n },\r\n /**\r\n * [[Paper]] instance to draw pattern in.\r\n *\r\n * @ignore Exclude from docs\r\n * @param paper Paper\r\n */\r\n set: function (paper) {\r\n if (this._paper != paper) {\r\n this._paper = paper;\r\n this.draw();\r\n paper.appendDef(this.element);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Copies properties from another Pattern instance.\r\n *\r\n * @param source Source pattern\r\n */\r\n Pattern.prototype.copyFrom = function (source) {\r\n var _this = this;\r\n _super.prototype.copyFrom.call(this, source);\r\n $object.each(source.properties, function (key, value) {\r\n _this[key] = value;\r\n });\r\n };\r\n Object.defineProperty(Pattern.prototype, \"animations\", {\r\n /**\r\n * A list of animations currently running on the patter.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Animation list\r\n */\r\n get: function () {\r\n if (!this._animations) {\r\n this._animations = [];\r\n this._disposers.push(new AnimationDisposer(this._animations));\r\n }\r\n return this._animations;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Pattern.prototype, \"strokeDasharray\", {\r\n /**\r\n * @return `stroke-dasharray`\r\n */\r\n get: function () {\r\n return this.properties[\"strokeDashArray\"];\r\n },\r\n /**\r\n * A `stroke-dasharray` for the stroke (outline).\r\n *\r\n * \"Dasharray\" allows setting rules to make lines dashed, dotted, etc.\r\n *\r\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-dasharray} for more info on `stroke-dasharray`\r\n * @param value `stroke-dasharray`\r\n */\r\n set: function (value) {\r\n this.properties[\"strokeDashArray\"] = value;\r\n this.draw();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Processes JSON-based config before it is applied to the object.\r\n *\r\n * @ignore Exclude from docs\r\n * @param config Config\r\n */\r\n Pattern.prototype.processConfig = function (config) {\r\n if (config) {\r\n // Set up series\r\n if ($type.hasValue(config.elements) && $type.isArray(config.elements)) {\r\n for (var i = 0, len = config.elements.length; i < len; i++) {\r\n var element = config.elements[i];\r\n if ($type.hasValue(element[\"type\"])) {\r\n var sprite = this.createEntryInstance(element);\r\n if (sprite instanceof BaseObject) {\r\n sprite.config = element;\r\n }\r\n this.addElement($type.hasValue(element[\"typeProperty\"])\r\n ? sprite[element[\"typeProperty\"]]\r\n : sprite.element);\r\n }\r\n }\r\n }\r\n }\r\n _super.prototype.processConfig.call(this, config);\r\n };\r\n return Pattern;\r\n}(BaseObject));\r\nexport { Pattern };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"Pattern\"] = Pattern;\r\n","/**\r\n * Contains code and logic for generating radial gradients.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { BaseObject } from \"../../Base\";\r\nimport { List } from \"../../utils/List\";\r\nimport { getGhostPaper } from \"../Paper\";\r\nimport { registry } from \"../../Registry\";\r\nimport * as $iter from \"../../utils/Iterator\";\r\nimport * as $type from \"../../utils/Type\";\r\nimport { Percent } from \"../../utils/Percent\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Radial gradient class.\r\n */\r\nvar RadialGradient = /** @class */ (function (_super) {\r\n __extends(RadialGradient, _super);\r\n /**\r\n * Constructor\r\n */\r\n function RadialGradient() {\r\n var _this = _super.call(this) || this;\r\n /**\r\n * List of colors switch definitions in a gradient.\r\n */\r\n _this._stops = new List();\r\n _this.element = _this.paper.addGroup(\"radialGradient\");\r\n _this.id = \"gradient-\" + registry.getUniqueId();\r\n _this.element.attr({ \"id\": _this.id });\r\n _this._disposers.push(_this.element);\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * Draws gradient.\r\n */\r\n RadialGradient.prototype.draw = function () {\r\n var _this = this;\r\n var gradientElement = this.element;\r\n if ($type.isNumber(this.cx)) {\r\n var value = this.cx;\r\n if (value instanceof Percent) {\r\n value = value.percent + \"%\";\r\n }\r\n gradientElement.attr({ \"cx\": value });\r\n }\r\n if ($type.isNumber(this.cy)) {\r\n var value = this.cy;\r\n if (value instanceof Percent) {\r\n value = value.percent + \"%\";\r\n }\r\n gradientElement.attr({ \"cy\": value });\r\n }\r\n if (this.fx) {\r\n var value = this.fx;\r\n if (value instanceof Percent) {\r\n value = value.percent + \"%\";\r\n }\r\n gradientElement.attr({ \"fx\": value });\r\n }\r\n if (this.fy) {\r\n var value = this.fy;\r\n if (value instanceof Percent) {\r\n value = value.percent + \"%\";\r\n }\r\n gradientElement.attr({ \"fy\": value });\r\n }\r\n gradientElement.removeChildNodes();\r\n $iter.each($iter.indexed(this._stops.iterator()), function (a) {\r\n var i = a[0];\r\n var stop = a[1];\r\n var offset = stop.offset;\r\n if (!$type.isNumber(offset)) {\r\n offset = i / (_this._stops.length - 1);\r\n }\r\n var gradientStop = _this.paper.add(\"stop\");\r\n if ($type.hasValue(stop.color)) {\r\n gradientStop.attr({ \"stop-color\": stop.color.toString() });\r\n }\r\n if ($type.isNumber(stop.opacity)) {\r\n gradientStop.attr({ \"stop-opacity\": stop.opacity });\r\n }\r\n if ($type.isNumber(offset)) {\r\n gradientStop.attr({ \"offset\": offset });\r\n }\r\n gradientElement.add(gradientStop);\r\n });\r\n };\r\n /**\r\n * Adds a color step to the gradient.\r\n *\r\n * @param color Color (hex code or named color)\r\n * @param opacity Opacity (value from 0 to 1; 0 completely transaprent, 1 fully opaque)\r\n * @param offset Position of color in the gradient (value 0 to 1; 0 meaning start of the gradient and 1 end)\r\n */\r\n RadialGradient.prototype.addColor = function (color, opacity, offset) {\r\n this._stops.push({ color: color, opacity: opacity, offset: offset });\r\n this.draw();\r\n };\r\n Object.defineProperty(RadialGradient.prototype, \"paper\", {\r\n /**\r\n * @ignore Exclude from docs\r\n * @return Paper\r\n */\r\n get: function () {\r\n if (this._paper) {\r\n return this._paper;\r\n }\r\n return getGhostPaper();\r\n },\r\n /**\r\n * A [[Paper]] instace to use for the gradient.\r\n *\r\n * @ignore Exclude from docs\r\n * @param paper Paper\r\n */\r\n set: function (paper) {\r\n if (this._paper != paper) {\r\n this._paper = paper;\r\n this.draw();\r\n paper.appendDef(this.element);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(RadialGradient.prototype, \"cx\", {\r\n get: function () {\r\n return this._cx;\r\n },\r\n /**\r\n * Center x coordinate of the gradient, can be set as number or Percent\r\n *\r\n * @param point Center point\r\n */\r\n set: function (value) {\r\n this._cx = value;\r\n this.draw();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(RadialGradient.prototype, \"cy\", {\r\n get: function () {\r\n return this._cy;\r\n },\r\n /**\r\n * Center y coordinate of the gradient, can be set as number or Percent\r\n *\r\n * @param point Center point\r\n */\r\n set: function (value) {\r\n this._cy = value;\r\n this.draw();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(RadialGradient.prototype, \"fx\", {\r\n get: function () {\r\n return this._fx;\r\n },\r\n /**\r\n * y coordinate of the focal point of a gradient, can be set in pixels or as Percent\r\n *\r\n * @param point Center point\r\n */\r\n set: function (value) {\r\n this._fx = value;\r\n this.draw();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(RadialGradient.prototype, \"fy\", {\r\n get: function () {\r\n return this._fy;\r\n },\r\n /**\r\n * y coordinate of the focal point of a gradient, can be set in pixels or as Percent\r\n *\r\n * @param point Center point\r\n */\r\n set: function (value) {\r\n this._fy = value;\r\n this.draw();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n RadialGradient.prototype.copyFrom = function (source) {\r\n _super.prototype.copyFrom.call(this, source);\r\n this.stops.copyFrom(source.stops);\r\n this.cx = source.cx;\r\n this.cy = source.cy;\r\n this.fx = source.fx;\r\n this.fy = source.fy;\r\n };\r\n Object.defineProperty(RadialGradient.prototype, \"stops\", {\r\n /**\r\n * A list of color stops in the gradient.\r\n *\r\n * @return Stops\r\n */\r\n get: function () {\r\n return this._stops;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Clears the gradient.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n RadialGradient.prototype.clear = function () {\r\n this._stops.clear();\r\n };\r\n return RadialGradient;\r\n}(BaseObject));\r\nexport { RadialGradient };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"RadialGradient\"] = RadialGradient;\r\n","/**\r\n * Module for \"Drop Shadow\" filter.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Filter } from \"./Filter\";\r\nimport { color } from \"../../utils/Color\";\r\nimport { registry } from \"../../Registry\";\r\n;\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Creats a \"Drop Shadow\" filter.\r\n */\r\nvar DropShadowFilter = /** @class */ (function (_super) {\r\n __extends(DropShadowFilter, _super);\r\n /**\r\n * Constructor\r\n */\r\n function DropShadowFilter() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"DropShadowFilter\";\r\n // Create elements\r\n // NOTE: we do not need to add each individual element to `_disposers`\r\n // because `filterPrimitives` has an event handler which automatically adds\r\n // anything added to it to `_disposers`\r\n _this.color = color(\"#000\");\r\n _this.feGaussianBlur = _this.paper.add(\"feGaussianBlur\");\r\n _this.feGaussianBlur.attr({ \"result\": \"blurOut\", \"in\": \"SourceGraphic\" });\r\n _this.filterPrimitives.push(_this.feGaussianBlur);\r\n _this.feOffset = _this.paper.add(\"feOffset\");\r\n _this.feOffset.attr({ \"result\": \"offsetBlur\" });\r\n _this.filterPrimitives.push(_this.feOffset);\r\n _this.feFlood = _this.paper.add(\"feFlood\");\r\n _this.feFlood.attr({ \"flood-color\": _this.color });\r\n _this.filterPrimitives.push(_this.feFlood);\r\n _this.feComposite = _this.paper.add(\"feComposite\");\r\n _this.feComposite.attr({ \"in2\": \"offsetBlur\", operator: \"in\" });\r\n _this.filterPrimitives.push(_this.feComposite);\r\n _this.feMerge = _this.paper.addGroup(\"feMerge\");\r\n _this.feMerge.add(_this.paper.add(\"feMergeNode\"));\r\n _this.feMerge.add(_this.paper.add(\"feMergeNode\").attr({ \"in\": \"SourceGraphic\" }));\r\n _this.filterPrimitives.push(_this.feMerge);\r\n // Set default properties\r\n _this.width = 200;\r\n _this.height = 200;\r\n _this.blur = 1.5;\r\n _this.dx = 3;\r\n _this.dy = 3;\r\n _this.opacity = 0.5;\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n Object.defineProperty(DropShadowFilter.prototype, \"color\", {\r\n /**\r\n * @return Color\r\n */\r\n get: function () {\r\n return this.properties.color;\r\n },\r\n /**\r\n * Shadow color.\r\n *\r\n * @param value Color\r\n */\r\n set: function (value) {\r\n this.properties.color = value;\r\n if (this.feFlood) {\r\n this.feFlood.attr({ \"flood-color\": value });\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DropShadowFilter.prototype, \"opacity\", {\r\n /**\r\n * @return Opacity (0-1)\r\n */\r\n get: function () {\r\n return this.properties.opacity;\r\n },\r\n /**\r\n * Opacity of the shadow. (0-1)\r\n *\r\n * @param value Opacity (0-1)\r\n */\r\n set: function (value) {\r\n this.properties.opacity = value;\r\n this.feFlood.attr({ \"flood-opacity\": value });\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DropShadowFilter.prototype, \"dx\", {\r\n /**\r\n * @return Horizontal offset (px)\r\n */\r\n get: function () {\r\n return this.properties.dx;\r\n },\r\n /**\r\n * Horizontal offset in pixels.\r\n *\r\n * @param value Horizontal offset (px)\r\n */\r\n set: function (value) {\r\n this.properties.dx = value;\r\n this.feOffset.attr({ \"dx\": value / this.scale });\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DropShadowFilter.prototype, \"dy\", {\r\n /**\r\n * @return Vertical offset (px)\r\n */\r\n get: function () {\r\n return this.properties.dy;\r\n },\r\n /**\r\n * Vertical offset in pixels.\r\n *\r\n * @param value Vertical offset (px)\r\n */\r\n set: function (value) {\r\n this.properties.dy = value;\r\n this.feOffset.attr({ \"dy\": value / this.scale });\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DropShadowFilter.prototype, \"blur\", {\r\n /**\r\n * @return Blur\r\n */\r\n get: function () {\r\n return this.properties.blur;\r\n },\r\n /**\r\n * Blur.\r\n *\r\n * @param value Blur\r\n */\r\n set: function (value) {\r\n this.properties.blur = value;\r\n this.feGaussianBlur.attr({ \"stdDeviation\": value / this.scale });\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * [updateScale description]\r\n *\r\n * @todo Description\r\n */\r\n DropShadowFilter.prototype.updateScale = function () {\r\n this.dx = this.dx;\r\n this.dy = this.dy;\r\n this.blur = this.blur;\r\n };\r\n return DropShadowFilter;\r\n}(Filter));\r\nexport { DropShadowFilter };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"DropShadowFilter\"] = DropShadowFilter;\r\n","/**\r\n * This module contains a base class for an SVG filter.\r\n *\r\n * Filters can be used to decorate, change and transform just about any DOM\r\n * element.\r\n *\r\n * A Filter works by applying one or more effects (primitives) to SVG element.\r\n *\r\n * For more information on how SVG filters work, refer to\r\n * [this MDN tutorial](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/SVG_Filters_Tutorial).\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { BaseObject } from \"../../Base\";\r\nimport { getGhostPaper } from \"../Paper\";\r\nimport { Animation, AnimationDisposer } from \"../../utils/Animation\";\r\nimport { List } from \"../../utils/List\";\r\nimport * as $object from \"../../utils/Object\";\r\nimport * as $iter from \"../../utils/Iterator\";\r\n;\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Base filter class.\r\n *\r\n * This class while can be instantiated will not do anything. It is just a base\r\n * functionality for any other \"real\" filters to extend.\r\n *\r\n * Filters can be used to decorate, change and transform just about any DOM\r\n * element.\r\n *\r\n * A Filter works by applying one or more effects (primitives) to SVG element.\r\n *\r\n * For more information on how SVG filters work, refer to\r\n * [this MDN tutorial](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/SVG_Filters_Tutorial).\r\n *\r\n * @todo Example\r\n */\r\nvar Filter = /** @class */ (function (_super) {\r\n __extends(Filter, _super);\r\n /**\r\n * Constructor\r\n */\r\n function Filter() {\r\n var _this = \r\n // Init\r\n _super.call(this) || this;\r\n /**\r\n * A storage for Filter property/value pairs.\r\n *\r\n * @ignore Exclude from docs\r\n * @see {@link FilterProperties}\r\n */\r\n _this.properties = {};\r\n /**\r\n * Identifies if this object is a \"template\" and should not be treated as\r\n * real object that is drawn or actually used in the chart.\r\n */\r\n _this.isTemplate = false;\r\n /**\r\n * [_scale description]\r\n *\r\n * @todo Description\r\n */\r\n _this._scale = 1;\r\n /**\r\n * [_nonScaling description]\r\n *\r\n * @todo Description\r\n */\r\n _this._nonScaling = true;\r\n _this.className = \"Filter\";\r\n // Create a list to hold primitives (effect elements)\r\n _this.filterPrimitives = new List();\r\n _this.properties.filterUnits = \"objectBoundingBox\";\r\n // Automatically add added primitives to `_disposers` so they are discarded\r\n // when Filter object is destroyed (disposed)\r\n _this.filterPrimitives.events.on(\"inserted\", function (ev) {\r\n _this._disposers.push(ev.newValue);\r\n });\r\n // Set default dimensions\r\n _this.width = 120;\r\n _this.height = 120;\r\n // Apply theme\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * Appends actual filter elements to the filter group.\r\n *\r\n * @ignore Exclude from docs\r\n * @param filterElement An SVG `<group>` element to add filter element to\r\n */\r\n Filter.prototype.appendPrimitives = function (filterElement) {\r\n $iter.each(this.filterPrimitives.iterator(), function (filterPrimitive) {\r\n filterElement.add(filterPrimitive);\r\n });\r\n };\r\n /**\r\n * Uses Transitions filter's values from current to target. This is used to\r\n * smoothly appear filter, rather than it pop into effect.\r\n *\r\n * @ignore Exclude from docs\r\n * @param animationOptions Animation options\r\n * @param duration Duration in milliseconds\r\n * @param easing Easing function\r\n * @return Animation instance\r\n */\r\n Filter.prototype.animate = function (animationOptions, duration, easing) {\r\n var animation = new Animation(this, animationOptions, duration, easing).start();\r\n return animation;\r\n };\r\n Object.defineProperty(Filter.prototype, \"width\", {\r\n /**\r\n * @return Width (%)\r\n */\r\n get: function () {\r\n return this.properties[\"width\"];\r\n },\r\n /**\r\n * Width of the filter element in percent.\r\n *\r\n * If the filter is designed to \"bleed out\" of the original target element,\r\n * like for example a shadow, you need this bigger than 100, or the\r\n * non-fitting parts will be clipped.\r\n *\r\n * @default 120\r\n * @param value Width (px)\r\n */\r\n set: function (value) {\r\n this.properties[\"width\"] = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Filter.prototype, \"height\", {\r\n /**\r\n * @return Height\r\n */\r\n get: function () {\r\n return this.properties[\"height\"];\r\n },\r\n /**\r\n * Height of the filter element in percent.\r\n *\r\n * If the filter is designed to \"bleed out\" of the original target element,\r\n * like for example a shadow, you need this bigger than 100, or the\r\n * non-fitting parts will be clipped.\r\n *\r\n * @default 120\r\n * @param value Height (%)\r\n */\r\n set: function (value) {\r\n this.properties[\"height\"] = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Copies properties from another [[Filter]] object.\r\n *\r\n * @param filter Source [[Filter]] object\r\n */\r\n Filter.prototype.copyFrom = function (filter) {\r\n var _this = this;\r\n _super.prototype.copyFrom.call(this, filter);\r\n $object.each(filter.properties, function (key, value) {\r\n _this[key] = value;\r\n });\r\n };\r\n Object.defineProperty(Filter.prototype, \"paper\", {\r\n /**\r\n * @return Paper\r\n */\r\n get: function () {\r\n if (this._paper) {\r\n return this._paper;\r\n }\r\n return getGhostPaper();\r\n },\r\n /**\r\n * Sets [[Paper]] instance to create filter's elements in.\r\n *\r\n * @ignore Exclude from docs\r\n * @param paper Paper\r\n */\r\n set: function (paper) {\r\n if (this._paper != paper) {\r\n this._paper = paper;\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Filter.prototype, \"animations\", {\r\n /**\r\n * All animations currently in play.\r\n *\r\n * @ignore Exclude from docs\r\n * @return List of animations\r\n */\r\n get: function () {\r\n if (!this._animations) {\r\n this._animations = [];\r\n this._disposers.push(new AnimationDisposer(this._animations));\r\n }\r\n return this._animations;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Filter.prototype, \"scale\", {\r\n /**\r\n * @ignore Exclude from docs\r\n */\r\n get: function () {\r\n return this._scale;\r\n },\r\n /**\r\n * [[Sprite]] uses this method to inform filter about it's scale.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n set: function (value) {\r\n this._scale = value;\r\n this.updateScale();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Updates filter properties which depend on scale.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Filter.prototype.updateScale = function () {\r\n // Dummy method for extending classes to override.\r\n };\r\n Object.defineProperty(Filter.prototype, \"filterUnits\", {\r\n /**\r\n * @return Filter units\r\n */\r\n get: function () {\r\n return this.properties.filterUnits;\r\n },\r\n /**\r\n * Which units are used when drawing filter.\r\n *\r\n * Use `\"userSpaceOnUse\"` when applying filters on a perfectly straight line.\r\n *\r\n * @since 4.9.17\r\n * @default objectBoundingBox\r\n * @param value Filter units\r\n */\r\n set: function (value) {\r\n this.properties.filterUnits = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Filter.prototype, \"nonScaling\", {\r\n /**\r\n * @return Non scaling?\r\n */\r\n get: function () {\r\n return this._nonScaling;\r\n },\r\n /**\r\n * If a filter is non scaling, it will look the same even if the sprite is\r\n * scaled, otherwise filter will scale together with a [[Sprite]].\r\n *\r\n * @default false\r\n * @param value Non scaling?\r\n */\r\n set: function (value) {\r\n this._nonScaling = value;\r\n if (!value) {\r\n this._scale = 1;\r\n }\r\n this.updateScale();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Filter.prototype, \"sprite\", {\r\n /**\r\n * A target element this filter is currently attached to.\r\n *\r\n * We need to keep track of it because one filter can be used for just one\r\n * element, so we have to remove it from the old \"parent\" when attaching to\r\n * the new one.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Target element\r\n */\r\n set: function (value) {\r\n this.setSprite(value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Sets filter's target element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Element filter is being attached to\r\n */\r\n Filter.prototype.setSprite = function (value) {\r\n if (this._sprite && this._sprite != value) {\r\n this._sprite.filters.removeValue(this);\r\n }\r\n this._sprite = value;\r\n };\r\n return Filter;\r\n}(BaseObject));\r\nexport { Filter };\r\n","/**\r\n * A collection of functions for ordering.\r\n */\r\n/**\r\n * [reverse description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param a [description]\r\n * @return [description]\r\n */\r\nexport function reverse(a) {\r\n switch (a) {\r\n case 0:\r\n return 0;\r\n case -1:\r\n return 1;\r\n case 1:\r\n return -1;\r\n }\r\n}\r\n/**\r\n * [or description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param a Item 1\r\n * @param b Item 2\r\n * @return [description]\r\n */\r\nexport function or(a, b) {\r\n if (a === 0) {\r\n return b;\r\n }\r\n else {\r\n return a;\r\n }\r\n}\r\n","/**\r\n * An Adapter can be used to apply chained synchronous transformations to any\r\n * value at runtime.\r\n *\r\n * Each type class using Adapters must have `adapters` property and adapter\r\n * interface defined.\r\n *\r\n * Adapters can be used to allow external code to apply transformations to any\r\n * value at any time.\r\n *\r\n * For example we have a Weather class which has a method `now()` which returns\r\n * current temperature.\r\n *\r\n * ```\r\n * function now() {\r\n * // ... calculate temperature\r\n * let temp = \"Temperature now is \" + degrees + \"F\";\r\n * return temp;\r\n * }\r\n * ```\r\n *\r\n * Now, supposed we want to let other classes to modify the output of the\r\n * `now()`? We just apply an adapter to the `temp` before it is returned:\r\n *\r\n * ```\r\n * temp = this.adapters.apply(\"now\", {\r\n * temp: temp,\r\n * degrees: degrees\r\n * }).temp;\r\n * ```\r\n *\r\n * Some other class might tap onto it by defining an Adapter that calculates\r\n * the temperature in Celsius:\r\n *\r\n * weather.adapters.add(\"now\", (arg) => {\r\n * arg.temp += \"(\" + farenheitToCelsius(arg.degrees) + \"C)\";\r\n * return arh;\r\n * });\r\n *\r\n * Furthermore some time-related class could add time:\r\n *\r\n * weather.adapters.add(\"now\", (arg) => {\r\n * arg.temp += \"; the time now is \" + (new Date().toLocaleString());\r\n * return arh;\r\n * });\r\n *\r\n * So without adapters we would get output like this:\r\n *\r\n * ```\r\n * Temperature now is 90F\r\n * ```\r\n *\r\n * With adapters applied we now have:\r\n *\r\n * ```\r\n * Temperature now is 90F (32C); the time now is 12/11/2012, 7:00:00 PM\r\n * ```\r\n */\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { SortedList } from \"./SortedList\";\r\nimport * as $number from \"./Number\";\r\nimport * as $order from \"./Order\";\r\nimport * as $iter from \"../utils/Iterator\";\r\nimport * as $array from \"../utils/Array\";\r\nimport * as $type from \"../utils/Type\";\r\nimport * as $object from \"../utils/Object\";\r\n/**\r\n * ============================================================================\r\n * GLOBAL ADAPTER\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * A global adapter is an adpater that is attached to a class type rather than\r\n * specific object instance.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\nvar GlobalAdapter = /** @class */ (function () {\r\n function GlobalAdapter() {\r\n /**\r\n * Callback id iterator.\r\n */\r\n this._callbackId = 0;\r\n /**\r\n * A list of if callbacks (adapters).\r\n */\r\n this._callbacks = new SortedList(function (left, right) {\r\n return $order.or($number.order(left.priority, right.priority), $number.order(left.id, right.id));\r\n });\r\n }\r\n /**\r\n * Adds a global callback which is not specific to any particular object.\r\n * Whenever an adapter in any object of the specific class type is invoked\r\n * global adapters will kick in.\r\n *\r\n * @param type Class type\r\n * @param key Adapter key\r\n * @param callback Callback function\r\n * @param priority Priority (higher priority meaning adapter will be applied later)\r\n * @param scope Callback function scaope\r\n */\r\n GlobalAdapter.prototype.addAll = function (type, key, callback, priority, scope) {\r\n if (priority === void 0) { priority = 0; }\r\n this._callbacks.insert({\r\n id: ++this._callbackId,\r\n key: key,\r\n callback: callback,\r\n priority: priority,\r\n scope: scope,\r\n type: type\r\n });\r\n };\r\n /**\r\n * Returns if there are adapters for specific type available.\r\n *\r\n * @param type Adapter type\r\n * @param key Adapter key\r\n * @return {boolean}\r\n */\r\n GlobalAdapter.prototype.isEnabled = function (type, key) {\r\n return $array.any(this._callbacks.values, function (x) { return x.key === key && type instanceof x.type; });\r\n };\r\n /**\r\n * Applies global adapters for the object of the specific type.\r\n *\r\n * @param type Class type\r\n * @param key Adapter key\r\n * @param value Value\r\n */\r\n GlobalAdapter.prototype.applyAll = function (type, key, value) {\r\n // This is needed to improve the performance and reduce garbage collection\r\n var callbacks = this._callbacks.values;\r\n var length = callbacks.length;\r\n if (length == 0) {\r\n return value;\r\n }\r\n // Cycle through all callbacks and find the ones we need to use\r\n for (var i = 0; i < length; ++i) {\r\n var item = callbacks[i];\r\n if (item.key === key && type instanceof item.type) {\r\n value = item.callback.call(item.scope, value, type, key);\r\n }\r\n }\r\n return value;\r\n };\r\n return GlobalAdapter;\r\n}());\r\nexport { GlobalAdapter };\r\n/**\r\n * A global Adapter for plugins that want to add specific\r\n * functionality for any chart, not just specific instance.\r\n *\r\n * If you want to add an adapter which applies to all instances of the same\r\n * object type, like, for instance all slices in PieSeries, you can use\r\n * global adapter.\r\n *\r\n * Global adapter is a system-wide instance, accessible via `globalAdapter`.\r\n *\r\n * ```TypeScript\r\n * am4core.globalAdapter.addAll<am4charts.IPieSeriesAdapters, am4charts.PieSeries, \"fill\">(am4charts.PieSeries, \"fill\", (value, target, key) => {\r\n * return am4core.color(\"#005500\");\r\n * });\r\n * ```\r\n * ```JavaScript\r\n * am4core.globalAdapter.addAll(am4charts.PieSeries, \"fill\", (value, target, key) => {\r\n * return am4core.color(\"#005500\");\r\n * });\r\n * ```\r\n *\r\n * @ignore\r\n */\r\nexport var globalAdapter = new GlobalAdapter();\r\n/**\r\n * ============================================================================\r\n * REGULAR ADAPTER\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Adapter allows adding ordered callback functions and associating them with a\r\n * string-based key. An Adapter user can then easily invoke those callbacks to\r\n * apply custom functions on its input, output or intermediate values.\r\n *\r\n * Custom code and plugins can add their own callbacks to modify and enhance\r\n * core functionality.\r\n *\r\n * See the description of `add()` for an example.\r\n *\r\n * Almost any object in amCharts4 has own adapter, accessible with `adapter`\r\n * property.\r\n *\r\n * Any adapters added to it will be applied to that object only.\r\n *\r\n * ### Global Adapters\r\n *\r\n * If you want to add an adapter which applies to all instances of the same\r\n * object type, like, for instance all slices in PieSeries, you can use\r\n * global adapter.\r\n *\r\n * Global adapter is a system-wide instance, accessible via `globalAdapter`.\r\n *\r\n * ```TypeScript\r\n * am4core.globalAdapter.addAll<am4charts.IPieSeriesAdapters, am4charts.PieSeries, \"fill\">(am4charts.PieSeries. \"fill\", (value, target, key) => {\r\n * return am4core.color(\"#005500\");\r\n * });\r\n * ```\r\n * ```JavaScript\r\n * am4core.globalAdapter.addAll(am4charts.PieSeries. \"fill\", (value, target, key) => {\r\n * return am4core.color(\"#005500\");\r\n * });\r\n * ```\r\n *\r\n * {@link https://www.amcharts.com/docs/v4/reference/adapter_module/#globalAdapter_property More info}.\r\n *\r\n * @important\r\n */\r\nvar Adapter = /** @class */ (function () {\r\n /**\r\n * Constructor, sets the object referece this Adapter should be used for.\r\n *\r\n * @param c Object\r\n */\r\n function Adapter(c) {\r\n /**\r\n * Internal counter for callback ids.\r\n */\r\n this._callbackId = 0;\r\n /**\r\n * A list of adapter callbacks.\r\n *\r\n * @param $number.order(left.priority, right.priority) [description]\r\n * @param $number.order(left.id, right.id));\t} [description]\r\n */\r\n this._callbacks = new SortedList(function (left, right) {\r\n return $order.or($number.order(left.priority, right.priority), $number.order(left.id, right.id));\r\n });\r\n this._disabled = {};\r\n this.object = c;\r\n // TODO this exposes the internal events\r\n this.events = this._callbacks.events;\r\n }\r\n /**\r\n * Adds a callback for a specific key.\r\n *\r\n * ```TypeScript\r\n * // Override fill color value and make all slices green\r\n * chart.series.template.adapter.add(\"fill\", (value, target, key) => {\r\n * return am4core.color(\"#005500\");\r\n * });\r\n * ```\r\n * ```JavaScript\r\n * // Override fill color value and make all slices green\r\n * chart.series.template.adapter.add(\"fill\", function(value, target, key) {\r\n * return am4core.color(\"#005500\");\r\n * });\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"series\": [{\r\n * // ...\r\n * \"adapter\": {\r\n * \t// Override fill color value and make all slices green\r\n * \t\"fill\": function(value, target, key) {\r\n * \t return am4core.color(\"#005500\");\r\n * \t}\r\n * }\r\n * }]\r\n * }\r\n * ```\r\n *\r\n * The above will call user-defined function (adapter) whenever `fill` value\r\n * is requested from the Pie series, allowing it to override the default\r\n * using custom code and any fuzzy logic.\r\n *\r\n * There can be any number of adapters set on one property key.\r\n *\r\n * In this case adapters will be applied in daisy-chain fashion. The first\r\n * adapter in queue will make its transformation. The next one will have\r\n * the output of the first adapter as a starting value, etc.\r\n *\r\n * The order of the adapters are determined either by the order they were\r\n * added in, or their `priority` value.\r\n *\r\n * The heigher the `priority`, the later in the game adapter will be applied.\r\n *\r\n * @param key Key\r\n * @param callback A callback function\r\n * @param priority The higher priority, the more chance the adapter will be applied last\r\n * @param scope Scope for the callback function\r\n */\r\n Adapter.prototype.add = function (key, callback, priority, scope) {\r\n if (priority === void 0) { priority = 0; }\r\n this._callbacks.insert({\r\n id: ++this._callbackId,\r\n key: key,\r\n callback: callback,\r\n priority: priority,\r\n scope: scope\r\n });\r\n };\r\n /**\r\n * Checks whether specific adapter is already set.\r\n *\r\n * @param key Key\r\n * @param callback A callback function\r\n * @param priority The higher priority, the more chance the adapter will be applied last\r\n * @param scope Scope for the callback function\r\n * @returns Adapter set?\r\n */\r\n Adapter.prototype.has = function (key, callback, priority, scope) {\r\n if (priority === void 0) { priority = 0; }\r\n return $iter.contains(this._callbacks.iterator(), function (item) {\r\n return item.key === key && item.callback === callback && item.priority === priority && item.scope === scope;\r\n });\r\n };\r\n /**\r\n * Removes adapter callbacks for the specific `key`.\r\n *\r\n * If `priority` is specified, only callbacks for that priority are removed.\r\n *\r\n * @param key Key\r\n * @param priority Priority\r\n * @todo Implement\r\n */\r\n Adapter.prototype.remove = function (key, priority) {\r\n var _this = this;\r\n // It has to make a copy because it removes the elements while iterating\r\n // TODO inefficient\r\n // TODO should this re-enable the key ?\r\n $array.each($iter.toArray(this._callbacks.iterator()), function (item) {\r\n // TODO test this\r\n if (item.key === key && (!$type.isNumber(priority) || priority === item.priority)) {\r\n _this._callbacks.remove(item);\r\n }\r\n });\r\n };\r\n /**\r\n * Enable applying adapters for a certain key, if it was disabled before by\r\n * `disableKey()`.\r\n *\r\n * @param key Key\r\n */\r\n Adapter.prototype.enableKey = function (key) {\r\n delete this._disabled[key];\r\n };\r\n /**\r\n * Disable applying adapters for a certain key.\r\n *\r\n * Optionally, can set how many applies to skip before automatically\r\n * re-enabling the applying.\r\n *\r\n * @param key Key\r\n * @param amount Number of applies to skip\r\n */\r\n Adapter.prototype.disableKey = function (key, amount) {\r\n if (amount === void 0) { amount = Infinity; }\r\n this._disabled[key] = amount;\r\n };\r\n Adapter.prototype._hasListenersByType = function (key) {\r\n return $array.any(this._callbacks.values, function (x) { return x.key === key; });\r\n };\r\n /**\r\n * Returns if there are any enabled adapters set for the specific `key`.\r\n *\r\n * @returns Are there any adapters for the key?\r\n */\r\n Adapter.prototype.isEnabled = function (key) {\r\n return this._disabled[key] == null && (this._hasListenersByType(key) || globalAdapter.isEnabled(this.object, key));\r\n };\r\n Adapter.prototype._shouldDispatch = function (key) {\r\n var count = this._disabled[key];\r\n if (!$type.isNumber(count)) {\r\n return true;\r\n }\r\n else {\r\n if (count <= 1) {\r\n delete this._disabled[key];\r\n }\r\n else {\r\n --this._disabled[key];\r\n }\r\n return false;\r\n }\r\n };\r\n /**\r\n * Passes the input value through all the callbacks for the defined `key`.\r\n *\r\n * @param key Key\r\n * @param value Input value\r\n * @param ...rest Rest of the parameters to be passed into callback\r\n * @return Output value\r\n */\r\n Adapter.prototype.apply = function (key, value) {\r\n if (this._shouldDispatch(key)) {\r\n // This is needed to improve the performance and reduce garbage collection\r\n var callbacks = this._callbacks.values;\r\n var length_1 = callbacks.length;\r\n if (length_1 > 0) {\r\n for (var i = 0; i < length_1; ++i) {\r\n var item = callbacks[i];\r\n if (item.key === key) {\r\n value = item.callback.call(item.scope, value, this.object, key);\r\n }\r\n }\r\n }\r\n // Apply global adapters\r\n value = globalAdapter.applyAll(this.object, key, value);\r\n return value;\r\n }\r\n else {\r\n return value;\r\n }\r\n };\r\n /**\r\n * Returns all adapter keys which are in this adapter.\r\n *\r\n * @return Adapter keys\r\n */\r\n Adapter.prototype.keys = function () {\r\n // TODO inefficient\r\n return $iter.toArray($iter.map(this._callbacks.iterator(), function (x) { return x.key; }));\r\n };\r\n /**\r\n * Copies all the adapter callbacks from `source`.\r\n *\r\n * @param source An Adapter to copy items from\r\n */\r\n Adapter.prototype.copyFrom = function (source) {\r\n var _this = this;\r\n $iter.each(source._callbacks.iterator(), function (x) {\r\n _this.add(x.key, x.callback, x.priority, x.scope);\r\n });\r\n $object.each(source._disabled, function (key, val) {\r\n _this._disabled[key] = val;\r\n });\r\n };\r\n /**\r\n * Clears all callbacks from this Adapter.\r\n */\r\n Adapter.prototype.clear = function () {\r\n // TODO should this also re-enable all the keys ?\r\n this._callbacks.clear();\r\n };\r\n return Adapter;\r\n}());\r\nexport { Adapter };\r\n","/**\r\n * Animation module.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { BaseObjectEvents } from \"../Base\";\r\nimport { SVGDefaults } from \"../defs/SVGDefaults\";\r\nimport { Disposer } from \"../utils/Disposer\";\r\nimport { Color } from \"../utils/Color\";\r\nimport { Percent, percent } from \"../utils/Percent\";\r\nimport * as $async from \"../utils/AsyncPending\";\r\nimport * as $ease from \"../utils/Ease\";\r\nimport * as $colors from \"../utils/Colors\";\r\nimport * as $math from \"../utils/Math\";\r\nimport * as $array from \"../utils/Array\";\r\nimport * as $type from \"../utils/Type\";\r\nimport { system } from \"../System\";\r\nimport { options } from \"../Options\";\r\n/**\r\n * Calls a `callback` function for the `duration` of milliseconds.\r\n *\r\n * @todo Needed?\r\n * @deprecated Not used anywhere\r\n * @ignore Exclude from docs\r\n * @param duration Duration (ms)\r\n * @param callback Callback function\r\n * @return Disposer\r\n */\r\nexport function animate(duration, callback) {\r\n var disposed = false;\r\n // TODO use performance.now() ?\r\n var startTime = Date.now();\r\n function loop(now) {\r\n if (!disposed) {\r\n var diff = now - startTime;\r\n if (diff >= duration) {\r\n callback(1);\r\n }\r\n else {\r\n $async.nextFrame(loop);\r\n callback(diff / duration);\r\n }\r\n }\r\n }\r\n $async.nextFrame(loop);\r\n return new Disposer(function () {\r\n disposed = true;\r\n });\r\n}\r\n/**\r\n * Returns numeric value accoring to progress between start and end values.\r\n *\r\n * @param progress Progress (0-1)\r\n * @param from\r\n * @param to\r\n * @return Value according to progress\r\n */\r\nfunction getProgressNumber(progress, from, to) {\r\n return from + ((to - from) * progress);\r\n}\r\n/**\r\n * Returns [[Percent]] value accoring to progress between start and end\r\n * values.\r\n *\r\n * @param progress Progress (0-1)\r\n * @param from\r\n * @param to\r\n * @return Value according to progress\r\n */\r\nfunction getProgressPercent(progress, from, to) {\r\n return new Percent(getProgressNumber(progress, from.percent, to.percent));\r\n}\r\n/**\r\n * Returns color value accoring to progress between start and end values.\r\n *\r\n * @param progress Progress (0-1)\r\n * @param from\r\n * @param to\r\n * @return Color according to progress\r\n */\r\nfunction getProgressColor(progress, from, to) {\r\n var color = new Color($colors.interpolate(from.rgb, to.rgb, progress));\r\n if (from.alpha != to.alpha) {\r\n color.alpha = from.alpha + (to.alpha - from.alpha) * progress;\r\n }\r\n return color;\r\n}\r\n/**\r\n * [getHybridProperty description]\r\n *\r\n * @todo Description\r\n * @param property [description]\r\n * @param type [description]\r\n * @return [description]\r\n */\r\nfunction getHybridProperty(property, type) {\r\n return type + property.charAt(0).toUpperCase() + property.substr(1);\r\n}\r\nvar AnimationDisposer = /** @class */ (function () {\r\n function AnimationDisposer(array) {\r\n this._disposer = new Disposer(function () {\r\n while (array.length !== 0) {\r\n array[0].dispose();\r\n }\r\n });\r\n }\r\n AnimationDisposer.prototype.isDisposed = function () {\r\n return this._disposer.isDisposed();\r\n };\r\n AnimationDisposer.prototype.dispose = function () {\r\n this._disposer.dispose();\r\n };\r\n return AnimationDisposer;\r\n}());\r\nexport { AnimationDisposer };\r\n/**\r\n * Animation can be used to transition certain properties on an object that\r\n * implements [[IAnimatable]] interface.\r\n *\r\n * @see {@link IAnimationEvents} for a list of available events\r\n */\r\nvar Animation = /** @class */ (function (_super) {\r\n __extends(Animation, _super);\r\n /**\r\n * Constructor\r\n *\r\n * @param object An object animation should run on\r\n * @param animationOptions One or several (array) of animation options\r\n * @param duration Duration (ms)\r\n * @param easing Easing function\r\n */\r\n function Animation(object, animationOptions, duration, easing) {\r\n var _this = \r\n // Init\r\n _super.call(this) || this;\r\n /**\r\n * Duration of the animation in milliseconds.\r\n */\r\n _this.duration = 0;\r\n /**\r\n * Easing function to use.\r\n *\r\n * @see {@link Ease}\r\n */\r\n _this.easing = $ease.linear;\r\n /**\r\n * Contains progress of the current animation: 0 (start) to 1 (end).\r\n */\r\n _this.progress = 0;\r\n /**\r\n * Indicated how many times animation should loop.\r\n */\r\n _this._loop = 0;\r\n /**\r\n * Animation is paused.\r\n */\r\n _this._pause = false;\r\n /**\r\n * Holds reference to timeout for delayed play.\r\n */\r\n _this._delayTimeout = null;\r\n /**\r\n * Elapsed time in currently playing animation.\r\n */\r\n _this._time = 0;\r\n _this._isFinished = false;\r\n _this.className = \"Animation\";\r\n // Override duration if animations disabled system-wide\r\n if (options.animationsEnabled === false) {\r\n duration = 0;\r\n }\r\n // Set parameters\r\n _this.object = object;\r\n _this.animationOptions = $array.toArray(animationOptions);\r\n _this.duration = duration;\r\n if (easing) {\r\n _this.easing = easing;\r\n }\r\n // Run check if there are already animations playing on the same properties\r\n // and stop them - the last animation takes precedence\r\n //this.stopSameAnimations();\r\n /*if ($type.hasValue(callback)) {\r\n // TODO don't use .call\r\n this.events.on(\"animationended\", callback, object);\r\n }*/\r\n // Apply theme\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n // TODO verify that this is correct\r\n Animation.prototype.debug = function () { };\r\n /**\r\n * Disposes this object, clears up after itself.\r\n */\r\n Animation.prototype.dispose = function () {\r\n _super.prototype.dispose.call(this);\r\n this.pause();\r\n };\r\n /**\r\n * Delays animation start by X milliseconds.\r\n *\r\n * @param delay Delay (ms)\r\n * @return Animation\r\n */\r\n Animation.prototype.delay = function (delay) {\r\n var _this = this;\r\n //@todo Maybe not use `bind()`\r\n if (delay > 0) {\r\n this.pause();\r\n // This is so that it will get disposed if `this.object` is disposed\r\n // TODO hacky, figure out a better way\r\n $array.move(this.object.animations, this);\r\n var id_1 = setTimeout(function () {\r\n _this._delayTimeout = null;\r\n _this.start();\r\n }, delay);\r\n this._delayTimeout = new Disposer(function () {\r\n clearTimeout(id_1);\r\n });\r\n }\r\n return this;\r\n };\r\n Animation.prototype._start = function () {\r\n this._isFinished = false;\r\n // Clear delay timeout if there was one\r\n if (this._delayTimeout) {\r\n this.removeDispose(this._delayTimeout);\r\n this._delayTimeout = null;\r\n }\r\n // Run check if there are already animations playing on the same properties\r\n // and stop them - the last animation takes precedence\r\n this.stopSameAnimations();\r\n // Reset counters\r\n this._pause = false;\r\n // Register animation\r\n $array.move(system.animations, this);\r\n // Register this animation in object's `animations` list\r\n $array.move(this.object.animations, this);\r\n system.requestFrame();\r\n };\r\n /**\r\n * Starts animation.\r\n *\r\n * @return Animation\r\n */\r\n Animation.prototype.start = function () {\r\n this._start();\r\n this._startTime = Date.now();\r\n this._time = 0;\r\n this.staticOptions = [];\r\n // Process initial property values\r\n for (var i = this.animationOptions.length - 1; i >= 0; i--) {\r\n var options_1 = this.animationOptions[i];\r\n if (!$type.hasValue(options_1.from)) {\r\n if (options_1.childObject) {\r\n options_1.from = options_1.childObject[options_1.property];\r\n }\r\n else {\r\n options_1.from = this.object[options_1.property];\r\n if (!$type.hasValue(options_1.from)) {\r\n options_1.from = SVGDefaults[options_1.property];\r\n }\r\n }\r\n /*if (!$type.hasValue(options.from)) {\r\n throw Error(\"Could not get initial transition value.\");\r\n }*/\r\n }\r\n if (options_1.from == options_1.to) { // || options.to == (<any>this.object)[options.property]){ this is not good, as dataItem.value is set to final at once, and we animate workingValue\r\n $array.remove(this.animationOptions, options_1);\r\n }\r\n else if (!$type.hasValue(options_1.from) || (!(options_1.from instanceof Percent) && (options_1.to instanceof Percent)) || ((options_1.from instanceof Percent) && !(options_1.to instanceof Percent))) {\r\n // Initial value is undefined, treat it as static\r\n this.staticOptions.push(options_1);\r\n $array.remove(this.animationOptions, options_1);\r\n }\r\n else {\r\n // Use different update methods for different value types\r\n if ($type.isNumber(options_1.to)) {\r\n // Numeric value\r\n options_1.updateMethod = getProgressNumber;\r\n // Check if initial value is not Percent\r\n if (options_1.from instanceof Percent) {\r\n // It is. Let's convert it to pixel value\r\n // @todo Check if we can do this in a less hacky way\r\n var convertedFrom = this.object[getHybridProperty(options_1.property, \"pixel\")];\r\n if (!isNaN(convertedFrom)) {\r\n options_1.from = convertedFrom;\r\n }\r\n else {\r\n this.staticOptions.push(options_1);\r\n $array.remove(this.animationOptions, options_1);\r\n }\r\n }\r\n else if (isNaN(options_1.from)) {\r\n // Static value\r\n this.staticOptions.push(options_1);\r\n $array.remove(this.animationOptions, options_1);\r\n }\r\n }\r\n else {\r\n // Check if maybe we have a color or percent value\r\n if (options_1.to instanceof Color) {\r\n // Yup - set resolved named color\r\n //options.from = $colors.stringToColor(<string>options.from);\r\n if (options_1.from) {\r\n options_1.updateMethod = getProgressColor;\r\n }\r\n else {\r\n // Static value\r\n this.staticOptions.push(options_1);\r\n $array.remove(this.animationOptions, options_1);\r\n }\r\n }\r\n else if (options_1.to instanceof Percent) {\r\n // Percent\r\n options_1.updateMethod = getProgressPercent;\r\n // Check if the initial value is maybe in pixels\r\n if (!isNaN(options_1.from)) {\r\n // It is. Let's convert it\r\n // @todo Check if we can do this in a less hacky way\r\n var convertedFrom = this.object[getHybridProperty(options_1.property, \"relative\")];\r\n if (!isNaN(convertedFrom)) {\r\n options_1.from = percent(convertedFrom * 100);\r\n }\r\n }\r\n }\r\n else {\r\n // Static value\r\n this.staticOptions.push(options_1);\r\n $array.remove(this.animationOptions, options_1);\r\n }\r\n }\r\n }\r\n }\r\n // Apply static options (just in case they were reset by previous\r\n // animation loop)\r\n this.applyStaticOptions();\r\n if (this.events.isEnabled(\"animationstarted\")) {\r\n var event_1 = {\r\n type: \"animationstarted\",\r\n target: this,\r\n progress: this.progress\r\n };\r\n this.events.dispatchImmediately(\"animationstarted\", event_1);\r\n }\r\n this.update();\r\n // If duration is 0, just end animation\r\n if (this.duration === 0) {\r\n this.end();\r\n }\r\n return this;\r\n };\r\n /**\r\n * Sets loop count for the animation. If parameter is not a valid number the\r\n * animation will keep on looping indefinitely.\r\n *\r\n * @param count Number of times to loop animation\r\n * @return Animation\r\n */\r\n Animation.prototype.loop = function (count) {\r\n if (!$type.isNumber(count)) {\r\n count = Infinity;\r\n }\r\n this._loop = count;\r\n return this;\r\n };\r\n /**\r\n * Pauses animation.\r\n *\r\n * @return Animation\r\n */\r\n Animation.prototype.pause = function () {\r\n this._pause = true;\r\n if (this._delayTimeout) {\r\n this.removeDispose(this._delayTimeout);\r\n this._delayTimeout = null;\r\n }\r\n $array.remove(system.animations, this);\r\n $array.remove(this.object.animations, this);\r\n return this;\r\n };\r\n /**\r\n * Resumes paused animation.\r\n *\r\n * @return Animation\r\n */\r\n Animation.prototype.resume = function () {\r\n this._start();\r\n this._startTime = Date.now() - this._time;\r\n return this;\r\n };\r\n /**\r\n * Jumps to animation end. If animation is set to loop, this will start\r\n * another round of animation from start.\r\n *\r\n * @return Animation\r\n */\r\n Animation.prototype.end = function () {\r\n // Pause and complete the progress\r\n if (this._loop == 0) {\r\n this.pause();\r\n }\r\n this.setProgress(1);\r\n // Apply static options\r\n this.applyStaticOptions();\r\n if (this.events.isEnabled(\"animationended\")) {\r\n var event_2 = {\r\n type: \"animationended\",\r\n target: this,\r\n progress: this.progress\r\n };\r\n this.events.dispatchImmediately(\"animationended\", event_2);\r\n }\r\n // Check if we should loop\r\n if (this._loop > 0) {\r\n this._loop--;\r\n this.start();\r\n }\r\n else {\r\n this.stop();\r\n this._isFinished = true;\r\n }\r\n return this;\r\n };\r\n /**\r\n * Stops animation immediately leaving properties in their current values.\r\n */\r\n Animation.prototype.kill = function () {\r\n this.pause();\r\n this._isFinished = true;\r\n };\r\n /**\r\n * Returns indicator if this animation is finished or not\r\n *\r\n * @return Is finished?\r\n */\r\n Animation.prototype.isFinished = function () {\r\n return this._isFinished;\r\n };\r\n /**\r\n * Applies static options that can't be animated.\r\n */\r\n Animation.prototype.applyStaticOptions = function () {\r\n var _this = this;\r\n $array.each(this.staticOptions, function (options) {\r\n if (options.childObject) {\r\n options.childObject[options.property] = _this.progress == 1 ? options.to : options.from;\r\n }\r\n else {\r\n _this.object[options.property] = _this.progress == 1 ? options.to : options.from;\r\n }\r\n });\r\n };\r\n /**\r\n * Stops animation.\r\n *\r\n * When animation is stopped, the properties of the target object will remain\r\n * where they were at the moment when `stop()` was called.\r\n *\r\n * @param skipEvent Do not trigger `animationstopped` event\r\n * @return Animation\r\n */\r\n Animation.prototype.stop = function (skipEvent) {\r\n this.pause();\r\n if (!skipEvent) {\r\n if (this.events.isEnabled(\"animationstopped\")) {\r\n var event_3 = {\r\n type: \"animationstopped\",\r\n target: this,\r\n progress: this.progress\r\n };\r\n this.events.dispatchImmediately(\"animationstopped\", event_3);\r\n }\r\n }\r\n return this;\r\n };\r\n /**\r\n * Sets current progress and updates object's numeric and color values.\r\n *\r\n * @param progress Progress (0-1)\r\n */\r\n Animation.prototype.setProgress = function (progress) {\r\n var _this = this;\r\n this._time = this.duration * progress; // just in case we call this from outside\r\n $array.each(this.animationOptions, function (options) {\r\n if (options.updateMethod && $type.hasValue(options.from)) {\r\n var value = options.updateMethod(progress, options.from, options.to);\r\n if (options.childObject) {\r\n options.childObject[options.property] = value;\r\n }\r\n else {\r\n _this.object[options.property] = value;\r\n }\r\n }\r\n });\r\n this.progress = progress;\r\n if (this.events.isEnabled(\"animationprogress\")) {\r\n var event_4 = {\r\n type: \"animationprogress\",\r\n target: this,\r\n progress: this.progress\r\n };\r\n this.events.dispatchImmediately(\"animationprogress\", event_4);\r\n }\r\n system.requestFrame();\r\n };\r\n /**\r\n * Tracks and sets progress according to time or frames.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Animation\r\n */\r\n Animation.prototype.update = function () {\r\n if (!this._pause) {\r\n var progress = void 0;\r\n this._time = $math.fitToRange(Date.now() - this._startTime, 0, this.duration);\r\n var timeProgress = this._time / this.duration;\r\n progress = this.easing(timeProgress);\r\n if (this.duration == 0 || !$type.isNumber(progress) || timeProgress >= 1) {\r\n progress = 1;\r\n }\r\n this.setProgress(progress);\r\n if ($math.round(this._time / this.duration, 6) == 1) {\r\n this.end();\r\n }\r\n }\r\n return this;\r\n };\r\n Object.defineProperty(Animation.prototype, \"delayed\", {\r\n /**\r\n * Returns `true` if this animation is delayed.\r\n *\r\n * @readonly\r\n * @return [description]\r\n */\r\n get: function () {\r\n return this._delayTimeout ? true : false;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Checks other animations currently running on the same object and removes\r\n * overlapping options from those other animations that are contained in\r\n * this animation.\r\n *\r\n * This is needed to ensure that no two confurent animations step on each\r\n * other's toes by trying to animate the same property.\r\n */\r\n Animation.prototype.stopSameAnimations = function () {\r\n var _this = this;\r\n // stop animation of the same property\r\n // TODO make this more efficient\r\n // TODO don't copy the array\r\n $array.each($array.copy(this.object.animations), function (animation) {\r\n if (animation !== _this && !animation.delayed) {\r\n var killed_1 = [];\r\n $array.each(_this.animationOptions, function (newOptions) {\r\n $array.each(animation.animationOptions, function (oldOptions) {\r\n if (newOptions.property == oldOptions.property && newOptions.childObject == oldOptions.childObject) {\r\n killed_1.push(oldOptions);\r\n if (animation.animationOptions.length == 0) {\r\n animation.kill();\r\n }\r\n }\r\n });\r\n });\r\n $array.each(killed_1, function (oldOptions) {\r\n $array.remove(animation.animationOptions, oldOptions);\r\n });\r\n }\r\n });\r\n };\r\n /**\r\n * Adds easing functions to \"function\" fields.\r\n *\r\n * @param field Field name\r\n * @return Assign as function?\r\n */\r\n Animation.prototype.asFunction = function (field) {\r\n return field == \"easing\" || _super.prototype.asIs.call(this, field);\r\n };\r\n return Animation;\r\n}(BaseObjectEvents));\r\nexport { Animation };\r\n","import * as $math from \"./Math\";\r\nimport * as $type from \"./Type\";\r\n/**\r\n * ============================================================================\r\n * UTILITY FUNCTIONS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Searches `array` for `value`.\r\n *\r\n * Returns -1 if not found.\r\n *\r\n * @param array Source array\r\n * @param value Value to search\r\n * @returns Index\r\n */\r\nexport function indexOf(array, value) {\r\n var length = array.length;\r\n for (var i = 0; i < length; ++i) {\r\n // TODO handle NaN\r\n if (array[i] === value) {\r\n return i;\r\n }\r\n }\r\n return -1;\r\n}\r\n/**\r\n * Calls `test` for each element in `array`.\r\n *\r\n * If `test` returns `true` then it immediately returns `true`.\r\n *\r\n * If `test` returns `false` for all of the elements in `array` then it returns `false`.\r\n *\r\n * @param array Source array\r\n * @param test Function which is called on each element\r\n * @returns Whether `test` returned true or not\r\n */\r\nexport function any(array, test) {\r\n var length = array.length;\r\n for (var i = 0; i < length; ++i) {\r\n if (test(array[i])) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n}\r\n/**\r\n * Calls `fn` function for every member of array and returns a new array out\r\n * of all outputs.\r\n *\r\n * @param array Source array\r\n * @param fn Callback function\r\n * @returns New array\r\n */\r\nexport function map(array, fn) {\r\n var length = array.length;\r\n var output = new Array(length);\r\n for (var i = 0; i < length; ++i) {\r\n output[i] = fn(array[i], i);\r\n }\r\n return output;\r\n}\r\n/**\r\n * Iterates through all items in array and calls `fn` function for each of\r\n * them.\r\n *\r\n * @param array Source array\r\n * @param fn Callback function\r\n */\r\nexport function each(array, fn) {\r\n var length = array.length;\r\n for (var i = 0; i < length; ++i) {\r\n fn(array[i], i);\r\n }\r\n}\r\n/**\r\n * Iterates through all items in array in reverse order and calls `fn` function for each of\r\n * them.\r\n *\r\n * @param array Source array\r\n * @param fn Callback function\r\n */\r\nexport function eachReverse(array, fn) {\r\n var i = array.length;\r\n while (i--) {\r\n fn(array[i], i);\r\n }\r\n}\r\n/**\r\n * Iterates through all items in array and calls `fn` function for each of\r\n * them.\r\n *\r\n * If `fn` call evaluates to `false`, further iteration is cancelled.\r\n *\r\n * @param array Source array\r\n * @param fn Callback function\r\n */\r\nexport function eachContinue(array, fn) {\r\n var length = array.length;\r\n for (var i = 0; i < length; ++i) {\r\n if (!fn(array[i], i)) {\r\n break;\r\n }\r\n }\r\n}\r\n/**\r\n * Shifts an item at `index` towards beginning of the array.\r\n *\r\n * @param array Source array\r\n * @param index Target element index\r\n */\r\nexport function shiftLeft(array, index) {\r\n var length = array.length;\r\n for (var i = index; i < length; ++i) {\r\n array[i - index] = array[i];\r\n }\r\n array.length = length - index;\r\n}\r\n/**\r\n * Returns the last item of the array.\r\n *\r\n * @param array Source array\r\n * @returns Last item\r\n */\r\nexport function last(array) {\r\n var length = array.length;\r\n return length ? array[length - 1] : undefined;\r\n}\r\n/**\r\n * Returns the first item of the array.\r\n *\r\n * @param array Source array\r\n * @returns Last item\r\n */\r\nexport function first(array) {\r\n return array[0];\r\n}\r\n/**\r\n * Inserts `element` into `array` at `index`.\r\n *\r\n * Caps `index` to be between `0` and `array.length`\r\n *\r\n * @param array Source array\r\n * @param element Item to insert\r\n * @param array Index to insert item at\r\n */\r\nexport function insert(array, element, index) {\r\n //if (array) {\r\n index = $math.fitToRange(index, 0, array.length);\r\n array.splice(index, 0, element);\r\n //}\r\n}\r\n/**\r\n * Removes all copies of `element` from `array` (if they exist) and then\r\n * inserts `element` at `index`.\r\n *\r\n * @param array Source array\r\n * @param element Item\r\n * @param array Index to move item to\r\n */\r\nexport function setIndex(array, element, index) {\r\n remove(array, element);\r\n insert(array, element, index);\r\n}\r\n/**\r\n * Pushes all of the elements from `input` into `array`.\r\n *\r\n * @param array Output array\r\n * @param input Input array\r\n */\r\nexport function pushAll(array, input) {\r\n var length = input.length;\r\n for (var i = 0; i < length; ++i) {\r\n array.push(input[i]);\r\n }\r\n}\r\n/**\r\n * Removes `element` from `array`.\r\n *\r\n * If there are multiple copies of `element`, they are all removed.\r\n *\r\n * @param array Source array\r\n * @param element Item to remove\r\n */\r\nexport function remove(array, element) {\r\n var found = false;\r\n var index = array.indexOf(element);\r\n if (index !== -1) {\r\n found = true;\r\n array.splice(index, 1);\r\n var length_1 = array.length;\r\n while (index < length_1) {\r\n // TODO handle NaN\r\n if (array[index] === element) {\r\n array.splice(index, 1);\r\n --length_1;\r\n }\r\n else {\r\n ++index;\r\n }\r\n }\r\n }\r\n return found;\r\n}\r\n/**\r\n * Adds an `element` to `array`.\r\n *\r\n * If array already contains and item like this, it is removed before adding\r\n * it again.\r\n *\r\n * Optionally `toIndex` can be specified to add element at specific index.\r\n *\r\n * @param array Source array\r\n * @param element Item to add\r\n * @param array Index to move item to\r\n */\r\nexport function move(array, element, toIndex) {\r\n // @todo this implementation must be the same as the List.moveValue method\r\n // @todo don't do anything if the desired index is the same as the current index\r\n var index = indexOf(array, element);\r\n // @todo remove all old values rather than only the first ?\r\n if (index !== -1) {\r\n removeIndex(array, index);\r\n }\r\n if (toIndex == null) {\r\n array.push(element);\r\n }\r\n else {\r\n insertIndex(array, toIndex, element);\r\n }\r\n}\r\n/**\r\n * Inserts `element` into `array` at `index`.\r\n *\r\n * If `index` is not provided, it will insert `element` at the end of `array`.\r\n *\r\n * @param array Source array\r\n * @param element Item to add\r\n * @param array Index to add item at\r\n */\r\nexport function add(array, element, index) {\r\n // Append to the end if index is not set\r\n if (!$type.isNumber(index)) {\r\n array.push(element);\r\n }\r\n // Add to the beginning of array if index is 0\r\n else if (index === 0) {\r\n array.unshift(element);\r\n }\r\n // Add to indicated place if index is set\r\n else {\r\n array.splice(index, 0, element);\r\n }\r\n}\r\n/**\r\n * Removes `element` from `array` (if it exists) and then inserts `element` at\r\n * `index`.\r\n *\r\n * If `index` is not provided, it will insert `element` at the end of `array`.\r\n *\r\n * @param array Source array\r\n * @param element Item to remove\r\n * @param array Index to move item to\r\n */\r\nexport function replace(array, element, index) {\r\n // check if exists\r\n var ind = array.indexOf(element);\r\n // remove if exists\r\n if (ind !== -1) {\r\n array.splice(ind, 1);\r\n }\r\n // add to end if index is not set\r\n if (!$type.isNumber(index)) {\r\n array.push(element);\r\n }\r\n // add to indicated place if index is set\r\n else {\r\n array.splice(index, 0, element);\r\n }\r\n}\r\n/**\r\n * Wraps `input` in an array, if it isn't already an array.\r\n *\r\n * @param input Source value\r\n * @return An array\r\n */\r\nexport function toArray(input) {\r\n if (Array.isArray(input)) {\r\n return input;\r\n }\r\n else {\r\n return [input];\r\n }\r\n}\r\n/**\r\n * Returns `true` if `element` exists in `array`.\r\n *\r\n * @param array Source array\r\n * @param element Item to search for\r\n * @returns Item in array?\r\n */\r\nexport function has(array, element) {\r\n return indexOf(array, element) !== -1;\r\n}\r\n/**\r\n * Returns a shallow copy of `array`.\r\n *\r\n * @param array Source array\r\n * @returns Copy of the array\r\n */\r\nexport function copy(array) {\r\n var length = array.length;\r\n // It's faster to create the array with a pre-defined length\r\n var output = new Array(length);\r\n for (var i = 0; i < length; ++i) {\r\n // Because the array has a pre-defined length, we have to assign rather than push\r\n // This is also faster than pushing\r\n output[i] = array[i];\r\n }\r\n return output;\r\n}\r\n/**\r\n * Returns a copy of `array` which contains all the elements between `start`\r\n * and `end`. (including `start` and excluding `end`)\r\n *\r\n * If `end` is not provided, it defaults to `array.length`.\r\n *\r\n * @param array Source array\r\n * @param start Start index\r\n * @param end End index\r\n * @returns Part of the array\r\n */\r\nexport function slice(array, start, end) {\r\n if (end === void 0) { end = array.length; }\r\n var output = new Array(end - start);\r\n for (var i = start; i < end; ++i) {\r\n output[i - start] = array[i];\r\n }\r\n return output;\r\n}\r\n/**\r\n * Inserts a value into array at specific index.\r\n *\r\n * @param array Source array\r\n * @param index Index\r\n * @param value Value to insert\r\n */\r\nexport function insertIndex(array, index, value) {\r\n array.splice(index, 0, value);\r\n}\r\n/**\r\n * Removes a value from array at specific index.\r\n *\r\n * @param array Source array\r\n * @param index Index\r\n */\r\nexport function removeIndex(array, index) {\r\n array.splice(index, 1);\r\n}\r\n/**\r\n * Orders an array using specific `ordering` function and returns index of\r\n * the `value`.\r\n *\r\n * @ignore Exclude from docs\r\n * @param array Source array\r\n * @param ordering An ordering function\r\n * @param value Value to search for\r\n * @returns Result of the search\r\n */\r\nexport function getSortedIndex(array, ordering, value) {\r\n var start = 0;\r\n var end = array.length;\r\n var found = false;\r\n while (start < end) {\r\n // TODO is this faster/slower than using Math.floor ?\r\n var pivot = (start + end) >> 1;\r\n var order = ordering(value, array[pivot]);\r\n // less\r\n if (order < 0) {\r\n end = pivot;\r\n // equal\r\n }\r\n else if (order === 0) {\r\n found = true;\r\n start = pivot + 1;\r\n // more\r\n }\r\n else {\r\n start = pivot + 1;\r\n }\r\n }\r\n return {\r\n found: found,\r\n index: (found ? start - 1 : start)\r\n };\r\n}\r\n/**\r\n * Searches the array using custom function and returns index of the item if\r\n * found.\r\n *\r\n * Will call `matches` function on all items of the array. If return value\r\n * evaluates to `true`, index is returned.\r\n *\r\n * Otherwise returns -1.\r\n *\r\n * @param array Source array\r\n * @param matches Search function\r\n * @returns Index of the item if found\r\n */\r\nexport function findIndex(array, matches) {\r\n var length = array.length;\r\n for (var i = 0; i < length; ++i) {\r\n if (matches(array[i], i)) {\r\n return i;\r\n }\r\n }\r\n return -1;\r\n}\r\n/**\r\n * Searches the array using custom function and returns item if found.\r\n *\r\n * Will call `matches` function on all items of the array. If return value\r\n * evaluates to `true`, index is returned.\r\n *\r\n * Otherwise returns `undefined`.\r\n *\r\n * @param array Source array\r\n * @param matches Search function\r\n * @returns Item if found\r\n */\r\nexport function find(array, matches) {\r\n var index = findIndex(array, matches);\r\n if (index !== -1) {\r\n return array[index];\r\n }\r\n}\r\n/**\r\n * Iterates through all items in array and calls `fn` function for each of\r\n * them.\r\n *\r\n * @param array Source array\r\n * @param fn Callback function\r\n */\r\nexport function shuffle(array) {\r\n // https://stackoverflow.com/a/2450976/449477\r\n var currentIndex = array.length, temporaryValue, randomIndex;\r\n // While there remain elements to shuffle...\r\n while (0 !== currentIndex) {\r\n // Pick a remaining element...\r\n randomIndex = Math.floor(Math.random() * currentIndex);\r\n currentIndex -= 1;\r\n // And swap it with the current element.\r\n temporaryValue = array[currentIndex];\r\n array[currentIndex] = array[randomIndex];\r\n array[randomIndex] = temporaryValue;\r\n }\r\n}\r\nexport function keepIf(array, keep) {\r\n var length = array.length;\r\n var i = 0;\r\n while (i < length) {\r\n if (keep(array[i])) {\r\n ++i;\r\n }\r\n else {\r\n array.splice(i, 1);\r\n --length;\r\n }\r\n }\r\n}\r\n","/**\r\n * A collection of low-level async operation stuff.\r\n */\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport * as $array from \"./Array\";\r\nvar pendingFrame = false;\r\nvar nextQueue = [];\r\nvar readQueue = [];\r\nvar writeQueue = [];\r\nvar idleQueue = [];\r\nvar fps = 1000 / 60;\r\n/**\r\n * [raf description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\r\nexport var raf = (typeof requestAnimationFrame === \"function\"\r\n ? function (fn) {\r\n requestAnimationFrame(fn);\r\n }\r\n : function (fn) {\r\n setTimeout(fn, fps);\r\n });\r\n/**\r\n * [frameLoop description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\r\nfunction frameLoop() {\r\n var now = Date.now();\r\n var length = nextQueue.length;\r\n for (var i = 0; i < length; ++i) {\r\n nextQueue[i](now);\r\n }\r\n $array.shiftLeft(nextQueue, length);\r\n for (var i = 0; i < readQueue.length; ++i) {\r\n readQueue[i](now);\r\n }\r\n readQueue.length = 0;\r\n for (var i = 0; i < writeQueue.length; ++i) {\r\n writeQueue[i](now);\r\n }\r\n writeQueue.length = 0;\r\n if (nextQueue.length === 0 && readQueue.length === 0) {\r\n pendingFrame = false;\r\n }\r\n else {\r\n raf(frameLoop);\r\n }\r\n}\r\n/**\r\n * [pendFrame description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\r\nfunction pendFrame() {\r\n if (!pendingFrame) {\r\n pendingFrame = true;\r\n raf(frameLoop);\r\n }\r\n}\r\n/**\r\n * [nextFrame description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param fn [description]\r\n */\r\nexport function nextFrame(fn) {\r\n nextQueue.push(fn);\r\n pendFrame();\r\n}\r\n/**\r\n * [readFrame description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param fn [description]\r\n */\r\nexport function readFrame(fn) {\r\n readQueue.push(fn);\r\n pendFrame();\r\n}\r\n/**\r\n * [writeFrame description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param fn [description]\r\n */\r\nexport function writeFrame(fn) {\r\n writeQueue.push(fn);\r\n pendFrame();\r\n}\r\n/**\r\n * [whenIdle description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param fn [description]\r\n */\r\nexport function whenIdle(fn) {\r\n idleQueue.push(fn);\r\n}\r\n/**\r\n * [triggerIdle description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @todo Maybe don't trigger a callback which was added while in the middle of triggering?\r\n */\r\nexport function triggerIdle() {\r\n var now = Date.now();\r\n var length = idleQueue.length;\r\n for (var i = 0; i < length; ++i) {\r\n idleQueue.shift()(now);\r\n }\r\n}\r\n","// Also detects iOS\r\nexport function isSafari() {\r\n return /apple/i.test(navigator.vendor);\r\n}\r\nexport function isInternetExplorer() {\r\n return /MSIE |Trident\\//.test(navigator.userAgent);\r\n}\r\n","/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Dictionary } from \"./Dictionary\";\r\nimport * as $type from \"./Type\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Represents object cache.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Better storage\r\n * @todo TTL logging\r\n * @todo Garbage collector\r\n */\r\nvar Cache = /** @class */ (function () {\r\n function Cache() {\r\n /**\r\n * Storage for cache items.\r\n */\r\n this._storage = new Dictionary();\r\n /**\r\n * Default TTL in milliseconds.\r\n */\r\n this.ttl = 1000;\r\n }\r\n /**\r\n * Caches or updates cached value, resets TTL.\r\n *\r\n * If `ttl` is set to zero, item will never expire.\r\n *\r\n * @param owner An id of the object that owns this cache\r\n * @param key Index key\r\n * @param value Value\r\n * @param ttl TTL of the cache to live in milliseconds\r\n */\r\n Cache.prototype.set = function (owner, key, value, ttl) {\r\n // Create if storage does not exist for this owner\r\n var ownerStorage = this._storage.insertKeyIfEmpty(owner, function () { return new Dictionary(); });\r\n // Create cache item\r\n var item = {\r\n \"touched\": new Date().getTime(),\r\n \"ttl\": $type.isNumber(ttl) ? ttl : this.ttl,\r\n \"value\": value\r\n };\r\n // Set\r\n ownerStorage.setKey(key, item);\r\n };\r\n /**\r\n * Rerturns cached item, respecting TTL.\r\n *\r\n * @param owner An id of the object that owns this cache\r\n * @param key Index key\r\n * @param value Value to return if cache not available\r\n * @return Value, or `undefined` if not set\r\n */\r\n Cache.prototype.get = function (owner, key, value) {\r\n if (value === void 0) { value = undefined; }\r\n // \t\t || ypeof this._storage[owner][key] === \"undefined\" || this._storage[owner][key].expired === true) {\r\n if (this._storage.hasKey(owner)) {\r\n var ownerStorage = this._storage.getKey(owner);\r\n if (ownerStorage.hasKey(key)) {\r\n var cacheItem = ownerStorage.getKey(key);\r\n if (cacheItem.ttl && ((cacheItem.touched + cacheItem.ttl) < new Date().getTime())) {\r\n cacheItem.expired = true;\r\n }\r\n if (cacheItem.expired) {\r\n ownerStorage.removeKey(key);\r\n return value;\r\n }\r\n return cacheItem.value;\r\n }\r\n else {\r\n return value;\r\n }\r\n }\r\n else {\r\n return value;\r\n }\r\n };\r\n /**\r\n * Clears cache for specific owner or everything.\r\n *\r\n * @param owner Owner to clear cache for\r\n */\r\n Cache.prototype.clear = function (owner) {\r\n if (owner) {\r\n this._storage.removeKey(owner);\r\n }\r\n else {\r\n this._storage.clear();\r\n }\r\n };\r\n return Cache;\r\n}());\r\nexport { Cache };\r\n/**\r\n * ============================================================================\r\n * GLOBAL INSTANCE\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * A global instance of cache. Use this instance to cache any values.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\nexport var cache = new Cache();\r\n","/**\r\n * This module contains Color object definition\r\n */\r\nimport { registry } from \"../Registry\";\r\nimport * as $colors from \"./Colors\";\r\nimport * as $type from \"./Type\";\r\n/**\r\n * Represents a color.\r\n *\r\n * `Color` accepts value only in [[iRGB]] object format. To create `Color`\r\n * object by parsing it from any supported string-based formats, use helper\r\n * [[color]] function:\r\n *\r\n * ```TypeScript\r\n * am4core.color(\"#ff0000\");\r\n * am4core.color(\"#f00\");\r\n * am4core.color(\"rgb(255, 0, 0)\");\r\n * am4core.color(\"rgba(255, 0, 0, 0.5)\");\r\n * am4core.color({ r: 255, g: 0, b: 0 });\r\n * am4core.color(\"red\");\r\n * ```\r\n * ```JavaScript\r\n * am4core.color(\"#ff0000\");\r\n * am4core.color(\"#f00\");\r\n * am4core.color(\"rgb(255, 0, 0)\");\r\n * am4core.color(\"rgba(255, 0, 0, 0.5)\");\r\n * am4core.color({ r: 255, g: 0, b: 0 });\r\n * am4core.color(\"red\");\r\n * ```\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/colors/} for color-related info\r\n */\r\nvar Color = /** @class */ (function () {\r\n /**\r\n * Constructor\r\n *\r\n * @param color Source color\r\n */\r\n function Color(color) {\r\n this._value = color;\r\n }\r\n Object.defineProperty(Color.prototype, \"rgb\", {\r\n /**\r\n * Returns [[iRGB]] representation of the color.\r\n *\r\n * @return RGB object\r\n */\r\n get: function () {\r\n return this._value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Color.prototype, \"hex\", {\r\n /**\r\n * Returns color hex value string, e.g. \"#FF0000\".\r\n *\r\n * @return Hex color code\r\n */\r\n get: function () {\r\n return this._value ? $colors.rgbToHex(this._value) : \"none\";\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Color.prototype, \"rgba\", {\r\n /**\r\n * Returns an `rgba()` representation of the color, e.g.:\r\n * `rgba(255, 0, 0, 0.5)`.\r\n *\r\n * @return rgba color string\r\n */\r\n get: function () {\r\n return this._value ? $colors.rgbToRGBA(this._value) : \"none\";\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Color.prototype, \"alpha\", {\r\n /**\r\n * Returns current transparency.\r\n *\r\n * @return Alpha (0-1)\r\n */\r\n get: function () {\r\n if (this._value != null && this._value.a != null) {\r\n return this._value.a;\r\n }\r\n else {\r\n return 1;\r\n }\r\n },\r\n /**\r\n * Set alpha (transparency) of the color.\r\n *\r\n * @param value Alpha (0-1)\r\n */\r\n set: function (value) {\r\n if (this._value) {\r\n this._value.a = value;\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Color.prototype, \"lightColor\", {\r\n /**\r\n * Returns current light color setting.\r\n *\r\n * @return Color\r\n */\r\n get: function () {\r\n if (!this._lightColor) {\r\n this._lightColor = new Color({ r: 255, g: 255, b: 255 });\r\n }\r\n return this._lightColor;\r\n },\r\n /**\r\n * Sets \"light\" color. Used when determining contrasting color.\r\n *\r\n * @param color Color\r\n */\r\n set: function (color) {\r\n this._lightColor = color;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Color.prototype, \"darkColor\", {\r\n /**\r\n * Returns current dark color setting.\r\n *\r\n * @return Color\r\n */\r\n get: function () {\r\n if (!this._darkColor) {\r\n this._darkColor = new Color({ r: 0, g: 0, b: 0 });\r\n }\r\n return this._darkColor;\r\n },\r\n /**\r\n * Sets \"dark\" color. Used when determining contrasting color.\r\n *\r\n * @param color Color\r\n */\r\n set: function (color) {\r\n this._darkColor = color;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Overrides `toString` method so that [[Color]] object can be used as\r\n * string.\r\n *\r\n * @ignore Exclude from docs\r\n * @return String represantion of color (usable in CSS)\r\n */\r\n Color.prototype.toString = function () {\r\n return this.alpha < 1 ? this.rgba : this.hex;\r\n };\r\n /**\r\n * Returns a new [[Color]] which is percent lighter (positive value),\r\n * or darker (negative value).\r\n *\r\n * Parameter is in the scale of -1 to 1.\r\n *\r\n * @param percent Increase/decrease lightness by X\r\n * @return New Color\r\n */\r\n Color.prototype.lighten = function (percent) {\r\n return new Color($colors.lighten(this.rgb, percent));\r\n };\r\n /**\r\n * Returns a new [[Color]] which is percent brighter (positive value),\r\n * or darker (negative value).\r\n *\r\n * Parameter is in the scale of -1 to 1.\r\n *\r\n * @param percent Increase/decrease brightness by X\r\n * @return New Color\r\n */\r\n Color.prototype.brighten = function (percent) {\r\n return new Color($colors.brighten(this.rgb, percent));\r\n };\r\n /**\r\n * Returns a new [[Color]] based on current color with specific saturation\r\n * applied.\r\n *\r\n * `saturation` can be in the range of 0 (fully desaturated) to 1 (fully\r\n * saturated).\r\n *\r\n * @param saturation Saturation (0-1)\r\n * @return New (saturated) color\r\n */\r\n Color.prototype.saturate = function (saturation) {\r\n return new Color($colors.saturate(this.rgb, saturation));\r\n };\r\n Object.defineProperty(Color.prototype, \"alternative\", {\r\n /**\r\n * Returns a either light or dark color that contrasts specifically with\r\n * this color.\r\n *\r\n * Uses properties `darkColor` (default black) and `lightColor` (default\r\n * white).\r\n *\r\n * Useful when determining which color label should be on a colored\r\n * background, so that it stands out.\r\n *\r\n * @return Contrasting color\r\n */\r\n get: function () {\r\n if (this.rgb != null) {\r\n return $colors.isLight(this.rgb) ? this.darkColor : this.lightColor;\r\n }\r\n else {\r\n throw new Error(\"Color does not exist\");\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return Color;\r\n}());\r\nexport { Color };\r\n/**\r\n * Resolves an input variable to a normal [[iRGB]] color and creates [[Color]]\r\n * object for it.\r\n *\r\n * @param value Input value\r\n * @param alpha Alpha (0-1)\r\n * @return Color object\r\n */\r\nexport function color(value, alpha) {\r\n if (!$type.hasValue(value)) {\r\n return new Color(undefined);\r\n }\r\n if (typeof value == \"string\") {\r\n var cacheId = \"_color_\" + value + \"_\" + (alpha || \"1\");\r\n var cached = registry.getCache(cacheId);\r\n if (cached) {\r\n return new Color({\r\n r: cached.r,\r\n g: cached.g,\r\n b: cached.b,\r\n a: cached.a\r\n });\r\n }\r\n var rgb = $colors.rgb(value, alpha);\r\n registry.setCache(cacheId, rgb);\r\n return new Color(rgb);\r\n }\r\n // Check if it's already a Color object\r\n if (value instanceof Color) {\r\n if ($type.hasValue(alpha)) {\r\n value.alpha = alpha;\r\n }\r\n return value;\r\n }\r\n // Not a string or Color instance, it's the iRGB object then\r\n return new Color(value);\r\n}\r\n/**\r\n * Checks if supplied argument is instance of [[Color]].\r\n *\r\n * @param value Input value\r\n * @return Is Color?\r\n */\r\nexport function isColor(value) {\r\n return value instanceof Color;\r\n}\r\n/**\r\n * Converts any value to [[Color]].\r\n *\r\n * @param value Input value\r\n * @return Color\r\n */\r\nexport function castColor(value) {\r\n return color(value);\r\n}\r\n/**\r\n * Converts any value into a [[Color]].\r\n *\r\n * @param value Source value\r\n * @return Color object\r\n */\r\nexport function toColor(value) {\r\n if ($type.hasValue(value) && !isColor(value)) {\r\n return castColor(value);\r\n }\r\n return value;\r\n}\r\n","/**\r\n * This module contains ColorSet object definition\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { BaseObject } from \"../Base\";\r\nimport { Color, color } from \"./Color\";\r\nimport { registry } from \"../Registry\";\r\nimport * as $colors from \"./Colors\";\r\nimport * as $type from \"./Type\";\r\nimport * as $utils from \"./Utils\";\r\nimport * as $math from \"./Math\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Represents a set of colors. Can also generate colors according to set rules.\r\n *\r\n * @important\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/colors/} for color-related info\r\n */\r\nvar ColorSet = /** @class */ (function (_super) {\r\n __extends(ColorSet, _super);\r\n /**\r\n * Constructor\r\n */\r\n function ColorSet() {\r\n var _this = _super.call(this) || this;\r\n /**\r\n * Holds the list of the colors in this set. (preset or auto-generated)\r\n */\r\n _this._list = [];\r\n /**\r\n * Current step in a color generator's cycle.\r\n */\r\n _this._currentStep = 0;\r\n /**\r\n * If set to non-zero value, the ColorSet will start iterating colors from\r\n * that particular index, not the first color in the list.\r\n */\r\n _this._startIndex = 0;\r\n /**\r\n * Current pass in the color generator's cycle. Normally a generator would\r\n * cycle through all available hue range, then repeat it, alternating other\r\n * color properties, to generate distinctive colors.\r\n */\r\n _this._currentPass = 0;\r\n /**\r\n * A base color. If there are no colors pre-set in the color list, ColorSet\r\n * will use this color as a base when generating new ones, applying\r\n * `stepOptions` and `passOptions` to this base color.\r\n */\r\n _this.baseColor = new Color({\r\n r: 103,\r\n g: 183,\r\n b: 220\r\n });\r\n /**\r\n * Modifications to apply with each new generated color.\r\n */\r\n _this.stepOptions = {};\r\n /**\r\n * Modifications to apply on top of `stepOptions` for each \"pass\" of the\r\n * color generation.\r\n *\r\n * A \"pass\" is when ColorSet generates `minColors` number of colors.\r\n */\r\n _this.passOptions = {\r\n brighten: -0.2\r\n };\r\n /**\r\n * An index increment to use when iterating through color list.\r\n *\r\n * Default is 1, which means returning each and every color.\r\n *\r\n * Setting it to a bigger number will make ColorSet `next()` iterator skip\r\n * some colors.\r\n *\r\n * E.g. setting to 2, will return every second color in the list.\r\n *\r\n * This is useful, when the color list has colors that are too close each\r\n * other for contrast.\r\n *\r\n * However, having bigger number will mean that `next()` iterator will go\r\n * through the list quicker, and the generator will kick sooner.\r\n */\r\n _this.step = 1;\r\n /**\r\n * A number of colors to generate in one \"pass\".\r\n *\r\n * This setting can be automatically overridden, if ColorSet has a list of\r\n * pre-set colors. In such case ColorSet will generate exactly the same\r\n * number of colors with each pass as there were colors in original set.\r\n */\r\n _this.minColors = 20;\r\n /**\r\n * Do not let the \"lightness\" of generated color to fall below this\r\n * threshold.\r\n */\r\n _this.minLightness = 0.2;\r\n /**\r\n * Do not let the \"lightness\" of generated color to get above this threshold.\r\n */\r\n _this.maxLightness = 0.9;\r\n /**\r\n * Randomly shuffle generated colors.\r\n */\r\n _this.shuffle = false;\r\n /**\r\n * When colors are generated, based on `stepOptions`, each generated color\r\n * gets either lighter or darker.\r\n *\r\n * If this is set to `true`, color generator will switch to opposing spectrum\r\n * when reaching `minLightness` or `maxLightness`.\r\n *\r\n * E.g. if we start off with a red color, then gradually generate lighter\r\n * colors through rose shades, then switch back to dark red and gradually\r\n * increase the lightness of it until it reaches the starting red.\r\n *\r\n * If set to `false` it will stop there and cap lightness at whatever level\r\n * we hit `minLightness` or `maxLightness`, which may result in a number of\r\n * the same colors.\r\n */\r\n _this.wrap = true;\r\n /**\r\n * Re-use same colors in the pre-set list, when ColorSet runs out of colors,\r\n * rather than start generating new ones.\r\n */\r\n _this.reuse = false;\r\n /**\r\n * Saturation of colors. This will change saturation of all colors of color\r\n * set.\r\n *\r\n * It is recommended to set this in theme, as changing it at run time won't\r\n * make the items to redraw and change color.\r\n */\r\n _this.saturation = 1;\r\n _this.className = \"ColorSet\";\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n Object.defineProperty(ColorSet.prototype, \"list\", {\r\n /**\r\n * Returns current list of colors.\r\n *\r\n * If there are none, a new list of colors is generated, based on various\r\n * ColorSet settings.\r\n *\r\n * @return Color list\r\n */\r\n get: function () {\r\n if (!this._list) {\r\n this.generate(this.minColors);\r\n }\r\n return this._list;\r\n },\r\n /**\r\n * Sets a list of pre-defined colors to use for the iterator.\r\n *\r\n * @param value Color list\r\n */\r\n set: function (value) {\r\n this._list = value;\r\n this.reset();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Gets reusable color.\r\n *\r\n * @param index Index of color\r\n * @return Color\r\n */\r\n ColorSet.prototype.getReusableColor = function (index) {\r\n if (this._list.length == 0) {\r\n this.generate(1);\r\n return this.list[0];\r\n }\r\n else {\r\n var tmpstep = index - (Math.floor(index / this._list.length) * this.list.length);\r\n return this.list[tmpstep];\r\n }\r\n };\r\n /**\r\n * Returns next color in the list using internal iterator counter.\r\n *\r\n * If `step` is set to something other than 1, it may return other color than\r\n * exact next one in the list.\r\n *\r\n * @return Color\r\n */\r\n ColorSet.prototype.next = function () {\r\n var color;\r\n if (this.list.length <= this._currentStep) {\r\n if (this.reuse) {\r\n color = this.getReusableColor(this._currentStep);\r\n }\r\n else {\r\n this.generate($math.max(this.minColors, this._currentStep + 1));\r\n color = this.list[this._currentStep];\r\n }\r\n }\r\n else {\r\n color = this.list[this._currentStep];\r\n }\r\n this._currentStep += this.step;\r\n return color.saturate(this.saturation);\r\n };\r\n /**\r\n * Returns a color at specific index in the list.\r\n *\r\n * @param i Index\r\n * @return Color\r\n */\r\n ColorSet.prototype.getIndex = function (i) {\r\n var color;\r\n if (this.list.length <= i) {\r\n if (this.reuse) {\r\n color = this.getReusableColor(i);\r\n }\r\n else {\r\n this.generate(this.minColors);\r\n color = this.getIndex(i);\r\n }\r\n }\r\n else {\r\n color = this.list[i];\r\n }\r\n return color.saturate(this.saturation);\r\n };\r\n /**\r\n * Resets internal iterator.\r\n *\r\n * Calling `next()` after this will return the very first color in the color\r\n * list, even if it was already returned before.\r\n */\r\n ColorSet.prototype.reset = function () {\r\n this._currentStep = this._startIndex;\r\n };\r\n Object.defineProperty(ColorSet.prototype, \"currentStep\", {\r\n /**\r\n * @return Step\r\n */\r\n get: function () {\r\n return this._currentStep;\r\n },\r\n /**\r\n * Sets current color iteration. You can use this property to skip some\r\n * colors from iteration. E.g. setting it to `10` will skip first ten\r\n * colors.\r\n *\r\n * Please note that the number is zero-based.\r\n *\r\n * @param value Step\r\n */\r\n set: function (value) {\r\n this._currentStep = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ColorSet.prototype, \"startIndex\", {\r\n /**\r\n * @return Index\r\n */\r\n get: function () {\r\n return this._startIndex;\r\n },\r\n /**\r\n * If set to non-zero value, the ColorSet will start iterating colors from\r\n * that particular index, not the first color in the list.\r\n *\r\n * @default 0\r\n * @since 4.4.9\r\n * @param value Index\r\n */\r\n set: function (value) {\r\n this._startIndex = value;\r\n this.reset();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Generates colors based on the various ColorSet settings.\r\n *\r\n * @param count Number of colors to generate\r\n */\r\n ColorSet.prototype.generate = function (count) {\r\n // Init\r\n var curColor = this.currentColor;\r\n var hsl = $colors.rgbToHsl($type.getValue(curColor.rgb));\r\n var hueStep = $type.hasValue(this.stepOptions.hue) ? this.stepOptions.hue : 1 / count;\r\n var mods = {\r\n brighten: 0,\r\n lighten: 0,\r\n hue: hsl.h,\r\n lightness: hsl.l,\r\n saturation: hsl.s\r\n };\r\n // Generate list of hues, and shuffle them\r\n var hues = [];\r\n var startIndex = this.list.length == 0 ? 0 : 1;\r\n if (this.reuse) {\r\n for (var i = startIndex; i <= count; i++) {\r\n hues.push($colors.rgbToHsl($type.getValue(this._list[i].rgb)).h);\r\n }\r\n }\r\n else {\r\n for (var i = startIndex; i <= count; i++) {\r\n var h = hsl.h + hueStep * i;\r\n if (this.wrap && (h > 1)) {\r\n h -= 1;\r\n }\r\n hues.push(h);\r\n }\r\n }\r\n // Shuffle colors randomly\r\n if (this.shuffle) {\r\n hues.sort(function (a, b) {\r\n return Math.random() - 0.5;\r\n });\r\n }\r\n // Generate colors by rotating hue\r\n for (var i = 0; i < count; i++) {\r\n // Update hue\r\n if (this.reuse) {\r\n hsl = $colors.rgbToHsl($type.getValue(this._list[i].rgb));\r\n }\r\n else {\r\n hsl.h = hues.shift();\r\n }\r\n // Apply HSL mods\r\n this.applyStepOptions(hsl, mods, i, this._currentPass);\r\n // Convert back to Color\r\n var c = color($colors.hslToRgb(hsl));\r\n // Apply regular color mods\r\n var brighten = (this.stepOptions.brighten || 0) * i + (this.passOptions.brighten || 0) * this._currentPass;\r\n if (brighten != 0) {\r\n if (this.wrap) {\r\n brighten = $utils.fitNumberRelative(brighten, this.minLightness, this.maxLightness);\r\n }\r\n else {\r\n brighten = $utils.fitNumber(brighten, this.minLightness, this.maxLightness);\r\n }\r\n c = c.brighten(brighten);\r\n }\r\n var lighten = (this.stepOptions.lighten || 0) * i + (this.passOptions.lighten || 0) * this._currentPass;\r\n if (lighten != 0) {\r\n if (this.wrap) {\r\n lighten = $utils.fitNumberRelative(lighten, this.minLightness, this.maxLightness);\r\n }\r\n else {\r\n lighten = $utils.fitNumber(lighten, this.minLightness, this.maxLightness);\r\n }\r\n c = c.lighten(lighten);\r\n }\r\n this._list.push(c);\r\n }\r\n this._currentPass++;\r\n };\r\n Object.defineProperty(ColorSet.prototype, \"currentColor\", {\r\n /**\r\n * Returns current last color. It's either the last color in the list of\r\n * colors, or `baseColor` if list is empty.\r\n *\r\n * @return Color\r\n */\r\n get: function () {\r\n if (this._list.length == 0) {\r\n return this.baseColor.saturate(this.saturation);\r\n }\r\n else {\r\n return this._list[this._list.length - 1].saturate(this.saturation);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Generates modifiers for color, based on what step and pass.\r\n *\r\n * @param hsl Curren HSL value of the color to modify\r\n * @param base The modifiers that were before modification to use as a base\r\n * @param step Current step\r\n * @param pass Current pass\r\n */\r\n ColorSet.prototype.applyStepOptions = function (hsl, base, step, pass) {\r\n // Process lightness\r\n hsl.l = base.lightness + (this.stepOptions.lightness || 0) * step + (this.passOptions.lightness || 0) * pass;\r\n if (this.wrap) {\r\n if (hsl.l > 1) {\r\n hsl.l = hsl.l - Math.floor(hsl.l);\r\n }\r\n else if (hsl.l < 0) {\r\n hsl.l = -(hsl.l - Math.floor(hsl.l));\r\n }\r\n hsl.l = $utils.fitNumberRelative(hsl.l, this.minLightness, this.maxLightness);\r\n }\r\n else {\r\n if (hsl.l > 1) {\r\n hsl.l = 1;\r\n }\r\n else if (hsl.l < 0) {\r\n hsl.l = 0;\r\n }\r\n hsl.l = $utils.fitNumber(hsl.l, this.minLightness, this.maxLightness);\r\n }\r\n };\r\n /**\r\n * Processes JSON-based config before it is applied to the object.\r\n *\r\n * @ignore Exclude from docs\r\n * @param config Config\r\n */\r\n ColorSet.prototype.processConfig = function (config) {\r\n if (config) {\r\n // Cast colors\r\n if ($type.hasValue(config.list) && $type.isArray(config.list)) {\r\n for (var i = 0, len = config.list.length; i < len; i++) {\r\n if (!(config.list[i] instanceof Color)) {\r\n config.list[i] = color(config.list[i]);\r\n }\r\n }\r\n }\r\n if ($type.hasValue(config.baseColor) && !(config.baseColor instanceof Color)) {\r\n config.baseColor = color(config.baseColor);\r\n }\r\n }\r\n _super.prototype.processConfig.call(this, config);\r\n };\r\n return ColorSet;\r\n}(BaseObject));\r\nexport { ColorSet };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"ColorSet\"] = ColorSet;\r\n","/**\r\n * A collection of color-related functions\r\n */\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport * as $math from \"./Math\";\r\nimport * as $type from \"./Type\";\r\n/**\r\n * Define named colors for easy resolution to RGB.\r\n */\r\nvar namedColors = {\r\n aliceblue: { r: 240, g: 248, b: 255 },\r\n antiquewhite: { r: 250, g: 235, b: 215 },\r\n aqua: { r: 0, g: 255, b: 255 },\r\n aquamarine: { r: 127, g: 255, b: 212 },\r\n azure: { r: 240, g: 255, b: 255 },\r\n beige: { r: 245, g: 245, b: 220 },\r\n bisque: { r: 255, g: 228, b: 196 },\r\n black: { r: 0, g: 0, b: 0 },\r\n blanchedalmond: { r: 255, g: 235, b: 205 },\r\n blue: { r: 0, g: 0, b: 255 },\r\n blueviolet: { r: 138, g: 43, b: 226 },\r\n brown: { r: 165, g: 42, b: 42 },\r\n burlywood: { r: 222, g: 184, b: 135 },\r\n cadetblue: { r: 95, g: 158, b: 160 },\r\n chartreuse: { r: 127, g: 255, b: 0 },\r\n chocolate: { r: 210, g: 105, b: 30 },\r\n coral: { r: 255, g: 127, b: 80 },\r\n cornflowerblue: { r: 100, g: 149, b: 237 },\r\n cornsilk: { r: 255, g: 248, b: 220 },\r\n crimson: { r: 220, g: 20, b: 60 },\r\n cyan: { r: 0, g: 255, b: 255 },\r\n darkblue: { r: 0, g: 0, b: 139 },\r\n darkcyan: { r: 0, g: 139, b: 139 },\r\n darkgoldenrod: { r: 184, g: 134, b: 11 },\r\n darkgray: { r: 169, g: 169, b: 169 },\r\n darkgrey: { r: 169, g: 169, b: 169 },\r\n darkgreen: { r: 0, g: 100, b: 0 },\r\n darkkhaki: { r: 189, g: 183, b: 107 },\r\n darkmagenta: { r: 139, g: 0, b: 139 },\r\n darkolivegreen: { r: 85, g: 107, b: 47 },\r\n darkorange: { r: 255, g: 140, b: 0 },\r\n darkorchid: { r: 153, g: 50, b: 204 },\r\n darkred: { r: 139, g: 0, b: 0 },\r\n darksalmon: { r: 233, g: 150, b: 122 },\r\n darkseagreen: { r: 143, g: 188, b: 143 },\r\n darkslateblue: { r: 72, g: 61, b: 139 },\r\n darkslategray: { r: 47, g: 79, b: 79 },\r\n darkslategrey: { r: 47, g: 79, b: 79 },\r\n darkturquoise: { r: 0, g: 206, b: 209 },\r\n darkviolet: { r: 148, g: 0, b: 211 },\r\n deeppink: { r: 255, g: 20, b: 147 },\r\n deepskyblue: { r: 0, g: 191, b: 255 },\r\n dimgray: { r: 105, g: 105, b: 105 },\r\n dimgrey: { r: 105, g: 105, b: 105 },\r\n dodgerblue: { r: 30, g: 144, b: 255 },\r\n firebrick: { r: 178, g: 34, b: 34 },\r\n floralwhite: { r: 255, g: 250, b: 240 },\r\n forestgreen: { r: 34, g: 139, b: 34 },\r\n fuchsia: { r: 255, g: 0, b: 255 },\r\n gainsboro: { r: 220, g: 220, b: 220 },\r\n ghostwhite: { r: 248, g: 248, b: 255 },\r\n gold: { r: 255, g: 215, b: 0 },\r\n goldenrod: { r: 218, g: 165, b: 32 },\r\n gray: { r: 128, g: 128, b: 128 },\r\n grey: { r: 128, g: 128, b: 128 },\r\n green: { r: 0, g: 128, b: 0 },\r\n greenyellow: { r: 173, g: 255, b: 47 },\r\n honeydew: { r: 240, g: 255, b: 240 },\r\n hotpink: { r: 255, g: 105, b: 180 },\r\n indianred: { r: 205, g: 92, b: 92 },\r\n indigo: { r: 75, g: 0, b: 130 },\r\n ivory: { r: 255, g: 255, b: 240 },\r\n khaki: { r: 240, g: 230, b: 140 },\r\n lavender: { r: 230, g: 230, b: 250 },\r\n lavenderblush: { r: 255, g: 240, b: 245 },\r\n lawngreen: { r: 124, g: 252, b: 0 },\r\n lemonchiffon: { r: 255, g: 250, b: 205 },\r\n lightblue: { r: 173, g: 216, b: 230 },\r\n lightcoral: { r: 240, g: 128, b: 128 },\r\n lightcyan: { r: 224, g: 255, b: 255 },\r\n lightgoldenrodyellow: { r: 250, g: 250, b: 210 },\r\n lightgray: { r: 211, g: 211, b: 211 },\r\n lightgrey: { r: 211, g: 211, b: 211 },\r\n lightgreen: { r: 144, g: 238, b: 144 },\r\n lightpink: { r: 255, g: 182, b: 193 },\r\n lightsalmon: { r: 255, g: 160, b: 122 },\r\n lightseagreen: { r: 32, g: 178, b: 170 },\r\n lightskyblue: { r: 135, g: 206, b: 250 },\r\n lightslategray: { r: 119, g: 136, b: 153 },\r\n lightslategrey: { r: 119, g: 136, b: 153 },\r\n lightsteelblue: { r: 176, g: 196, b: 222 },\r\n lightyellow: { r: 255, g: 255, b: 224 },\r\n lime: { r: 0, g: 255, b: 0 },\r\n limegreen: { r: 50, g: 205, b: 50 },\r\n linen: { r: 250, g: 240, b: 230 },\r\n magenta: { r: 255, g: 0, b: 255 },\r\n maroon: { r: 128, g: 0, b: 0 },\r\n mediumaquamarine: { r: 102, g: 205, b: 170 },\r\n mediumblue: { r: 0, g: 0, b: 205 },\r\n mediumorchid: { r: 186, g: 85, b: 211 },\r\n mediumpurple: { r: 147, g: 112, b: 219 },\r\n mediumseagreen: { r: 60, g: 179, b: 113 },\r\n mediumslateblue: { r: 123, g: 104, b: 238 },\r\n mediumspringgreen: { r: 0, g: 250, b: 154 },\r\n mediumturquoise: { r: 72, g: 209, b: 204 },\r\n mediumvioletred: { r: 199, g: 21, b: 133 },\r\n midnightblue: { r: 25, g: 25, b: 112 },\r\n mintcream: { r: 245, g: 255, b: 250 },\r\n mistyrose: { r: 255, g: 228, b: 225 },\r\n moccasin: { r: 255, g: 228, b: 181 },\r\n navajowhite: { r: 255, g: 222, b: 173 },\r\n navy: { r: 0, g: 0, b: 128 },\r\n oldlace: { r: 253, g: 245, b: 230 },\r\n olive: { r: 128, g: 128, b: 0 },\r\n olivedrab: { r: 107, g: 142, b: 35 },\r\n orange: { r: 255, g: 165, b: 0 },\r\n orangered: { r: 255, g: 69, b: 0 },\r\n orchid: { r: 218, g: 112, b: 214 },\r\n palegoldenrod: { r: 238, g: 232, b: 170 },\r\n palegreen: { r: 152, g: 251, b: 152 },\r\n paleturquoise: { r: 175, g: 238, b: 238 },\r\n palevioletred: { r: 219, g: 112, b: 147 },\r\n papayawhip: { r: 255, g: 239, b: 213 },\r\n peachpuff: { r: 255, g: 218, b: 185 },\r\n peru: { r: 205, g: 133, b: 63 },\r\n pink: { r: 255, g: 192, b: 203 },\r\n plum: { r: 221, g: 160, b: 221 },\r\n powderblue: { r: 176, g: 224, b: 230 },\r\n purple: { r: 128, g: 0, b: 128 },\r\n rebeccapurple: { r: 102, g: 51, b: 153 },\r\n red: { r: 255, g: 0, b: 0 },\r\n rosybrown: { r: 188, g: 143, b: 143 },\r\n royalblue: { r: 65, g: 105, b: 225 },\r\n saddlebrown: { r: 139, g: 69, b: 19 },\r\n salmon: { r: 250, g: 128, b: 114 },\r\n sandybrown: { r: 244, g: 164, b: 96 },\r\n seagreen: { r: 46, g: 139, b: 87 },\r\n seashell: { r: 255, g: 245, b: 238 },\r\n sienna: { r: 160, g: 82, b: 45 },\r\n silver: { r: 192, g: 192, b: 192 },\r\n skyblue: { r: 135, g: 206, b: 235 },\r\n slateblue: { r: 106, g: 90, b: 205 },\r\n slategray: { r: 112, g: 128, b: 144 },\r\n slategrey: { r: 112, g: 128, b: 144 },\r\n snow: { r: 255, g: 250, b: 250 },\r\n springgreen: { r: 0, g: 255, b: 127 },\r\n steelblue: { r: 70, g: 130, b: 180 },\r\n tan: { r: 210, g: 180, b: 140 },\r\n teal: { r: 0, g: 128, b: 128 },\r\n thistle: { r: 216, g: 191, b: 216 },\r\n tomato: { r: 255, g: 99, b: 71 },\r\n turquoise: { r: 64, g: 224, b: 208 },\r\n violet: { r: 238, g: 130, b: 238 },\r\n wheat: { r: 245, g: 222, b: 179 },\r\n white: { r: 255, g: 255, b: 255 },\r\n whitesmoke: { r: 245, g: 245, b: 245 },\r\n yellow: { r: 255, g: 255, b: 0 },\r\n yellowgreen: { r: 154, g: 205, b: 50 }\r\n};\r\n/**\r\n * Tries to resolve a named color into a hex color representation.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Color name\r\n * @return Color\r\n * @deprecated\r\n * @hidden\r\n */\r\n/*export function resolveNamedColor(value: string): Color {\r\n return (<any>namedColors)[value] ? (<any>namedColors)[value] : undefined;\r\n}*/\r\n/**\r\n * Converts a proper color hex code (i.e. \"#FF5500\") or named color (i.e. \"red\")\r\n * into an {iRGB} object. If the code is not correctly formatted, an RGB of\r\n * black is returned.\r\n *\r\n * @ignore Exclude from docs\r\n * @param color Color code\r\n * @param alpha Alpha (0-1)\r\n * @return RGB\r\n */\r\nexport function rgb(color, alpha) {\r\n // Init return value\r\n var rgb;\r\n // Try resolving color format\r\n // Named color?\r\n if (namedColors[color]) {\r\n rgb = namedColors[color];\r\n }\r\n // Hex code?\r\n else if (color.charAt(0) === \"#\") {\r\n rgb = hexToRgb(color);\r\n }\r\n // rgb() format?\r\n else if (color.match(/^rgba?\\(/)) {\r\n rgb = rgbaToRgb(color);\r\n }\r\n // Was not able to resolve?\r\n if (!rgb) {\r\n rgb = { r: 0, g: 0, b: 0, a: 1 };\r\n }\r\n // Set alpha\r\n if ($type.hasValue(alpha)) {\r\n rgb.a = alpha;\r\n }\r\n return rgb;\r\n}\r\n/**\r\n * Converts a hex color code (i.e. \"#FF5500\") to an [[iRGB]] object.\r\n *\r\n * @ignore Exclude from docs\r\n * @param hex Hex color code\r\n * @return RGB\r\n */\r\nexport function hexToRgb(hex) {\r\n // Expand shorthand form (e.g. \"03F\") to full form (e.g. \"0033FF\")\r\n var shorthandRegex = /^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i;\r\n hex = hex.replace(shorthandRegex, function (m, r, g, b) {\r\n return r + r + g + g + b + b;\r\n });\r\n var result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex);\r\n return result ? {\r\n r: parseInt(result[1], 16),\r\n g: parseInt(result[2], 16),\r\n b: parseInt(result[3], 16)\r\n } : hexToRgbWithAlpha(hex);\r\n}\r\n/**\r\n * Converts a hex color code with alpha (i.e. \"#FF5500128\") to an [[iRGB]] object.\r\n *\r\n * @ignore Exclude from docs\r\n * @param hex Hex color code\r\n * @return RGB\r\n */\r\nexport function hexToRgbWithAlpha(hex) {\r\n // Expand shorthand form (e.g. \"03FA\") to full form (e.g. \"0033FFAA\")\r\n var shorthandRegex = /^#?([a-f\\d])([a-f\\d])([a-f\\d])([a-f\\d])$/i;\r\n hex = hex.replace(shorthandRegex, function (m, r, g, b, a) {\r\n return r + r + g + g + b + b + a + a;\r\n });\r\n var result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex);\r\n return result ? {\r\n r: parseInt(result[1], 16),\r\n g: parseInt(result[2], 16),\r\n b: parseInt(result[3], 16),\r\n a: parseInt(result[4], 16) / 256\r\n } : undefined;\r\n}\r\n/**\r\n * Converts color strings in format like `rgb()` and `rgba()` to [[iRGB]].\r\n *\r\n * @ignore Exclude from docs\r\n * @param color Color code\r\n * @return RGB\r\n */\r\nexport function rgbaToRgb(color) {\r\n color = color.replace(/[ ]/g, \"\");\r\n // Init\r\n var matches = color.match(/^rgb\\(([0-9]*),([0-9]*),([0-9]*)\\)/i);\r\n // Try rgb() format\r\n if (matches) {\r\n matches.push(\"1\");\r\n }\r\n else {\r\n matches = color.match(/^rgba\\(([0-9]*),([0-9]*),([0-9]*),([.0-9]*)\\)/i);\r\n if (!matches) {\r\n return;\r\n }\r\n }\r\n return {\r\n r: parseInt(matches[1]),\r\n g: parseInt(matches[2]),\r\n b: parseInt(matches[3]),\r\n a: parseFloat(matches[4])\r\n };\r\n}\r\n/**\r\n * Converts an [[iRGB]] object into a hex color code.\r\n *\r\n * @ignore Exclude from docs\r\n * @param rgb RGB\r\n * @return Hex color code\r\n */\r\nexport function rgbToHex(rgb) {\r\n return \"#\" + pad2(rgb.r.toString(16)) + pad2(rgb.g.toString(16)) + pad2(rgb.b.toString(16));\r\n}\r\n/**\r\n * Converts an [[iRGB]] object into its `rgb()` or `rgba()` representation.\r\n *\r\n * @ignore Exclude from docs\r\n * @param rgb RGB\r\n * @return `rgba()` syntax\r\n */\r\nexport function rgbToRGBA(rgb) {\r\n if ($type.hasValue(rgb.a) && rgb.a !== 1) {\r\n return \"rgba(\" + rgb.r + \",\" + rgb.g + \",\" + rgb.b + \",\" + rgb.a + \")\";\r\n }\r\n else {\r\n return \"rgb(\" + rgb.r + \",\" + rgb.g + \",\" + rgb.b + \")\";\r\n }\r\n}\r\n/**\r\n * Pads a 1-digit string with a zero.\r\n *\r\n * @ignore Exclude from docs\r\n * @param c Input string\r\n * @return Padded string\r\n */\r\nexport function pad2(c) {\r\n return c.length == 1 ? \"0\" + c : \"\" + c;\r\n}\r\n/**\r\n * Returns an intermediate color between two colors based on the relative\r\n * position. Position needs to be in range between 0 and 1. Zero meaning the\r\n * resulting color will be closest to the first reference color.\r\n *\r\n * @ignore Exclude from docs\r\n * @param color1 First reference color\r\n * @param color2 Second reference color\r\n * @param percent Relative position (0-1)\r\n * @return Interpolated color\r\n */\r\nexport function interpolate(rgb1, rgb2, percent) {\r\n percent = $math.fitToRange(percent, 0, 1);\r\n if (rgb1) {\r\n if (rgb2) {\r\n return {\r\n r: rgb1.r + Math.round((rgb2.r - rgb1.r) * percent),\r\n g: rgb1.g + Math.round((rgb2.g - rgb1.g) * percent),\r\n b: rgb1.b + Math.round((rgb2.b - rgb1.b) * percent),\r\n a: (rgb1.a || 1) + Math.round(((rgb2.a || 1) - (rgb1.a || 1)) * percent)\r\n };\r\n }\r\n else {\r\n return rgb1;\r\n }\r\n }\r\n else if (rgb2) {\r\n return rgb2;\r\n }\r\n else {\r\n return rgb1;\r\n }\r\n}\r\n/**\r\n * Returns a color that is `percent` brighter than the reference color.\r\n *\r\n * @ignore Exclude from docs\r\n * @param color Reference color\r\n * @param percent Brightness percent\r\n * @return Hex code of the new color\r\n */\r\nexport function lighten(rgb, percent) {\r\n if (rgb) {\r\n return {\r\n r: Math.max(0, Math.min(255, rgb.r + getLightnessStep(rgb.r, percent))),\r\n g: Math.max(0, Math.min(255, rgb.g + getLightnessStep(rgb.g, percent))),\r\n b: Math.max(0, Math.min(255, rgb.b + getLightnessStep(rgb.b, percent))),\r\n a: rgb.a\r\n };\r\n }\r\n else {\r\n // TODO is this correct ?\r\n return rgb;\r\n }\r\n}\r\n;\r\n/**\r\n * Gets lightness step.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Value\r\n * @param percent Percent\r\n * @return Step\r\n */\r\nexport function getLightnessStep(value, percent) {\r\n var base = percent > 0 ? 255 - value : value;\r\n return Math.round(base * percent);\r\n}\r\n/**\r\n * Returns a color that is `percent` brighter than the source `color`.\r\n *\r\n * @ignore Exclude from docs\r\n * @param color Source color\r\n * @param percent Brightness percent\r\n * @return New color\r\n */\r\nexport function brighten(rgb, percent) {\r\n if (rgb) {\r\n var base = Math.min(Math.max(rgb.r, rgb.g, rgb.b), 230);\r\n //let base = Math.max(rgb.r, rgb.g, rgb.b);\r\n var step = getLightnessStep(base, percent);\r\n return {\r\n r: Math.max(0, Math.min(255, Math.round(rgb.r + step))),\r\n g: Math.max(0, Math.min(255, Math.round(rgb.g + step))),\r\n b: Math.max(0, Math.min(255, Math.round(rgb.b + step))),\r\n a: rgb.a\r\n };\r\n }\r\n else {\r\n // TODO is this correct ?\r\n return rgb;\r\n }\r\n}\r\n;\r\n/**\r\n * Returns brightness step.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Value\r\n * @param percent Percent\r\n * @return Step\r\n */\r\nexport function getBrightnessStep(value, percent) {\r\n var base = 255; //percent > 0 ? 255 - value : value;\r\n return Math.round(base * percent);\r\n}\r\n/**\r\n * Returns a new [[iRGB]] object based on `rgb` parameter with specific\r\n * saturation applied.\r\n *\r\n * `saturation` can be in the range of 0 (fully desaturated) to 1 (fully\r\n * saturated).\r\n *\r\n * @ignore Exclude from docs\r\n * @param color Base color\r\n * @param saturation Saturation (0-1)\r\n * @return New color\r\n */\r\nexport function saturate(rgb, saturation) {\r\n if (rgb == null || saturation == 1) {\r\n return rgb;\r\n }\r\n var hsl = rgbToHsl(rgb);\r\n hsl.s = saturation;\r\n return hslToRgb(hsl);\r\n}\r\n/*\r\n// not used\r\nexport function rgbToMatrix(rgb: iRGB): string {\r\n let r = $type.toText($math.round((rgb.r || 0) / 255, 10));\r\n let g = $type.toText($math.round((rgb.g || 0) / 255, 10));\r\n let b = $type.toText($math.round((rgb.b || 0) / 255, 10));\r\n let a = $type.toText(rgb.a || 1);\r\n return\t r + \" 0 0 0 0\" +\r\n \" 0 \" + g + \" 0 0 0\" +\r\n \" 0 0 \" + b + \" 0 0\" +\r\n \" 0 0 0 \" + a + \" 0\";\r\n}\r\n*/\r\n/**\r\n * The functions below are taken and adapted from Garry Tan's blog post:\r\n * http://axonflux.com/handy-rgb-to-hsl-and-rgb-to-hsv-color-model-c\r\n *\r\n * The further attributions go mjijackson.com, which now seems to be defunct.\r\n */\r\n/**\r\n * Converts an HSL color value to RGB. Conversion formula\r\n * adapted from http://en.wikipedia.org/wiki/HSL_color_space.\r\n * Assumes h, s, and l are contained in the set [0, 1] and\r\n * returns r, g, and b in the set [0, 255].\r\n *\r\n * Function adapted from:\r\n * http://axonflux.com/handy-rgb-to-hsl-and-rgb-to-hsv-color-model-c\r\n *\r\n * @ignore Exclude from docs\r\n * @param h The hue\r\n * @param s The saturation\r\n * @param l The lightness\r\n * @return The RGB representation\r\n */\r\nexport function hslToRgb(color) {\r\n var r, g, b;\r\n var h = color.h;\r\n var s = color.s;\r\n var l = color.l;\r\n if (s == 0) {\r\n r = g = b = l; // achromatic\r\n }\r\n else {\r\n var hue2rgb = function hue2rgb(p, q, t) {\r\n if (t < 0) {\r\n t += 1;\r\n }\r\n if (t > 1) {\r\n t -= 1;\r\n }\r\n if (t < 1 / 6) {\r\n return p + (q - p) * 6 * t;\r\n }\r\n if (t < 1 / 2) {\r\n return q;\r\n }\r\n if (t < 2 / 3) {\r\n return p + (q - p) * (2 / 3 - t) * 6;\r\n }\r\n return p;\r\n };\r\n var q = l < 0.5 ? l * (1 + s) : l + s - l * s;\r\n var p = 2 * l - q;\r\n r = hue2rgb(p, q, h + 1 / 3);\r\n g = hue2rgb(p, q, h);\r\n b = hue2rgb(p, q, h - 1 / 3);\r\n }\r\n return {\r\n r: Math.round(r * 255),\r\n g: Math.round(g * 255),\r\n b: Math.round(b * 255)\r\n };\r\n}\r\n/**\r\n * Converts an RGB color value to HSL. Conversion formula\r\n * adapted from http://en.wikipedia.org/wiki/HSL_color_space.\r\n * Assumes r, g, and b are contained in the set [0, 255] and\r\n * returns h, s, and l in the set [0, 1].\r\n *\r\n * Function adapted from:\r\n * http://axonflux.com/handy-rgb-to-hsl-and-rgb-to-hsv-color-model-c\r\n *\r\n * @ignore Exclude from docs\r\n * @param r The red color value\r\n * @param g The green color value\r\n * @param b The blue color value\r\n * @return The HSL representation\r\n */\r\nexport function rgbToHsl(color) {\r\n var r = color.r / 255;\r\n var g = color.g / 255;\r\n var b = color.b / 255;\r\n var max = Math.max(r, g, b);\r\n var min = Math.min(r, g, b);\r\n var h = 0;\r\n var s = 0;\r\n var l = (max + min) / 2;\r\n if (max === min) {\r\n h = s = 0; // achromatic\r\n }\r\n else {\r\n var d = max - min;\r\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\r\n switch (max) {\r\n case r:\r\n h = (g - b) / d + (g < b ? 6 : 0);\r\n break;\r\n case g:\r\n h = (b - r) / d + 2;\r\n break;\r\n case b:\r\n h = (r - g) / d + 4;\r\n break;\r\n }\r\n h /= 6;\r\n }\r\n return {\r\n h: h,\r\n s: s,\r\n l: l\r\n };\r\n}\r\n/**\r\n * Converts an RGB color value to HSV. Conversion formula\r\n * adapted from http://en.wikipedia.org/wiki/HSV_color_space.\r\n * Assumes r, g, and b are contained in the set [0, 255] and\r\n * returns h, s, and v in the set [0, 1].\r\n *\r\n * @ignore Exclude from docs\r\n * @param Number r The red color value\r\n * @param Number g The green color value\r\n * @param Number b The blue color value\r\n * @return Array The HSV representation\r\n */\r\nexport function rgbToHsv(color) {\r\n var r = color.r / 255;\r\n var g = color.g / 255;\r\n var b = color.b / 255;\r\n var max = Math.max(r, g, b), min = Math.min(r, g, b);\r\n var h = 0;\r\n var s = 0;\r\n var v = max;\r\n var d = max - min;\r\n s = max == 0 ? 0 : d / max;\r\n if (max == min) {\r\n h = 0; // achromatic\r\n }\r\n else {\r\n switch (max) {\r\n case r:\r\n h = (g - b) / d + (g < b ? 6 : 0);\r\n break;\r\n case g:\r\n h = (b - r) / d + 2;\r\n break;\r\n case b:\r\n h = (r - g) / d + 4;\r\n break;\r\n }\r\n h /= 6;\r\n }\r\n return {\r\n h: h,\r\n s: s,\r\n v: v\r\n };\r\n}\r\n/**\r\n * Converts an HSV color value to RGB. Conversion formula\r\n * adapted from http://en.wikipedia.org/wiki/HSV_color_space.\r\n * Assumes h, s, and v are contained in the set [0, 1] and\r\n * returns r, g, and b in the set [0, 255].\r\n *\r\n * @ignore Exclude from docs\r\n * @param Number h The hue\r\n * @param Number s The saturation\r\n * @param Number v The value\r\n * @return Array The RGB representation\r\n */\r\nexport function hsvToRgb(color) {\r\n var r = 0;\r\n var g = 0;\r\n var b = 0;\r\n var h = color.h;\r\n var s = color.s;\r\n var v = color.v;\r\n var i = Math.floor(h * 6);\r\n var f = h * 6 - i;\r\n var p = v * (1 - s);\r\n var q = v * (1 - f * s);\r\n var t = v * (1 - (1 - f) * s);\r\n switch (i % 6) {\r\n case 0:\r\n r = v;\r\n g = t;\r\n b = p;\r\n break;\r\n case 1:\r\n r = q;\r\n g = v;\r\n b = p;\r\n break;\r\n case 2:\r\n r = p;\r\n g = v;\r\n b = t;\r\n break;\r\n case 3:\r\n r = p;\r\n g = q;\r\n b = v;\r\n break;\r\n case 4:\r\n r = t;\r\n g = p;\r\n b = v;\r\n break;\r\n case 5:\r\n r = v;\r\n g = p;\r\n b = q;\r\n break;\r\n }\r\n return {\r\n r: Math.round(r * 255),\r\n g: Math.round(g * 255),\r\n b: Math.round(b * 255)\r\n };\r\n}\r\n/**\r\n * Returns `true` if color is \"light\". Useful indetermining which contrasting\r\n * color to use for elements over this color. E.g.: you would want to use\r\n * black text over light background, and vice versa.\r\n *\r\n * @ignore Exclude from docs\r\n * @param color Source color\r\n * @return Light?\r\n */\r\nexport function isLight(color) {\r\n return ((color.r * 299) + (color.g * 587) + (color.b * 114)) / 1000 >= 128;\r\n}\r\n","/**\r\n * A collection of DOM-related functions.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Disposer } from \"./Disposer\";\r\nimport { readFrame, writeFrame } from \"./AsyncPending\";\r\nimport { options } from \"../Options\";\r\nimport * as $object from \"./Object\";\r\nimport * as $array from \"./Array\";\r\nimport * as $type from \"./Type\";\r\n/**\r\n * SVG namespace.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\nexport var SVGNS = \"http://www.w3.org/2000/svg\";\r\n/**\r\n * XML namespace.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\nexport var XMLNS = \"http://www.w3.org/2000/xmlns/\";\r\n/**\r\n * XLINK namespace.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\nexport var XLINK = \"http://www.w3.org/1999/xlink\";\r\n/**\r\n * Function that adds a disposable event listener directly to a DOM element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param dom A DOM element to add event to\r\n * @param type Event type\r\n * @param listener Event listener\r\n * @returns Disposable event\r\n */\r\nexport function addEventListener(dom, type, listener, options) {\r\n //@todo proper type check for options: EventListenerOptions | boolean (TS for some reason gives error on passive parameter)\r\n //console.log(type, dom);\r\n dom.addEventListener(type, listener, options || false);\r\n return new Disposer(function () {\r\n dom.removeEventListener(type, listener, options || false);\r\n });\r\n}\r\n/**\r\n * Finds and returns an element reference using following logic:\r\n * * If we pass in an element instance, we just return it back.\r\n * * If we pass in a string, the function looks for an element with such id.\r\n * * If no element with such id is found, we grab the first element with a tag name like this.\r\n *\r\n * @ignore Exclude from docs\r\n * @param el Element definition (reference, or id, or tag name)\r\n * @return Element reference\r\n * @todo Review this function as it seems pretty fuzzy and hacky\r\n */\r\nexport function getElement(el) {\r\n if ($type.isString(el)) {\r\n var e = document.getElementById(el);\r\n if (e == null) {\r\n e = document.getElementsByClassName(el)[0];\r\n }\r\n if (e instanceof HTMLElement) {\r\n return e;\r\n }\r\n }\r\n else if (el instanceof HTMLElement) {\r\n return el;\r\n }\r\n}\r\n/**\r\n * Adds a class name to an HTML or SVG element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param element Element\r\n * @param className Class name to add\r\n */\r\nexport function addClass(element, className) {\r\n if (!element) {\r\n return;\r\n }\r\n if (element.classList) {\r\n var classes = className.split(\" \");\r\n $array.each(classes, function (name) {\r\n element.classList.add(name);\r\n });\r\n }\r\n else {\r\n var currentClassName = element.getAttribute(\"class\");\r\n if (currentClassName) {\r\n element.setAttribute(\"class\", currentClassName.split(\" \").filter(function (item) {\r\n return item !== className;\r\n }).join(\" \") + \" \" + className);\r\n }\r\n else {\r\n element.setAttribute(\"class\", className);\r\n }\r\n //element.className = element.className.replace(new RegExp(\"^\" + className + \"| \" + className), \"\") + \" \" + className;\r\n }\r\n}\r\n/**\r\n * Removes a class name from an HTML or SVG element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param element Element\r\n * @param className Class name to add\r\n */\r\nexport function removeClass(element, className) {\r\n if (!element) {\r\n return;\r\n }\r\n if (element.classList) {\r\n element.classList.remove(className);\r\n }\r\n else {\r\n var currentClassName = element.getAttribute(\"class\");\r\n if (currentClassName) {\r\n element.setAttribute(\"class\", currentClassName.split(\" \").filter(function (item) {\r\n return item !== className;\r\n }).join(\" \"));\r\n }\r\n //element.className = element.className.replace(new RegExp(\"^\" + className + \"| \" + className), \"\");\r\n }\r\n}\r\n/**\r\n * Sets style property on DOM element.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Still needed?\r\n */\r\nexport function setStyle(element, property, value) {\r\n element.style[property] = value;\r\n}\r\n/**\r\n * Gets the computed style value for an element.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\nexport function getComputedStyle(element, property) {\r\n if (element.currentStyle) {\r\n return element.currentStyle[property];\r\n }\r\n return document.defaultView.getComputedStyle(element, null).getPropertyValue(property);\r\n}\r\n/**\r\n * Removes focus from any element by shifting focus to body.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\nexport function blur() {\r\n if (document.activeElement && document.activeElement != document.body) {\r\n if (document.activeElement.blur) {\r\n document.activeElement.blur();\r\n }\r\n else {\r\n var input = document.createElement(\"button\");\r\n input.style.position = \"fixed\";\r\n input.style.top = \"0px\";\r\n input.style.left = \"-10000px\";\r\n document.body.appendChild(input);\r\n input.focus();\r\n input.blur();\r\n document.body.removeChild(input);\r\n }\r\n }\r\n}\r\n/**\r\n * Tries to focus the element.\r\n *\r\n * @ignore Exlude from docs\r\n * @param element Element to focus\r\n */\r\nexport function focus(element) {\r\n if (element instanceof HTMLElement) {\r\n element.focus();\r\n }\r\n else {\r\n var input = document.createElement(\"input\");\r\n var fo = document.createElementNS(SVGNS, \"foreignObject\");\r\n fo.appendChild(input);\r\n element.appendChild(fo);\r\n input.focus();\r\n input.disabled = true;\r\n fo.remove();\r\n }\r\n /*if ((<any>element).focus != undefined) {\r\n (<any>element).focus();\r\n }\r\n else if (element instanceof SVGSVGElement) {\r\n // Not implemented\r\n // @todo implement focus fallback\r\n }*/\r\n}\r\n/**\r\n * Returns markup for the element including the element tag itself.\r\n * SVG elements do not support `outerHTML` so this functions applies of\r\n * a workaround which creates a new temporary wrapper, clones element and uses\r\n * wrapper's `innerHTML`.\r\n *\r\n * @ignore Exclude from docs\r\n * @param element Element to get full markup for\r\n * @return Markup\r\n * @deprecated Not in use anywhere\r\n */\r\nexport function outerHTML(element) {\r\n if (element.outerHTML) {\r\n return element.outerHTML;\r\n }\r\n else {\r\n var twrap = document.createElement(\"div\");\r\n var tnode = element.cloneNode(true);\r\n twrap.appendChild(tnode);\r\n var content = twrap.innerHTML;\r\n return content;\r\n }\r\n}\r\n/**\r\n * Checks if element is a valid DOM node.\r\n *\r\n * @ignore Exclude from docs\r\n * @param el Element\r\n * @return `true` if element is a valid DOM node\r\n */\r\nexport function isElement(el) {\r\n return el instanceof Object && el && el.nodeType === 1;\r\n}\r\n/**\r\n * Checks of element `a` contains element `b`.\r\n *\r\n * @param a Aleged ascendant\r\n * @param b Aleged descendant\r\n * @return Contains?\r\n */\r\nexport function contains(a, b) {\r\n var cursor = b;\r\n while (true) {\r\n if (a === cursor) {\r\n return true;\r\n }\r\n else if (cursor.parentNode == null) {\r\n // TODO better ShadowRoot detection\r\n if (cursor.host == null) {\r\n return false;\r\n }\r\n else {\r\n cursor = cursor.host;\r\n }\r\n }\r\n else {\r\n cursor = cursor.parentNode;\r\n }\r\n }\r\n}\r\n/**\r\n * Returns the shadow root of the element or null\r\n *\r\n * @param a Node\r\n * @return Root\r\n */\r\nexport function getShadowRoot(a) {\r\n var cursor = a;\r\n while (true) {\r\n if (cursor.parentNode == null) {\r\n // TODO better ShadowRoot detection\r\n if (cursor.host != null) {\r\n return cursor;\r\n }\r\n else {\r\n return null;\r\n }\r\n }\r\n else {\r\n cursor = cursor.parentNode;\r\n }\r\n }\r\n}\r\n/**\r\n * Returns the root of the element (either the Document or the ShadowRoot)\r\n *\r\n * @param a Node\r\n * @return Root\r\n */\r\nexport function getRoot(a) {\r\n // TODO replace with Node.prototype.getRootNode\r\n var owner = a.ownerDocument;\r\n var cursor = a;\r\n while (true) {\r\n if (cursor.parentNode == null) {\r\n // If the cursor is the document, or it is a ShadowRoot\r\n // TODO better ShadowRoot detection\r\n if (cursor === owner || cursor.host != null) {\r\n return cursor;\r\n }\r\n else {\r\n return null;\r\n }\r\n }\r\n else {\r\n cursor = cursor.parentNode;\r\n }\r\n }\r\n}\r\n/**\r\n * Gets the true target of the Event.\r\n *\r\n * This is needed to make events work with the shadow DOM.\r\n *\r\n * @param event Event\r\n * @return EventTarget\r\n */\r\nexport function eventTarget(event) {\r\n if (typeof event.composedPath === \"function\") {\r\n return event.composedPath()[0];\r\n }\r\n else {\r\n return event.target;\r\n }\r\n}\r\n/**\r\n * Copies attributes from one element to another.\r\n *\r\n * @ignore Exclude from docs\r\n * @param source Element to copy attributes from\r\n * @param target Element to copy attributes to\r\n */\r\nexport function copyAttributes(source, target) {\r\n $array.each(source.attributes, function (attr) {\r\n // TODO what if it's null ?\r\n if (attr.value != null) {\r\n target.setAttribute(attr.name, attr.value);\r\n }\r\n });\r\n}\r\n/**\r\n * [fixPixelPerfect description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param el Element\r\n */\r\nexport function fixPixelPerfect(el) {\r\n readFrame(function () {\r\n // sometimes IE doesn't like this\r\n // TODO figure out a way to remove this\r\n try {\r\n var rect = el.getBoundingClientRect();\r\n var left_1 = rect.left - Math.round(rect.left);\r\n var top_1 = rect.top - Math.round(rect.top);\r\n if (left_1 !== 0) {\r\n writeFrame(function () {\r\n el.style.left = left_1 + \"px\";\r\n });\r\n }\r\n if (top_1 !== 0) {\r\n writeFrame(function () {\r\n el.style.top = top_1 + \"px\";\r\n });\r\n }\r\n }\r\n catch (e) { }\r\n });\r\n}\r\n/**\r\n * [rootStylesheet description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\r\nvar rootStylesheet;\r\n/**\r\n * [getStylesheet description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @return [description]\r\n */\r\nfunction getStylesheet(element) {\r\n if (element == null) {\r\n if (!$type.hasValue(rootStylesheet)) {\r\n // TODO use createElementNS ?\r\n var e = document.createElement(\"style\");\r\n e.type = \"text/css\";\r\n if (options.nonce != \"\") {\r\n e.setAttribute(\"nonce\", options.nonce);\r\n }\r\n document.head.appendChild(e);\r\n rootStylesheet = e.sheet;\r\n }\r\n return rootStylesheet;\r\n }\r\n else {\r\n // TODO use createElementNS ?\r\n var e = document.createElement(\"style\");\r\n e.type = \"text/css\";\r\n if (options.nonce != \"\") {\r\n e.setAttribute(\"nonce\", options.nonce);\r\n }\r\n element.appendChild(e);\r\n return e.sheet;\r\n }\r\n}\r\n/**\r\n * [makeStylesheet description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param selector [description]\r\n * @return [description]\r\n */\r\nfunction appendStylesheet(root, selector) {\r\n var index = root.cssRules.length;\r\n root.insertRule(selector + \"{}\", index);\r\n return root.cssRules[index];\r\n}\r\n/**\r\n * Defines a class for a CSS rule.\r\n *\r\n * Can be used to dynamically add CSS to the document.\r\n */\r\nvar StyleRule = /** @class */ (function (_super) {\r\n __extends(StyleRule, _super);\r\n /**\r\n * Constructor.\r\n *\r\n * @param selector CSS selector\r\n * @param styles An object of style attribute - value pairs\r\n */\r\n function StyleRule(element, selector, styles) {\r\n var _this = this;\r\n var root = getStylesheet(element);\r\n // TODO test this\r\n _this = _super.call(this, function () {\r\n // TODO a bit hacky\r\n var index = $array.indexOf(root.cssRules, _this._rule);\r\n if (index === -1) {\r\n throw new Error(\"Could not dispose StyleRule\");\r\n }\r\n else {\r\n // TODO if it's empty remove it from the DOM ?\r\n root.deleteRule(index);\r\n }\r\n }) || this;\r\n _this._rule = appendStylesheet(root, selector);\r\n $object.each(styles, function (key, value) {\r\n _this.setStyle(key, value);\r\n });\r\n return _this;\r\n }\r\n Object.defineProperty(StyleRule.prototype, \"selector\", {\r\n /**\r\n * @return CSS selector\r\n */\r\n get: function () {\r\n return this._rule.selectorText;\r\n },\r\n /**\r\n * A CSS selector text.\r\n *\r\n * E.g.: `.myClass p`\r\n *\r\n * @param selector CSS selector\r\n */\r\n set: function (selector) {\r\n this._rule.selectorText = selector;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Sets the same style properties with browser-specific prefixes.\r\n *\r\n * @param name Attribute name\r\n * @param value Attribute value\r\n */\r\n StyleRule.prototype._setVendorPrefixName = function (name, value) {\r\n var style = this._rule.style;\r\n style.setProperty(\"-webkit-\" + name, value, \"\");\r\n style.setProperty(\"-moz-\" + name, value, \"\");\r\n style.setProperty(\"-ms-\" + name, value, \"\");\r\n style.setProperty(\"-o-\" + name, value, \"\");\r\n style.setProperty(name, value, \"\");\r\n };\r\n /**\r\n * Sets a value for specific style attribute.\r\n *\r\n * @param name Attribute\r\n * @param value Value\r\n */\r\n StyleRule.prototype.setStyle = function (name, value) {\r\n if (name === \"transition\") {\r\n this._setVendorPrefixName(name, value);\r\n }\r\n else {\r\n this._rule.style.setProperty(name, value, \"\");\r\n }\r\n };\r\n return StyleRule;\r\n}(Disposer));\r\nexport { StyleRule };\r\n/**\r\n * An internal counter for unique style ids.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\nvar styleId = 0;\r\n/**\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\r\nvar StyleClass = /** @class */ (function (_super) {\r\n __extends(StyleClass, _super);\r\n /**\r\n * Constructor.\r\n *\r\n * @param styles An object of style attribute - value pairs\r\n * @param name Class name\r\n */\r\n function StyleClass(element, styles, name) {\r\n var _this = this;\r\n var className = (!$type.hasValue(name)\r\n // TODO generate the classname randomly\r\n ? \"__style_\" + (++styleId) + \"__\"\r\n : name);\r\n _this = _super.call(this, element, \".\" + className, styles) || this;\r\n _this._className = className;\r\n return _this;\r\n }\r\n Object.defineProperty(StyleClass.prototype, \"className\", {\r\n /**\r\n * @return Class name\r\n */\r\n get: function () {\r\n return this._className;\r\n },\r\n /**\r\n * Class name.\r\n *\r\n * @param name Class name\r\n */\r\n set: function (name) {\r\n this._className = name;\r\n this.selector = \".\" + name;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Converts the whole class to\r\n * @ignore Exclude from docs\r\n */\r\n StyleClass.prototype.toString = function () {\r\n return this._className;\r\n };\r\n return StyleClass;\r\n}(StyleRule));\r\nexport { StyleClass };\r\nexport function ready(f) {\r\n if (document.readyState !== \"loading\") {\r\n f();\r\n }\r\n else {\r\n var listener_1 = function () {\r\n if (document.readyState !== \"loading\") {\r\n document.removeEventListener(\"readystatechange\", listener_1);\r\n f();\r\n }\r\n };\r\n document.addEventListener(\"readystatechange\", listener_1);\r\n }\r\n}\r\n/**\r\n * Returns a font fmaily name for the element (directly set or\r\n * computed/inherited).\r\n *\r\n * @ignore Exclude from docs\r\n * @param element Element\r\n * @return Font family\r\n */\r\nexport function findFont(element) {\r\n // Check if element has styles set\r\n var font = getComputedStyle(element, \"font-family\");\r\n if (!font) {\r\n // Completely transparent. Look for a parent\r\n var parent_1 = element.parentElement || element.parentNode;\r\n if (parent_1) {\r\n return findFont(parent_1);\r\n }\r\n else {\r\n return undefined;\r\n }\r\n }\r\n else {\r\n return font;\r\n }\r\n}\r\n/**\r\n * Returns a font fmaily name for the element (directly set or\r\n * computed/inherited).\r\n *\r\n * @ignore Exclude from docs\r\n * @param element Element\r\n * @return Font family\r\n */\r\nexport function findFontSize(element) {\r\n // Check if element has styles set\r\n var font = getComputedStyle(element, \"font-size\");\r\n if (!font) {\r\n // Completely transparent. Look for a parent\r\n var parent_2 = element.parentElement || element.parentNode;\r\n if (parent_2) {\r\n return findFontSize(parent_2);\r\n }\r\n else {\r\n return undefined;\r\n }\r\n }\r\n else {\r\n return font;\r\n }\r\n}\r\n/**\r\n * Checks whether element is not visible, whether directly or via its\r\n * ascendants.\r\n *\r\n * @param element Target element\r\n * @return Hidden?\r\n */\r\nexport function isHidden(element) {\r\n return (element.offsetParent === null);\r\n}\r\n/**\r\n * Checks wthether element is in the current viewport.\r\n *\r\n * @since 2.5.5\r\n * @param el Element\r\n * @return Within viewport?\r\n */\r\nexport function isElementInViewport(el, viewportTarget) {\r\n // Get position data of the element\r\n var rect = el.getBoundingClientRect();\r\n // Convert to array\r\n var targets = $type.isArray(viewportTarget) ? viewportTarget : viewportTarget ? [viewportTarget] : [];\r\n // Should we measure against specific viewport element?\r\n if (targets.length) {\r\n for (var i = 0; i < targets.length; i++) {\r\n var target = targets[i];\r\n // Check if viewport itself is visible\r\n if (!isElementInViewport(target)) {\r\n return false;\r\n }\r\n // Check if element is visible within the viewport\r\n var viewportRect = target.getBoundingClientRect();\r\n if (rect.top >= 0 &&\r\n rect.left >= 0 &&\r\n rect.top <= (viewportRect.top + viewportRect.height) &&\r\n rect.left <= (viewportRect.left + viewportRect.width)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n return (rect.top >= 0 &&\r\n rect.left >= 0 &&\r\n rect.top <= (window.innerHeight || document.documentElement.clientHeight) &&\r\n rect.left <= (window.innerWidth || document.documentElement.clientWidth));\r\n}\r\n","import { __extends, __generator, __read } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Disposer } from \"./Disposer\";\r\nimport { EventDispatcher } from \"./EventDispatcher\";\r\nimport * as $object from \"./Object\";\r\nimport * as $iter from \"./Iterator\";\r\nimport * as $string from \"./String\";\r\n/**\r\n * A disposable dictionary, which when disposed itself will call `dispose()`\r\n * method on all its items.\r\n */\r\nvar DictionaryDisposer = /** @class */ (function (_super) {\r\n __extends(DictionaryDisposer, _super);\r\n function DictionaryDisposer(dict) {\r\n var _this = this;\r\n var disposer = dict.events.on(\"removed\", function (x) {\r\n x.oldValue.dispose();\r\n }, undefined, false);\r\n _this = _super.call(this, function () {\r\n disposer.dispose();\r\n // TODO clear the dictionary ?\r\n $iter.each(dict.iterator(), function (a) {\r\n var v = a[1];\r\n v.dispose();\r\n });\r\n }) || this;\r\n return _this;\r\n }\r\n return DictionaryDisposer;\r\n}(Disposer));\r\nexport { DictionaryDisposer };\r\n/**\r\n * A Dictionary is collection where values of some type can be mapped to\r\n * string keys.\r\n *\r\n * You might call it an \"associative list\" or \"associative array\".\r\n */\r\nvar Dictionary = /** @class */ (function () {\r\n /**\r\n * Constructor\r\n */\r\n function Dictionary() {\r\n /**\r\n * Event dispatcher.\r\n */\r\n this.events = new EventDispatcher();\r\n this._dictionary = {};\r\n }\r\n /**\r\n * Returns `true` if key exists in Dictionary.\r\n *\r\n * @param key The key to search for\r\n * @return `true` if key exists, `false` if it doesn't\r\n */\r\n Dictionary.prototype.hasKey = function (key) {\r\n return $object.hasKey(this._dictionary, key);\r\n };\r\n /**\r\n * Returns the value for a specific key.\r\n *\r\n * @param key The key to search for\r\n * @return Value for the key, or `undefined` if it doesn't exist\r\n */\r\n Dictionary.prototype.getKey = function (key) {\r\n return this._dictionary[key];\r\n };\r\n /**\r\n * Inserts value at specific key.\r\n *\r\n * Will thrown an exception if the key already exists in the dictionary.\r\n *\r\n * @param key Key\r\n * @param value Value\r\n */\r\n Dictionary.prototype.insertKey = function (key, value) {\r\n if ($object.hasKey(this._dictionary, key)) {\r\n throw new Error(\"Key \" + key + \" already exists in dictionary\");\r\n }\r\n else {\r\n this._dictionary[key] = value;\r\n if (this.events.isEnabled(\"insertKey\")) {\r\n this.events.dispatchImmediately(\"insertKey\", {\r\n type: \"insertKey\",\r\n target: this,\r\n key: key,\r\n newValue: value\r\n });\r\n }\r\n }\r\n };\r\n /**\r\n * Adds or updates key/value into dictionary.\r\n *\r\n * If the key already exists, the old value will be overwritten.\r\n *\r\n * If the new value is exactly the same as the old value (using ===), it won't do anything.\r\n *\r\n * @param key Key\r\n * @param value Value\r\n */\r\n Dictionary.prototype.setKey = function (key, value) {\r\n if ($object.hasKey(this._dictionary, key)) {\r\n var oldValue = this._dictionary[key];\r\n if (oldValue !== value) {\r\n this._dictionary[key] = value;\r\n if (this.events.isEnabled(\"setKey\")) {\r\n this.events.dispatchImmediately(\"setKey\", {\r\n type: \"setKey\",\r\n target: this,\r\n key: key,\r\n oldValue: oldValue,\r\n newValue: value\r\n });\r\n }\r\n if (this.events.isEnabled(\"removed\")) {\r\n this.events.dispatchImmediately(\"removed\", {\r\n type: \"removed\",\r\n target: this,\r\n oldValue: oldValue\r\n });\r\n }\r\n }\r\n }\r\n else {\r\n this._dictionary[key] = value;\r\n if (this.events.isEnabled(\"insertKey\")) {\r\n this.events.dispatchImmediately(\"insertKey\", {\r\n type: \"insertKey\",\r\n target: this,\r\n key: key,\r\n newValue: value\r\n });\r\n }\r\n }\r\n };\r\n /**\r\n * Updates the value at specific `key` using custom function.\r\n *\r\n * Passes in current value into the function, and uses its output as a new\r\n * value.\r\n *\r\n * If the new value is exactly the same as the old value (using ===), it won't do anything.\r\n *\r\n * @ignore Exclude from docs\r\n * @param key Key\r\n * @param fn Function to transform the value\r\n */\r\n Dictionary.prototype.updateKey = function (key, fn) {\r\n if ($object.hasKey(this._dictionary, key)) {\r\n var oldValue = this._dictionary[key];\r\n var newValue = fn(oldValue);\r\n if (oldValue !== newValue) {\r\n this._dictionary[key] = newValue;\r\n if (this.events.isEnabled(\"setKey\")) {\r\n this.events.dispatchImmediately(\"setKey\", {\r\n type: \"setKey\",\r\n target: this,\r\n key: key,\r\n oldValue: oldValue,\r\n newValue: newValue\r\n });\r\n }\r\n if (this.events.isEnabled(\"removed\")) {\r\n this.events.dispatchImmediately(\"removed\", {\r\n type: \"removed\",\r\n target: this,\r\n oldValue: oldValue\r\n });\r\n }\r\n }\r\n }\r\n else {\r\n throw new Error(\"Key \" + key + \" doesn't exist in dictionary\");\r\n }\r\n };\r\n /**\r\n * Removes value at specific `key` from dictionary.\r\n *\r\n * @param key Key to remove\r\n */\r\n Dictionary.prototype.removeKey = function (key) {\r\n if ($object.hasKey(this._dictionary, key)) {\r\n var oldValue = this._dictionary[key];\r\n delete this._dictionary[key];\r\n if (this.events.isEnabled(\"removeKey\")) {\r\n this.events.dispatchImmediately(\"removeKey\", {\r\n type: \"removeKey\",\r\n target: this,\r\n key: key,\r\n oldValue: oldValue\r\n });\r\n }\r\n if (this.events.isEnabled(\"removed\")) {\r\n this.events.dispatchImmediately(\"removed\", {\r\n type: \"removed\",\r\n target: this,\r\n oldValue: oldValue\r\n });\r\n }\r\n }\r\n };\r\n /**\r\n * [insertKeyIfEmpty description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo description\r\n * @param key [description]\r\n * @param ifEmpty [description]\r\n * @return [description]\r\n */\r\n Dictionary.prototype.insertKeyIfEmpty = function (key, ifEmpty) {\r\n if (!this.hasKey(key)) {\r\n this.insertKey(key, ifEmpty());\r\n }\r\n return this.getKey(key);\r\n };\r\n /**\r\n * Removes all items from the dictionary.\r\n */\r\n Dictionary.prototype.clear = function () {\r\n var _this = this;\r\n // TODO dispatch this after clear\r\n if (this.events.isEnabled(\"removed\")) {\r\n $object.each(this._dictionary, function (key, value) {\r\n _this.events.dispatchImmediately(\"removed\", {\r\n type: \"removed\",\r\n target: _this,\r\n oldValue: value\r\n });\r\n });\r\n }\r\n this._dictionary = {};\r\n if (this.events.isEnabled(\"cleared\")) {\r\n this.events.dispatchImmediately(\"cleared\", {\r\n type: \"cleared\",\r\n target: this\r\n });\r\n }\r\n };\r\n /**\r\n * Copies items from another Dictionary.\r\n *\r\n * @param source A Dictionary to copy items from\r\n */\r\n Dictionary.prototype.copyFrom = function (source) {\r\n var _this = this;\r\n $iter.each(source.iterator(), function (a) {\r\n // TODO fix this type cast\r\n _this.setKey(a[0], a[1]);\r\n });\r\n };\r\n /**\r\n * Returns an interator that can be used to iterate through all items in\r\n * the dictionary.\r\n *\r\n * @return Iterator\r\n */\r\n Dictionary.prototype.iterator = function () {\r\n // @todo fix this type after the Iterator bug is fixed\r\n // https://github.com/Microsoft/TypeScript/issues/16730\r\n return $object.entries(this._dictionary);\r\n };\r\n /**\r\n * Returns an ES6 iterator for the keys/values of the dictionary.\r\n */\r\n Dictionary.prototype[Symbol.iterator] = function () {\r\n var _a, _b, _i, key;\r\n return __generator(this, function (_c) {\r\n switch (_c.label) {\r\n case 0:\r\n _a = [];\r\n for (_b in this._dictionary)\r\n _a.push(_b);\r\n _i = 0;\r\n _c.label = 1;\r\n case 1:\r\n if (!(_i < _a.length)) return [3 /*break*/, 4];\r\n key = _a[_i];\r\n if (!$object.hasKey(this._dictionary, key)) return [3 /*break*/, 3];\r\n return [4 /*yield*/, [key, this._dictionary[key]]];\r\n case 2:\r\n _c.sent();\r\n _c.label = 3;\r\n case 3:\r\n _i++;\r\n return [3 /*break*/, 1];\r\n case 4: return [2 /*return*/];\r\n }\r\n });\r\n };\r\n /**\r\n * Calls `f` for each key/value in the dictionary.\r\n */\r\n Dictionary.prototype.each = function (f) {\r\n $iter.each(this.iterator(), function (_a) {\r\n var _b = __read(_a, 2), key = _b[0], value = _b[1];\r\n return f(key, value);\r\n });\r\n };\r\n /**\r\n * Returns an iterator that can be used to iterate through all items in\r\n * the dictionary, ordered by key.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Iterator\r\n */\r\n Dictionary.prototype.sortedIterator = function () {\r\n return $iter.sort(this.iterator(), function (x, y) { return $string.order(x[0], y[0]); });\r\n };\r\n return Dictionary;\r\n}());\r\nexport { Dictionary };\r\n/**\r\n * A version of a [[Dictionary]] that has a \"template\".\r\n *\r\n * A template is an instance of an object, that can be used to create new\r\n * elements in the list without actually needing to create instances for those.\r\n *\r\n * When new element is created in the list, e.g. by calling its `create()`\r\n * method, an exact copy of the element is created (including properties and\r\n * other attributes), inserted into the list and returned.\r\n */\r\nvar DictionaryTemplate = /** @class */ (function (_super) {\r\n __extends(DictionaryTemplate, _super);\r\n /**\r\n * Constructor\r\n *\r\n * @param t Template object\r\n */\r\n function DictionaryTemplate(t) {\r\n var _this = _super.call(this) || this;\r\n _this.template = t;\r\n return _this;\r\n }\r\n Object.defineProperty(DictionaryTemplate.prototype, \"template\", {\r\n /**\r\n * @return Template object\r\n */\r\n get: function () {\r\n return this._template;\r\n },\r\n /**\r\n * A \"template\" object to copy all properties from when creating new list\r\n * items.\r\n *\r\n * @param v Template object\r\n */\r\n set: function (v) {\r\n v.isTemplate = true;\r\n this._template = v;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Copies all elements from other dictionary.\r\n *\r\n * @param source Source dictionary\r\n */\r\n DictionaryTemplate.prototype.copyFrom = function (source) {\r\n var _this = this;\r\n $iter.each(source.iterator(), function (a) {\r\n // TODO fix this type cast\r\n // TODO why does this need to clone ?\r\n _this.setKey(a[0], a[1].clone());\r\n });\r\n };\r\n /**\r\n * Instantiates a new object of the specified type, adds it to specified\r\n * `key` in the dictionary, and returns it.\r\n *\r\n * @param make Item type to use. Will use the default type for the dictionary if not specified.\r\n * @return Newly created item\r\n */\r\n DictionaryTemplate.prototype.create = function (key) {\r\n var _this = this;\r\n return this.insertKeyIfEmpty(key, function () { return _this.template.clone(); });\r\n };\r\n return DictionaryTemplate;\r\n}(Dictionary));\r\nexport { DictionaryTemplate };\r\n","import { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport * as $array from \"./Array\";\r\nimport * as $type from \"./Type\";\r\n/**\r\n * A base class for disposable objects.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\nvar Disposer = /** @class */ (function () {\r\n /**\r\n * Constructor.\r\n *\r\n * @param dispose Function that disposes object\r\n */\r\n function Disposer(dispose) {\r\n this._disposed = false;\r\n this._dispose = dispose;\r\n }\r\n /**\r\n * Checks if object is disposed.\r\n *\r\n * @return Disposed?\r\n */\r\n Disposer.prototype.isDisposed = function () {\r\n return this._disposed;\r\n };\r\n /**\r\n * Disposes the object.\r\n */\r\n Disposer.prototype.dispose = function () {\r\n if (!this._disposed) {\r\n this._disposed = true;\r\n this._dispose();\r\n }\r\n };\r\n return Disposer;\r\n}());\r\nexport { Disposer };\r\n/**\r\n * A collection of related disposers that can be disposed in one go.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\nvar MultiDisposer = /** @class */ (function (_super) {\r\n __extends(MultiDisposer, _super);\r\n function MultiDisposer(disposers) {\r\n return _super.call(this, function () {\r\n $array.each(disposers, function (x) {\r\n x.dispose();\r\n });\r\n }) || this;\r\n }\r\n return MultiDisposer;\r\n}(Disposer));\r\nexport { MultiDisposer };\r\n/**\r\n * A special kind of Disposer that has attached value set.\r\n *\r\n * If a new value is set using `set()` method, the old disposer value is\r\n * disposed.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\r\nvar MutableValueDisposer = /** @class */ (function (_super) {\r\n __extends(MutableValueDisposer, _super);\r\n /**\r\n * Constructor.\r\n */\r\n function MutableValueDisposer() {\r\n var _this = _super.call(this, function () {\r\n if ($type.hasValue(_this._disposer)) {\r\n _this._disposer.dispose();\r\n _this._disposer = undefined;\r\n }\r\n }) || this;\r\n return _this;\r\n }\r\n /**\r\n * Returns current value.\r\n *\r\n * @return Value\r\n */\r\n MutableValueDisposer.prototype.get = function () {\r\n return this._value;\r\n };\r\n /**\r\n * Sets value and disposes previous disposer if it was set.\r\n *\r\n * @param value New value\r\n * @param disposer Disposer\r\n */\r\n MutableValueDisposer.prototype.set = function (value, disposer) {\r\n if ($type.hasValue(this._disposer)) {\r\n this._disposer.dispose();\r\n }\r\n this._disposer = disposer;\r\n this._value = value;\r\n };\r\n /**\r\n * Resets the disposer value.\r\n */\r\n MutableValueDisposer.prototype.reset = function () {\r\n this.set(undefined, undefined);\r\n };\r\n return MutableValueDisposer;\r\n}(Disposer));\r\nexport { MutableValueDisposer };\r\n/**\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\r\nvar CounterDisposer = /** @class */ (function (_super) {\r\n __extends(CounterDisposer, _super);\r\n function CounterDisposer() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n /**\r\n * [_counter description]\r\n *\r\n * @todo Description\r\n */\r\n _this._counter = 0;\r\n return _this;\r\n }\r\n /**\r\n * [increment description]\r\n *\r\n * @todo Description\r\n */\r\n CounterDisposer.prototype.increment = function () {\r\n var _this = this;\r\n // TODO throw an error if it is disposed\r\n ++this._counter;\r\n // TODO make this more efficient\r\n return new Disposer(function () {\r\n --_this._counter;\r\n if (_this._counter === 0) {\r\n _this.dispose();\r\n }\r\n });\r\n };\r\n return CounterDisposer;\r\n}(Disposer));\r\nexport { CounterDisposer };\r\n","/**\r\n * A collection of easing functions\r\n *\r\n * Parts of this collection are taken from D3.js library (https://d3js.org/)\r\n */\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport * as $math from \"../utils/Math\";\r\nimport { registry } from \"../Registry\";\r\n/**\r\n * The functions below are from D3.js library (https://d3js.org/)\r\n *\r\n * ----------------------------------------------------------------------------\r\n * Copyright 2017 Mike Bostock\r\n *\r\n * Redistribution and use in source and binary forms, with or without\r\n * modification, are permitted provided that the following conditions are met:\r\n *\r\n * 1. Redistributions of source code must retain the above copyright notice,\r\n * this list of conditions and the following disclaimer.\r\n *\r\n * 2. Redistributions in binary form must reproduce the above copyright notice,\r\n * this list of conditions and the following disclaimer in the documentation\r\n * and/or other materials provided with the distribution.\r\n *\r\n * 3. Neither the name of the copyright holder nor the names of its\r\n * contributors may be used to endorse or promote products derived from this\r\n * software without specific prior written permission.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\r\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\r\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\r\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\r\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n * ----------------------------------------------------------------------------\r\n * @hidden\r\n */\r\n/**\r\n * ============================================================================\r\n * LINEAR FUNCTIONS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Easing function: \"linear\".\r\n */\r\nexport function linear(t) {\r\n return +t;\r\n}\r\nregistry.registeredClasses[\"ease.linear\"] = linear;\r\n/**\r\n * Easing function: \"quadIn\".\r\n */\r\nexport function quadIn(t) {\r\n return t * t;\r\n}\r\nregistry.registeredClasses[\"ease.quadIn\"] = quadIn;\r\n/**\r\n * Easing function: \"quadOut\".\r\n */\r\nexport function quadOut(t) {\r\n return t * (2 - t);\r\n}\r\nregistry.registeredClasses[\"ease.quadOut\"] = quadOut;\r\n/**\r\n * Easing function: \"quadInOut\".\r\n */\r\nexport function quadInOut(t) {\r\n t *= 2;\r\n return (t <= 1 ? t * t : --t * (2 - t) + 1) / 2;\r\n}\r\nregistry.registeredClasses[\"ease.quadInOut\"] = quadInOut;\r\n/**\r\n * Easing function: \"polyIn\".\r\n */\r\nexport function polyIn(t, e) {\r\n return Math.pow(t, e);\r\n}\r\nregistry.registeredClasses[\"ease.polyIn\"] = polyIn;\r\n/**\r\n * Easing function: \"polyOut\".\r\n */\r\nexport function polyOut(t, e) {\r\n return 1 - Math.pow(1 - t, e);\r\n}\r\nregistry.registeredClasses[\"ease.polyOut\"] = polyOut;\r\n/**\r\n * Easing function: \"polyInOut\".\r\n */\r\nexport function polyInOut(t, e) {\r\n t *= 2;\r\n return (t <= 1 ? Math.pow(t, e) : 2 - Math.pow(2 - t, e)) / 2;\r\n}\r\nregistry.registeredClasses[\"ease.polyInOut\"] = polyInOut;\r\n/**\r\n * Easing function: \"polyIn3\".\r\n */\r\nexport function polyIn3(t) {\r\n return polyIn(t, 3);\r\n}\r\nregistry.registeredClasses[\"ease.polyIn3\"] = polyIn3;\r\n/**\r\n * Easing function: \"polyOut3\".\r\n */\r\nexport function polyOut3(t) {\r\n return polyOut(t, 3);\r\n}\r\nregistry.registeredClasses[\"ease.polyOut3\"] = polyOut3;\r\n/**\r\n * Easing function: \"polyInOut3\".\r\n */\r\nexport function polyInOut3(t) {\r\n return polyInOut(t, 3);\r\n}\r\nregistry.registeredClasses[\"ease.polyInOut3\"] = polyInOut3;\r\n/**\r\n * ============================================================================\r\n * EXPONENTIAL FUNCTIONS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Easing function: \"expIn\".\r\n */\r\nexport function expIn(t) {\r\n return Math.pow(2, 10 * t - 10);\r\n}\r\nregistry.registeredClasses[\"ease.expIn\"] = expIn;\r\n/**\r\n * Easing function: \"expOut\".\r\n */\r\nexport function expOut(t) {\r\n return 1 - Math.pow(2, -10 * t);\r\n}\r\nregistry.registeredClasses[\"ease.expOut\"] = expOut;\r\n/**\r\n * Easing function: \"expInOut\".\r\n */\r\nexport function expInOut(t) {\r\n t *= 2;\r\n return (t <= 1 ? Math.pow(2, 10 * t - 10) : 2 - Math.pow(2, 10 - 10 * t)) / 2;\r\n}\r\nregistry.registeredClasses[\"ease.expInOut\"] = expInOut;\r\n/**\r\n * ============================================================================\r\n * SINE FUNCTIONS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Easing function: \"sinIn\".\r\n */\r\nexport function sinIn(t) {\r\n return 1 - Math.cos(t * $math.HALFPI);\r\n}\r\nregistry.registeredClasses[\"ease.sinIn\"] = sinIn;\r\n/**\r\n * Easing function: \"sinOut\".\r\n */\r\nexport function sinOut(t) {\r\n return Math.sin(t * $math.HALFPI);\r\n}\r\nregistry.registeredClasses[\"ease.sinOut\"] = sinOut;\r\n/**\r\n * Easing function: \"sinInOut\".\r\n */\r\nexport function sinInOut(t) {\r\n return (1 - Math.cos($math.PI * t)) / 2;\r\n}\r\nregistry.registeredClasses[\"ease.sinInOut\"] = sinInOut;\r\n/**\r\n * ============================================================================\r\n * CUBIC FUNCTIONS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Easing function: \"cubicIn\".\r\n */\r\nexport function cubicIn(t) {\r\n return t * t * t;\r\n}\r\nregistry.registeredClasses[\"ease.cubicIn\"] = cubicIn;\r\n/**\r\n * Easing function: \"cubicOut\".\r\n */\r\nexport function cubicOut(t) {\r\n return --t * t * t + 1;\r\n}\r\nregistry.registeredClasses[\"ease.cubicOut\"] = cubicOut;\r\n/**\r\n * Easing function: \"cubicInOut\".\r\n */\r\nexport function cubicInOut(t) {\r\n t *= 2;\r\n return (t <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2;\r\n}\r\nregistry.registeredClasses[\"ease.cubicInOut\"] = cubicInOut;\r\n/**\r\n * ============================================================================\r\n * CIRCLE FUNCTIONS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Easing function: \"circleIn\".\r\n */\r\nexport function circleIn(t) {\r\n return 1 - Math.sqrt(1 - t * t);\r\n}\r\nregistry.registeredClasses[\"ease.circleIn\"] = circleIn;\r\n/**\r\n * Easing function: \"circleOut\".\r\n */\r\nexport function circleOut(t) {\r\n return Math.sqrt(1 - --t * t);\r\n}\r\nregistry.registeredClasses[\"ease.circleOut\"] = circleOut;\r\n/**\r\n * Easing function: \"circleInOut\".\r\n */\r\nexport function circleInOut(t) {\r\n t *= 2;\r\n return (t <= 1 ? 1 - Math.sqrt(1 - t * t) : Math.sqrt(1 - (t -= 2) * t) + 1) / 2;\r\n}\r\nregistry.registeredClasses[\"ease.circleInOut\"] = circleInOut;\r\n/**\r\n * ============================================================================\r\n * BOUNCE FUNCTIONS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nvar b1 = 4 / 11, b2 = 6 / 11, b3 = 8 / 11, b4 = 3 / 4, b5 = 9 / 11, b6 = 10 / 11, b7 = 15 / 16, b8 = 21 / 22, b9 = 63 / 64, b0 = 1 / b1 / b1;\r\n/**\r\n * Easing function: \"bounceIn\".\r\n */\r\nexport function bounceIn(t) {\r\n return 1 - bounceOut(1 - t);\r\n}\r\nregistry.registeredClasses[\"ease.bounceIn\"] = bounceIn;\r\n/**\r\n * Easing function: \"bounceOut\".\r\n */\r\nexport function bounceOut(t) {\r\n t = +t;\r\n return t < b1 ? b0 * t * t : t < b3 ? b0 * (t -= b2) * t + b4 : t < b6 ? b0 * (t -= b5) * t + b7 : b0 * (t -= b8) * t + b9;\r\n}\r\nregistry.registeredClasses[\"ease.bounceOut\"] = bounceOut;\r\n/**\r\n * Easing function: \"bounceInOut\".\r\n */\r\nexport function bounceInOut(t) {\r\n t *= 2;\r\n return (t <= 1 ? 1 - bounceOut(1 - t) : bounceOut(t - 1) + 1) / 2;\r\n}\r\nregistry.registeredClasses[\"ease.bounceInOut\"] = bounceInOut;\r\n/**\r\n * ============================================================================\r\n * ELASTIC FUNCTIONS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nvar tau = 2 * Math.PI;\r\nvar amplitude = 1;\r\nvar period = 0.3 / tau;\r\nvar s = Math.asin(1 / amplitude) * period;\r\n/**\r\n * Easing function: \"elasticIn\".\r\n *\r\n * @function elasticIn\r\n * @param a Amplitude\r\n * @param p period\r\n */\r\nexport function elasticIn(t) {\r\n return amplitude * Math.pow(2, 10 * --t) * Math.sin((s - t) / period);\r\n}\r\nregistry.registeredClasses[\"ease.elasticIn\"] = elasticIn;\r\n/**\r\n * Easing function: \"elasticOut\".\r\n *\r\n * @function elasticOut\r\n * @param a Amplitude\r\n * @param p period\r\n */\r\nexport function elasticOut(t) {\r\n return 1 - amplitude * Math.pow(2, -10 * (t = +t)) * Math.sin((t + s) / period);\r\n}\r\nregistry.registeredClasses[\"ease.elasticOut\"] = elasticOut;\r\n/**\r\n * Easing function: \"elasticInOut\".\r\n *\r\n * @function elasticInOut\r\n * @param a Amplitude\r\n * @param p period\r\n */\r\nexport function elasticInOut(t) {\r\n t = t * 2 - 1;\r\n return (t < 0\r\n ? amplitude * Math.pow(2, 10 * t) * Math.sin((s - t) / period)\r\n : 2 - amplitude * Math.pow(2, -10 * t) * Math.sin((s + t) / period)) / 2;\r\n}\r\nregistry.registeredClasses[\"ease.elasticInOut\"] = elasticInOut;\r\n","/**\r\n * Event Dispatcher module is used for registering listeners and dispatching\r\n * events across amCharts system.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Disposer } from \"./Disposer\";\r\nimport * as $array from \"./Array\";\r\nimport * as $async from \"./AsyncPending\";\r\nimport * as $type from \"./Type\";\r\n/*export interface IEventDispatcher<T> {\r\n isDisposed(): boolean;\r\n dispose(): void;\r\n hasListeners(): boolean;\r\n enable(): void;\r\n disable(): void;\r\n enableType<Key extends keyof T>(type: Key): void;\r\n disableType<Key extends keyof T>(type: Key, amount?: number): void;\r\n isEnabled<Key extends keyof T>(type: Key): boolean;\r\n has<C, Key extends keyof T>(type: Key, callback?: (this: C, event: T[Key]) => void, context?: C): boolean;\r\n dispatchImmediately<Key extends keyof T>(type: Key, event: T[Key]): void;\r\n dispatch<Key extends keyof T>(type: Key, event: T[Key]): void;\r\n onAll<C, Key extends keyof T>(callback: (this: C, type: Key, event: T[Key]) => void, context?: C): IDisposer;\r\n on<C, Key extends keyof T>(type: Key, callback: (this: C, event: T[Key]) => void, context?: C): IDisposer;\r\n once<C, Key extends keyof T>(type: Key, callback: (this: C, event: T[Key]) => void, context?: C): IDisposer;\r\n off<C, Key extends keyof T>(type: Key, callback: (this: C, event: T[Key]) => void, context?: C): void;\r\n off<C, Key extends keyof T>(type: Key, callback: (this: C, event: T[Key]) => void, context?: C): void;\r\n copyFrom(source: this): void;\r\n}*/\r\n/**\r\n * Universal Event Dispatcher.\r\n *\r\n * @important\r\n */\r\nvar EventDispatcher = /** @class */ (function () {\r\n /**\r\n * Constructor\r\n */\r\n function EventDispatcher() {\r\n this._listeners = [];\r\n this._killed = [];\r\n this._disabled = {};\r\n this._iterating = 0;\r\n this._enabled = true;\r\n this._disposed = false;\r\n }\r\n /**\r\n * Returns if this object has been already disposed.\r\n *\r\n * @return Disposed?\r\n */\r\n EventDispatcher.prototype.isDisposed = function () {\r\n return this._disposed;\r\n };\r\n /**\r\n * Dispose (destroy) this object.\r\n */\r\n EventDispatcher.prototype.dispose = function () {\r\n if (!this._disposed) {\r\n this._disposed = true;\r\n var a = this._listeners;\r\n this._iterating = 1;\r\n this._listeners = null;\r\n this._disabled = null;\r\n try {\r\n $array.each(a, function (x) {\r\n x.disposer.dispose();\r\n });\r\n }\r\n finally {\r\n this._killed = null;\r\n this._iterating = null;\r\n }\r\n }\r\n };\r\n /**\r\n * Checks if this particular event dispatcher has any listeners set.\r\n *\r\n * @return Has listeners?\r\n */\r\n EventDispatcher.prototype.hasListeners = function () {\r\n return this._listeners.length !== 0;\r\n };\r\n /**\r\n * Checks if this particular event dispatcher has any particular listeners set.\r\n *\r\n * @return Has particular event listeners?\r\n */\r\n EventDispatcher.prototype.hasListenersByType = function (type) {\r\n return $array.any(this._listeners, function (x) { return (x.type === null || x.type === type) && !x.killed; });\r\n };\r\n /**\r\n * Enable dispatching of events if they were previously disabled by\r\n * `disable()`.\r\n */\r\n EventDispatcher.prototype.enable = function () {\r\n this._enabled = true;\r\n };\r\n /**\r\n * Disable dispatching of events until re-enabled by `enable()`.\r\n */\r\n EventDispatcher.prototype.disable = function () {\r\n this._enabled = false;\r\n };\r\n /**\r\n * Enable dispatching particular event, if it was disabled before by\r\n * `disableType()`.\r\n *\r\n * @param type Event type\r\n */\r\n EventDispatcher.prototype.enableType = function (type) {\r\n delete this._disabled[type];\r\n };\r\n /**\r\n * Disable dispatching of events for a certain event type.\r\n *\r\n * Optionally, can set how many dispatches to skip before automatically\r\n * re-enabling the dispatching.\r\n *\r\n * @param type Event type\r\n * @param amount Number of event dispatches to skip\r\n */\r\n EventDispatcher.prototype.disableType = function (type, amount) {\r\n if (amount === void 0) { amount = Infinity; }\r\n this._disabled[type] = amount;\r\n };\r\n /**\r\n * Removes listener from dispatcher.\r\n *\r\n * Will throw an exception if such listener does not exists.\r\n *\r\n * @param listener Listener to remove\r\n */\r\n EventDispatcher.prototype._removeListener = function (listener) {\r\n if (this._iterating === 0) {\r\n var index = this._listeners.indexOf(listener);\r\n if (index === -1) {\r\n throw new Error(\"Invalid state: could not remove listener\");\r\n }\r\n this._listeners.splice(index, 1);\r\n }\r\n else {\r\n this._killed.push(listener);\r\n }\r\n };\r\n /**\r\n * Removes existing listener by certain parameters.\r\n *\r\n * @param once Listener's once setting\r\n * @param type Listener's type\r\n * @param callback Callback function\r\n * @param context Callback context\r\n */\r\n EventDispatcher.prototype._removeExistingListener = function (once, type, callback, context) {\r\n if (this._disposed) {\r\n throw new Error(\"EventDispatcher is disposed\");\r\n }\r\n this._eachListener(function (info) {\r\n if (info.once === once && // TODO is this correct ?\r\n info.type === type &&\r\n (callback == null || info.callback === callback) &&\r\n info.context === context) {\r\n info.disposer.dispose();\r\n }\r\n });\r\n };\r\n /**\r\n * Checks if dispatching for particular event type is enabled.\r\n *\r\n * @param type Event type\r\n * @return Enabled?\r\n */\r\n EventDispatcher.prototype.isEnabled = function (type) {\r\n if (this._disposed) {\r\n throw new Error(\"EventDispatcher is disposed\");\r\n }\r\n // TODO is this check correct ?\r\n return this._enabled && this._listeners.length > 0 && this.hasListenersByType(type) && this._disabled[type] == null;\r\n };\r\n /**\r\n * Checks if there's already a listener with specific parameters.\r\n *\r\n * @param type Listener's type\r\n * @param callback Callback function\r\n * @param context Callback context\r\n * @return Has listener?\r\n */\r\n EventDispatcher.prototype.has = function (type, callback, context) {\r\n var index = $array.findIndex(this._listeners, function (info) {\r\n return info.once !== true && // Ignoring \"once\" listeners\r\n info.type === type &&\r\n (callback == null || info.callback === callback) &&\r\n info.context === context;\r\n });\r\n return index !== -1;\r\n };\r\n /**\r\n * Checks whether event of the particular type should be dispatched.\r\n *\r\n * @param type Event type\r\n * @return Dispatch?\r\n */\r\n EventDispatcher.prototype._shouldDispatch = function (type) {\r\n if (this._disposed) {\r\n throw new Error(\"EventDispatcher is disposed\");\r\n }\r\n var count = this._disabled[type];\r\n if (!$type.isNumber(count)) {\r\n return this._enabled;\r\n }\r\n else {\r\n if (count <= 1) {\r\n delete this._disabled[type];\r\n }\r\n else {\r\n --this._disabled[type];\r\n }\r\n return false;\r\n }\r\n };\r\n /**\r\n * [_eachListener description]\r\n *\r\n * All of this extra code is needed when a listener is removed while iterating\r\n *\r\n * @todo Description\r\n * @param fn [description]\r\n */\r\n EventDispatcher.prototype._eachListener = function (fn) {\r\n var _this = this;\r\n ++this._iterating;\r\n try {\r\n $array.each(this._listeners, fn);\r\n }\r\n finally {\r\n --this._iterating;\r\n // TODO should this be inside or outside the finally ?\r\n if (this._iterating === 0 && this._killed.length !== 0) {\r\n // Remove killed listeners\r\n $array.each(this._killed, function (killed) {\r\n _this._removeListener(killed);\r\n });\r\n this._killed.length = 0;\r\n }\r\n }\r\n };\r\n /**\r\n * Dispatches an event immediately without waiting for next cycle.\r\n *\r\n * @param type Event type\r\n * @param event Event object\r\n * @todo automatically add in type and target properties if they are missing\r\n */\r\n EventDispatcher.prototype.dispatchImmediately = function (type, event) {\r\n if (this._shouldDispatch(type)) {\r\n // TODO check if it's faster to use an object of listeners rather than a single big array\r\n // TODO if the function throws, maybe it should keep going ?\r\n this._eachListener(function (listener) {\r\n if (!listener.killed && (listener.type === null || listener.type === type)) {\r\n listener.dispatch(type, event);\r\n }\r\n });\r\n }\r\n };\r\n /**\r\n * Shelves the event to be dispatched within next update cycle.\r\n *\r\n * @param type Event type\r\n * @param event Event object\r\n * @todo automatically add in type and target properties if they are missing\r\n */\r\n EventDispatcher.prototype.dispatch = function (type, event) {\r\n if (this._shouldDispatch(type)) {\r\n this._eachListener(function (listener) {\r\n // TODO check if it's faster to use an object of listeners rather than a single big array\r\n if (!listener.killed && (listener.type === null || listener.type === type)) {\r\n // TODO if the function throws, maybe it should keep going ?\r\n // TODO dispatch during the update cycle, rather than using whenIdle\r\n $async.whenIdle(function () {\r\n if (!listener.killed) {\r\n listener.dispatch(type, event);\r\n }\r\n });\r\n }\r\n });\r\n }\r\n };\r\n /**\r\n * Creates, catalogs and returns an [[EventListener]].\r\n *\r\n * Event listener can be disposed.\r\n *\r\n * @param once Listener's once setting\r\n * @param type Listener's type\r\n * @param callback Callback function\r\n * @param context Callback context\r\n * @param shouldClone Whether the listener should be copied when the EventDispatcher is copied\r\n * @param dispatch\r\n * @returns An event listener\r\n */\r\n EventDispatcher.prototype._on = function (once, type, callback, context, shouldClone, dispatch) {\r\n var _this = this;\r\n if (this._disposed) {\r\n throw new Error(\"EventDispatcher is disposed\");\r\n }\r\n this._removeExistingListener(once, type, callback, context);\r\n var info = {\r\n type: type,\r\n callback: callback,\r\n context: context,\r\n shouldClone: shouldClone,\r\n dispatch: dispatch,\r\n killed: false,\r\n once: once,\r\n disposer: new Disposer(function () {\r\n info.killed = true;\r\n _this._removeListener(info);\r\n })\r\n };\r\n this._listeners.push(info);\r\n return info;\r\n };\r\n /**\r\n * Creates an event listener to be invoked on **any** event.\r\n *\r\n * @param callback Callback function\r\n * @param context Callback context\r\n * @param shouldClone Whether the listener should be copied when the EventDispatcher is copied\r\n * @returns A disposable event listener\r\n * @todo what if `listen` is called on the same function twice ?\r\n */\r\n EventDispatcher.prototype.onAll = function (callback, context, shouldClone) {\r\n if (shouldClone === void 0) { shouldClone = true; }\r\n return this._on(false, null, callback, context, shouldClone, function (type, event) { return callback.call(context, type, event); }).disposer;\r\n };\r\n /**\r\n * Creates an event listener to be invoked on a specific event type.\r\n *\r\n * ```TypeScript\r\n * series.events.on(\"hidden\", (ev) => {\r\n * console.log(\"Series hidden: \" + ev.target.name);\r\n * }, this);\r\n * ```\r\n * ```JavaScript\r\n * series.events.on(\"hidden\", function(ev) {\r\n * console.log(\"Series hidden: \" + ev.target.name);\r\n * }, this);\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"series\": [{\r\n * // ...\r\n * \"events\": {\r\n * \t\"hidden\": function(ev) {\r\n * \t console.log(\"Series hidden: \" + ev.target.name);\r\n * \t}\r\n * }\r\n * }]\r\n * }\r\n * ```\r\n *\r\n * The above will invoke our custom event handler whenever series we put\r\n * event on is hidden.\r\n *\r\n * @param type Listener's type\r\n * @param callback Callback function\r\n * @param context Callback context\r\n * @param shouldClone Whether the listener should be copied when the EventDispatcher is copied\r\n * @returns A disposable event listener\r\n * @todo what if `listen` is called on the same function twice ?\r\n */\r\n EventDispatcher.prototype.on = function (type, callback, context, shouldClone) {\r\n if (shouldClone === void 0) { shouldClone = true; }\r\n return this._on(false, type, callback, context, shouldClone, function (type, event) { return callback.call(context, event); }).disposer;\r\n };\r\n /**\r\n * Creates an event listener to be invoked on a specific event type once.\r\n *\r\n * Once the event listener is invoked, it is automatically disposed.\r\n *\r\n * ```TypeScript\r\n * series.events.on(\"hidden\", (ev) => {\r\n * console.log(\"Series hidden: \" + ev.target.name);\r\n * }, this);\r\n * ```\r\n * ```JavaScript\r\n * series.events.on(\"hidden\", function(ev) {\r\n * console.log(\"Series hidden: \" + ev.target.name);\r\n * }, this);\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"series\": [{\r\n * // ...\r\n * \"events\": {\r\n * \t\"hidden\": function(ev) {\r\n * \t console.log(\"Series hidden: \" + ev.target.name);\r\n * \t}\r\n * }\r\n * }]\r\n * }\r\n * ```\r\n *\r\n * The above will invoke our custom event handler the first time series we\r\n * put event on is hidden.\r\n *\r\n * @param type Listener's type\r\n * @param callback Callback function\r\n * @param context Callback context\r\n * @param shouldClone Whether the listener should be copied when the EventDispatcher is copied\r\n * @returns A disposable event listener\r\n * @todo what if `listen` is called on the same function twice ?\r\n */\r\n EventDispatcher.prototype.once = function (type, callback, context, shouldClone) {\r\n if (shouldClone === void 0) { shouldClone = true; }\r\n var x = this._on(true, type, callback, context, shouldClone, function (type, event) {\r\n x.disposer.dispose();\r\n callback.call(context, event);\r\n });\r\n // TODO maybe this should return a different Disposer ?\r\n return x.disposer;\r\n };\r\n /**\r\n * Removes the event listener with specific parameters.\r\n *\r\n * @param type Listener's type\r\n * @param callback Callback function\r\n * @param context Callback context\r\n */\r\n EventDispatcher.prototype.off = function (type, callback, context) {\r\n this._removeExistingListener(false, type, callback, context);\r\n };\r\n /**\r\n * Copies all dispatcher parameters, including listeners, from another event\r\n * dispatcher.\r\n *\r\n * @param source Source event dispatcher\r\n */\r\n EventDispatcher.prototype.copyFrom = function (source) {\r\n var _this = this;\r\n if (this._disposed) {\r\n throw new Error(\"EventDispatcher is disposed\");\r\n }\r\n if (source === this) {\r\n throw new Error(\"Cannot copyFrom the same TargetedEventDispatcher\");\r\n }\r\n $array.each(source._listeners, function (x) {\r\n // TODO is this correct ?\r\n if (!x.killed && x.shouldClone) {\r\n if (x.type === null) {\r\n _this.onAll(x.callback, x.context);\r\n }\r\n else if (x.once) {\r\n _this.once(x.type, x.callback, x.context);\r\n }\r\n else {\r\n _this.on(x.type, x.callback, x.context);\r\n }\r\n }\r\n });\r\n };\r\n return EventDispatcher;\r\n}());\r\nexport { EventDispatcher };\r\n/**\r\n * A version of the [[EventDispatcher]] that dispatches events for a specific\r\n * target object.\r\n *\r\n * @important\r\n */\r\nvar TargetedEventDispatcher = /** @class */ (function (_super) {\r\n __extends(TargetedEventDispatcher, _super);\r\n /**\r\n * Constructor\r\n *\r\n * @param target Event dispatcher target\r\n */\r\n function TargetedEventDispatcher(target) {\r\n var _this = _super.call(this) || this;\r\n _this.target = target;\r\n return _this;\r\n }\r\n /**\r\n * Copies all dispatcher parameters, including listeners, from another event\r\n * dispatcher.\r\n *\r\n * @param source Source event dispatcher\r\n */\r\n TargetedEventDispatcher.prototype.copyFrom = function (source) {\r\n var _this = this;\r\n if (this._disposed) {\r\n throw new Error(\"EventDispatcher is disposed\");\r\n }\r\n if (source === this) {\r\n throw new Error(\"Cannot copyFrom the same TargetedEventDispatcher\");\r\n }\r\n $array.each(source._listeners, function (x) {\r\n // TODO very hacky\r\n if (x.context === source.target) {\r\n return;\r\n }\r\n // TODO is this correct ?\r\n if (!x.killed && x.shouldClone) {\r\n if (x.type === null) {\r\n _this.onAll(x.callback, x.context);\r\n }\r\n else if (x.once) {\r\n _this.once(x.type, x.callback, x.context);\r\n }\r\n else {\r\n _this.on(x.type, x.callback, x.context);\r\n }\r\n }\r\n });\r\n };\r\n return TargetedEventDispatcher;\r\n}(EventDispatcher));\r\nexport { TargetedEventDispatcher };\r\n","/**\r\n * This module contains a version of ColorSet that can (and should) be used for\r\n * coloring UI elements.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { BaseObject } from \"../Base\";\r\nimport { registry } from \"../Registry\";\r\nimport { color } from \"./Color\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * This module contains a version of ColorSet that can (and should) be used for\r\n * coloring UI elements.\r\n *\r\n * The main difference from the basic [[ColorSet]] is that instead of sequenced\r\n * colors, it uses a concept of named colors.\r\n *\r\n * This way, every element in the UI can extract an exact color theme author\r\n * meant for the specific purpose, like strokes, backgrounds, etc.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/colors/} for color-related info\r\n */\r\nvar InterfaceColorSet = /** @class */ (function (_super) {\r\n __extends(InterfaceColorSet, _super);\r\n /**\r\n * Constructor\r\n */\r\n function InterfaceColorSet() {\r\n var _this = _super.call(this) || this;\r\n /**\r\n * Maps the list of purposes (like \"stroke\") to an index of color of the\r\n * color set.\r\n */\r\n _this._purposes = {\r\n stroke: color(\"#e5e5e5\"),\r\n fill: color(\"#f3f3f3\"),\r\n primaryButton: color(\"#6794dc\"),\r\n primaryButtonHover: color(\"#6771dc\"),\r\n primaryButtonDown: color(\"#68dc75\"),\r\n primaryButtonActive: color(\"#68dc75\"),\r\n primaryButtonText: color(\"#FFFFFF\"),\r\n primaryButtonStroke: color(\"#FFFFFF\"),\r\n secondaryButton: color(\"#d9d9d9\"),\r\n secondaryButtonHover: color(\"#d9d9d9\").brighten(-0.25),\r\n secondaryButtonDown: color(\"#d9d9d9\").brighten(-0.35),\r\n secondaryButtonActive: color(\"#d9d9d9\").brighten(0.35),\r\n secondaryButtonText: color(\"#000000\"),\r\n secondaryButtonStroke: color(\"#FFFFFF\"),\r\n grid: color(\"#000000\"),\r\n background: color(\"#ffffff\"),\r\n alternativeBackground: color(\"#000000\"),\r\n text: color(\"#000000\"),\r\n alternativeText: color(\"#FFFFFF\"),\r\n disabledBackground: color(\"#999999\"),\r\n positive: color(\"#67dc75\"),\r\n negative: color(\"#dc6788\")\r\n };\r\n _this.className = \"InterfaceColorSet\";\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n InterfaceColorSet.prototype.debug = function () { };\r\n /**\r\n * Returns a color to be used for the specific purpose.\r\n *\r\n * ```TypeScript\r\n * let uicolors = new am4core.InterfaceColorSet();\r\n * console.log(uicolors.getFor(\"stroke\"));\r\n * ```\r\n * ```JavaScript\r\n * var uicolors = new am4core.InterfaceColorSet();\r\n * console.log(uicolors.getFor(\"stroke\"));\r\n * ```\r\n *\r\n * @param purpose Color use purpuse\r\n * @return Color\r\n */\r\n InterfaceColorSet.prototype.getFor = function (purpose) {\r\n return this._purposes[purpose];\r\n };\r\n /**\r\n * Sets color to be used for the specific purpose.\r\n *\r\n * @param purpose Color use purpose\r\n * @param color Color\r\n */\r\n InterfaceColorSet.prototype.setFor = function (purpose, color) {\r\n this._purposes[purpose] = color;\r\n };\r\n return InterfaceColorSet;\r\n}(BaseObject));\r\nexport { InterfaceColorSet };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"InterfaceColorSet\"] = InterfaceColorSet;\r\n","import * as $array from \"./Array\";\r\n/**\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\r\nexport function fromArray(array) {\r\n return function (push) {\r\n var length = array.length;\r\n for (var i = 0; i < length; ++i) {\r\n if (!push(array[i])) {\r\n break;\r\n }\r\n }\r\n };\r\n}\r\n/**\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\r\nexport function length(iter) {\r\n var sum = 0;\r\n iter(function (_) {\r\n ++sum;\r\n return true;\r\n });\r\n return sum;\r\n}\r\n/**\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\r\nexport function toArray(iter) {\r\n var output = [];\r\n iter(function (value) {\r\n output.push(value);\r\n return true;\r\n });\r\n return output;\r\n}\r\n/**\r\n * [iter description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\r\nexport function eachContinue(iter, fn) {\r\n iter(fn);\r\n}\r\n/**\r\n * [iter description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\r\nexport function each(iter, fn) {\r\n iter(function (value) {\r\n fn(value);\r\n return true;\r\n });\r\n}\r\n/**\r\n * [iter description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\r\nexport function sort(iter, fn) {\r\n return fromArray(toArray(iter).sort(fn));\r\n}\r\n/**\r\n * [A description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\r\nexport function map(iter, fn) {\r\n return function (push) { return iter(function (value) { return push(fn(value)); }); };\r\n}\r\n/**\r\n * [iter description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\r\nexport function filter(iter, fn) {\r\n return function (push) { return iter(function (value) {\r\n if (fn(value)) {\r\n return push(value);\r\n }\r\n else {\r\n return true;\r\n }\r\n }); };\r\n}\r\n/**\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\r\nexport function concat() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n return function (push) {\r\n var go = true;\r\n var push2 = function (value) { return (go = push(value)); };\r\n var length = args.length;\r\n for (var i = 0; i < length; ++i) {\r\n args[i](push2);\r\n if (!go) {\r\n break;\r\n }\r\n }\r\n };\r\n}\r\n/**\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\r\nexport function flatten(iter) {\r\n return function (push) {\r\n var go = true;\r\n var push2 = function (value) { return (go = push(value)); };\r\n iter(function (value) {\r\n value(push2);\r\n return go;\r\n });\r\n };\r\n}\r\n/**\r\n * [number description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\r\nexport function indexed(iter) {\r\n return function (push) {\r\n var index = 0;\r\n iter(function (value) { return push([index++, value]); });\r\n };\r\n}\r\n/**\r\n * [iter description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\r\nexport function findIndex(iter, matches) {\r\n var found = false;\r\n var i = 0;\r\n iter(function (value) {\r\n if (matches(value)) {\r\n found = true;\r\n return false;\r\n }\r\n else {\r\n ++i;\r\n return true;\r\n }\r\n });\r\n return (found ? i : -1);\r\n}\r\n/**\r\n * [iter description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\r\nexport function find(iter, matches) {\r\n var output;\r\n iter(function (value) {\r\n if (matches(value)) {\r\n output = value;\r\n return false;\r\n }\r\n else {\r\n return true;\r\n }\r\n });\r\n return output;\r\n}\r\n/**\r\n * [A description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\r\nexport function findMap(iter, matches) {\r\n var output;\r\n iter(function (value) {\r\n var v = matches(value);\r\n if (v !== null) {\r\n output = v;\r\n return false;\r\n }\r\n else {\r\n return true;\r\n }\r\n });\r\n return output;\r\n}\r\n/**\r\n * [iter description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\r\nexport function contains(iter, matches) {\r\n var output = false;\r\n iter(function (value) {\r\n if (matches(value)) {\r\n output = true;\r\n return false;\r\n }\r\n else {\r\n return true;\r\n }\r\n });\r\n return output;\r\n}\r\n/**\r\n * [A description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\r\nexport function foldl(iter, init, fn) {\r\n iter(function (value) {\r\n init = fn(init, value);\r\n return true;\r\n });\r\n return init;\r\n}\r\n/**\r\n * [min2 description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param left [description]\r\n * @param right [description]\r\n * @return [description]\r\n */\r\nfunction min2(left, right) {\r\n if (left == null || right < left) {\r\n return right;\r\n }\r\n else {\r\n return left;\r\n }\r\n}\r\n/**\r\n * [min description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Verify that this works correctly\r\n * @todo Description\r\n * @param a [description]\r\n * @return [description]\r\n */\r\nexport function min(a) {\r\n return foldl(a, null, min2);\r\n}\r\n/**\r\n * [max2 description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param left [description]\r\n * @param right [description]\r\n * @return [description]\r\n */\r\nfunction max2(left, right) {\r\n if (left == null || right > left) {\r\n return right;\r\n }\r\n else {\r\n return left;\r\n }\r\n}\r\n/**\r\n * [max description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Verify that this works correctly\r\n * @todo Description\r\n * @param a [description]\r\n * @return [description]\r\n */\r\nexport function max(a) {\r\n return foldl(a, null, max2);\r\n}\r\n/**\r\n * [join description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param iter [description]\r\n * @param separator [description]\r\n * @return [description]\r\n */\r\nexport function join(iter, separator) {\r\n if (separator === void 0) { separator = \"\"; }\r\n var first = true;\r\n var init = \"\";\r\n iter(function (value) {\r\n if (first) {\r\n first = false;\r\n }\r\n else {\r\n init += separator;\r\n }\r\n init += value;\r\n return true;\r\n });\r\n return init;\r\n}\r\n/**\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\r\nvar ListIterator = /** @class */ (function () {\r\n /**\r\n * Constructor\r\n *\r\n * @param list [description]\r\n * @param create [description]\r\n */\r\n function ListIterator(list, create) {\r\n // flag specifies if iterator should create new list item if it is reqested for a nextItem but there is no more left in the list\r\n this.createNewItems = false;\r\n this.list = list;\r\n this._create = create;\r\n this.reset();\r\n }\r\n ListIterator.prototype.reset = function () {\r\n this._listCopy = toArray(this.list.iterator());\r\n };\r\n ListIterator.prototype.clear = function () {\r\n this._listCopy.length = 0;\r\n };\r\n ListIterator.prototype.getFirst = function () {\r\n return this.returnItem(0);\r\n };\r\n ListIterator.prototype.getLast = function () {\r\n return this.returnItem(this._listCopy.length - 1);\r\n };\r\n ListIterator.prototype.find = function (fn) {\r\n var index = $array.findIndex(this._listCopy, fn);\r\n if (index !== -1) {\r\n var item = this._listCopy[index];\r\n // TODO use removeIndex instead ?\r\n $array.remove(this._listCopy, item);\r\n return item;\r\n }\r\n else {\r\n return this.getLast();\r\n }\r\n };\r\n ListIterator.prototype.removeItem = function (item) {\r\n return $array.remove(this._listCopy, item);\r\n };\r\n ListIterator.prototype.returnItem = function (index) {\r\n if (index >= 0 && index < this._listCopy.length) {\r\n var item = this._listCopy[index];\r\n // TODO use removeIndex instead ?\r\n $array.remove(this._listCopy, item);\r\n return item;\r\n }\r\n else if (this.createNewItems) {\r\n return this._create();\r\n }\r\n };\r\n ListIterator.prototype.iterator = function () {\r\n return fromArray(this._listCopy);\r\n };\r\n return ListIterator;\r\n}());\r\nexport { ListIterator };\r\n","/**\r\n * A collection of keyboard-related utilities accessible via `keyboard`\r\n * instance.\r\n */\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport * as $type from \"./Type\";\r\n/**\r\n * A class that represents collection of keyboard-related utilities.\r\n *\r\n * Do not instantiate this class directly, but rather use `keyboard` variable.\r\n */\r\nvar Keyboard = /** @class */ (function () {\r\n function Keyboard() {\r\n }\r\n /**\r\n * Returns a named key based on information contained in the event or\r\n * \"other\".\r\n *\r\n * @param ev A keyboard event\r\n * @return Keyboard named key\r\n */\r\n Keyboard.prototype.getEventKey = function (ev) {\r\n // Get the key code\r\n var code = ev.keyCode || ev.which, key;\r\n // Map to internal key\r\n switch (code) {\r\n case 38:\r\n key = \"up\";\r\n break;\r\n case 40:\r\n key = \"down\";\r\n break;\r\n case 37:\r\n key = \"left\";\r\n break;\r\n case 39:\r\n key = \"right\";\r\n break;\r\n case 13:\r\n key = \"enter\";\r\n break;\r\n case 27:\r\n key = \"esc\";\r\n break;\r\n case 36:\r\n key = \"home\";\r\n break;\r\n case 35:\r\n key = \"end\";\r\n break;\r\n case 9:\r\n key = \"tab\";\r\n break;\r\n case 17:\r\n key = \"ctrl\";\r\n break;\r\n case 18:\r\n key = \"alt\";\r\n break;\r\n case 16:\r\n key = \"shift\";\r\n break;\r\n case 32:\r\n key = \"space\";\r\n break;\r\n case 36:\r\n key = \"home\";\r\n break;\r\n case 35:\r\n key = \"end\";\r\n break;\r\n case 33:\r\n key = \"pgup\";\r\n break;\r\n case 34:\r\n key = \"pgdn\";\r\n break;\r\n case 45:\r\n key = \"ins\";\r\n break;\r\n case 46:\r\n key = \"del\";\r\n break;\r\n case 107:\r\n key = \"plus\";\r\n break;\r\n case 109:\r\n key = \"minus\";\r\n break;\r\n default:\r\n key = \"other\";\r\n break;\r\n }\r\n return key;\r\n };\r\n /**\r\n * Checks if event key is one or more of the selected named keys.\r\n *\r\n * @param ev Keyboard event\r\n * @param key Named key or array of keys\r\n * @return Is event key one of the list?\r\n */\r\n Keyboard.prototype.isKey = function (ev, key) {\r\n var eventKey = this.getEventKey(ev);\r\n if ($type.isString(key)) {\r\n key = [key];\r\n }\r\n return key.indexOf(eventKey) !== -1;\r\n };\r\n /**\r\n * Returns `true` if shift key was presset at the moment of the event.\r\n *\r\n * @param ev Event object\r\n * @return Was shift pressed?\r\n */\r\n Keyboard.prototype.shiftKey = function (ev) {\r\n return ev.shiftKey;\r\n };\r\n /**\r\n * Returns `true` if ctrl key was presset at the moment of the event.\r\n *\r\n * @param ev Event object\r\n * @return Was ctrl pressed?\r\n */\r\n Keyboard.prototype.ctrlKey = function (ev) {\r\n return ev.ctrlKey;\r\n };\r\n /**\r\n * Returns `true` if alt key was presset at the moment of the event\r\n * @param ev Event object\r\n * @return Was alt pressed?\r\n */\r\n Keyboard.prototype.altKey = function (ev) {\r\n return ev.altKey;\r\n };\r\n /**\r\n * Returns `true` if meta key was presset at the moment of the event\r\n * @param ev Event object\r\n * @return Was meta pressed?\r\n */\r\n Keyboard.prototype.metaKey = function (ev) {\r\n return ev.metaKey;\r\n };\r\n return Keyboard;\r\n}());\r\nexport { Keyboard };\r\n/**\r\n * A single [[Keyboard]] instance to be reused across all elements so that\r\n * they don't need to instantiate their own.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\nexport var keyboard = new Keyboard();\r\n","/**\r\n * amCharts 4 locale\r\n *\r\n * Locale: en\r\n * Language: International English\r\n * Author: Martynas Majeris\r\n *\r\n * Follow instructions in [on this page](https://www.amcharts.com/docs/v4/tutorials/creating-translations/) to make corrections or add new translations.\r\n *\r\n * ---\r\n * Edit but leave the header section above this line. You can remove any\r\n * subsequent comment sections.\r\n * ---\r\n *\r\n * Use this file as a template to create translations. Leave the key part in\r\n * English intact. Fill the value with a translation.\r\n *\r\n * Empty string means no translation, so default \"International English\"\r\n * will be used.\r\n *\r\n * If you need the translation to literally be an empty string, use `null`\r\n * instead.\r\n *\r\n * IMPORTANT:\r\n * When translating make good effort to keep the translation length\r\n * at least the same chartcount as the English, especially for short prompts.\r\n *\r\n * Having significantly longer prompts may distort the actual charts.\r\n *\r\n * NOTE:\r\n * Some prompts - like months or weekdays - come in two versions: full and\r\n * shortened.\r\n *\r\n * If there's no official shortened version of these in your language, and it\r\n * would not be possible to invent such short versions that don't seem weird\r\n * to native speakers of that language, fill those with the same as full\r\n * version.\r\n *\r\n * PLACEHOLDERS:\r\n * Some prompts have placeholders like \"%1\". Those will be replaced by actual\r\n * values during translation and should be retained in the translated prompts.\r\n *\r\n * Placeholder positions may be changed to better suit structure of the\r\n * sentence.\r\n *\r\n * For example \"From %1 to %2\", when actually used will replace \"%1\" with an\r\n * actual value representing range start, and \"%2\" will be replaced by end\r\n * value.\r\n *\r\n * E.g. in a Scrollbar for Value axis \"From %1 to %2\" will become\r\n * \"From 100 to 200\". You may translate \"From\" and \"to\", as well as re-arrange\r\n * the order of the prompt itself, but make sure the \"%1\" and \"%2\" remain, in\r\n * places where they will make sense.\r\n *\r\n * Save the file as language_LOCALE, i.e. `en_GB.ts`, `fr_FR.ts`, etc.\r\n */\r\nexport default {\r\n // Number formatting options.\r\n // \r\n // Please check with the local standards which separator is accepted to be\r\n // used for separating decimals, and which for thousands.\r\n \"_decimalSeparator\": \".\",\r\n \"_thousandSeparator\": \",\",\r\n // Position of the percent sign in numbers\r\n \"_percentPrefix\": null,\r\n \"_percentSuffix\": \"%\",\r\n // Suffixes for numbers\r\n // When formatting numbers, big or small numers might be reformatted to\r\n // shorter version, by applying a suffix.\r\n // \r\n // For example, 1000000 might become \"1m\".\r\n // Or 1024 might become \"1KB\" if we're formatting byte numbers.\r\n // \r\n // This section defines such suffixes for all such cases.\r\n \"_big_number_suffix_3\": \"k\",\r\n \"_big_number_suffix_6\": \"M\",\r\n \"_big_number_suffix_9\": \"G\",\r\n \"_big_number_suffix_12\": \"T\",\r\n \"_big_number_suffix_15\": \"P\",\r\n \"_big_number_suffix_18\": \"E\",\r\n \"_big_number_suffix_21\": \"Z\",\r\n \"_big_number_suffix_24\": \"Y\",\r\n \"_small_number_suffix_3\": \"m\",\r\n \"_small_number_suffix_6\": \"μ\",\r\n \"_small_number_suffix_9\": \"n\",\r\n \"_small_number_suffix_12\": \"p\",\r\n \"_small_number_suffix_15\": \"f\",\r\n \"_small_number_suffix_18\": \"a\",\r\n \"_small_number_suffix_21\": \"z\",\r\n \"_small_number_suffix_24\": \"y\",\r\n \"_byte_suffix_B\": \"B\",\r\n \"_byte_suffix_KB\": \"KB\",\r\n \"_byte_suffix_MB\": \"MB\",\r\n \"_byte_suffix_GB\": \"GB\",\r\n \"_byte_suffix_TB\": \"TB\",\r\n \"_byte_suffix_PB\": \"PB\",\r\n // Default date formats for various periods.\r\n // \r\n // This should reflect official or de facto formatting universally accepted\r\n // in the country translation is being made for\r\n // Available format codes here:\r\n // https://www.amcharts.com/docs/v4/concepts/formatters/formatting-date-time/#Format_codes\r\n // \r\n // This will be used when formatting date/time for particular granularity,\r\n // e.g. \"_date_hour\" will be shown whenever we need to show time as hours.\r\n // \r\n // \"date\" is used as in default date format when showing standalone dates.\r\n \"_date\": \"yyyy-MM-dd\",\r\n \"_date_millisecond\": \"mm:ss SSS\",\r\n \"_date_second\": \"HH:mm:ss\",\r\n \"_date_minute\": \"HH:mm\",\r\n \"_date_hour\": \"HH:mm\",\r\n \"_date_day\": \"MMM dd\",\r\n \"_date_week\": \"ww\",\r\n \"_date_month\": \"MMM\",\r\n \"_date_year\": \"yyyy\",\r\n // Default duration formats for various base units.\r\n // \r\n // This will be used by DurationFormatter to format numeric values into\r\n // duration.\r\n // \r\n // Notice how each duration unit comes in several versions. This is to ensure\r\n // that each base unit is shown correctly.\r\n // \r\n // For example, if we have baseUnit set to \"second\", meaning our duration is\r\n // in seconds.\r\n // \r\n // If we pass in `50` to formatter, it will know that we have just 50 seconds\r\n // (less than a minute) so it will use format in `\"_duration_second\"` (\"ss\"),\r\n // and the formatted result will be in like `\"50\"`.\r\n // \r\n // If we pass in `70`, which is more than a minute, the formatter will switch\r\n // to `\"_duration_second_minute\"` (\"mm:ss\"), resulting in \"01:10\" formatted\r\n // text.\r\n // \r\n // Available codes here:\r\n // https://www.amcharts.com/docs/v4/concepts/formatters/formatting-duration/#Available_Codes\r\n \"_duration_millisecond\": \"SSS\",\r\n \"_duration_millisecond_second\": \"ss.SSS\",\r\n \"_duration_millisecond_minute\": \"mm:ss SSS\",\r\n \"_duration_millisecond_hour\": \"hh:mm:ss SSS\",\r\n \"_duration_millisecond_day\": \"d'd' mm:ss SSS\",\r\n \"_duration_millisecond_week\": \"d'd' mm:ss SSS\",\r\n \"_duration_millisecond_month\": \"M'm' dd'd' mm:ss SSS\",\r\n \"_duration_millisecond_year\": \"y'y' MM'm' dd'd' mm:ss SSS\",\r\n \"_duration_second\": \"ss\",\r\n \"_duration_second_minute\": \"mm:ss\",\r\n \"_duration_second_hour\": \"hh:mm:ss\",\r\n \"_duration_second_day\": \"d'd' hh:mm:ss\",\r\n \"_duration_second_week\": \"d'd' hh:mm:ss\",\r\n \"_duration_second_month\": \"M'm' dd'd' hh:mm:ss\",\r\n \"_duration_second_year\": \"y'y' MM'm' dd'd' hh:mm:ss\",\r\n \"_duration_minute\": \"mm\",\r\n \"_duration_minute_hour\": \"hh:mm\",\r\n \"_duration_minute_day\": \"d'd' hh:mm\",\r\n \"_duration_minute_week\": \"d'd' hh:mm\",\r\n \"_duration_minute_month\": \"M'm' dd'd' hh:mm\",\r\n \"_duration_minute_year\": \"y'y' MM'm' dd'd' hh:mm\",\r\n \"_duration_hour\": \"hh'h'\",\r\n \"_duration_hour_day\": \"d'd' hh'h'\",\r\n \"_duration_hour_week\": \"d'd' hh'h'\",\r\n \"_duration_hour_month\": \"M'm' dd'd' hh'h'\",\r\n \"_duration_hour_year\": \"y'y' MM'm' dd'd' hh'h'\",\r\n \"_duration_day\": \"d'd'\",\r\n \"_duration_day_week\": \"d'd'\",\r\n \"_duration_day_month\": \"M'm' dd'd'\",\r\n \"_duration_day_year\": \"y'y' MM'm' dd'd'\",\r\n \"_duration_week\": \"w'w'\",\r\n \"_duration_week_month\": \"w'w'\",\r\n \"_duration_week_year\": \"w'w'\",\r\n \"_duration_month\": \"M'm'\",\r\n \"_duration_month_year\": \"y'y' MM'm'\",\r\n \"_duration_year\": \"y'y'\",\r\n // Era translations\r\n \"_era_ad\": \"AD\",\r\n \"_era_bc\": \"BC\",\r\n // Day part, used in 12-hour formats, e.g. 5 P.M.\r\n // Please note that these come in 3 variants:\r\n // * one letter (e.g. \"A\")\r\n // * two letters (e.g. \"AM\")\r\n // * two letters with dots (e.g. \"A.M.\")\r\n // \r\n // All three need to to be translated even if they are all the same. Some\r\n // users might use one, some the other.\r\n \"A\": \"\",\r\n \"P\": \"\",\r\n \"AM\": \"\",\r\n \"PM\": \"\",\r\n \"A.M.\": \"\",\r\n \"P.M.\": \"\",\r\n // Date-related stuff.\r\n // \r\n // When translating months, if there's a difference, use the form which is\r\n // best for a full date, e.g. as you would use it in \"2018 January 1\".\r\n // \r\n // Note that May is listed twice. This is because in English May is the same\r\n // in both long and short forms, while in other languages it may not be the\r\n // case. Translate \"May\" to full word, while \"May(short)\" to shortened\r\n // version.\r\n // \r\n // Should month names and weekdays be capitalized or not?\r\n // \r\n // Rule of thumb is this: if the names should always be capitalized,\r\n // regardless of name position within date (\"January\", \"21st January 2018\",\r\n // etc.) use capitalized names. Otherwise enter all lowercase.\r\n // \r\n // The date formatter will automatically capitalize names if they are the\r\n // first (or only) word in resulting date.\r\n \"January\": \"\",\r\n \"February\": \"\",\r\n \"March\": \"\",\r\n \"April\": \"\",\r\n \"May\": \"\",\r\n \"June\": \"\",\r\n \"July\": \"\",\r\n \"August\": \"\",\r\n \"September\": \"\",\r\n \"October\": \"\",\r\n \"November\": \"\",\r\n \"December\": \"\",\r\n \"Jan\": \"\",\r\n \"Feb\": \"\",\r\n \"Mar\": \"\",\r\n \"Apr\": \"\",\r\n \"May(short)\": \"May\",\r\n \"Jun\": \"\",\r\n \"Jul\": \"\",\r\n \"Aug\": \"\",\r\n \"Sep\": \"\",\r\n \"Oct\": \"\",\r\n \"Nov\": \"\",\r\n \"Dec\": \"\",\r\n // Weekdays.\r\n \"Sunday\": \"\",\r\n \"Monday\": \"\",\r\n \"Tuesday\": \"\",\r\n \"Wednesday\": \"\",\r\n \"Thursday\": \"\",\r\n \"Friday\": \"\",\r\n \"Saturday\": \"\",\r\n \"Sun\": \"\",\r\n \"Mon\": \"\",\r\n \"Tue\": \"\",\r\n \"Wed\": \"\",\r\n \"Thu\": \"\",\r\n \"Fri\": \"\",\r\n \"Sat\": \"\",\r\n // Date ordinal function.\r\n // \r\n // This is used when adding number ordinal when formatting days in dates.\r\n // \r\n // E.g. \"January 1st\", \"February 2nd\".\r\n // \r\n // The function accepts day number, and returns a string to be added to the\r\n // day, like in default English translation, if we pass in 2, we will receive\r\n // \"nd\" back.\r\n \"_dateOrd\": function (day) {\r\n var res = \"th\";\r\n if ((day < 11) || (day > 13)) {\r\n switch (day % 10) {\r\n case 1:\r\n res = \"st\";\r\n break;\r\n case 2:\r\n res = \"nd\";\r\n break;\r\n case 3:\r\n res = \"rd\";\r\n break;\r\n }\r\n }\r\n return res;\r\n },\r\n // Various chart controls.\r\n // Shown as a tooltip on zoom out button.\r\n \"Zoom Out\": \"\",\r\n // Timeline buttons\r\n \"Play\": \"\",\r\n \"Stop\": \"\",\r\n // Chart's Legend screen reader title.\r\n \"Legend\": \"\",\r\n // Legend's item screen reader indicator.\r\n \"Click, tap or press ENTER to toggle\": \"\",\r\n // Shown when the chart is busy loading something.\r\n \"Loading\": \"\",\r\n // Shown as the first button in the breadcrumb navigation, e.g.:\r\n // Home > First level > ...\r\n \"Home\": \"\",\r\n // Chart types.\r\n // Those are used as default screen reader titles for the main chart element\r\n // unless developer has set some more descriptive title.\r\n \"Chart\": \"\",\r\n \"Serial chart\": \"\",\r\n \"X/Y chart\": \"\",\r\n \"Pie chart\": \"\",\r\n \"Gauge chart\": \"\",\r\n \"Radar chart\": \"\",\r\n \"Sankey diagram\": \"\",\r\n \"Flow diagram\": \"\",\r\n \"Chord diagram\": \"\",\r\n \"TreeMap chart\": \"\",\r\n \"Force directed tree\": \"\",\r\n \"Sliced chart\": \"\",\r\n // Series types.\r\n // Used to name series by type for screen readers if they do not have their\r\n // name set.\r\n \"Series\": \"\",\r\n \"Candlestick Series\": \"\",\r\n \"OHLC Series\": \"\",\r\n \"Column Series\": \"\",\r\n \"Line Series\": \"\",\r\n \"Pie Slice Series\": \"\",\r\n \"Funnel Series\": \"\",\r\n \"Pyramid Series\": \"\",\r\n \"X/Y Series\": \"\",\r\n // Map-related stuff.\r\n \"Map\": \"\",\r\n \"Press ENTER to zoom in\": \"\",\r\n \"Press ENTER to zoom out\": \"\",\r\n \"Use arrow keys to zoom in and out\": \"\",\r\n \"Use plus and minus keys on your keyboard to zoom in and out\": \"\",\r\n // Export-related stuff.\r\n // These prompts are used in Export menu labels.\r\n // \r\n // \"Export\" is the top-level menu item.\r\n // \r\n // \"Image\", \"Data\", \"Print\" as second-level indicating type of export\r\n // operation.\r\n // \r\n // Leave actual format untranslated, unless you absolutely know that they\r\n // would convey more meaning in some other way.\r\n \"Export\": \"\",\r\n \"Image\": \"\",\r\n \"Data\": \"\",\r\n \"Print\": \"\",\r\n \"Press ENTER or use arrow keys to navigate\": \"\",\r\n \"Click, tap or press ENTER to open\": \"\",\r\n \"Click, tap or press ENTER to print.\": \"\",\r\n \"Click, tap or press ENTER to export as %1.\": \"\",\r\n 'To save the image, right-click this link and choose \"Save picture as...\"': \"\",\r\n 'To save the image, right-click thumbnail on the left and choose \"Save picture as...\"': \"\",\r\n \"(Press ESC to close this message)\": \"\",\r\n \"Image Export Complete\": \"\",\r\n \"Export operation took longer than expected. Something might have gone wrong.\": \"\",\r\n \"Saved from\": \"\",\r\n \"PNG\": \"\",\r\n \"JPG\": \"\",\r\n \"GIF\": \"\",\r\n \"SVG\": \"\",\r\n \"PDF\": \"\",\r\n \"JSON\": \"\",\r\n \"CSV\": \"\",\r\n \"XLSX\": \"\",\r\n // Scrollbar-related stuff.\r\n // \r\n // Scrollbar is a control which can zoom and pan the axes on the chart.\r\n // \r\n // Each scrollbar has two grips: left or right (for horizontal scrollbar) or\r\n // upper and lower (for vertical one).\r\n // \r\n // Prompts change in relation to whether Scrollbar is vertical or horizontal.\r\n // \r\n // The final section is used to indicate the current range of selection.\r\n \"Use TAB to select grip buttons or left and right arrows to change selection\": \"\",\r\n \"Use left and right arrows to move selection\": \"\",\r\n \"Use left and right arrows to move left selection\": \"\",\r\n \"Use left and right arrows to move right selection\": \"\",\r\n \"Use TAB select grip buttons or up and down arrows to change selection\": \"\",\r\n \"Use up and down arrows to move selection\": \"\",\r\n \"Use up and down arrows to move lower selection\": \"\",\r\n \"Use up and down arrows to move upper selection\": \"\",\r\n \"From %1 to %2\": \"\",\r\n \"From %1\": \"\",\r\n \"To %1\": \"\",\r\n // Data loader-related.\r\n \"No parser available for file: %1\": \"\",\r\n \"Error parsing file: %1\": \"\",\r\n \"Unable to load file: %1\": \"\",\r\n \"Invalid date\": \"\",\r\n // Common actions\r\n \"Close\": \"\",\r\n \"Minimize\": \"\"\r\n};\r\n","/**\r\n * Language module contains everything related to language-specific operations:\r\n * * Translating prompts\r\n * * Translating functions\r\n * * Date format localizations\r\n */\r\nimport { __extends, __read, __spread } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { BaseObjectEvents } from \"../Base\";\r\nimport { Adapter } from \"./Adapter\";\r\nimport * as $array from \"./Array\";\r\nimport * as $type from \"./Type\";\r\nimport en from \"../../../lang/en\";\r\nimport { options } from \"../Options\";\r\n;\r\n;\r\n/**\r\n * Handles all language-related tasks, like loading and storing translations,\r\n * translating prompts, lists of prompts and even functions.\r\n *\r\n * Almost every object in amCharts4 universe will have a `language` property,\r\n * which can be accessed for prompt translation.\r\n *\r\n * @see {@link ILanguageAdapters} for a list of available Adapters\r\n * @todo Make prompt keys case-insensitive\r\n * @important\r\n */\r\nvar Language = /** @class */ (function (_super) {\r\n __extends(Language, _super);\r\n /**\r\n * Constructor\r\n */\r\n function Language() {\r\n var _this = _super.call(this) || this;\r\n /**\r\n * Adapter.\r\n */\r\n _this.adapter = new Adapter(_this);\r\n /**\r\n * Current locale.\r\n */\r\n _this._locale = en;\r\n /**\r\n * Default locale. A locale to fall back to if none is specified, or\r\n * if there's no translation for the prompt for the current language.\r\n */\r\n _this._defaultLocale = en;\r\n _this.className = \"Language\";\r\n // Set default language if necessary\r\n if ($type.hasValue(options.defaultLocale)) {\r\n _this.locale = options.defaultLocale;\r\n }\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * Returns locale that is currently used.\r\n *\r\n * @param locale Force locale. Will use current language if not set.\r\n * @return Locale\r\n */\r\n Language.prototype.getLocale = function (locale) {\r\n if (locale == null) {\r\n locale = this._locale;\r\n }\r\n return this.adapter.apply(\"locale\", {\r\n locale: locale\r\n }).locale;\r\n };\r\n /**\r\n * Returns the translation of the string.\r\n *\r\n * If the translation is empty, it will return untranslated prompt.\r\n *\r\n * Third parameter and up are strings that can be used to replace \"%X\"\r\n * placeholders in prompt.\r\n *\r\n * E.g.:\r\n *\r\n * ```TypeScript\r\n * // Results in \"This is a first translation test\"\r\n * chart.language.translate(\"This is a %1 translation %2\", null, \"first\", \"test\");\r\n * ```\r\n * ```JavaScriptScript\r\n * // Results in \"This is a first translation test\"\r\n * chart.language.translate(\"This is a %1 translation %2\", null, \"first\", \"test\");\r\n * ```\r\n *\r\n * @param prompt A string to translate\r\n * @param locale Force translation into specific locale, e.g. fr_FR\r\n * @param rest Parameters to replace in string\r\n * @return Translation\r\n */\r\n Language.prototype.translate = function (prompt, locale) {\r\n var rest = [];\r\n for (var _i = 2; _i < arguments.length; _i++) {\r\n rest[_i - 2] = arguments[_i];\r\n }\r\n // Get langauge\r\n locale = this.getLocale(locale);\r\n // Init translation\r\n var translation = prompt;\r\n // Get translations for the locale\r\n var translations = this.getTranslations(locale);\r\n var value = translations[prompt];\r\n // Try to look for the translation\r\n if (value === null) {\r\n translation = \"\";\r\n }\r\n else if ($type.hasValue(value)) {\r\n // It might be an empty string\r\n if (value) {\r\n translation = value;\r\n }\r\n }\r\n else if (locale !== this._defaultLocale) {\r\n // Try to look in default language\r\n return this.translate.apply(this, __spread([prompt, this._defaultLocale], rest));\r\n }\r\n // Replace %1, %2, etc params\r\n if (rest.length) {\r\n for (var len = rest.length, i = 0; i < len; ++i) {\r\n translation = translation.split(\"%\" + (i + 1)).join(rest[i]);\r\n }\r\n }\r\n // Return the translation\r\n return this.adapter.apply(\"translate\", {\r\n translation: translation,\r\n locale: locale\r\n }).translation;\r\n };\r\n /**\r\n * Non-type-checked translation.\r\n *\r\n * Can be used by plugins and other code that may have their own non-standard\r\n * translation prompts.\r\n *\r\n * @since 4.5.5\r\n * @param prompt A string to translate\r\n * @param locale Force translation into specific locale, e.g. fr_FR\r\n * @param rest Parameters to replace in string\r\n * @return Translation\r\n */\r\n Language.prototype.translateAny = function (prompt, locale) {\r\n var rest = [];\r\n for (var _i = 2; _i < arguments.length; _i++) {\r\n rest[_i - 2] = arguments[_i];\r\n }\r\n return this.translate.apply(this, __spread([prompt, locale], rest));\r\n };\r\n /**\r\n * Sets a prompt translation.\r\n *\r\n * @since 4.9.35\r\n * @param prompt Prompt in English\r\n * @param translation Translation\r\n * @param locale Locale\r\n */\r\n Language.prototype.setTranslationAny = function (prompt, translation, locale) {\r\n var localeTarget = locale || this.locale;\r\n localeTarget[prompt] = translation;\r\n };\r\n /**\r\n * Translates prompt.\r\n *\r\n * If translation is empty, it will return empty string, which is a different\r\n * behavior than that of regular `translate`.\r\n *\r\n * @param prompt A string to translate\r\n * @param locale Force translation into specific locale, e.g. fr_FR\r\n * @param ...rest Parameters to replace in string\r\n * @return Translation\r\n */\r\n Language.prototype.translateEmpty = function (prompt, locale) {\r\n var rest = [];\r\n for (var _i = 2; _i < arguments.length; _i++) {\r\n rest[_i - 2] = arguments[_i];\r\n }\r\n var translation = this.translate.apply(this, __spread([prompt, locale], rest));\r\n return translation == prompt ? \"\" : translation;\r\n };\r\n /**\r\n * Translates a function.\r\n *\r\n * This method will return a function reference, but will not run it. It's\r\n * up to the caller script to run the function.\r\n *\r\n * @param prompt A function id to translate\r\n * @param locale Force translation into specific locale. e.g. fr_FR\r\n * @return A language-specific version of the function\r\n * @todo Apply adapter\r\n */\r\n Language.prototype.translateFunc = function (prompt, locale) {\r\n // Get langauge\r\n locale = this.getLocale(locale);\r\n // Get translations for the locale\r\n var translations = this.getTranslations(locale);\r\n var value = translations[prompt];\r\n // Try to look for the translation\r\n if (value != null) {\r\n return value;\r\n }\r\n // Try to look in default language\r\n if (locale !== this._defaultLocale) {\r\n return this.translateFunc(prompt, this._defaultLocale);\r\n }\r\n // Fail - return empty function\r\n return function () {\r\n return \"\";\r\n };\r\n };\r\n /**\r\n * Translates a list of prompts in one go.\r\n *\r\n * @param list An array of strings to translate\r\n * @param locale Force translation into specific locale. e.g. fr_FR\r\n * @return An array of translated strings in the same order as source list\r\n */\r\n Language.prototype.translateAll = function (list, locale) {\r\n var _this = this;\r\n // Translate all items in the list\r\n if (!this.isDefault()) {\r\n return $array.map(list, function (x) { return _this.translate(x, locale); });\r\n }\r\n else {\r\n return list;\r\n }\r\n };\r\n /**\r\n * Returns `true` if the currently selected locale is a default locale.\r\n *\r\n * @return `true` if locale is default; `false` if it is not.\r\n */\r\n Language.prototype.isDefault = function () {\r\n return this._defaultLocale === this._locale;\r\n };\r\n Object.defineProperty(Language.prototype, \"locale\", {\r\n /**\r\n * @return Locale definition\r\n */\r\n get: function () {\r\n return this._locale;\r\n },\r\n /**\r\n * Current locale.\r\n *\r\n * @param value Locale definition (translations)\r\n */\r\n set: function (value) {\r\n if (this._locale != value) {\r\n this._locale = value;\r\n if (this.events.isEnabled(\"localechanged\")) {\r\n var event_1 = {\r\n type: \"localechanged\",\r\n locale: value,\r\n target: this\r\n };\r\n this.events.dispatchImmediately(\"localechanged\", event_1);\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Returns translations for a given locale.\r\n *\r\n * @ignore\r\n * @deprecated\r\n * @param locale Locale\r\n * @return Translations\r\n */\r\n Language.prototype.getTranslations = function (locale) {\r\n return this.adapter.apply(\"translations\", {\r\n translations: locale,\r\n locale: locale\r\n }).translations;\r\n };\r\n return Language;\r\n}(BaseObjectEvents));\r\nexport { Language };\r\n","import { __extends, __generator } from \"tslib\";\r\nimport { Disposer, MultiDisposer } from \"./Disposer\";\r\nimport { EventDispatcher } from \"./EventDispatcher\";\r\nimport * as $array from \"./Array\";\r\nimport * as $iter from \"./Iterator\";\r\n/**\r\n * @todo Description\r\n */\r\nvar IndexedIterable = /** @class */ (function () {\r\n /**\r\n * Constructor.\r\n *\r\n * @param array List items\r\n * @param start Start index\r\n * @param end End index\r\n */\r\n function IndexedIterable(array, start, end) {\r\n this._array = array;\r\n this._start = start;\r\n this._end = end;\r\n }\r\n /**\r\n * Returns a list item iterator.\r\n *\r\n * @return Iterator\r\n */\r\n IndexedIterable.prototype.iterator = function () {\r\n var _this = this;\r\n return function (push) {\r\n if (_this._start !== _this._end) {\r\n if (_this._start < _this._end) {\r\n for (var i = _this._start; i < _this._end; ++i) {\r\n if (!push(_this._array[i])) {\r\n break;\r\n }\r\n }\r\n }\r\n else {\r\n for (var i = _this._start - 1; i >= _this._end; --i) {\r\n if (!push(_this._array[i])) {\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n };\r\n };\r\n /**\r\n * Returns an interable list sorted backwards than current list.\r\n *\r\n * @return List\r\n */\r\n IndexedIterable.prototype.backwards = function () {\r\n return new IndexedIterable(this._array, this._end, this._start);\r\n };\r\n /**\r\n * Returns a new list consisting only of specific range of items between\r\n * `start` and `end` indexes.\r\n *\r\n * @param start Start index\r\n * @param end End index\r\n * @return List\r\n */\r\n IndexedIterable.prototype.range = function (start, end) {\r\n if (start <= end) {\r\n if (this._start === this._end) {\r\n return this;\r\n }\r\n else if (this._start < this._end) {\r\n var diff = end - start;\r\n start = Math.max(this._start + start, this._start);\r\n end = Math.min(start + diff, this._end);\r\n return new IndexedIterable(this._array, start, end);\r\n }\r\n else {\r\n var diff = end - start;\r\n start = Math.max(this._start - start, this._end);\r\n end = Math.max(start - diff, this._end);\r\n return new IndexedIterable(this._array, start, end);\r\n }\r\n }\r\n else {\r\n throw new Error(\"Start index must be lower than end index\");\r\n }\r\n };\r\n return IndexedIterable;\r\n}());\r\nexport { IndexedIterable };\r\n/**\r\n * ListGrouper organizes [[List]] items into groups.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\nvar ListGrouper = /** @class */ (function (_super) {\r\n __extends(ListGrouper, _super);\r\n /**\r\n * Constructor.\r\n */\r\n function ListGrouper(list, getKey, sort) {\r\n var _this = _super.call(this, [\r\n list.events.on(\"inserted\", function (x) {\r\n var value = x.newValue;\r\n var key = _this._getKey(value);\r\n var index = 0;\r\n $iter.eachContinue(list.iterator(), function (x) {\r\n if (x === value) {\r\n return false;\r\n }\r\n else if (_this._getKey(x) === key) {\r\n ++index;\r\n }\r\n return true;\r\n });\r\n _this._insert(value, key, index);\r\n }, undefined, false),\r\n list.events.on(\"removed\", function (x) {\r\n _this._remove(x.oldValue);\r\n }, undefined, false)\r\n ]) || this;\r\n /**\r\n * Grouping keys.\r\n */\r\n _this._keys = [];\r\n /**\r\n * List item groups.\r\n */\r\n _this._groups = {};\r\n _this._getKey = getKey;\r\n _this._sort = sort;\r\n $iter.each(list.iterator(), function (x) {\r\n _this._insert(x, getKey(x));\r\n });\r\n return _this;\r\n }\r\n /**\r\n * Inserts an item (`x`) to a specific group (`key`) and specific `index`.\r\n *\r\n * @param x Item\r\n * @param key Group name\r\n * @param index Index\r\n */\r\n ListGrouper.prototype._insert = function (x, key, index) {\r\n if (this._groups[key] == null) {\r\n this._groups[key] = [];\r\n // TODO code duplication with SortedList\r\n var _a = $array.getSortedIndex(this._keys, this._sort, key), found = _a.found, index_1 = _a.index;\r\n if (found) {\r\n throw new Error(\"Key already exists: \" + key);\r\n }\r\n else {\r\n $array.insertIndex(this._keys, index_1, key);\r\n }\r\n }\r\n if (index == null) {\r\n this._groups[key].push(x);\r\n }\r\n else {\r\n $array.insertIndex(this._groups[key], index, x);\r\n }\r\n };\r\n /**\r\n * Removes an item from the list.\r\n *\r\n * @param x Item to remove\r\n */\r\n ListGrouper.prototype._remove = function (x) {\r\n var key = this._getKey(x);\r\n var values = this._groups[key];\r\n if (values != null) {\r\n $array.remove(values, x);\r\n if (values.length === 0) {\r\n delete this._groups[key];\r\n var _a = $array.getSortedIndex(this._keys, this._sort, key), found = _a.found, index = _a.index;\r\n if (found) {\r\n $array.removeIndex(this._keys, index);\r\n }\r\n else {\r\n throw new Error(\"Key doesn't exist: \" + key);\r\n }\r\n }\r\n }\r\n };\r\n /**\r\n * Returns an iterator for the list.\r\n *\r\n * The iterator will iterate through all items in all groups.\r\n *\r\n * @return Iterator\r\n */\r\n ListGrouper.prototype.iterator = function () {\r\n var _this = this;\r\n return $iter.flatten($iter.map($iter.fromArray(this._keys), function (key) {\r\n return $iter.fromArray(_this._groups[key]);\r\n }));\r\n };\r\n return ListGrouper;\r\n}(MultiDisposer));\r\nexport { ListGrouper };\r\n/**\r\n * A disposable list, which when disposed itself will call `dispose()` method\r\n * on all its items.\r\n */\r\nvar ListDisposer = /** @class */ (function (_super) {\r\n __extends(ListDisposer, _super);\r\n function ListDisposer(list, disposeOnRemove) {\r\n if (disposeOnRemove === void 0) { disposeOnRemove = true; }\r\n var _this = this;\r\n if (disposeOnRemove) {\r\n var disposer_1 = list.events.on(\"removed\", function (x) {\r\n x.oldValue.dispose();\r\n }, undefined, false);\r\n _this = _super.call(this, function () {\r\n disposer_1.dispose();\r\n // TODO clear the list ?\r\n $iter.each(list.iterator(), function (x) {\r\n x.dispose();\r\n });\r\n }) || this;\r\n }\r\n else {\r\n _this = _super.call(this, function () {\r\n // TODO clear the list ?\r\n $iter.each(list.iterator(), function (x) {\r\n x.dispose();\r\n });\r\n }) || this;\r\n }\r\n return _this;\r\n }\r\n return ListDisposer;\r\n}(Disposer));\r\nexport { ListDisposer };\r\n/**\r\n * Checks if specific index fits into length.\r\n *\r\n * @param index Index\r\n * @param len Length\r\n */\r\nfunction checkBounds(index, len) {\r\n if (!(index >= 0 && index < len)) {\r\n throw new Error(\"Index out of bounds: \" + index);\r\n }\r\n}\r\n/**\r\n * A List class is used to hold a number of indexed items of the same type.\r\n */\r\nvar List = /** @class */ (function () {\r\n /**\r\n * Constructor\r\n *\r\n * @param initial Inital list of values to add to list\r\n */\r\n function List(initial) {\r\n if (initial === void 0) { initial = []; }\r\n /**\r\n * Event dispatcher.\r\n */\r\n this.events = new EventDispatcher();\r\n this._values = initial;\r\n }\r\n Object.defineProperty(List.prototype, \"values\", {\r\n /**\r\n * An array of values in the list.\r\n *\r\n * Do not use this property to add values. Rather use dedicated methods, like\r\n * `push()`, `removeIndex()`, etc.\r\n *\r\n * @readonly\r\n * @return List values\r\n */\r\n get: function () {\r\n return this._values;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Checks if list contains specific item reference.\r\n *\r\n * @param item Item to search for\r\n * @return `true` if found, `false` if not found\r\n */\r\n List.prototype.contains = function (value) {\r\n return this._values.indexOf(value) !== -1;\r\n };\r\n /**\r\n * Removes specific item from the list.\r\n *\r\n * @param item An item to remove\r\n */\r\n List.prototype.removeValue = function (value) {\r\n var i = 0;\r\n var length = this._values.length;\r\n while (i < length) {\r\n // TODO handle NaN\r\n if (this._values[i] === value) {\r\n this.removeIndex(i);\r\n --length;\r\n }\r\n else {\r\n ++i;\r\n }\r\n }\r\n };\r\n /**\r\n * Searches the list for specific item and returns its index.\r\n *\r\n * @param item An item to search for\r\n * @return Index or -1 if not found\r\n */\r\n List.prototype.indexOf = function (value) {\r\n return $array.indexOf(this._values, value);\r\n };\r\n Object.defineProperty(List.prototype, \"length\", {\r\n /**\r\n * Number of items in list.\r\n *\r\n * @readonly\r\n * @return Number of items\r\n */\r\n get: function () {\r\n return this._values.length;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Checks if there's a value at specific index.\r\n *\r\n * @param index Index\r\n * @return Value exists?\r\n */\r\n List.prototype.hasIndex = function (index) {\r\n return index >= 0 && index < this._values.length;\r\n };\r\n /**\r\n * Returns an item at specified index.\r\n *\r\n * @param index Index\r\n * @return List item\r\n */\r\n List.prototype.getIndex = function (index) {\r\n return this._values[index];\r\n };\r\n /**\r\n * Sets value at specific index.\r\n *\r\n * If there's already a value at the index, it is overwritten.\r\n *\r\n * @param index Index\r\n * @param value New value\r\n * @return New value\r\n */\r\n List.prototype.setIndex = function (index, value) {\r\n checkBounds(index, this._values.length);\r\n var oldValue = this._values[index];\r\n // Do nothing if the old value and the new value are the same\r\n if (oldValue !== value) {\r\n this._values[index] = value;\r\n if (this.events.isEnabled(\"setIndex\")) {\r\n this.events.dispatchImmediately(\"setIndex\", {\r\n type: \"setIndex\",\r\n target: this,\r\n index: index,\r\n oldValue: oldValue,\r\n newValue: value\r\n });\r\n }\r\n if (this.events.isEnabled(\"removed\")) {\r\n this.events.dispatchImmediately(\"removed\", {\r\n type: \"removed\",\r\n target: this,\r\n oldValue: oldValue\r\n });\r\n }\r\n if (this.events.isEnabled(\"inserted\")) {\r\n this.events.dispatchImmediately(\"inserted\", {\r\n type: \"inserted\",\r\n target: this,\r\n newValue: value\r\n });\r\n }\r\n }\r\n return oldValue;\r\n };\r\n /**\r\n * Adds an item to the list at a specific index, which pushes all the other\r\n * items further down the list.\r\n *\r\n * @param index Index\r\n * @param item An item to add\r\n */\r\n List.prototype.insertIndex = function (index, value) {\r\n checkBounds(index, this._values.length + 1);\r\n $array.insertIndex(this._values, index, value);\r\n if (this.events.isEnabled(\"insertIndex\")) {\r\n this.events.dispatchImmediately(\"insertIndex\", {\r\n type: \"insertIndex\",\r\n target: this,\r\n index: index,\r\n newValue: value\r\n });\r\n }\r\n if (this.events.isEnabled(\"inserted\")) {\r\n this.events.dispatchImmediately(\"inserted\", {\r\n type: \"inserted\",\r\n target: this,\r\n newValue: value\r\n });\r\n }\r\n };\r\n /**\r\n * [_sortQuicksort description]\r\n *\r\n * @todo Description\r\n * @param low [description]\r\n * @param high [description]\r\n * @param order [description]\r\n */\r\n List.prototype._sortQuicksort = function (low, high, order) {\r\n if (low < high) {\r\n var p = this._sortPartition(low, high, order);\r\n this._sortQuicksort(low, p, order);\r\n this._sortQuicksort(p + 1, high, order);\r\n }\r\n };\r\n /**\r\n * [_sortPartition description]\r\n *\r\n * @todo Description\r\n * @param low [description]\r\n * @param high [description]\r\n * @param order [description]\r\n * @return [description]\r\n */\r\n List.prototype._sortPartition = function (low, high, order) {\r\n var values = this._values;\r\n var pivot = values[low];\r\n var i = low - 1;\r\n var j = high + 1;\r\n for (;;) {\r\n do {\r\n ++i;\r\n } while (order(values[i], pivot) < 0);\r\n do {\r\n --j;\r\n } while (order(values[j], pivot) > 0);\r\n if (i >= j) {\r\n return j;\r\n }\r\n else {\r\n this.swap(i, j);\r\n }\r\n }\r\n };\r\n /**\r\n * Reorders list items according to specific ordering function.\r\n *\r\n * @param order Ordering function\r\n */\r\n List.prototype.sort = function (order) {\r\n // https://en.wikipedia.org/wiki/Quicksort#Hoare_partition_scheme\r\n // @todo faster implementation of this\r\n // @todo test this\r\n this._sortQuicksort(0, this._values.length - 1, order);\r\n };\r\n /**\r\n * Swaps indexes of two items in the list.\r\n *\r\n * @param a Item 1\r\n * @param b Item 2\r\n */\r\n List.prototype.swap = function (a, b) {\r\n var len = this._values.length;\r\n checkBounds(a, len);\r\n checkBounds(b, len);\r\n if (a !== b) {\r\n var value_a = this._values[a];\r\n var value_b = this._values[b];\r\n this._values[a] = value_b;\r\n if (this.events.isEnabled(\"setIndex\")) {\r\n this.events.dispatchImmediately(\"setIndex\", {\r\n type: \"setIndex\",\r\n target: this,\r\n index: a,\r\n oldValue: value_a,\r\n newValue: value_b\r\n });\r\n }\r\n this._values[b] = value_a;\r\n if (this.events.isEnabled(\"setIndex\")) {\r\n this.events.dispatchImmediately(\"setIndex\", {\r\n type: \"setIndex\",\r\n target: this,\r\n index: b,\r\n oldValue: value_b,\r\n newValue: value_a\r\n });\r\n }\r\n }\r\n };\r\n /**\r\n * Removes a value at specific index.\r\n *\r\n * @param index Index of value to remove\r\n * @return Removed value\r\n */\r\n List.prototype.removeIndex = function (index) {\r\n checkBounds(index, this._values.length);\r\n var oldValue = this._values[index];\r\n $array.removeIndex(this._values, index);\r\n if (this.events.isEnabled(\"removeIndex\")) {\r\n this.events.dispatchImmediately(\"removeIndex\", {\r\n type: \"removeIndex\",\r\n target: this,\r\n index: index,\r\n oldValue: oldValue\r\n });\r\n }\r\n if (this.events.isEnabled(\"removed\")) {\r\n this.events.dispatchImmediately(\"removed\", {\r\n type: \"removed\",\r\n target: this,\r\n oldValue: oldValue\r\n });\r\n }\r\n return oldValue;\r\n };\r\n /**\r\n * Moves an item to a specific index within the list.\r\n *\r\n * If the index is not specified it will move the item to the end of the\r\n * list.\r\n *\r\n * @param value Item to move\r\n * @param index Index to place item at\r\n */\r\n List.prototype.moveValue = function (value, toIndex) {\r\n // TODO don't do anything if the desired index is the same as the current index\r\n var index = this.indexOf(value);\r\n // TODO remove all old values rather than only the first ?\r\n if (index !== -1) {\r\n var oldValue = this._values[index];\r\n $array.removeIndex(this._values, index);\r\n if (this.events.isEnabled(\"removeIndex\")) {\r\n this.events.dispatchImmediately(\"removeIndex\", {\r\n type: \"removeIndex\",\r\n target: this,\r\n index: index,\r\n oldValue: oldValue\r\n });\r\n }\r\n }\r\n if (toIndex == null) {\r\n toIndex = this._values.length;\r\n this._values.push(value);\r\n }\r\n else {\r\n $array.insertIndex(this._values, toIndex, value);\r\n }\r\n if (this.events.isEnabled(\"insertIndex\")) {\r\n this.events.dispatchImmediately(\"insertIndex\", {\r\n type: \"insertIndex\",\r\n target: this,\r\n index: toIndex,\r\n newValue: value\r\n });\r\n }\r\n if (index === -1) {\r\n if (this.events.isEnabled(\"inserted\")) {\r\n this.events.dispatchImmediately(\"inserted\", {\r\n type: \"inserted\",\r\n target: this,\r\n newValue: value\r\n });\r\n }\r\n }\r\n };\r\n /**\r\n * Adds an item to the end of the list.\r\n *\r\n * @param item An item to add\r\n */\r\n List.prototype.push = function (value) {\r\n var index = this._values.push(value) - 1;\r\n if (this.events.isEnabled(\"insertIndex\")) {\r\n this.events.dispatchImmediately(\"insertIndex\", {\r\n type: \"insertIndex\",\r\n target: this,\r\n index: index,\r\n newValue: value\r\n });\r\n }\r\n if (this.events.isEnabled(\"inserted\")) {\r\n this.events.dispatchImmediately(\"inserted\", {\r\n type: \"inserted\",\r\n target: this,\r\n newValue: value\r\n });\r\n }\r\n return value;\r\n };\r\n /**\r\n * Adds an item as a first item in the list.\r\n *\r\n * @param item An item to add\r\n */\r\n List.prototype.unshift = function (value) {\r\n this.insertIndex(0, value);\r\n };\r\n /**\r\n * Adds multiple items to the list.\r\n *\r\n * @param items An Array of items to add\r\n */\r\n List.prototype.pushAll = function (values) {\r\n var _this = this;\r\n $array.each(values, function (value) {\r\n _this.push(value);\r\n });\r\n };\r\n /**\r\n * Copies and adds items from abother list.\r\n *\r\n * @param source A list top copy items from\r\n */\r\n List.prototype.copyFrom = function (source) {\r\n this.pushAll(source._values);\r\n };\r\n /**\r\n * Returns the last item from the list, and removes it.\r\n *\r\n * @return Item\r\n */\r\n List.prototype.pop = function () {\r\n var index = this._values.length - 1;\r\n return index < 0 ? undefined : this.removeIndex(this._values.length - 1);\r\n };\r\n /**\r\n * Returns the first item from the list, and removes it.\r\n *\r\n * @return Item\r\n */\r\n List.prototype.shift = function () {\r\n return this._values.length ? this.removeIndex(0) : undefined;\r\n };\r\n /**\r\n * Sets multiple items to the list.\r\n *\r\n * All current items are removed.\r\n *\r\n * @param newArray New items\r\n */\r\n List.prototype.setAll = function (newArray) {\r\n var _this = this;\r\n // @tod if a value exists in both the new and old arrays, don't send remove/insert events\r\n var oldArray = $array.copy(this._values);\r\n this._values.length = 0;\r\n $array.each(newArray, function (value) {\r\n _this._values.push(value);\r\n });\r\n if (this.events.isEnabled(\"setAll\")) {\r\n this.events.dispatchImmediately(\"setAll\", {\r\n type: \"setAll\",\r\n target: this,\r\n oldArray: oldArray,\r\n newArray: this._values // TODO make a copy ?\r\n });\r\n }\r\n if (this.events.isEnabled(\"removed\")) {\r\n $array.each(oldArray, function (x) {\r\n _this.events.dispatchImmediately(\"removed\", {\r\n type: \"removed\",\r\n target: _this,\r\n oldValue: x\r\n });\r\n });\r\n }\r\n if (this.events.isEnabled(\"inserted\")) {\r\n $array.each(this._values, function (x) {\r\n _this.events.dispatchImmediately(\"inserted\", {\r\n type: \"inserted\",\r\n target: _this,\r\n newValue: x\r\n });\r\n });\r\n }\r\n };\r\n /**\r\n * Removes all items from the list.\r\n */\r\n List.prototype.clear = function () {\r\n this.setAll([]);\r\n };\r\n /**\r\n * Returns a list iterator.\r\n *\r\n * @return Iterator\r\n */\r\n List.prototype.iterator = function () {\r\n return $iter.fromArray(this._values);\r\n };\r\n /**\r\n * Returns an ES6 iterator for the list.\r\n */\r\n List.prototype[Symbol.iterator] = function () {\r\n var length, i;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n length = this._values.length;\r\n i = 0;\r\n _a.label = 1;\r\n case 1:\r\n if (!(i < length)) return [3 /*break*/, 4];\r\n return [4 /*yield*/, this._values[i]];\r\n case 2:\r\n _a.sent();\r\n _a.label = 3;\r\n case 3:\r\n ++i;\r\n return [3 /*break*/, 1];\r\n case 4: return [2 /*return*/];\r\n }\r\n });\r\n };\r\n /**\r\n * Calls `f` for each element in the list.\r\n *\r\n * `f` should have at least one parameter defined which will get a current\r\n * item, with optional second argument - index.\r\n */\r\n List.prototype.each = function (f) {\r\n $array.each(this._values, f);\r\n };\r\n /**\r\n * Returns a specific range of list items, which can be iterated.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Code duplication with IndexedIterable\r\n * @param start Start index\r\n * @param end End index\r\n * @return Range\r\n */\r\n List.prototype.range = function (start, end) {\r\n if (start <= end) {\r\n var diff = end - start;\r\n start = Math.max(start, 0);\r\n end = Math.min(start + diff, this._values.length);\r\n return new IndexedIterable(this._values, start, end);\r\n }\r\n else {\r\n throw new Error(\"Start index must be lower than end index\");\r\n }\r\n };\r\n /**\r\n * Returns an iterator that has list items sorted backwards.\r\n *\r\n * @ignore Exclude from docs\r\n * @return List\r\n */\r\n List.prototype.backwards = function () {\r\n return new IndexedIterable(this._values, this._values.length, 0);\r\n };\r\n return List;\r\n}());\r\nexport { List };\r\n/**\r\n * A version of a [[List]] that has a \"template\".\r\n *\r\n * A template is an instance of an object, that can be used to create new\r\n * elements in the list without actually needing to create instances for those.\r\n *\r\n * When new element is created in the list, e.g. by calling its `create()`\r\n * method, an exact copy of the element is created (including properties and\r\n * other attributes), inserted into the list and returned.\r\n */\r\nvar ListTemplate = /** @class */ (function (_super) {\r\n __extends(ListTemplate, _super);\r\n /**\r\n * Constructor\r\n *\r\n * @param t Template object\r\n */\r\n function ListTemplate(t) {\r\n var _this = _super.call(this) || this;\r\n _this.template = t;\r\n return _this;\r\n }\r\n Object.defineProperty(ListTemplate.prototype, \"template\", {\r\n /**\r\n * @return Template object\r\n */\r\n get: function () {\r\n return this._template;\r\n },\r\n /**\r\n * A \"template\" object to copy all properties from when creating new list\r\n * items.\r\n *\r\n * @param v Template object\r\n */\r\n set: function (v) {\r\n v.isTemplate = true;\r\n this._template = v;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Copies all elements from other list.\r\n *\r\n * @param source Source list\r\n */\r\n ListTemplate.prototype.copyFrom = function (source) {\r\n var _this = this;\r\n $iter.each(source.iterator(), function (value) {\r\n _this.push(value.clone());\r\n });\r\n };\r\n ListTemplate.prototype.create = function (make) {\r\n var clone = (make != null\r\n ? new make()\r\n : this.template.clone());\r\n this.push(clone);\r\n return clone;\r\n };\r\n /**\r\n * Creates an exact clone of the list, including its items and template.\r\n *\r\n * @return New list\r\n */\r\n ListTemplate.prototype.clone = function () {\r\n var out = new ListTemplate(this.template);\r\n var values = this.values;\r\n var length = values.length;\r\n for (var i = 0; i < length; ++i) {\r\n out.push(values[i].clone());\r\n }\r\n return out;\r\n };\r\n return ListTemplate;\r\n}(List));\r\nexport { ListTemplate };\r\n","import { __read, __spread } from \"tslib\";\r\nimport { options } from \"../Options\";\r\n/**\r\n * Outputs string to console if `verbose` is `true`.\r\n */\r\nexport function log() {\r\n var messages = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n messages[_i] = arguments[_i];\r\n }\r\n if (options.verbose) {\r\n if (console) {\r\n console.log.apply(console, __spread(messages));\r\n }\r\n }\r\n}\r\n/**\r\n * Outputs a warning to the console.\r\n */\r\nexport function warn() {\r\n var messages = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n messages[_i] = arguments[_i];\r\n }\r\n if (!options.suppressWarnings) {\r\n if (console) {\r\n console.warn.apply(console, __spread(messages));\r\n }\r\n }\r\n}\r\n","/**\r\n * A collection of Math-related functions\r\n *\r\n * @todo Comment trigonometric functions?\r\n */\r\nimport * as $type from \"./Type\";\r\n/**\r\n * ============================================================================\r\n * CONSTANTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nexport var PI = Math.PI;\r\nexport var HALFPI = PI / 2;\r\nexport var RADIANS = PI / 180;\r\nexport var DEGREES = 180 / PI;\r\n/**\r\n * Converts any value and fits it into a specific value range.\r\n *\r\n * @param value Source value\r\n * @param min Minimum allowable value\r\n * @param max Maximum allowable value\r\n * @return Number\r\n */\r\nexport function toNumberRange(value, min, max) {\r\n if ($type.hasValue(value)) {\r\n value = $type.toNumber(value);\r\n return fitToRange(value, min, max);\r\n }\r\n return value;\r\n}\r\n/**\r\n * Rounds the numeric value to whole number or specific precision of set.\r\n *\r\n * @param value Value\r\n * @param precision Precision (number of decimal points)\r\n * @param floor In case value ends with 0.5 and precision is 0, we might need to floor the value instead of ceiling it.\r\n * @return Rounded value\r\n */\r\nexport function round(value, precision, floor) {\r\n if (!$type.isNumber(precision) || precision <= 0) {\r\n var rounded = Math.round(value);\r\n if (floor) {\r\n if (rounded - value == 0.5) {\r\n rounded--;\r\n }\r\n }\r\n return rounded;\r\n }\r\n else {\r\n var d = Math.pow(10, precision);\r\n return Math.round(value * d) / d;\r\n }\r\n}\r\n/**\r\n * Ceils the numeric value to whole number or specific precision of set.\r\n *\r\n * @param value Value\r\n * @param precision Precision (number of decimal points)\r\n * @return Rounded value\r\n */\r\nexport function ceil(value, precision) {\r\n if (!$type.isNumber(precision) || precision <= 0) {\r\n return Math.ceil(value);\r\n }\r\n else {\r\n var d = Math.pow(10, precision);\r\n return Math.ceil(value * d) / d;\r\n }\r\n}\r\n/**\r\n * Stretches `t` so that it will always be between `from` and `to`.\r\n *\r\n * @param t Number from 0 to 1\r\n * @param from Lowest possible value\r\n * @param to Highest possible value\r\n * @return Adjusted value\r\n */\r\nexport function stretch(t, from, to) {\r\n return (t * (to - from)) + from;\r\n}\r\n/**\r\n * Adjust numeric value so it fits to specific value range.\r\n *\r\n * @param value Value\r\n * @param minValue Lowest possible value\r\n * @param maxValue Highest possible value\r\n * @return Adjusted value\r\n */\r\nexport function fitToRange(value, minValue, maxValue) {\r\n if ($type.isNumber(minValue)) {\r\n if ($type.isNumber(maxValue) && maxValue < minValue) {\r\n var temp = maxValue;\r\n maxValue = minValue;\r\n minValue = temp;\r\n }\r\n if (value < minValue) {\r\n value = minValue;\r\n }\r\n }\r\n if ($type.isNumber(maxValue)) {\r\n if (value > maxValue) {\r\n value = maxValue;\r\n }\r\n }\r\n return value;\r\n}\r\n/**\r\n * Returns sine of a number.\r\n *\r\n * @param value Value\r\n * @return Sine\r\n */\r\nexport function sin(value) {\r\n return round(Math.sin(RADIANS * value), 10);\r\n}\r\n/**\r\n * Returns tan of a number.\r\n *\r\n * @param value Value\r\n * @return Sine\r\n */\r\nexport function tan(value) {\r\n return round(Math.tan(RADIANS * value), 10);\r\n}\r\n/**\r\n * Returns cosine of a number.\r\n *\r\n * @param value Value\r\n * @return Cosine\r\n */\r\nexport function cos(value) {\r\n return round(Math.cos(RADIANS * value), 10);\r\n}\r\nexport function max(left, right) {\r\n if ($type.isNumber(left)) {\r\n if ($type.isNumber(right)) {\r\n if (right > left) {\r\n return right;\r\n }\r\n else {\r\n return left;\r\n }\r\n }\r\n else {\r\n return left;\r\n }\r\n }\r\n else if ($type.isNumber(right)) {\r\n return right;\r\n }\r\n else {\r\n return null;\r\n }\r\n}\r\nexport function min(left, right) {\r\n if ($type.isNumber(left)) {\r\n if ($type.isNumber(right)) {\r\n if (right < left) {\r\n return right;\r\n }\r\n else {\r\n return left;\r\n }\r\n }\r\n else {\r\n return left;\r\n }\r\n }\r\n else if ($type.isNumber(right)) {\r\n return right;\r\n }\r\n else {\r\n return null;\r\n }\r\n}\r\n/**\r\n * Returns the closest value from the array of values to the reference value.\r\n *\r\n * @param values Array of values\r\n * @param value Reference value\r\n * @return Closes value from the array\r\n */\r\nexport function closest(values, referenceValue) {\r\n return values.reduce(function (prev, curr) {\r\n return (Math.abs(curr - referenceValue) < Math.abs(prev - referenceValue) ? curr : prev);\r\n });\r\n}\r\n/**\r\n * Checks whether two ranges of values intersect.\r\n *\r\n * @param range1 Range 1\r\n * @param range2 Range 2\r\n * @return Any intersecting numbers?\r\n */\r\nexport function intersect(range1, range2) {\r\n var start1 = $type.getValue(range1.start);\r\n var start2 = $type.getValue(range2.start);\r\n var end1 = $type.getValue(range1.end);\r\n var end2 = $type.getValue(range2.end);\r\n return Math.max(start1, start2) <= Math.min(end1, end2);\r\n}\r\n/**\r\n * Inverts the range of values.\r\n *\r\n * @param range Range\r\n */\r\nexport function invertRange(range) {\r\n var start = $type.getValue(range.start);\r\n var end = $type.getValue(range.end);\r\n return { start: 1 - end, end: 1 - start };\r\n}\r\n/**\r\n * Returns an intersection range between two ranges of values.\r\n *\r\n * @param range1 Range 1\r\n * @param range2 Range 2\r\n * @return Intersecting value range\r\n */\r\nexport function intersection(range1, range2) {\r\n var start1 = $type.getValue(range1.start);\r\n var start2 = $type.getValue(range2.start);\r\n var end1 = $type.getValue(range1.end);\r\n var end2 = $type.getValue(range2.end);\r\n var startMax = Math.max(start1, start2);\r\n var endMin = Math.min(end1, end2);\r\n if (endMin < startMax) {\r\n return undefined;\r\n }\r\n else {\r\n return { start: startMax, end: endMin };\r\n }\r\n}\r\n/**\r\n * Returns pixel \"distance\" between two points.\r\n *\r\n * If second point is not specified, distance from {x:0, y:0} point is\r\n * calculated.\r\n *\r\n * @param point1 Point 1\r\n * @param point2 Point 2\r\n * @return Distance in relative pixels\r\n */\r\nexport function getDistance(point1, point2) {\r\n if (!point1) {\r\n return 0;\r\n }\r\n if (!point2) {\r\n point2 = { x: 0, y: 0 };\r\n }\r\n return Math.sqrt(Math.pow(Math.abs(point1.x - point2.x), 2) + Math.pow(Math.abs(point1.y - point2.y), 2));\r\n}\r\n/**\r\n * Returns pixel \"horizontal distance\" between two points.\r\n *\r\n * If second point is not specified, distance from {x:0, y:0} point is\r\n * calculated.\r\n *\r\n * @param point1 Point 1\r\n * @param point2 Point 2\r\n * @return Distance in relative pixels\r\n */\r\nexport function getHorizontalDistance(point1, point2) {\r\n if (!point1) {\r\n return 0;\r\n }\r\n if (!point2) {\r\n point2 = { x: 0, y: 0 };\r\n }\r\n return Math.abs(point1.x - point2.x);\r\n}\r\n/**\r\n * Returns pixel \"vertical distance\" between two points.\r\n *\r\n * If second point is not specified, distance from {x:0, y:0} point is\r\n * calculated.\r\n *\r\n * @param point1 Point 1\r\n * @param point2 Point 2\r\n * @return Distance in relative pixels\r\n */\r\nexport function getVerticalDistance(point1, point2) {\r\n if (!point1) {\r\n return 0;\r\n }\r\n if (!point2) {\r\n point2 = { x: 0, y: 0 };\r\n }\r\n return Math.abs(point1.y - point2.y);\r\n}\r\n/**\r\n * Returns approximate pixel \"distance\" between two points of cubic curve\r\n *\r\n * If second point is not specified, distance from {x:0, y:0} point is\r\n * calculated.\r\n *\r\n * @param point1 Point 1\r\n * @param point2 Point 2\r\n * @param controlPointA Control Point 1\r\n * @param controlPointB Control Point 2\r\n * @param stepCount number of steps (the more, the more accurate result)\r\n * @return Distance in relative pixels\r\n */\r\nexport function getCubicCurveDistance(point1, point2, controlPointA, controlPointB, stepCount) {\r\n if (!point1) {\r\n return 0;\r\n }\r\n if (!point2) {\r\n point2 = { x: 0, y: 0 };\r\n }\r\n var distance = 0;\r\n var prevPoint = point1;\r\n if (stepCount > 0) {\r\n for (var s = 0; s <= stepCount; s++) {\r\n var point = getPointOnCubicCurve(point1, point2, controlPointA, controlPointB, s / stepCount);\r\n distance += getDistance(prevPoint, point);\r\n prevPoint = point;\r\n }\r\n }\r\n return distance;\r\n}\r\n/**\r\n * Returns scale based on original and end position of the two points.\r\n *\r\n * @param point1 Current position of point 1\r\n * @param startPoint1 Start position of point 1\r\n * @param point2 Current position of point 1\r\n * @param startPoint2 Start position of point 2\r\n * @return Scale Calculated scale\r\n */\r\nexport function getScale(point1, startPoint1, point2, startPoint2) {\r\n var initialDistance = getDistance(startPoint1, startPoint2);\r\n var currentDistance = getDistance(point1, point2);\r\n return Math.abs(currentDistance / initialDistance);\r\n}\r\n/**\r\n * Returns an exact mid point between two points.\r\n *\r\n * @param point1 Position of point 1\r\n * @param point2 Position of point 2\r\n * @return Mid point Position of mid-point\r\n */\r\nexport function getMidPoint(point1, point2, position) {\r\n if (!$type.isNumber(position)) {\r\n position = 0.5;\r\n }\r\n return {\r\n \"x\": (point1.x + (point2.x - point1.x) * position),\r\n \"y\": (point1.y + (point2.y - point1.y) * position)\r\n };\r\n}\r\n/**\r\n * Returns difference in angles between starting and ending position of two\r\n * vectors.\r\n *\r\n * @param point1 Current position of point 1\r\n * @param startPoint1 Start position of point 1\r\n * @param point2 Current position of point 1\r\n * @param startPoint2 Start position of point 2\r\n * @return Angle difference in degrees\r\n */\r\nexport function getRotation(point1, startPoint1, point2, startPoint2) {\r\n // Get start and end angles\r\n var startAngle = getAngle(startPoint1, startPoint2);\r\n var angle = getAngle(point1, point2);\r\n // Calculate angle\r\n var diff = startAngle - angle;\r\n if (diff < 0) {\r\n diff += 360;\r\n }\r\n return diff;\r\n}\r\n/**\r\n * Calculates angle of the vector based on two or one point.\r\n *\r\n * @param point1 Point 1\r\n * @param point2 Point 2\r\n * @return Angle in degrees\r\n */\r\nexport function getAngle(point1, point2) {\r\n if (!point2) {\r\n point2 = { x: point1.x * 2, y: point1.y * 2 };\r\n }\r\n var diffX = point2.x - point1.x;\r\n var diffY = point2.y - point1.y;\r\n var angle = Math.atan2(diffY, diffX) * DEGREES;\r\n if (angle < 0) {\r\n angle += 360;\r\n }\r\n return normalizeAngle(angle);\r\n}\r\n/**\r\n * Returns the shift in coordinates of the center when item is rotated, moved\r\n * and scaled at the same time.\r\n *\r\n * @param center Current center\r\n * @param point1 Frst reference point\r\n * @param startPoint1 Original position of the first reference point\r\n * @param point2 Second reference point\r\n * @param startPoint2 Original position of the first reference point\r\n * @return Shift in center point coordinates\r\n */\r\nexport function getCenterShift(center, point1, startPoint1, point2, startPoint2) {\r\n // Get angle\r\n var angle = getRotation(point1, startPoint1, point2, startPoint2) - 90;\r\n if (angle < 0) {\r\n angle += 360;\r\n }\r\n // Get distance between new position\r\n var distance = getDistance(point1, point2);\r\n // Calculate new X\r\n var x = Math.cos(angle) / distance + point1.x;\r\n var y = Math.cos(angle) / distance + point1.y;\r\n var shift = {\r\n \"x\": x - center.x,\r\n \"y\": y - center.y\r\n };\r\n return shift;\r\n}\r\n/**\r\n * Converts an array of points into a bounding box rectangle.\r\n *\r\n * Array can contain any number of points.\r\n *\r\n * @param points Points\r\n * @return Bounding box rectangle\r\n */\r\nexport function getBBox(points) {\r\n if (points) {\r\n var length_1 = points.length;\r\n if (length_1 !== 0) {\r\n var left = void 0;\r\n var right = void 0;\r\n var top_1;\r\n var bottom = void 0;\r\n for (var i = 0; i < length_1; i++) {\r\n var point = points[i];\r\n if (!$type.isNumber(right) || (point.x > right)) {\r\n right = point.x;\r\n }\r\n if (!$type.isNumber(left) || (point.x < left)) {\r\n left = point.x;\r\n }\r\n if (!$type.isNumber(top_1) || (point.y < top_1)) {\r\n top_1 = point.y;\r\n }\r\n if (!$type.isNumber(bottom) || (point.y > bottom)) {\r\n bottom = point.y;\r\n }\r\n }\r\n return { x: left, y: top_1, width: right - left, height: bottom - top_1 };\r\n }\r\n }\r\n return { x: 0, y: 0, width: 0, height: 0 };\r\n}\r\n/**\r\n * Returns a [[IRectangle]] object representing a common rectangle that fits\r\n * all passed in rectangles in it.\r\n *\r\n * @param rectangles An array of rectangles\r\n * @return Common rectangle\r\n */\r\nexport function getCommonRectangle(rectangles) {\r\n var length = rectangles.length;\r\n if (length !== 0) {\r\n var minX = void 0;\r\n var minY = void 0;\r\n var maxX = void 0;\r\n var maxY = void 0;\r\n for (var i = 0; i < length; i++) {\r\n var rectangle = rectangles[i];\r\n minX = min(rectangle.x, minX);\r\n minY = min(rectangle.y, minY);\r\n maxX = max(rectangle.x + rectangle.width, maxX);\r\n maxY = max(rectangle.y + rectangle.height, maxY);\r\n }\r\n return { x: minX, y: minY, width: maxX - minX, height: maxY - minY };\r\n }\r\n}\r\n/**\r\n * [getPointOnQuadraticCurve description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param pointA [description]\r\n * @param pointB [description]\r\n * @param controlPoint [description]\r\n * @param position [description]\r\n * @return [description]\r\n */\r\nexport function getPointOnQuadraticCurve(pointA, pointB, controlPoint, position) {\r\n var x = (1 - position) * (1 - position) * pointA.x + 2 * (1 - position) * position * controlPoint.x + position * position * pointB.x;\r\n var y = (1 - position) * (1 - position) * pointA.y + 2 * (1 - position) * position * controlPoint.y + position * position * pointB.y;\r\n return { x: x, y: y };\r\n}\r\n/**\r\n * [getPointOnCubicCurve description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param pointA [description]\r\n * @param pointB [description]\r\n * @param controlPointA [description]\r\n * @param controlPointB [description]\r\n * @param position [description]\r\n * @return [description]\r\n */\r\nexport function getPointOnCubicCurve(pointA, pointB, controlPointA, controlPointB, position) {\r\n var point = { x: 0, y: 0 };\r\n var mt1 = 1 - position;\r\n var mt2 = mt1 * mt1;\r\n var mt3 = mt2 * mt1;\r\n point.x = pointA.x * mt3 + controlPointA.x * 3 * mt2 * position + controlPointB.x * 3 * mt1 * position * position + pointB.x * position * position * position;\r\n point.y = pointA.y * mt3 + controlPointA.y * 3 * mt2 * position + controlPointB.y * 3 * mt1 * position * position + pointB.y * position * position * position;\r\n return point;\r\n}\r\n/**\r\n * [getCubicControlPointA description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param p0 [description]\r\n * @param p1 [description]\r\n * @param p2 [description]\r\n * @param p3 [description]\r\n * @param tensionX [description]\r\n * @param tensionY [description]\r\n * @return [description]\r\n */\r\nexport function getCubicControlPointA(p0, p1, p2, p3, tensionX, tensionY) {\r\n tensionX = adjustTension(tensionX);\r\n tensionY = adjustTension(tensionY);\r\n return { x: ((-p0.x + p1.x / tensionX + p2.x) * tensionX), y: ((-p0.y + p1.y / tensionY + p2.y) * tensionY) };\r\n}\r\n/**\r\n * [getCubicControlPointB description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param p0 [description]\r\n * @param p1 [description]\r\n * @param p2 [description]\r\n * @param p3 [description]\r\n * @param tensionX [description]\r\n * @param tensionY [description]\r\n * @return [description]\r\n */\r\nexport function getCubicControlPointB(p0, p1, p2, p3, tensionX, tensionY) {\r\n tensionX = adjustTension(tensionX);\r\n tensionY = adjustTension(tensionY);\r\n return { x: ((p1.x + p2.x / tensionX - p3.x) * tensionX), y: ((p1.y + p2.y / tensionY - p3.y) * tensionY) };\r\n}\r\n/**\r\n * [adjustTension description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param tension [description]\r\n * @return [description]\r\n */\r\nexport function adjustTension(tension) {\r\n return 1 - tension + 0.00001;\r\n}\r\n/**\r\n * [normalizeAngle description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param value [description]\r\n * @return [description]\r\n */\r\nexport function normalizeAngle(value) {\r\n if (value == 360) {\r\n return 360;\r\n }\r\n return value % 360;\r\n}\r\n/**\r\n * [normalizeAngleToRange description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @todo review this with various angles, can be tested on radar chart with custom start/end angles\r\n * @param value [description]\r\n * @param startAngle [description]\r\n * @param endAngle [description]\r\n * @return [description]\r\n */\r\nexport function fitAngleToRange(value, startAngle, endAngle) {\r\n if (startAngle > endAngle) {\r\n var temp = startAngle;\r\n startAngle = endAngle;\r\n endAngle = temp;\r\n }\r\n value = normalizeAngle(value);\r\n var count = (startAngle - normalizeAngle(startAngle)) / 360;\r\n if (value < startAngle) {\r\n value += 360 * (count + 1);\r\n }\r\n var maxEnd = startAngle + (endAngle - startAngle) / 2 + 180;\r\n var maxStart = startAngle + (endAngle - startAngle) / 2 - 180;\r\n if (value > endAngle) {\r\n if (value - 360 > startAngle) {\r\n value -= 360;\r\n }\r\n else {\r\n if (value < maxEnd) {\r\n value = endAngle;\r\n }\r\n else {\r\n value = startAngle;\r\n }\r\n }\r\n }\r\n if (value < startAngle) {\r\n if (value > maxStart) {\r\n value = startAngle;\r\n }\r\n else {\r\n value = endAngle;\r\n }\r\n }\r\n return value;\r\n}\r\n/**\r\n * Returns [[IRectangle]] of an arc in relative values, assuming that the\r\n * center is at the circle center.\r\n *\r\n * Used to find out max radius of an arc.\r\n *\r\n * @ignore Exclude from docs\r\n * @param startAngle Start angle\r\n * @param endAngle End angle\r\n * @param radius \t Relative radius\r\n * @return Rectangle\r\n */\r\nexport function getArcRect(startAngle, endAngle, radius) {\r\n var minX = Number.MAX_VALUE;\r\n var minY = Number.MAX_VALUE;\r\n var maxX = -Number.MAX_VALUE;\r\n var maxY = -Number.MAX_VALUE;\r\n var bpoints = [];\r\n if (!$type.isNumber(radius)) {\r\n radius = 1;\r\n }\r\n bpoints.push(getArcPoint(radius, startAngle));\r\n bpoints.push(getArcPoint(radius, endAngle));\r\n var fromAngle = Math.min(Math.floor(startAngle / 90) * 90, Math.floor(endAngle / 90) * 90);\r\n var toAngle = Math.max(Math.ceil(startAngle / 90) * 90, Math.ceil(endAngle / 90) * 90);\r\n for (var angle = fromAngle; angle <= toAngle; angle += 90) {\r\n if (angle >= startAngle && angle <= endAngle) {\r\n bpoints.push(getArcPoint(radius, angle));\r\n }\r\n }\r\n for (var i = 0; i < bpoints.length; i++) {\r\n var pt = bpoints[i];\r\n if (pt.x < minX) {\r\n minX = pt.x;\r\n }\r\n if (pt.y < minY) {\r\n minY = pt.y;\r\n }\r\n if (pt.x > maxX) {\r\n maxX = pt.x;\r\n }\r\n if (pt.y > maxY) {\r\n maxY = pt.y;\r\n }\r\n }\r\n return ({ x: minX, y: minY, width: maxX - minX, height: maxY - minY });\r\n}\r\n/**\r\n * Returns point on arc\r\n *\r\n * @param center point\r\n * @param radius\r\n * @param arc\r\n * @return {boolean}\r\n */\r\nexport function getArcPoint(radius, arc) {\r\n return ({ x: radius * cos(arc), y: radius * sin(arc) });\r\n}\r\n/**\r\n * Returns true if a point is within rectangle\r\n *\r\n * @param point\r\n * @param rectangle\r\n * @return {boolean}\r\n */\r\nexport function isInRectangle(point, rectangle) {\r\n if (point.x >= rectangle.x && point.x <= rectangle.x + rectangle.width && point.y >= rectangle.y && point.y <= rectangle.y + rectangle.height) {\r\n return true;\r\n }\r\n return false;\r\n}\r\nexport function getLineIntersection(pointA1, pointA2, pointB1, pointB2) {\r\n var x = ((pointA1.x * pointA2.y - pointA2.x * pointA1.y) * (pointB1.x - pointB2.x) - (pointA1.x - pointA2.x) * (pointB1.x * pointB2.y - pointB1.y * pointB2.x)) / ((pointA1.x - pointA2.x) * (pointB1.y - pointB2.y) - (pointA1.y - pointA2.y) * (pointB1.x - pointB2.x));\r\n var y = ((pointA1.x * pointA2.y - pointA2.x * pointA1.y) * (pointB1.y - pointB2.y) - (pointA1.y - pointA2.y) * (pointB1.x * pointB2.y - pointB1.y * pointB2.x)) / ((pointA1.x - pointA2.x) * (pointB1.y - pointB2.y) - (pointA1.y - pointA2.y) * (pointB1.x - pointB2.x));\r\n return { x: x, y: y };\r\n}\r\n","/**\r\n * Morpher module contains functionality that allows morphing one polygon to\r\n * another.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { BaseObject } from \"../Base\";\r\nimport { Animation, AnimationDisposer } from \"../utils/Animation\";\r\nimport * as $math from \"../utils/Math\";\r\nimport * as $ease from \"../utils/Ease\";\r\nimport * as $type from \"../utils/Type\";\r\n/**\r\n * Morpher can be used to morph one polygon to some other polygon.\r\n */\r\nvar Morpher = /** @class */ (function (_super) {\r\n __extends(Morpher, _super);\r\n /**\r\n * Constructor.\r\n *\r\n * @param morphable An object to morph\r\n */\r\n function Morpher(morphable) {\r\n var _this = _super.call(this) || this;\r\n /**\r\n * A storage for measurements.\r\n */\r\n _this._bboxes = [];\r\n /**\r\n * Duration of the morphing animation in milliseconds.\r\n */\r\n _this.morphDuration = 800;\r\n /**\r\n * An easing function to use for morphing animation.\r\n *\r\n * @see {@link Ease}\r\n */\r\n _this.morphEasing = $ease.cubicOut;\r\n /**\r\n * If set to `true`, all separate parts of the multi-part polygon will\r\n * morph into a single circle or polygon when using built-in methods\r\n * `morphToCircle()` or `morphToPolygon()`.\r\n *\r\n * Otherwise each separate part of polygon will morph to individual target\r\n * circle or polgyon.\r\n */\r\n _this.morphToSingle = true;\r\n /**\r\n * A ratio to scale morphed object in relation to the source object.\r\n */\r\n _this.scaleRatio = 1;\r\n _this.className = \"Morpher\";\r\n _this.morphable = morphable;\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * Morphs a polygon to another polygon.\r\n *\r\n * @param toPoints Corner points of the target shape\r\n * @param duration Duration in milliseconds\r\n * @param easing Easing function\r\n * @return Animation\r\n */\r\n Morpher.prototype.morphToPolygon = function (toPoints, duration, easing) {\r\n var points = this.morphable.currentPoints;\r\n if (points && toPoints) {\r\n this.sortPoints(points);\r\n this.sortPoints(toPoints);\r\n this._morphFromPointsReal = [];\r\n this._morphToPointsReal = [];\r\n if (!$type.hasValue(duration)) {\r\n duration = this.morphDuration;\r\n }\r\n if (!$type.hasValue(easing)) {\r\n easing = this.morphEasing;\r\n }\r\n this._morphFromPointsReal = this.normalizePoints(toPoints, points);\r\n this._morphToPointsReal = this.normalizePoints(points, toPoints);\r\n this.morphable.currentPoints = this._morphFromPointsReal;\r\n var animation = new Animation(this, { property: \"morphProgress\", from: 0, to: 1 }, duration, easing);\r\n this._disposers.push(animation);\r\n animation.start();\r\n return animation;\r\n }\r\n };\r\n /**\r\n * [normalizePoints description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param pointsA Point A\r\n * @param pointsB Point B\r\n * @return Normalized points\r\n */\r\n Morpher.prototype.normalizePoints = function (pointsA, pointsB) {\r\n for (var i = 0, len = pointsA.length; i < len; i++) {\r\n var surfaceA = pointsA[i][0];\r\n var holeA = pointsA[i][1];\r\n var bboxA = $type.getValue($math.getBBox(surfaceA));\r\n var middleX = bboxA.x + bboxA.width;\r\n var middleY = bboxA.y + bboxA.height;\r\n // check if we have the same in PointsB\r\n if (!pointsB[i]) {\r\n pointsB[i] = [];\r\n }\r\n // check if we have surface in pointsB\r\n if (surfaceA && !pointsB[i][0]) {\r\n pointsB[i][0] = [{ x: middleX, y: middleY }, { x: middleX, y: middleY }];\r\n }\r\n if (pointsB[i][0]) {\r\n pointsB[i][0] = this.addPoints(pointsB[i][0], surfaceA.length);\r\n var distance = Infinity;\r\n var splitAt = 0;\r\n for (var a = 0; a < pointsB[i][0].length; a++) {\r\n var newDistance = $math.getDistance(pointsB[i][0][a], surfaceA[0]);\r\n if (newDistance < distance) {\r\n splitAt = a;\r\n distance = newDistance;\r\n }\r\n }\r\n var partA = pointsB[i][0].slice(0, splitAt);\r\n var partB = pointsB[i][0].slice(splitAt);\r\n pointsB[i][0] = partB.concat(partA);\r\n }\r\n if (holeA) {\r\n if (!pointsB[i][1]) {\r\n pointsB[i][1] = [{ x: middleX, y: middleY }, { x: middleX, y: middleY }];\r\n }\r\n pointsB[i][1] = this.addPoints(pointsB[i][1], holeA.length);\r\n }\r\n }\r\n return pointsB;\r\n };\r\n /**\r\n * [sortPoints description]\r\n *\r\n * @ignore Exclude from doc\r\n * @todo Description\r\n * @param points [description]\r\n * @return common bbox of points\r\n */\r\n Morpher.prototype.sortPoints = function (points) {\r\n points.sort(function (a, b) {\r\n var bbox1 = $type.getValue($math.getBBox(a[0]));\r\n var bbox2 = $type.getValue($math.getBBox(b[0]));\r\n if (bbox1.width * bbox1.height > bbox2.width * bbox2.height) {\r\n return -1;\r\n }\r\n else {\r\n return 1;\r\n }\r\n });\r\n var bboxes = [];\r\n for (var i = 0, len = points.length; i < len; i++) {\r\n var surface = points[i][0];\r\n if (surface) {\r\n bboxes.push($type.getValue($math.getBBox(surface)));\r\n }\r\n }\r\n return $math.getCommonRectangle(bboxes);\r\n };\r\n /**\r\n * Morphs polygon to a circle (it is actually a polygon which makes a circle).\r\n *\r\n * @param radius Target circle radius (px)\r\n * @param duration Duration (ms)\r\n * @param easing Easing function\r\n * @return Animation\r\n */\r\n Morpher.prototype.morphToCircle = function (radius, duration, easing) {\r\n var points = this.morphable.points;\r\n var commonBBox = this.sortPoints(points);\r\n this._morphFromPointsReal = [];\r\n this._morphToPointsReal = [];\r\n if (!$type.hasValue(duration)) {\r\n duration = this.morphDuration;\r\n }\r\n if (!$type.hasValue(easing)) {\r\n easing = this.morphEasing;\r\n }\r\n // surface\r\n for (var i = 0, len = points.length; i < len; i++) {\r\n var surface = points[i][0];\r\n var hole = points[i][1];\r\n this._morphFromPointsReal[i] = [];\r\n this._morphToPointsReal[i] = [];\r\n if (surface) {\r\n var toPoints = surface;\r\n var fromPoints = surface;\r\n var bbox = $type.getValue($math.getBBox(fromPoints)); // this._bboxes[i];\r\n if (this.morphToSingle) {\r\n bbox = $type.getValue(commonBBox);\r\n }\r\n var middleX = bbox.x + bbox.width / 2;\r\n var middleY = bbox.y + bbox.height / 2;\r\n var realRadius = radius;\r\n if (!$type.isNumber(realRadius)) {\r\n realRadius = Math.min(bbox.width / 2, bbox.height / 2);\r\n }\r\n toPoints = [];\r\n // find angle for the first point\r\n var startAngle = $math.getAngle({ x: middleX, y: middleY }, surface[0]);\r\n var count = 100;\r\n if (surface.length > count) {\r\n count = surface.length;\r\n }\r\n fromPoints = this.addPoints(surface, count);\r\n count = fromPoints.length; // add Points might increase number a bit\r\n var angle = 360 / (count - 1);\r\n for (var a = 0; a < count; a++) {\r\n var realAngle = angle * a + startAngle;\r\n var pointOnCircle = { x: middleX + realRadius * $math.cos(realAngle), y: middleY + realRadius * $math.sin(realAngle) };\r\n toPoints[a] = pointOnCircle;\r\n }\r\n if (hole && hole.length > 0) {\r\n for (var i_1 = 0, hlen = hole.length; i_1 < hlen; i_1++) {\r\n toPoints.push({ x: middleX, y: middleY });\r\n }\r\n }\r\n this._morphFromPointsReal[i][0] = fromPoints;\r\n this._morphToPointsReal[i][0] = toPoints;\r\n }\r\n }\r\n this.morphable.currentPoints = this._morphFromPointsReal;\r\n var animation = new Animation(this, { property: \"morphProgress\", from: 0, to: 1 }, duration, easing);\r\n this._disposers.push(animation);\r\n animation.start();\r\n return animation;\r\n };\r\n /**\r\n * [addPoints description]\r\n *\r\n * @ignore Exclude from doc\r\n * @todo Description\r\n * @param points [description]\r\n * @param mustHaveCount [description]\r\n * @return [description]\r\n */\r\n Morpher.prototype.addPoints = function (points, mustHaveCount) {\r\n var addToSegmentCount = Math.round(mustHaveCount / points.length);\r\n var newPoints = [];\r\n for (var i = 0, len = points.length; i < len; i++) {\r\n var point0 = points[i];\r\n var point1 = void 0;\r\n if (i == points.length - 1) {\r\n point1 = points[0];\r\n }\r\n else {\r\n point1 = points[i + 1];\r\n }\r\n newPoints.push(point0);\r\n for (var p = 1; p < addToSegmentCount; p++) {\r\n var percent = p / addToSegmentCount;\r\n var extraPoint = { x: point0.x + (point1.x - point0.x) * percent, y: point0.y + (point1.y - point0.y) * percent };\r\n newPoints.push(extraPoint);\r\n }\r\n // stop adding in case we already added more than left in original\r\n if (newPoints.length + points.length - i == mustHaveCount) {\r\n addToSegmentCount = 0;\r\n }\r\n }\r\n if (newPoints.length < mustHaveCount && points.length > 0) {\r\n var lastPoint = points[points.length - 1];\r\n for (var p = newPoints.length; p < mustHaveCount; p++) {\r\n // add same as last\r\n newPoints.push({ x: lastPoint.x, y: lastPoint.y });\r\n }\r\n }\r\n return newPoints;\r\n };\r\n /**\r\n * Morphs polygon into a rectangular polygon.\r\n *\r\n * @param width Width of the target rectangle (px)\r\n * @param height Height of the target rectangle (px)\r\n * @param duration Duration (ms)\r\n * @param easing Easing function\r\n * @return Animation\r\n */\r\n Morpher.prototype.morphToRectangle = function (width, height, duration, easing) {\r\n var points = this.morphable.points;\r\n this.sortPoints(points);\r\n this._morphFromPointsReal = [];\r\n this._morphToPointsReal = [];\r\n if (!$type.hasValue(duration)) {\r\n duration = this.morphDuration;\r\n }\r\n if (!$type.hasValue(easing)) {\r\n easing = this.morphEasing;\r\n }\r\n //\t\tlet biggestBBox: IRectangle = this._bboxes[this._biggestIndex];\r\n // surface\r\n for (var i = 0, len = points.length; i < len; i++) {\r\n var surface = points[i][0];\r\n var hole = points[i][1];\r\n this._morphFromPointsReal[i] = [];\r\n this._morphToPointsReal[i] = [];\r\n if (surface) {\r\n var toPoints = surface;\r\n var fromPoints = surface;\r\n var bbox = this._bboxes[i];\r\n // we only work with first area. TODO: maybe we should find the biggest one?\r\n if (this.morphToSingle) {\r\n //if (i != this._biggestIndex) {\r\n //\tbbox = { x: biggestBBox.x + biggestBBox.width / 2, y: biggestBBox.y + biggestBBox.height / 2, width: 0, height: 0 };\r\n //}\r\n }\r\n var x = bbox.x;\r\n var y = bbox.y;\r\n var realWidth = width;\r\n var realHeight = height;\r\n if (!$type.isNumber(realWidth)) {\r\n realWidth = bbox.width;\r\n }\r\n if (!$type.isNumber(realHeight)) {\r\n realHeight = bbox.height;\r\n }\r\n toPoints = [{ x: x, y: y }, { x: x + realWidth, y: y }, { x: x + realWidth, y: y + realHeight }, { x: x, y: y + realHeight }];\r\n toPoints = this.addPoints(toPoints, surface.length);\r\n // if polygon has less points then count, add\r\n if (surface.length < 4) {\r\n for (var i_2 = surface.length; i_2 < 4; i_2++) {\r\n toPoints.push({ x: surface[i_2].x, y: surface[i_2].y });\r\n }\r\n }\r\n if (hole && hole.length > 0) {\r\n var middleX = bbox.x + bbox.width / 2;\r\n var middleY = bbox.y + bbox.height / 2;\r\n for (var i_3 = 0, hlen = hole.length; i_3 < hlen; i_3++) {\r\n toPoints.push({ x: middleX, y: middleY });\r\n }\r\n }\r\n this._morphFromPointsReal[i][0] = fromPoints;\r\n this._morphToPointsReal[i][0] = toPoints;\r\n }\r\n }\r\n this.morphable.currentPoints = this._morphFromPointsReal;\r\n var animation = new Animation(this, { property: \"morphProgress\", from: 0, to: 1 }, duration, easing);\r\n this._disposers.push(animation);\r\n animation.start();\r\n return animation;\r\n };\r\n Object.defineProperty(Morpher.prototype, \"morphProgress\", {\r\n /**\r\n * Returns the progress of morph transition.\r\n *\r\n * @return Progress (0-1)\r\n */\r\n get: function () {\r\n return this._morphProgress;\r\n },\r\n /**\r\n * Progress of the morph transition.\r\n *\r\n * Setting this will also trigger actual transformation.\r\n *\r\n * @param value Progress (0-1)\r\n */\r\n set: function (value) {\r\n this._morphProgress = value;\r\n var currentPoints = [];\r\n if (value != null) {\r\n var fromPoints = this._morphFromPointsReal;\r\n var toPoints = this._morphToPointsReal;\r\n if (fromPoints != null && toPoints != null) {\r\n for (var i = 0, len = fromPoints.length; i < len; i++) {\r\n var currentArea = [];\r\n currentPoints.push(currentArea);\r\n var surfaceFrom = fromPoints[i][0];\r\n var holeFrom = fromPoints[i][1];\r\n var surfaceTo = toPoints[i][0];\r\n var holeTo = toPoints[i][1];\r\n if (surfaceFrom && surfaceFrom.length > 0 && surfaceTo && surfaceTo.length > 0) {\r\n var currentSurface = [];\r\n for (var i_4 = 0, slen = surfaceFrom.length; i_4 < slen; i_4++) {\r\n var point0 = surfaceFrom[i_4];\r\n var point1 = surfaceTo[i_4];\r\n var currentPoint = { x: point0.x + (point1.x * this.scaleRatio - point0.x) * value, y: point0.y + (point1.y * this.scaleRatio - point0.y) * value };\r\n currentSurface.push(currentPoint);\r\n }\r\n currentArea[0] = currentSurface;\r\n }\r\n if (holeFrom && holeFrom.length > 0 && holeTo && holeTo.length > 0) {\r\n var currentHole = [];\r\n for (var i_5 = 0, hlen = holeFrom.length; i_5 < hlen; i_5++) {\r\n var point0 = holeFrom[i_5];\r\n var point1 = holeTo[i_5];\r\n var currentPoint = { x: point0.x + (point1.x * this.scaleRatio - point0.x) * value, y: point0.y + (point1.y * this.scaleRatio - point0.y) * value };\r\n currentHole.push(currentPoint);\r\n }\r\n currentArea[1] = currentHole;\r\n }\r\n }\r\n }\r\n }\r\n this.morphable.currentPoints = currentPoints;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Restores the polygon to its original appearance.\r\n *\r\n * @param duration Duration (ms)\r\n * @param easing Easing function\r\n * @return Animation\r\n */\r\n Morpher.prototype.morphBack = function (duration, easing) {\r\n this._morphToPointsReal = this._morphFromPointsReal;\r\n this._morphFromPointsReal = this.morphable.currentPoints;\r\n if (!$type.hasValue(duration)) {\r\n duration = this.morphDuration;\r\n }\r\n if (!$type.hasValue(easing)) {\r\n easing = this.morphEasing;\r\n }\r\n var animation = new Animation(this, { property: \"morphProgress\", from: 0, to: 1 }, duration, easing);\r\n this._disposers.push(animation);\r\n animation.start();\r\n return animation;\r\n };\r\n Object.defineProperty(Morpher.prototype, \"animations\", {\r\n /**\r\n * Returns a list of morph animations currently being played.\r\n *\r\n * @return List of animations\r\n */\r\n get: function () {\r\n if (!this._animations) {\r\n this._animations = [];\r\n this._disposers.push(new AnimationDisposer(this._animations));\r\n }\r\n return this._animations;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return Morpher;\r\n}(BaseObject));\r\nexport { Morpher };\r\n","/**\r\n * A collection of network-related functions\r\n */\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport * as $type from \"./Type\";\r\n/**\r\n * Loads an external file via its URL.\r\n *\r\n * Please note that this is an asynchronous function.\r\n *\r\n * It will not return the result, but rather a `Promise`.\r\n *\r\n * You can use the `await` notion, or `then()`.\r\n *\r\n * ```TypeScript\r\n * // Using await\r\n * let response = await Net.load( \"http://www.my.com/data.json\" );\r\n * console.log( response.response );\r\n *\r\n * // Using then()\r\n * Net.load( \"http://www.my.com/data.json\" ).then( ( response ) => {\r\n * console.log( response.response );\r\n * } );\r\n * ```\r\n * ```JavaScript\r\n * // Using then()\r\n * Net.load( \"http://www.my.com/data.json\" ).then( function( response ) {\r\n * console.log( response.response );\r\n * } );\r\n * ```\r\n *\r\n * @async\r\n * @param url URL for the file to load\r\n * @param target A target element that is requesting the net load\r\n * @param options Request options\r\n * @return Result (Promise)\r\n */\r\nexport function load(url, target, options) {\r\n return new Promise(function (success, error) {\r\n // Is return type Blob?\r\n var isBlob = $type.hasValue(options) && options.responseType == \"blob\";\r\n // Create request and set up handlers\r\n var xhr = new XMLHttpRequest();\r\n xhr.onload = function () {\r\n if (xhr.status === 200) {\r\n var response = void 0;\r\n var blob_1;\r\n if (isBlob) {\r\n blob_1 = xhr.response;\r\n readBlob(blob_1).then(function (response) {\r\n var output = {\r\n xhr: xhr,\r\n error: false,\r\n response: response,\r\n blob: blob_1,\r\n type: xhr.getResponseHeader(\"Content-Type\"),\r\n target: target\r\n };\r\n success(output);\r\n });\r\n return;\r\n }\r\n else {\r\n response = xhr.responseText || xhr.response;\r\n }\r\n var output = {\r\n xhr: xhr,\r\n error: false,\r\n response: response,\r\n blob: blob_1,\r\n type: xhr.getResponseHeader(\"Content-Type\"),\r\n target: target\r\n };\r\n success(output);\r\n }\r\n else {\r\n error({\r\n xhr: xhr,\r\n error: true,\r\n type: xhr.getResponseHeader(\"Content-Type\"),\r\n target: target\r\n });\r\n }\r\n };\r\n xhr.onerror = function () {\r\n error({\r\n xhr: xhr,\r\n error: true,\r\n type: xhr.getResponseHeader(\"Content-Type\"),\r\n target: target\r\n });\r\n };\r\n // Open request\r\n xhr.open(\"GET\", url, true);\r\n if (options && options.withCredentials) {\r\n xhr.withCredentials = true;\r\n }\r\n // Process options\r\n if ($type.hasValue(options)) {\r\n if ($type.hasValue(options.requestHeaders)) {\r\n for (var i = 0; i < options.requestHeaders.length; i++) {\r\n var header = options.requestHeaders[i];\r\n xhr.setRequestHeader(header.key, header.value);\r\n }\r\n }\r\n if ($type.hasValue(options.responseType)) {\r\n xhr.responseType = options.responseType;\r\n }\r\n }\r\n // Send request\r\n xhr.send();\r\n });\r\n}\r\n/**\r\n * Returns textual representation of a Blob object.\r\n *\r\n * @param blob Target blob\r\n * @return Text promise\r\n */\r\nexport function readBlob(blob) {\r\n return new Promise(function (success, error) {\r\n var reader = new FileReader();\r\n reader.onload = function (event) {\r\n success(reader.result);\r\n };\r\n reader.onerror = function (e) {\r\n error(e);\r\n };\r\n reader.readAsText(blob);\r\n });\r\n}\r\n","/**\r\n * ============================================================================\r\n * COMPARING FUNCTIONS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Comparing function used for ordering.\r\n *\r\n * @ignore Exclude from docs\r\n * @param a Number 1\r\n * @param b Number 2\r\n * @return Result\r\n */\r\nexport function order(a, b) {\r\n if (a === b) {\r\n return 0;\r\n }\r\n else if (a < b) {\r\n return -1;\r\n }\r\n else {\r\n return 1;\r\n }\r\n}\r\n","/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport * as $array from \"./Array\";\r\nimport * as $type from \"./Type\";\r\n/**\r\n * ============================================================================\r\n * UTILITY FUNCTIONS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Returns an iterator for all entries in object.\r\n *\r\n * Can be used to safely iterate through all properties of the object.\r\n *\r\n * @param object Source object\r\n * @returns Iterator\r\n */\r\nexport function entries(object) {\r\n return function (push) {\r\n // TODO make this more efficient ?\r\n for (var key in object) {\r\n if (hasKey(object, key)) {\r\n if (!push([key, object[key]])) {\r\n break;\r\n }\r\n }\r\n }\r\n };\r\n}\r\n/**\r\n * Returns an array of object's property names.\r\n *\r\n * @param object Source object\r\n * @returns Object property names\r\n */\r\nexport function keys(object) {\r\n var output = [];\r\n for (var key in object) {\r\n if (hasKey(object, key)) {\r\n output.push(key);\r\n }\r\n }\r\n return output;\r\n}\r\n/**\r\n * Returns an array of object's property names ordered using specific ordering\r\n * function.\r\n *\r\n * @param object Source object\r\n * @param order Ordering function\r\n * @returns Object property names\r\n */\r\nexport function keysOrdered(object, order) {\r\n return keys(object).sort(order);\r\n}\r\n/**\r\n * Checks if `object` has a specific `key`.\r\n *\r\n * @param object Source object\r\n * @param key Property name\r\n * @returns Has key?\r\n */\r\nexport function hasKey(object, key) {\r\n return {}.hasOwnProperty.call(object, key);\r\n}\r\n/**\r\n * Returns value of the specific `key`.\r\n *\r\n * @param object Source object\r\n * @param key Property name\r\n * @returns Key value\r\n */\r\nexport function getKey(object, key) {\r\n return object[key];\r\n}\r\n/**\r\n * Iterates through all properties of the object calling `fn` for each of them.\r\n *\r\n * If return value of the function evaluates to `false` further iteration is\r\n * cancelled.\r\n *\r\n * @param object Source object\r\n * @param fn Callback function\r\n */\r\nexport function eachContinue(object, fn) {\r\n for (var key in object) {\r\n if (hasKey(object, key)) {\r\n if (!fn(key, object[key])) {\r\n break;\r\n }\r\n }\r\n }\r\n}\r\n/**\r\n * Iterates through all properties of the object calling `fn` for each of them.\r\n *\r\n * @param object Source object\r\n * @param fn Callback function\r\n */\r\nexport function each(object, fn) {\r\n eachContinue(object, function (key, value) {\r\n fn(key, value);\r\n return true;\r\n });\r\n}\r\n/**\r\n * Orders object properties using custom `ord` function and iterates through\r\n * them calling `fn` for each of them.\r\n *\r\n * @param object Source object\r\n * @param fn Callback function\r\n * @param order Ordering function\r\n */\r\nexport function eachOrdered(object, fn, ord) {\r\n $array.each(keysOrdered(object, ord), function (key) {\r\n fn(key, object[key]);\r\n });\r\n}\r\n/**\r\n * Returns a copy of the object.\r\n *\r\n * @param object Source object\r\n * @returns Copy of the object\r\n */\r\nexport function copy(object) {\r\n return Object.assign({}, object);\r\n}\r\n/**\r\n * Merges two objects and returns a new object that contains properties from\r\n * both source objects.\r\n *\r\n * @param object1 Source object #1\r\n * @param object2 Source object #2\r\n * @returns Combined object\r\n */\r\nexport function merge(object1, object2) {\r\n return Object.assign({}, object1, object2);\r\n}\r\n/**\r\n * Returns object clone.\r\n *\r\n * @param object Source object\r\n * @returns Clone\r\n */\r\nexport function clone(object) {\r\n return JSON.parse(JSON.stringify(object));\r\n}\r\n/**\r\n * Copies a list of properties from one object to another.\r\n *\r\n * Will not copy empty properties.\r\n *\r\n * @param source Source object\r\n * @param target Target object\r\n * @param keys List of keys to copy\r\n */\r\nexport function copyProperties(source, target, keys) {\r\n $array.each(keys, function (key) {\r\n if ($type.hasValue(source[key])) {\r\n target[key] = source[key];\r\n }\r\n });\r\n}\r\n/**\r\n * Copies a list of properties from one object to another only if target does't have value of the property set.\r\n *\r\n * Will not copy empty properties.\r\n *\r\n * @param source Source object\r\n * @param target Target object\r\n * @param keys List of keys to copy\r\n */\r\nexport function softCopyProperties(source, target, keys) {\r\n $array.each(keys, function (key) {\r\n if ($type.hasValue(source[key]) && !($type.hasValue(target[key]))) {\r\n target[key] = source[key];\r\n }\r\n });\r\n}\r\n/**\r\n * Copies a list of properties from one object to another.\r\n *\r\n * Will copy empty properties.\r\n *\r\n * @param source Source object\r\n * @param target Target object\r\n * @param keys List of keys to copy\r\n */\r\nexport function forceCopyProperties(source, target, keys) {\r\n $array.each(keys, function (key) {\r\n target[key] = source[key];\r\n });\r\n}\r\n/**\r\n * Copies all properties from one object to another.\r\n *\r\n * @param from Source object\r\n * @param to Target object\r\n */\r\nexport function copyAllProperties(from, to) {\r\n copyProperties(from, to, keys(from));\r\n}\r\n","/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Represents a relative value (percent).\r\n *\r\n * The Percent object, can be instantiated using two ways:\r\n *\r\n * * Via `new Percent(X)`.\r\n * * Via `am4core.percent(X)`.\r\n *\r\n * `Percent` type objects can be used in a number of dual-measuring or\r\n * positioning properties, like `width`. E.g.:\r\n *\r\n * ```TypeScript\r\n * chart.paddingRight = new Percent(10);\r\n * // or\r\n * chart.paddingRight = am4core.percent(10);\r\n * ```\r\n * ```JavaScript\r\n * chart.paddingRight = new Percent(10);\r\n * // or\r\n * chart.paddingRight = am4core.percent(10);\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"paddingRight\": \"10%\"\r\n * }\r\n * ```\r\n */\r\nvar Percent = /** @class */ (function () {\r\n /**\r\n * Constructor.\r\n *\r\n * @param percent Percent value\r\n */\r\n function Percent(percent) {\r\n this._value = percent;\r\n }\r\n Object.defineProperty(Percent.prototype, \"value\", {\r\n /**\r\n * Relative value.\r\n *\r\n * E.g. 100% is 1, 50% is 0.5, etc.\r\n *\r\n * This is useful to apply transformations to other values. E.g.:\r\n *\r\n * ```TypeScript\r\n * let value = 256;\r\n * let percent = new am4core.Percent(50);\r\n * console.log(value * percent.value); // outputs 128\r\n * ```\r\n * ```JavaScript\r\n * var value = 256;\r\n * var percent = new am4core.Percent(50);\r\n * console.log(value * percent.value); // outputs 128\r\n * ```\r\n *\r\n * Alternatively, you can use `am4core.percent()` helper function:\r\n *\r\n * ```TypeScript\r\n * let value = 256;\r\n * let percent = am4core.percent(50);\r\n * console.log(value * percent.value); // outputs 128\r\n * ```\r\n * ```JavaScript\r\n * var value = 256;\r\n * var percent = am4core.percent(50);\r\n * console.log(value * percent.value); // outputs 128\r\n * ```\r\n *\r\n * @readonly\r\n * @return Relative value\r\n */\r\n get: function () {\r\n return this._value / 100;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Percent.prototype, \"percent\", {\r\n /**\r\n * Value in percent.\r\n *\r\n * @return Percent\r\n */\r\n get: function () {\r\n return this._value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Percent.prototype.toString = function () {\r\n return \"\" + this._value + \"%\";\r\n };\r\n return Percent;\r\n}());\r\nexport { Percent };\r\n/**\r\n * Converts numeric percent value to a proper [[Percent]] object.\r\n *\r\n * ```TypeScript\r\n * pieSeries.radius = am4core.percent(80);\r\n * ```\r\n * ```JavaScript\r\n * pieSeries.radius = am4core.percent(80);\r\n * ```\r\n *\r\n * @param value Percent\r\n * @return Percent object\r\n */\r\nexport function percent(value) {\r\n return new Percent(value);\r\n}\r\n/**\r\n * Checks if value is a [[Percent]] object.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Input value\r\n * @return Is percent?\r\n */\r\nexport function isPercent(value) {\r\n return value instanceof Percent;\r\n}\r\n","/**\r\n * Responsive functionality module.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { BaseObjectEvents } from \"../Base\";\r\nimport { List } from \"../utils/List\";\r\nimport { Adapter } from \"../utils/Adapter\";\r\nimport { registry } from \"../Registry\";\r\nimport * as $iter from \"../utils/Iterator\";\r\nimport * as $array from \"../utils/Array\";\r\nimport * as $type from \"../utils/Type\";\r\nimport * as $object from \"../utils/Object\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Responsive is responsible for overriding certain properties when conditions\r\n * are met.\r\n *\r\n * This class is used to dynamically apply and change certain chart properties\r\n * based on the current values of properties.\r\n *\r\n * Mainly, this is used with [[Sprite]]'s dimensional properties, like\r\n * `pixelWidth` and `pixelHeight`. However, it can be used to dynamically\r\n * change any property, based on any other property's value.\r\n *\r\n * A default responsive rules are disabled.\r\n *\r\n * To enable, set `enabled = false`. E.g.:\r\n *\r\n * ```TypeScript\r\n * chart.responsive.enabled = true;\r\n * ```\r\n * ```JavaScript\r\n * chart.responsive.enabled = true;\r\n * ```\r\n *\r\n * @see {@link IResponsiveEvents} for a list of available events\r\n * @see {@link IResponsiveAdapters} for a list of available Adapters\r\n * @todo Add default rules\r\n * @todo Watch for rule modification\r\n * @important\r\n */\r\nvar Responsive = /** @class */ (function (_super) {\r\n __extends(Responsive, _super);\r\n /**\r\n * Constructor\r\n */\r\n function Responsive() {\r\n var _this = \r\n // Init\r\n _super.call(this) || this;\r\n /**\r\n * Holds a list of responsive rules organized by object type.\r\n */\r\n _this._rules = new List();\r\n /**\r\n * Holds the list of the default responsive rules.\r\n * @deprecated\r\n */\r\n //protected _defaultRules = new List<IResponsiveRule>();\r\n /**\r\n * Holds the list of currently applied rules.\r\n */\r\n _this._appliedRules = {};\r\n /**\r\n * Used to keep track of objects that have rules applied at the moment.\r\n */\r\n _this._appliedTargets = [];\r\n /**\r\n * Use default rules in addition to the user-defined ones?\r\n */\r\n _this._useDefault = true;\r\n /**\r\n * Adapter.\r\n */\r\n _this.adapter = new Adapter(_this);\r\n /**\r\n * Indicates of responsive rules application is enabled.\r\n */\r\n _this._enabled = false;\r\n /**\r\n * Holds disposers for all events added by this class.\r\n */\r\n _this._responsiveDisposers = [];\r\n /**\r\n * Collection of objects and state ids that do not have any properties set.\r\n */\r\n _this._noStates = [];\r\n _this.className = \"Responsive\";\r\n // Set up rules list events\r\n _this.rules.events.on(\"inserted\", function () { _this.checkRules(); }, true);\r\n _this.rules.events.on(\"removed\", function () { _this.checkRules(); }, true);\r\n _this._disposers.push(_this.rules.events);\r\n // Apply theme\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n Object.defineProperty(Responsive.prototype, \"component\", {\r\n /**\r\n * @return Target object\r\n */\r\n get: function () {\r\n return this._component;\r\n },\r\n /**\r\n * A target object that responsive rules will need to be applied to.\r\n *\r\n * @param value Target object\r\n */\r\n set: function (value) {\r\n var _this = this;\r\n // Check if it's the same\r\n if (value == this._component) {\r\n return;\r\n }\r\n // Check if we already have a set up component and remove its events\r\n this.disposeResponsiveHandlers();\r\n // Set\r\n this._component = value;\r\n // Set up resize monitoring events\r\n this._responsiveDisposers.push($type.getValue(this.component).events.on(\"sizechanged\", function () { _this.checkRules(); }, this));\r\n this._responsiveDisposers.push($type.getValue(this.component).events.once(\"datavalidated\", function () {\r\n if (_this._component.isReady()) {\r\n _this.checkRules(true);\r\n }\r\n }, this));\r\n // Enable resoponsive\r\n this.enabled = true;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Responsive.prototype, \"enabled\", {\r\n /**\r\n * @return Apply responsive rules?\r\n */\r\n get: function () {\r\n return this.adapter.apply(\"enabled\", this._enabled);\r\n },\r\n /**\r\n * Should responsive rules be checked against and applied?\r\n *\r\n * @default false\r\n * @param value Apply responsive rules?\r\n */\r\n set: function (value) {\r\n if (this._enabled != value) {\r\n this._enabled = value;\r\n // Run `applyRules` so that any currently applied rules can be reset\r\n this.applyRules();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Responsive.prototype, \"useDefault\", {\r\n /**\r\n * @return Use default rules?\r\n */\r\n get: function () {\r\n return this.adapter.apply(\"useDefault\", this._useDefault);\r\n },\r\n /**\r\n * Should default responsive rules be applied in addition to user-defined\r\n * ones.\r\n *\r\n * User-defined rules will take precedence over default rules whenever they\r\n * produce conflicting settings.\r\n *\r\n * @default true\r\n * @param value Use default rules?\r\n */\r\n set: function (value) {\r\n if (this._useDefault != value) {\r\n this._useDefault = value;\r\n // Run `applyRules` so that any currently applied rules can be reset\r\n this.applyRules();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Responsive.prototype, \"rules\", {\r\n /**\r\n * @return User-defined rules\r\n */\r\n get: function () {\r\n return this.adapter.apply(\"rules\", this._rules);\r\n },\r\n /**\r\n * User-defined responsive rules.\r\n *\r\n * User-defined rules will take precedence over default rules whenever they\r\n * produce conflicting settings.\r\n *\r\n * Use `allRules` to get all applicable rules including default and\r\n * user-defined ones.\r\n *\r\n * @param value User-defined rules\r\n */\r\n set: function (value) {\r\n this._rules = value;\r\n this._enabled = true;\r\n this.applyRules();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Responsive.prototype, \"defaultRules\", {\r\n /**\r\n * Default responsive rules.\r\n *\r\n * @readonly\r\n * @return List of responsive rules\r\n */\r\n get: function () {\r\n return this.adapter.apply(\"defaultRules\", defaultRules);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Responsive.prototype, \"allRules\", {\r\n /**\r\n * Returns all rules: default rules (if not disabled) combined with\r\n * user-defined ones.\r\n *\r\n * @readonly\r\n * @return List of all applicable rules\r\n */\r\n get: function () {\r\n // Create empty list\r\n var rules = new List();\r\n // Add default rules if not disabled\r\n // A code, requesting `allRules` must ensure loading of default rules\r\n // by calling `loadDefaultRules()`\r\n if (this.useDefault) {\r\n rules.copyFrom(this.defaultRules);\r\n }\r\n // Add user-defined ones\r\n rules.copyFrom(this.rules);\r\n return this.adapter.apply(\"allRules\", rules);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Checks if rule by the particular id currently applied.\r\n *\r\n * @param ruleId Rule ID\r\n * @return Is currently applied?\r\n */\r\n Responsive.prototype.isApplied = function (ruleId) {\r\n var rule = this._appliedRules[ruleId];\r\n return $type.hasValue(rule) ? rule : false;\r\n };\r\n /**\r\n * Checks which responsive rules currently satisfy their conditions and\r\n * should be applied, or unapplied.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Responsive.prototype.checkRules = function (force) {\r\n var _this = this;\r\n if (force === void 0) { force = false; }\r\n // Check if there are any rules\r\n var rules = this.allRules;\r\n if (!rules || rules.length == 0) {\r\n return;\r\n }\r\n // Init a list of rules to be applied\r\n var rulesChanged = false;\r\n var component = $type.getValue(this.component);\r\n // Do not perform rule application of target has no size\r\n if (component.pixelWidth == 0 || component.pixelHeight == 0) {\r\n return;\r\n }\r\n // Check which rules match\r\n $iter.each(rules.iterator(), function (rule) {\r\n // Check if rule has an id\r\n if (!rule.id) {\r\n rule.id = registry.getUniqueId();\r\n }\r\n // Init indicator if this rule should be applied\r\n var apply = rule.relevant(component);\r\n // Let's check if this rule needs to be applied\r\n if ((apply && !_this.isApplied(rule.id)) || (!apply && _this.isApplied(rule.id))) {\r\n rulesChanged = true;\r\n }\r\n _this._appliedRules[rule.id] = apply;\r\n });\r\n if (force) {\r\n rulesChanged = true;\r\n }\r\n // Check if we need to re-apply the rules\r\n if (rulesChanged) {\r\n if (!this.component.isReady()) {\r\n // The chart is not yet ready (built)\r\n // We will hide the chart and delay application of rules\r\n // until \"ready\" event kicks in\r\n //component.hide(0);\r\n component.hidden = true;\r\n component.events.once(\"ready\", function (ev) {\r\n ev.target.show(0);\r\n _this._applyRules();\r\n });\r\n return;\r\n }\r\n this.dispatchImmediately(\"ruleschanged\");\r\n this._applyRules();\r\n }\r\n };\r\n Responsive.prototype._applyRules = function () {\r\n var _this = this;\r\n if (this._timeout) {\r\n this._timeout.dispose();\r\n }\r\n this._timeout = this.setTimeout(function () {\r\n _this.applyRules();\r\n }, 10);\r\n };\r\n /**\r\n * Applies current rules to the object.\r\n *\r\n * @ignore Exclude from docs\r\n * @param target Target object\r\n * @todo Better type check\r\n */\r\n Responsive.prototype.applyRules = function (target) {\r\n var _this = this;\r\n // If no target supplied, we assume the top-level element\r\n var newTarget = ($type.hasValue(target)\r\n ? target\r\n : $type.getValue(this.component));\r\n // Check each rule\r\n var defaultStateApplied = false;\r\n if (this.enabled) {\r\n var isApplied_1 = false;\r\n $iter.each(this.allRules.iterator(), function (rule) {\r\n // Get relevant state\r\n var state = _this.getState(rule, newTarget);\r\n // If there's a state, it means it needs to be applied\r\n if (state) {\r\n // Check if default state was already applied to this element.\r\n // We don't want to go resetting default states to ALL element,\r\n // if they don't have responsive states.\r\n if (!defaultStateApplied) {\r\n // Nope, reset states (instantly).\r\n if ($array.indexOf(_this._appliedTargets, newTarget.uid) !== -1) {\r\n // But only if this element has any rules applied, otherwise no\r\n // point in setting current state\r\n newTarget.setState(_this.getDefaultState(newTarget), 0);\r\n }\r\n defaultStateApplied = true;\r\n }\r\n // Is this rule currently applied?\r\n if (_this.isApplied($type.getValue(rule.id))) {\r\n // Yes. Apply the responsive state\r\n state.transitionDuration = 0;\r\n _this.setTargetState(newTarget, state);\r\n _this.dispatchImmediately(\"ruleapplied\", {\r\n rule: rule\r\n });\r\n isApplied_1 = true;\r\n }\r\n }\r\n });\r\n if (isApplied_1) {\r\n $array.replace(this._appliedTargets, newTarget.uid);\r\n }\r\n else {\r\n $array.remove(this._appliedTargets, newTarget.uid);\r\n }\r\n }\r\n // Apply rules to the children\r\n if (newTarget.children) {\r\n $iter.each(newTarget.children.iterator(), function (child) {\r\n _this.applyRules(child);\r\n });\r\n }\r\n };\r\n /**\r\n * Returns a relative state for the rule/target, or `undefined` if no state is\r\n * needed.\r\n *\r\n * @param rule [description]\r\n * @param target [description]\r\n * @return [description]\r\n */\r\n Responsive.prototype.getState = function (rule, target) {\r\n var stateId = \"responsive-\" + rule.id;\r\n var tmpId = target.uid + \"_\" + stateId;\r\n if ($array.indexOf(this._noStates, tmpId) !== -1) {\r\n return;\r\n }\r\n else if (!target.states.hasKey(stateId)) {\r\n var state = rule.state(target, stateId);\r\n if (!state) {\r\n this._noStates.push(tmpId);\r\n }\r\n return state;\r\n }\r\n else {\r\n return target.states.getKey(stateId);\r\n }\r\n };\r\n /**\r\n * Creates and returns default responsive rule for the target.\r\n *\r\n * This rule will be used to \"reset\" to non-responsive values.\r\n * @param target Target Sprite\r\n * @return State\r\n */\r\n Responsive.prototype.getDefaultState = function (target) {\r\n if (target.states.hasKey(\"responsive-default\")) {\r\n return target.states.getKey(\"responsive-default\");\r\n }\r\n return target.states.create(\"responsive-default\");\r\n };\r\n /**\r\n * Sets state on the target element and updates default state with the\r\n * overwritten values if needed.\r\n *\r\n * @param target Target\r\n * @param state State\r\n */\r\n Responsive.prototype.setTargetState = function (target, state) {\r\n var _this = this;\r\n // Update default state\r\n var defaultState = this.getDefaultState(target);\r\n $object.each(state.properties, function (key, val) {\r\n if (!$type.hasValue(defaultState.properties[key])) {\r\n defaultState.properties[key] = _this.getValue(target, key);\r\n }\r\n });\r\n target.setState(state);\r\n };\r\n /**\r\n * Gets a value from an element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param target Target object\r\n * @param property Property\r\n * @return Property value\r\n */\r\n Responsive.prototype.getValue = function (target, property) {\r\n // This is a bit hacky, first we check if the property exist.\r\n // If it doesn't we try accessing target's property directly\r\n var value = target.getPropertyValue(property);\r\n if (!$type.hasValue(value) && $type.hasValue(target[property])) {\r\n value = target[property];\r\n }\r\n return value;\r\n };\r\n /**\r\n * Disposes the object.\r\n */\r\n Responsive.prototype.dispose = function () {\r\n this.disposeResponsiveHandlers();\r\n _super.prototype.dispose.call(this);\r\n };\r\n /**\r\n * Disposes all event handlers.\r\n */\r\n Responsive.prototype.disposeResponsiveHandlers = function () {\r\n var disposer = this._responsiveDisposers.pop();\r\n while (disposer) {\r\n disposer.dispose();\r\n disposer = this._responsiveDisposers.pop();\r\n }\r\n };\r\n return Responsive;\r\n}(BaseObjectEvents));\r\nexport { Responsive };\r\n/**\r\n * [defaultRules description]\r\n *\r\n * @todo description\r\n */\r\nexport var defaultRules = new List();\r\ndefaultRules.events.on(\"inserted\", function (ev) {\r\n ev.newValue.id = registry.getUniqueId();\r\n});\r\n/**\r\n *\r\n * @todo description\r\n */\r\nvar ResponsiveBreakpoints = /** @class */ (function () {\r\n function ResponsiveBreakpoints() {\r\n }\r\n // Breakpoint functions (for use in `relevant` clause of the responsive rules)\r\n ResponsiveBreakpoints.widthXXS = function (container) {\r\n return container.pixelWidth <= ResponsiveBreakpoints.XXS;\r\n };\r\n ResponsiveBreakpoints.widthXS = function (container) {\r\n return container.pixelWidth <= ResponsiveBreakpoints.XS;\r\n };\r\n ResponsiveBreakpoints.widthS = function (container) {\r\n return container.pixelWidth <= ResponsiveBreakpoints.S;\r\n };\r\n ResponsiveBreakpoints.widthM = function (container) {\r\n return container.pixelWidth <= ResponsiveBreakpoints.M;\r\n };\r\n ResponsiveBreakpoints.widthL = function (container) {\r\n return container.pixelWidth <= ResponsiveBreakpoints.L;\r\n };\r\n ResponsiveBreakpoints.widthXL = function (container) {\r\n return container.pixelWidth <= ResponsiveBreakpoints.XL;\r\n };\r\n ResponsiveBreakpoints.widthXXL = function (container) {\r\n return container.pixelWidth <= ResponsiveBreakpoints.XXL;\r\n };\r\n ResponsiveBreakpoints.heightXXS = function (container) {\r\n return container.pixelHeight <= ResponsiveBreakpoints.XXS;\r\n };\r\n ResponsiveBreakpoints.heightXS = function (container) {\r\n return container.pixelHeight <= ResponsiveBreakpoints.XS;\r\n };\r\n ResponsiveBreakpoints.heightS = function (container) {\r\n return container.pixelHeight <= ResponsiveBreakpoints.S;\r\n };\r\n ResponsiveBreakpoints.heightM = function (container) {\r\n return container.pixelHeight <= ResponsiveBreakpoints.M;\r\n };\r\n ResponsiveBreakpoints.heightL = function (container) {\r\n return container.pixelHeight <= ResponsiveBreakpoints.L;\r\n };\r\n ResponsiveBreakpoints.heightXL = function (container) {\r\n return container.pixelHeight <= ResponsiveBreakpoints.XL;\r\n };\r\n ResponsiveBreakpoints.heightXXL = function (container) {\r\n return container.pixelHeight <= ResponsiveBreakpoints.XXL;\r\n };\r\n ResponsiveBreakpoints.isXXS = function (container) {\r\n return (container.pixelWidth <= ResponsiveBreakpoints.XXS) && (container.pixelHeight <= ResponsiveBreakpoints.XXS);\r\n };\r\n ResponsiveBreakpoints.isXS = function (container) {\r\n return (container.pixelWidth <= ResponsiveBreakpoints.XS) && (container.pixelHeight <= ResponsiveBreakpoints.XS);\r\n };\r\n ResponsiveBreakpoints.isS = function (container) {\r\n return (container.pixelWidth <= ResponsiveBreakpoints.S) && (container.pixelHeight <= ResponsiveBreakpoints.S);\r\n };\r\n ResponsiveBreakpoints.isM = function (container) {\r\n return (container.pixelWidth <= ResponsiveBreakpoints.M) && (container.pixelHeight <= ResponsiveBreakpoints.M);\r\n };\r\n ResponsiveBreakpoints.isL = function (container) {\r\n return (container.pixelWidth <= ResponsiveBreakpoints.L) && (container.pixelHeight <= ResponsiveBreakpoints.L);\r\n };\r\n ResponsiveBreakpoints.isXL = function (container) {\r\n return (container.pixelWidth <= ResponsiveBreakpoints.XL) && (container.pixelHeight <= ResponsiveBreakpoints.XL);\r\n };\r\n ResponsiveBreakpoints.isXXL = function (container) {\r\n return (container.pixelWidth <= ResponsiveBreakpoints.XXL) && (container.pixelHeight <= ResponsiveBreakpoints.XXL);\r\n };\r\n ResponsiveBreakpoints.maybeXXS = function (container) {\r\n return (container.pixelWidth <= ResponsiveBreakpoints.XXS) || (container.pixelHeight <= ResponsiveBreakpoints.XXS);\r\n };\r\n ResponsiveBreakpoints.maybeXS = function (container) {\r\n return (container.pixelWidth <= ResponsiveBreakpoints.XS) || (container.pixelHeight <= ResponsiveBreakpoints.XS);\r\n };\r\n ResponsiveBreakpoints.maybeS = function (container) {\r\n return (container.pixelWidth <= ResponsiveBreakpoints.S) || (container.pixelHeight <= ResponsiveBreakpoints.S);\r\n };\r\n ResponsiveBreakpoints.maybeM = function (container) {\r\n return (container.pixelWidth <= ResponsiveBreakpoints.M) || (container.pixelHeight <= ResponsiveBreakpoints.M);\r\n };\r\n ResponsiveBreakpoints.maybeL = function (container) {\r\n return (container.pixelWidth <= ResponsiveBreakpoints.L) || (container.pixelHeight <= ResponsiveBreakpoints.L);\r\n };\r\n ResponsiveBreakpoints.maybeXL = function (container) {\r\n return (container.pixelWidth <= ResponsiveBreakpoints.XL) || (container.pixelHeight <= ResponsiveBreakpoints.XL);\r\n };\r\n ResponsiveBreakpoints.maybeXXL = function (container) {\r\n return (container.pixelWidth <= ResponsiveBreakpoints.XXL) || (container.pixelHeight <= ResponsiveBreakpoints.XXL);\r\n };\r\n // Named pixel breakpoints\r\n ResponsiveBreakpoints.XXS = 100;\r\n ResponsiveBreakpoints.XS = 200;\r\n ResponsiveBreakpoints.S = 300;\r\n ResponsiveBreakpoints.M = 400;\r\n ResponsiveBreakpoints.L = 600;\r\n ResponsiveBreakpoints.XL = 800;\r\n ResponsiveBreakpoints.XXL = 1000;\r\n return ResponsiveBreakpoints;\r\n}());\r\nexport { ResponsiveBreakpoints };\r\n","import { __extends, __generator } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { EventDispatcher } from \"./EventDispatcher\";\r\nimport * as $array from \"./Array\";\r\nimport * as $iter from \"./Iterator\";\r\nimport * as $type from \"./Type\";\r\n/**\r\n * Ordered list contains values of any type in an indexed array.\r\n */\r\nvar OrderedList = /** @class */ (function () {\r\n /**\r\n * Constructor\r\n *\r\n * @param initial Inital list of values to add to list\r\n */\r\n function OrderedList(initial) {\r\n /**\r\n * Holds list values.\r\n */\r\n this._values = [];\r\n /**\r\n * Event dispatcher.\r\n */\r\n this.events = new EventDispatcher();\r\n if (initial != null) {\r\n this.setAll(initial);\r\n }\r\n }\r\n Object.defineProperty(OrderedList.prototype, \"values\", {\r\n /**\r\n * All items of the list.\r\n *\r\n * Do not modify the list directly. Rather use `insert()` and `remove()`\r\n * methods.\r\n *\r\n * @return List values\r\n */\r\n get: function () {\r\n return this._values;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Inserts a value into list item array.\r\n *\r\n * @param value Value\r\n */\r\n OrderedList.prototype._insert = function (value) {\r\n this._values.push(value);\r\n return this._values.length - 1;\r\n };\r\n Object.defineProperty(OrderedList.prototype, \"length\", {\r\n /**\r\n * Number of items in the list.\r\n *\r\n * @readonly\r\n * @return Length\r\n */\r\n get: function () {\r\n return this._values.length;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Returns the index of the specific `value`.\r\n *\r\n * -1 if not found.\r\n *\r\n * @param value Value\r\n * @return Index\r\n */\r\n OrderedList.prototype.indexOf = function (value) {\r\n return $array.indexOf(this._values, value);\r\n };\r\n /**\r\n * Checks if list contains the `value`.\r\n *\r\n * @param value Value\r\n * @return In the list?\r\n */\r\n OrderedList.prototype.contains = function (value) {\r\n return this.indexOf(value) !== -1;\r\n };\r\n /**\r\n * Returns an item at specific `index`.\r\n *\r\n * @param index Index\r\n * @return Item\r\n */\r\n OrderedList.prototype.getIndex = function (index) {\r\n return this._values[index];\r\n };\r\n Object.defineProperty(OrderedList.prototype, \"first\", {\r\n /**\r\n * First item in the list.\r\n *\r\n * @return Item\r\n */\r\n get: function () {\r\n return this._values[0];\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(OrderedList.prototype, \"last\", {\r\n /**\r\n * Last item in the list.\r\n *\r\n * @return Item\r\n */\r\n get: function () {\r\n return this._values[this._values.length - 1];\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Inserts a value into list.\r\n *\r\n * @param value Value\r\n */\r\n OrderedList.prototype.insert = function (value) {\r\n var index = this._insert(value);\r\n if (this.events.isEnabled(\"inserted\")) {\r\n this.events.dispatchImmediately(\"inserted\", {\r\n type: \"inserted\",\r\n target: this,\r\n index: index,\r\n newValue: value\r\n });\r\n }\r\n };\r\n /**\r\n * Removes an item with the `value` from the list.\r\n *\r\n * @param value Value\r\n */\r\n OrderedList.prototype.remove = function (value) {\r\n var index = this.indexOf(value);\r\n if (index !== -1) {\r\n var oldValue = this._values[index];\r\n $array.removeIndex(this._values, index);\r\n if (this.events.isEnabled(\"removed\")) {\r\n this.events.dispatchImmediately(\"removed\", {\r\n type: \"removed\",\r\n target: this,\r\n index: index,\r\n oldValue: oldValue,\r\n });\r\n }\r\n }\r\n };\r\n /**\r\n * Sets multiple items to the list.\r\n *\r\n * All current items are removed.\r\n *\r\n * @param newArray New items\r\n */\r\n OrderedList.prototype.setAll = function (newArray) {\r\n var _this = this;\r\n $array.eachReverse(this._values, function (x, i) {\r\n _this._values.pop();\r\n if (_this.events.isEnabled(\"removed\")) {\r\n _this.events.dispatchImmediately(\"removed\", {\r\n type: \"removed\",\r\n target: _this,\r\n index: i,\r\n oldValue: x\r\n });\r\n }\r\n });\r\n $array.each(newArray, function (value) {\r\n _this.insert(value);\r\n });\r\n };\r\n /**\r\n * Removes all items from the list.\r\n */\r\n OrderedList.prototype.clear = function () {\r\n this.setAll([]);\r\n };\r\n /**\r\n * Returns part of the list between `start` and `end` indexes, as a new\r\n * [[OrderedList]].\r\n *\r\n * @param start Start index\r\n * @param end End index\r\n * @return Items in range\r\n */\r\n OrderedList.prototype.slice = function (start, end) {\r\n var out = new OrderedList();\r\n out._values = this._values.slice(start, end);\r\n return out;\r\n };\r\n /**\r\n * Finds a closest available index to the `value` in specified direction.\r\n *\r\n * @ignore exclude from docs\r\n * @param value value to search for\r\n * @param fn A callback function that returns value of the item\r\n * @param direction Direciton\r\n * @return Index\r\n */\r\n OrderedList.prototype.findClosestIndex = function (value, fn, direction) {\r\n if (direction === void 0) { direction = \"any\"; }\r\n // Init temporary values\r\n var closestIndex = -1;\r\n var closestValue;\r\n var closestDifference;\r\n var i = 0;\r\n $iter.eachContinue(this.iterator(), function (element) {\r\n var item = fn(element);\r\n // Calc difference\r\n if (direction === \"any\") {\r\n // Exact match?\r\n if (item === value) {\r\n // Found exact value - don't bother searching further\r\n closestIndex = i;\r\n return false;\r\n }\r\n var difference = Math.abs(value - item);\r\n if (!$type.hasValue(closestDifference) || (closestDifference > difference)) {\r\n closestIndex = i;\r\n closestValue = item;\r\n closestDifference = difference;\r\n }\r\n }\r\n else if (direction === \"left\" && (item < value)) {\r\n if (!$type.hasValue(closestValue) || (closestValue < item)) {\r\n closestIndex = i;\r\n closestValue = item;\r\n }\r\n }\r\n else if (direction === \"right\" && (item >= value)) {\r\n if (!$type.hasValue(closestValue) || (closestValue >= item)) {\r\n closestIndex = i;\r\n closestValue = item;\r\n }\r\n }\r\n ++i;\r\n return true;\r\n });\r\n // Found nothing?\r\n if (closestIndex === -1) {\r\n if (direction === \"left\") {\r\n // Use First one\r\n closestIndex = 0;\r\n }\r\n else if (direction === \"right\") {\r\n // Use last item\r\n closestIndex = this.length - 1;\r\n }\r\n }\r\n return closestIndex;\r\n };\r\n /**\r\n * Returns a list iterator.\r\n *\r\n * @return Iterator\r\n */\r\n OrderedList.prototype.iterator = function () {\r\n return $iter.fromArray(this._values);\r\n };\r\n /**\r\n * Returns an ES6 iterator for the list.\r\n */\r\n OrderedList.prototype[Symbol.iterator] = function () {\r\n var length, i;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n length = this._values.length;\r\n i = 0;\r\n _a.label = 1;\r\n case 1:\r\n if (!(i < length)) return [3 /*break*/, 4];\r\n return [4 /*yield*/, this._values[i]];\r\n case 2:\r\n _a.sent();\r\n _a.label = 3;\r\n case 3:\r\n ++i;\r\n return [3 /*break*/, 1];\r\n case 4: return [2 /*return*/];\r\n }\r\n });\r\n };\r\n /**\r\n * Calls `f` for each element in the list.\r\n */\r\n OrderedList.prototype.each = function (f) {\r\n $array.each(this._values, f);\r\n };\r\n return OrderedList;\r\n}());\r\nexport { OrderedList };\r\n/**\r\n * A list where all items are ordered according to specific ordering function,\r\n * which is passed in via constructor parameter, when creating an instance of\r\n * [[SortedList]].\r\n */\r\nvar SortedList = /** @class */ (function (_super) {\r\n __extends(SortedList, _super);\r\n /**\r\n * Constructor.\r\n *\r\n * @param sort Ordering function\r\n */\r\n function SortedList(sort) {\r\n var _this = _super.call(this) || this;\r\n _this._ordering = sort;\r\n return _this;\r\n }\r\n /**\r\n * Inserts item into the list.\r\n *\r\n * @param value Item\r\n */\r\n SortedList.prototype._insert = function (value) {\r\n var index = $array.getSortedIndex(this._values, this._ordering, value).index;\r\n $array.insertIndex(this._values, index, value);\r\n return index;\r\n };\r\n /**\r\n * Returns index of the item in list if found.\r\n *\r\n * -1 if item is not in the list.\r\n *\r\n * @param value Item to search for\r\n * @return Index\r\n */\r\n SortedList.prototype.indexOf = function (value) {\r\n var _a = $array.getSortedIndex(this._values, this._ordering, value), found = _a.found, index = _a.index;\r\n if (found) {\r\n return index;\r\n }\r\n else {\r\n return -1;\r\n }\r\n };\r\n /**\r\n * [udpate description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param value [description]\r\n */\r\n SortedList.prototype.update = function (value) {\r\n // @todo test this\r\n var index = $array.indexOf(this._values, value);\r\n // @todo throw an error if it doesn't exist ?\r\n if (index !== -1) {\r\n var last = this._values.length - 1;\r\n // Check if the current ordering is correct\r\n if (!((index === 0 || this._ordering(this._values[index - 1], value) < 0) &&\r\n (index === last || this._ordering(value, this._values[index + 1]) < 0))) {\r\n // TODO send remove/insert/move events\r\n $array.removeIndex(this._values, index);\r\n this._insert(value);\r\n }\r\n }\r\n };\r\n return SortedList;\r\n}(OrderedList));\r\nexport { SortedList };\r\n/**\r\n * A version of a [[OrderedList]] that has a \"template\".\r\n *\r\n * A template is an instance of an object, that can be used to create new\r\n * elements in the list without actually needing to create instances for those.\r\n *\r\n * When new element is created in the list, e.g. by calling its `create()`\r\n * method, an exact copy of the element is created (including properties and\r\n * other attributes), inserted into the list and returned.\r\n */\r\nvar OrderedListTemplate = /** @class */ (function (_super) {\r\n __extends(OrderedListTemplate, _super);\r\n /**\r\n * Constructor\r\n *\r\n * @param t Template object\r\n */\r\n function OrderedListTemplate(t) {\r\n var _this = _super.call(this) || this;\r\n _this.template = t;\r\n return _this;\r\n }\r\n Object.defineProperty(OrderedListTemplate.prototype, \"template\", {\r\n /**\r\n * @return Template object\r\n */\r\n get: function () {\r\n return this._template;\r\n },\r\n /**\r\n * A \"template\" object to copy all properties from when creating new list\r\n * items.\r\n *\r\n * @param v Template object\r\n */\r\n set: function (v) {\r\n v.isTemplate = true;\r\n this._template = v;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Copies all elements from other list.\r\n *\r\n * @param source Source list\r\n */\r\n OrderedListTemplate.prototype.copyFrom = function (source) {\r\n var _this = this;\r\n $iter.each(source.iterator(), function (value) {\r\n _this.insert(value.clone());\r\n });\r\n };\r\n /**\r\n * Returns part of the list, starting at `start` and ending at `end` indexes,\r\n * as a new [[OrderedListTemplate]].\r\n *\r\n * @param start Start index\r\n * @param end End index\r\n * @return New list\r\n */\r\n OrderedListTemplate.prototype.slice = function (start, end) {\r\n var out = new OrderedListTemplate(this.template);\r\n out._values = this._values.slice(start, end);\r\n return out;\r\n };\r\n OrderedListTemplate.prototype.create = function (make) {\r\n var clone = (make != null\r\n ? new make()\r\n : this.template.clone());\r\n this.insert(clone);\r\n return clone;\r\n };\r\n return OrderedListTemplate;\r\n}(OrderedList));\r\nexport { OrderedListTemplate };\r\n/**\r\n * A version of a [[SortedList]] that has a \"template\".\r\n *\r\n * A template is an instance of an object, that can be used to create new\r\n * elements in the list without actually needing to create instances for those.\r\n *\r\n * When new element is created in the list, e.g. by calling its `create()`\r\n * method, an exact copy of the element is created (including properties and\r\n * other attributes), inserted into the list and returned.\r\n */\r\nvar SortedListTemplate = /** @class */ (function (_super) {\r\n __extends(SortedListTemplate, _super);\r\n /**\r\n * Constructor\r\n *\r\n * @param t Template object\r\n * @param sort Ordering function\r\n */\r\n function SortedListTemplate(t, sort) {\r\n var _this = _super.call(this, sort) || this;\r\n _this.template = t;\r\n return _this;\r\n }\r\n Object.defineProperty(SortedListTemplate.prototype, \"template\", {\r\n /**\r\n * @return Template object\r\n */\r\n get: function () {\r\n return this._template;\r\n },\r\n /**\r\n * A \"template\" object to copy all properties from when creating new list\r\n * items.\r\n *\r\n * @param v Template object\r\n */\r\n set: function (v) {\r\n v.isTemplate = true;\r\n this._template = v;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Copies all elements from other list.\r\n *\r\n * @param source Source list\r\n */\r\n SortedListTemplate.prototype.copyFrom = function (source) {\r\n var _this = this;\r\n $iter.each(source.iterator(), function (value) {\r\n _this.insert(value.clone());\r\n });\r\n };\r\n SortedListTemplate.prototype.create = function (make) {\r\n var clone = (make != null\r\n ? new make()\r\n : this.template.clone());\r\n this.insert(clone);\r\n return clone;\r\n };\r\n return SortedListTemplate;\r\n}(SortedList));\r\nexport { SortedListTemplate };\r\n","/**\r\n * ============================================================================\r\n * COMPARING FUNCTIONS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Comparing function used for ordering.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Use localeCompare\r\n * @param a Item 1\r\n * @param b Item 2\r\n * @return Result\r\n */\r\nexport function order(a, b) {\r\n if (a === b) {\r\n return 0;\r\n }\r\n else if (a < b) {\r\n return -1;\r\n }\r\n else {\r\n return 1;\r\n }\r\n}\r\n/**\r\n * ============================================================================\r\n * OTHER FUNCTIONS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Repeats a `string` number of times as set in `amount`.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Make this faster\r\n * @param string Source string\r\n * @param amount Number of times to repeat string\r\n * @return New string\r\n */\r\nexport function repeat(string, amount) {\r\n return new Array(amount + 1).join(string);\r\n}\r\n/**\r\n * Generates a random string `characters` length.\r\n *\r\n * @param chars Number of characters\r\n * @return Random string\r\n */\r\nexport function random(chars) {\r\n var res = \"\";\r\n var choice = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\r\n for (var i = 0; i < chars; i++) {\r\n res += choice.charAt(Math.floor(Math.random() * choice.length));\r\n }\r\n return res;\r\n}\r\n","/**\r\n * A collection of String-based constants.\r\n * @hidden\r\n * @ignore Exclude from docs\r\n */\r\n/**\r\n * @ignore Exclude from docs\r\n */\r\nexport var PX = \"px\";\r\n/**\r\n * @ignore Exclude from docs\r\n */\r\nexport var STRING = \"string\";\r\n/**\r\n * @ignore Exclude from docs\r\n */\r\nexport var NUMBER = \"number\";\r\n/**\r\n * @ignore Exclude from docs\r\n */\r\nexport var DATE = \"date\";\r\n/**\r\n * @ignore Exclude from docs\r\n */\r\nexport var DURATION = \"duration\";\r\n/**\r\n * @ignore Exclude from docs\r\n */\r\nexport var PLACEHOLDER = \"__§§§__\";\r\n/**\r\n * @ignore Exclude from docs\r\n */\r\nexport var PLACEHOLDER2 = \"__§§§§__\";\r\n","import * as $type from \"../utils/Type\";\r\n/**\r\n * Maps time period names to their numeric representations in milliseconds.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\nexport var timeUnitDurations = {\r\n millisecond: 1,\r\n second: 1000,\r\n minute: 60000,\r\n hour: 3600000,\r\n day: 86400000,\r\n week: 604800000,\r\n month: 2592000000,\r\n year: 31536000000\r\n};\r\n/**\r\n * Returns the next time unit that goes after source `unit`.\r\n *\r\n * E.g. \"hour\" is the next unit after \"minute\", etc.\r\n *\r\n * @ignore Exclude from docs\r\n * @param unit Source time unit\r\n * @return Next time unit\r\n */\r\nexport function getNextUnit(unit) {\r\n switch (unit) {\r\n case \"year\":\r\n return;\r\n case \"month\":\r\n return \"year\";\r\n case \"week\":\r\n return \"month\";\r\n case \"day\":\r\n return \"month\"; // not a mistake\r\n case \"hour\":\r\n return \"day\";\r\n case \"minute\":\r\n return \"hour\";\r\n case \"second\":\r\n return \"minute\";\r\n case \"millisecond\":\r\n return \"second\";\r\n }\r\n}\r\n/**\r\n * Returns number of milliseconds in the `count` of time `unit`.\r\n *\r\n * Available units: \"millisecond\", \"second\", \"minute\", \"hour\", \"day\", \"week\",\r\n * \"month\", and \"year\".\r\n *\r\n * @ignore Exclude from docs\r\n * @param unit Time unit\r\n * @param count Number of units\r\n * @return Milliseconds\r\n */\r\nexport function getDuration(unit, count) {\r\n if (!$type.hasValue(count)) {\r\n count = 1;\r\n }\r\n return timeUnitDurations[unit] * count;\r\n}\r\n/**\r\n * Returns current `Date` object.\r\n *\r\n * @return Current date\r\n */\r\nexport function now() {\r\n return new Date();\r\n}\r\n/**\r\n * Returns current timestamp.\r\n *\r\n * @return Current timestamp\r\n */\r\nexport function getTime() {\r\n return now().getTime();\r\n}\r\n/**\r\n * Returns a copy of the `Date` object.\r\n *\r\n * @ignore Exclude from docs\r\n * @param date Source date\r\n * @return Copy\r\n */\r\nexport function copy(date) {\r\n return new Date(date.getTime()); // todo: check if this is ok. new Date(date) used to strip milliseconds on FF in v3\r\n}\r\n/**\r\n * Checks if the `unit` part of two `Date` objects do not match. Two dates\r\n * represent a \"range\" of time, rather the same time date.\r\n *\r\n * @ignore Exclude from docs\r\n * @param dateOne Date 1\r\n * @param dateTwo Date 2\r\n * @param unit Time unit to check\r\n * @return Range?\r\n */\r\nexport function checkChange(dateOne, dateTwo, unit, utc) {\r\n dateOne = new Date(dateOne.getTime());\r\n dateTwo = new Date(dateTwo.getTime());\r\n var timeZoneOffset1 = 0;\r\n var timeZoneOffset2 = 0;\r\n if (!utc && unit != \"millisecond\") {\r\n timeZoneOffset1 = dateOne.getTimezoneOffset();\r\n dateOne.setUTCMinutes(dateOne.getUTCMinutes() - timeZoneOffset1);\r\n timeZoneOffset2 = dateTwo.getTimezoneOffset();\r\n dateTwo.setUTCMinutes(dateTwo.getUTCMinutes() - timeZoneOffset2);\r\n }\r\n var changed = false;\r\n switch (unit) {\r\n case \"year\":\r\n if (dateOne.getUTCFullYear() != dateTwo.getUTCFullYear()) {\r\n changed = true;\r\n }\r\n break;\r\n case \"month\":\r\n if (dateOne.getUTCFullYear() != dateTwo.getUTCFullYear()) {\r\n changed = true;\r\n }\r\n else if (dateOne.getUTCMonth() != dateTwo.getUTCMonth()) {\r\n changed = true;\r\n }\r\n break;\r\n case \"day\":\r\n if (dateOne.getUTCMonth() != dateTwo.getUTCMonth()) {\r\n changed = true;\r\n }\r\n else if (dateOne.getUTCDate() != dateTwo.getUTCDate()) {\r\n changed = true;\r\n }\r\n break;\r\n case \"hour\":\r\n if (dateOne.getUTCHours() != dateTwo.getUTCHours()) {\r\n changed = true;\r\n }\r\n break;\r\n case \"minute\":\r\n if (dateOne.getUTCMinutes() != dateTwo.getUTCMinutes()) {\r\n changed = true;\r\n }\r\n break;\r\n case \"second\":\r\n if (dateOne.getUTCSeconds() != dateTwo.getUTCSeconds()) {\r\n changed = true;\r\n }\r\n break;\r\n case \"millisecond\":\r\n if (dateOne.getTime() != dateTwo.getTime()) {\r\n changed = true;\r\n }\r\n break;\r\n }\r\n if (changed) {\r\n return true;\r\n }\r\n var nextUnit = getNextUnit(unit);\r\n if (nextUnit) {\r\n dateOne.setUTCMinutes(dateOne.getUTCMinutes() + timeZoneOffset1);\r\n dateTwo.setUTCMinutes(dateTwo.getUTCMinutes() + timeZoneOffset2);\r\n return checkChange(dateOne, dateTwo, nextUnit, utc);\r\n }\r\n else {\r\n return false;\r\n }\r\n}\r\n/**\r\n * Adds `count` of time `unit` to the source date. Returns a modified `Date` object.\r\n *\r\n * @ignore Exclude from docs\r\n * @param date Source date\r\n * @param unit Time unit\r\n * @param count Number of units to add\r\n * @return Modified date\r\n */\r\nexport function add(date, unit, count, utc) {\r\n var timeZoneOffset = 0;\r\n if (!utc && unit != \"millisecond\") {\r\n timeZoneOffset = date.getTimezoneOffset();\r\n date.setUTCMinutes(date.getUTCMinutes() - timeZoneOffset);\r\n }\r\n switch (unit) {\r\n case \"day\":\r\n var day = date.getUTCDate();\r\n date.setUTCDate(day + count);\r\n break;\r\n case \"second\":\r\n var seconds = date.getUTCSeconds();\r\n date.setUTCSeconds(seconds + count);\r\n break;\r\n case \"millisecond\":\r\n var milliseconds = date.getUTCMilliseconds();\r\n date.setUTCMilliseconds(milliseconds + count);\r\n break;\r\n case \"hour\":\r\n var hours = date.getUTCHours();\r\n date.setUTCHours(hours + count);\r\n break;\r\n case \"minute\":\r\n var minutes = date.getUTCMinutes();\r\n date.setUTCMinutes(minutes + count);\r\n break;\r\n case \"year\":\r\n var year = date.getUTCFullYear();\r\n date.setUTCFullYear(year + count);\r\n break;\r\n case \"month\":\r\n var month = date.getUTCMonth();\r\n date.setUTCMonth(month + count);\r\n break;\r\n case \"week\":\r\n var wday = date.getUTCDate();\r\n date.setUTCDate(wday + count * 7);\r\n break;\r\n }\r\n if (!utc && unit != \"millisecond\") {\r\n date.setUTCMinutes(date.getUTCMinutes() + timeZoneOffset);\r\n if (unit == \"day\" || unit == \"week\" || unit == \"month\" || unit == \"year\") {\r\n var newTimeZoneOffset = date.getTimezoneOffset();\r\n if (newTimeZoneOffset != timeZoneOffset) {\r\n var diff = newTimeZoneOffset - timeZoneOffset;\r\n date.setUTCMinutes(date.getUTCMinutes() + diff);\r\n // solves issues if newe time falls back to old time zone\r\n if (date.getTimezoneOffset() != newTimeZoneOffset) {\r\n date.setUTCMinutes(date.getUTCMinutes() - diff);\r\n }\r\n }\r\n }\r\n }\r\n return date;\r\n}\r\n/**\r\n * \"Rounds\" the date to specific time unit.\r\n *\r\n * @ignore Exclude from docs\r\n * @param date Source date\r\n * @param unit Time unit\r\n * @param count Number of units to round to\r\n * @param firstDateOfWeek First day of week\r\n * @param roundMinutes Minutes to round to (some timezones use non-whole hour)\r\n * @param timezone Use specific named timezone when rounding\r\n * @return New date\r\n */\r\nexport function round(date, unit, count, firstDateOfWeek, utc, firstDate, roundMinutes, timezone) {\r\n if (roundMinutes === void 0) { roundMinutes = 0; }\r\n if (!$type.isNumber(count)) {\r\n count = 1;\r\n }\r\n var timeZoneOffset = 0;\r\n if (timezone && [\"day\", \"month\", \"week\", \"year\"].indexOf(unit) != -1) {\r\n date = setTimezone(date, timezone);\r\n }\r\n if (!utc && unit != \"millisecond\") {\r\n timeZoneOffset = date.getTimezoneOffset();\r\n date.setUTCMinutes(date.getUTCMinutes() - timeZoneOffset);\r\n }\r\n switch (unit) {\r\n case \"day\":\r\n var day = date.getUTCDate();\r\n if (count > 1) {\r\n //\tday = Math.floor(day / count) * count;\r\n if (firstDate) {\r\n firstDate = round(firstDate, \"day\", 1);\r\n var difference = date.getTime() - firstDate.getTime();\r\n var unitCount = Math.floor(difference / getDuration(\"day\") / count);\r\n var duration = getDuration(\"day\", unitCount * count);\r\n date.setTime(firstDate.getTime() + duration - timeZoneOffset * getDuration(\"minute\"));\r\n }\r\n }\r\n else {\r\n date.setUTCDate(day);\r\n }\r\n date.setUTCHours(0, 0, 0, 0);\r\n break;\r\n case \"second\":\r\n var seconds = date.getUTCSeconds();\r\n if (count > 1) {\r\n seconds = Math.floor(seconds / count) * count;\r\n }\r\n date.setUTCSeconds(seconds, 0);\r\n break;\r\n case \"millisecond\":\r\n if (count == 1) {\r\n return date; // much better for perf!\r\n }\r\n var milliseconds = date.getUTCMilliseconds();\r\n milliseconds = Math.floor(milliseconds / count) * count;\r\n date.setUTCMilliseconds(milliseconds);\r\n break;\r\n case \"hour\":\r\n var hours = date.getUTCHours();\r\n if (count > 1) {\r\n hours = Math.floor(hours / count) * count;\r\n }\r\n date.setUTCHours(hours, roundMinutes, 0, 0);\r\n break;\r\n case \"minute\":\r\n var minutes = date.getUTCMinutes();\r\n milliseconds = date.getUTCMilliseconds();\r\n if (count > 1) {\r\n minutes = Math.floor(minutes / count) * count;\r\n }\r\n date.setUTCMinutes(minutes, 0, 0);\r\n break;\r\n case \"month\":\r\n var month = date.getUTCMonth();\r\n if (count > 1) {\r\n month = Math.floor(month / count) * count;\r\n }\r\n date.setUTCMonth(month, 1);\r\n date.setUTCHours(0, roundMinutes, 0, 0);\r\n break;\r\n case \"year\":\r\n var year = date.getUTCFullYear();\r\n if (count > 1) {\r\n year = Math.floor(year / count) * count;\r\n }\r\n date.setUTCFullYear(year, 0, 1);\r\n date.setUTCHours(0, roundMinutes, 0, 0);\r\n //let nonUTCDateY = new Date(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());\r\n //timeZoneOffset = nonUTCDateY.getTimezoneOffset();\r\n break;\r\n case \"week\":\r\n var wday = date.getUTCDate();\r\n var weekDay = date.getUTCDay();\r\n if (!$type.isNumber(firstDateOfWeek)) {\r\n firstDateOfWeek = 1;\r\n }\r\n // todo: rounding when count is not 1\r\n if (weekDay >= firstDateOfWeek) {\r\n wday = wday - weekDay + firstDateOfWeek;\r\n }\r\n else {\r\n wday = wday - (7 + weekDay) + firstDateOfWeek;\r\n }\r\n date.setUTCDate(wday);\r\n date.setUTCHours(0, roundMinutes, 0, 0);\r\n break;\r\n }\r\n if (!utc && unit != \"millisecond\") {\r\n date.setUTCMinutes(date.getUTCMinutes() + timeZoneOffset);\r\n if (unit == \"day\" || unit == \"week\" || unit == \"month\" || unit == \"year\") {\r\n var newTimeZoneOffset = date.getTimezoneOffset();\r\n if (newTimeZoneOffset != timeZoneOffset) {\r\n var diff = newTimeZoneOffset - timeZoneOffset;\r\n date.setUTCMinutes(date.getUTCMinutes() + diff);\r\n }\r\n }\r\n }\r\n return date;\r\n}\r\n/**\r\n * Returns a new `Date` object which corresponds to the source date in a\r\n * specific timezone.\r\n *\r\n * @since 4.10.1\r\n * @param date Source date\r\n * @param timezone Timezone identifier\r\n * @return Recalculated new Date\r\n */\r\nexport function setTimezone(date, timezone) {\r\n var d = new Date(date.toLocaleString(\"en-US\", { timeZone: timezone }));\r\n return d;\r\n}\r\n/**\r\n * Returns minute fraction of the set timezone.\r\n *\r\n * @since 4.10.12\r\n * @param timezone Timezone identifier\r\n * @return Minutes\r\n */\r\nexport function getTimezoneMinutes(timezone) {\r\n var d = new Date();\r\n d.setHours(0, 0, 0, 0);\r\n var d2 = setTimezone(d, timezone);\r\n return d2.getMinutes();\r\n}\r\n","/**\r\n * A collection of utility functions for various type checks and conversion\r\n * @todo Review unused functions for removal\r\n * @hidden\r\n */\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { percent, isPercent } from \"./Percent\";\r\n/**\r\n * ============================================================================\r\n * TYPE CHECK\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Returns `true` if value is not a number (NaN).\r\n *\r\n * @param value Input value\r\n * @return Is NaN?\r\n * @deprecated Is not used anywhere. JS built-in isNaN is used everywhere. Maybe we don't need this, or if we do, then we should use it everywhere\r\n */\r\nexport function isNaN(value) {\r\n return Number(value) !== value;\r\n}\r\n/**\r\n * Returns a type of the value.\r\n *\r\n * @param value Input value\r\n * @return Type of the value\r\n */\r\nexport function getType(value) {\r\n return ({}).toString.call(value);\r\n}\r\n/**\r\n * Returns a default value if the passed in value is empty.\r\n *\r\n * @param value Input value\r\n * @param optional Default value\r\n * @return Value or default value whichever is available\r\n * @deprecated Not used anywhere\r\n */\r\nexport function getDefault(value, optional) {\r\n return value || optional;\r\n}\r\n/**\r\n * Checks if the passed in value is a string.\r\n *\r\n * @param value Value\r\n * @return Is string?\r\n * @throws {Error}\r\n * @deprecated Not used anywhere\r\n */\r\nexport function checkString(value) {\r\n if (typeof value === \"string\") {\r\n return true;\r\n }\r\n else {\r\n throw new Error(\"Expected a string but got \" + getType(value));\r\n }\r\n}\r\n/**\r\n * Checks if the passed in value is a boolean.\r\n *\r\n * @param value Value\r\n * @return Is boolean?\r\n * @throws {Error}\r\n * @deprecated Not used anywhere\r\n */\r\nexport function checkBoolean(value) {\r\n if (typeof value === \"boolean\") {\r\n return true;\r\n }\r\n else {\r\n throw new Error(\"Expected a boolean but got \" + getType(value));\r\n }\r\n}\r\n/**\r\n * Checks if the passed in value is a number.\r\n *\r\n * @param value Value\r\n * @return Is number?\r\n * @throws {Error}\r\n */\r\nexport function checkNumber(value) {\r\n if (typeof value === \"number\") {\r\n if (isNaN(value)) {\r\n throw new Error(\"Expected a number but got NaN\");\r\n }\r\n }\r\n else {\r\n throw new Error(\"Expected a number but got \" + getType(value));\r\n }\r\n return true;\r\n}\r\n/**\r\n * Checks if the passed in value is an object.\r\n *\r\n * @param value Value\r\n * @return Is object?\r\n * @throws {Error}\r\n * @todo Is the input type correct?\r\n * @deprecated Not used anywhere\r\n */\r\nexport function checkObject(value) {\r\n var t = getType(value);\r\n if (t === \"[object Object]\") {\r\n return true;\r\n }\r\n else {\r\n throw new Error(\"Expected an object but got \" + t);\r\n }\r\n}\r\n/**\r\n * Checks if the passed in value is an array.\r\n *\r\n * @param value Value\r\n * @return Is array?\r\n * @throws {Error}\r\n * @deprecated Not used anywhere\r\n */\r\nexport function checkArray(value) {\r\n if (Array.isArray(value)) {\r\n return true;\r\n }\r\n else {\r\n throw new Error(\"Expected an array but got \" + getType(value));\r\n }\r\n}\r\n/**\r\n * Checks if the passed in value is a Date object.\r\n *\r\n * @param value Value\r\n * @return Is Date object?\r\n * @throws {Error}\r\n * @deprecated Not used anywhere\r\n */\r\nexport function checkDate(value) {\r\n var t = getType(value);\r\n if (t === \"[object Date]\") {\r\n return true;\r\n }\r\n else {\r\n throw new Error(\"Expected a date but got \" + t);\r\n }\r\n}\r\n/**\r\n * ============================================================================\r\n * TYPE CASTING\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Casts string or a number into string.\r\n *\r\n * @param value Input\r\n * @return String value\r\n * @deprecated Not used anywhere\r\n */\r\nexport function castString(value) {\r\n if (typeof value === \"string\") {\r\n return value;\r\n }\r\n else if (typeof value === \"number\") {\r\n return \"\" + value;\r\n }\r\n else {\r\n throw new Error(\"Expected a string or number but got \" + getType(value));\r\n }\r\n}\r\n/**\r\n * Casts string or a number into a number.\r\n *\r\n * @param value Input value\r\n * @return Number value\r\n * @throws {Error}\r\n */\r\nexport function castNumber(value) {\r\n if (typeof value === \"string\") {\r\n var number = +value;\r\n if (isNaN(number)) {\r\n throw new Error(\"Cannot cast string \" + JSON.stringify(value) + \" to a number\");\r\n }\r\n else {\r\n return number;\r\n }\r\n }\r\n else if (typeof value === \"number\") {\r\n if (isNaN(value)) {\r\n throw new Error(\"Expected a number but got NaN\");\r\n }\r\n else {\r\n return value;\r\n }\r\n }\r\n else {\r\n var t = getType(value);\r\n if (t === \"[object Date]\") {\r\n return value.getTime();\r\n }\r\n else {\r\n throw new Error(\"Expected a string, number, or date but got \" + t);\r\n }\r\n }\r\n}\r\n/**\r\n * Casts number, string or Date into a Date object.\r\n *\r\n * @param value Input value\r\n * @return Date object\r\n * @deprecated Not used anywhere\r\n * @throws {Error}\r\n * @hidden\r\n * @deprecated\r\n */\r\n/*export function castDate(value: string | number | Date, formatter?: DateFormatter): Date {\r\n if (typeof value === \"string\") {\r\n if (formatter) {\r\n return formatter.parse(value);\r\n }\r\n return new Date(value);\r\n\r\n } else if (typeof value === \"number\") {\r\n return new Date(value);\r\n\r\n } else {\r\n const t = getType(value);\r\n\r\n if (t === \"[object Date]\") {\r\n return value;\r\n\r\n } else {\r\n throw new Error(\"Expected a string, number, or date but got \" + t);\r\n }\r\n }\r\n}*/\r\n/**\r\n * ============================================================================\r\n * QUICK CONVERSION\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Converts any value into `boolean`.\r\n *\r\n * @param value Source value\r\n * @return `true` or `false`\r\n */\r\nexport function toBoolean(value) {\r\n return value ? true : false;\r\n}\r\n/**\r\n * Converts any value into a `number`.\r\n *\r\n * @param value Source value\r\n * @return Number representation of value\r\n */\r\nexport function toNumber(value) {\r\n if (hasValue(value) && !isNumber(value)) {\r\n var converted = Number(value);\r\n if (isNaN(converted) && isString(value) && value != \"\") {\r\n return toNumber(value.replace(/[^0-9.\\-]+/g, ''));\r\n }\r\n return converted;\r\n }\r\n return value;\r\n}\r\n/**\r\n * Converts any value into a string (text).\r\n *\r\n * @param value Source value\r\n * @return String representation of the input\r\n */\r\nexport function toText(value) {\r\n if (hasValue(value) && !isString(value)) {\r\n if (isNumber(value)) {\r\n return castString(value);\r\n }\r\n else if (isObject(value)) {\r\n return value.toString();\r\n }\r\n }\r\n return value;\r\n}\r\n/**\r\n * Converts any value to a number or [[Percent]].\r\n *\r\n * If the parameter is a string and contains \"%\", it will\r\n * convert it into a [[Percent]].\r\n *\r\n * Otherwise, it will convert into a number.\r\n *\r\n * @param value Number or percent\r\n * @return Percent object\r\n */\r\nexport function toNumberOrPercent(value) {\r\n if (!hasValue(value) || isNumber(value) || isPercent(value)) {\r\n return value;\r\n }\r\n if (isString(value) && value.indexOf(\"%\") != -1) {\r\n return percent(toNumber(value));\r\n }\r\n return toNumber(value);\r\n}\r\n/**\r\n * Checks if a variable has a value.\r\n *\r\n * @param a Input value\r\n * @returns Has value?\r\n */\r\nexport function hasValue(a) {\r\n return a != null;\r\n}\r\n/**\r\n * Returns a value or throws an {Error} exception if the variable has not\r\n * value.\r\n *\r\n * @param a Input value\r\n * @returns Value\r\n */\r\nexport function getValue(a) {\r\n if (hasValue(a)) {\r\n return a;\r\n }\r\n else {\r\n throw new Error(\"Value doesn't exist\");\r\n }\r\n}\r\n/**\r\n * Returns a value, or returns the default value if it doesn't have a value.\r\n *\r\n * @param a Input value\r\n * @returns Value\r\n */\r\nexport function getValueDefault(a, defaultValue) {\r\n if (hasValue(a)) {\r\n return a;\r\n }\r\n else {\r\n return defaultValue;\r\n }\r\n}\r\n/**\r\n * ============================================================================\r\n * TYPE CHECK\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Checks if parameter is `Date`.\r\n *\r\n * @param value Input value\r\n * @return Is Date?\r\n */\r\nexport function isDate(value) {\r\n return getType(value) === \"[object Date]\";\r\n}\r\n/**\r\n * Checks if parameter is `string`.\r\n *\r\n * @param value Input value\r\n * @return Is string?\r\n */\r\nexport function isString(value) {\r\n return typeof value === \"string\";\r\n}\r\n/**\r\n * Checks if parameter is `number`.\r\n *\r\n * @param value Input value\r\n * @return Is number?\r\n */\r\nexport function isNumber(value) {\r\n return typeof value === \"number\" && Number(value) == value;\r\n}\r\n/**\r\n * Checks if parameter is `object`.\r\n *\r\n * @param value Input value\r\n * @return Is object?\r\n */\r\nexport function isObject(value) {\r\n return typeof value === \"object\" && value != null;\r\n}\r\n/**\r\n * Checks if parameter is `Array`.\r\n *\r\n * @param value Input value\r\n * @return Is Array?\r\n */\r\nexport function isArray(value) {\r\n return Array.isArray(value);\r\n}\r\n","/**\r\n * A collection of universal utility functions.\r\n */\r\nimport { Percent } from \"./Percent\";\r\nimport { isSafari } from \"./Browser\";\r\nimport * as $math from \"../utils/Math\";\r\nimport * as $type from \"../utils/Type\";\r\nimport * as $string from \"./String\";\r\nimport * as $strings from \"./Strings\";\r\nimport * as $object from \"./Object\";\r\nimport * as $array from \"./Array\";\r\n/**\r\n * ============================================================================\r\n * MISC FUNCTIONS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Marks a value as being used (e.g. because the value has side effects).\r\n */\r\nexport function used(value) { }\r\n/**\r\n * Copies all properties of one object to the other, omitting undefined.\r\n *\r\n * @param fromObject Source object\r\n * @param toObject Target object\r\n * @return Updated target object\r\n * @todo Maybe consolidate with utils.copy?\r\n */\r\nexport function copyProperties(source, target) {\r\n $object.each(source, function (key, value) {\r\n // only if value is set\r\n if ($type.hasValue(value)) {\r\n target[key] = value;\r\n }\r\n });\r\n return target;\r\n}\r\n/**\r\n * Removes target from url\r\n */\r\nexport function stripHash(url) {\r\n return /^[^#]*/.exec(url)[0];\r\n}\r\nexport function getBaseURI() {\r\n var url = \"#\";\r\n // Needed until https://bugs.webkit.org/show_bug.cgi?id=189499 is fixed\r\n if (isSafari()) {\r\n var baseURI = document.baseURI;\r\n if (baseURI) {\r\n baseURI = stripHash(baseURI);\r\n var loc = stripHash(location.href);\r\n if (baseURI !== loc) {\r\n url = loc + url;\r\n }\r\n }\r\n }\r\n return url;\r\n}\r\n/**\r\n * Copies all properties of one object to the other, omitting undefined, but only if property in target object doesn't have a value set.\r\n *\r\n * @param fromObject Source object\r\n * @param toObject Target object\r\n * @return Updated target object\r\n * @todo Maybe consolidate with utils.copy?\r\n */\r\nexport function softCopyProperties(source, target) {\r\n $object.each(source, function (key, value) {\r\n // only if value is set\r\n if ($type.hasValue(value) && !($type.hasValue(target[key]))) {\r\n target[key] = value;\r\n }\r\n });\r\n return target;\r\n}\r\n/**\r\n * Copies all properties of one object to the other.\r\n *\r\n * @param source Source object\r\n * @param recipient Target object\r\n * @return Updated target object\r\n */\r\nexport function copy(source, target) {\r\n $object.each(source, function (key, value) {\r\n target[key] = value;\r\n });\r\n return target;\r\n}\r\n/**\r\n * Checks if value is not empty (undefined or zero-length string).\r\n *\r\n * @param value Value to check\r\n * @return `true` if value is not \"empty\"\r\n */\r\nexport function isNotEmpty(value) {\r\n return $type.hasValue(value) && (value.toString() !== \"\");\r\n}\r\n/**\r\n * [relativeToValue description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param percent [description]\r\n * @param full [description]\r\n * @return [description]\r\n */\r\nexport function relativeToValue(percent, full) {\r\n if ($type.isNumber(percent)) {\r\n return percent;\r\n }\r\n else if (percent != null && $type.isNumber(percent.value) && $type.isNumber(full)) {\r\n return full * percent.value;\r\n }\r\n else {\r\n return 0;\r\n }\r\n}\r\n/**\r\n * [relativeRadiusToValue description]\r\n *\r\n * Differs from relativeToValue so that if a value is negative, it subtracts\r\n * it from full value.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param percent [description]\r\n * @param full [description]\r\n * @param subtractIfNegative [description]\r\n * @return [description]\r\n */\r\nexport function relativeRadiusToValue(percent, full, subtractIfNegative) {\r\n var value;\r\n if ($type.isNumber(percent)) {\r\n value = percent;\r\n if (value < 0) {\r\n if (subtractIfNegative) {\r\n value = full + value;\r\n }\r\n else {\r\n value = full - value;\r\n }\r\n }\r\n }\r\n else if (percent != null && $type.isNumber(percent.value)) {\r\n value = full * percent.value;\r\n }\r\n return value;\r\n}\r\n/**\r\n * [valueToRelative description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param value [description]\r\n * @param full [description]\r\n * @return [description]\r\n */\r\nexport function valueToRelative(value, full) {\r\n if (value instanceof Percent) {\r\n return value.value;\r\n }\r\n else {\r\n return value / full;\r\n }\r\n}\r\n/**\r\n * Returns pixel ratio of the current screen (used on retina displays).\r\n *\r\n * @return Pixel ratio\r\n */\r\nexport function getPixelRatio() {\r\n var ratio = window.devicePixelRatio || 1;\r\n return ratio;\r\n}\r\n/**\r\n * ============================================================================\r\n * STRING FORMATTING FUNCTIONS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Converts camelCased text to dashed version:\r\n * (\"thisIsString\" > \"this-is-string\")\r\n *\r\n * @param str Input\r\n * @return Output\r\n */\r\nexport function camelToDashed(str) {\r\n return str.replace(/\\W+/g, '-').replace(/([a-z\\d])([A-Z])/g, '$1-$2').toLowerCase();\r\n}\r\n/**\r\n * Converts tring to uppercase.\r\n *\r\n * @param str String to convert\r\n * @return uppercased string\r\n * @todo Maybe make it better\r\n */\r\nexport function capitalize(str) {\r\n var arr = str.split(\"\");\r\n arr[0] = arr[0].toUpperCase();\r\n return arr.join(\"\");\r\n}\r\n/**\r\n * Converts any value into its string representation.\r\n *\r\n * @param value Value\r\n * @return String represantation of the value\r\n */\r\nexport function stringify(value) {\r\n return JSON.stringify(value);\r\n}\r\n/**\r\n * Escapes string so it can safely be used in a Regex.\r\n *\r\n * @param value Unsescaped string\r\n * @return Escaped string\r\n */\r\nexport function escapeForRgex(value) {\r\n return value.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&');\r\n}\r\n/**\r\n * Splits the text into multiple lines, respecting maximum character count.\r\n * Prioretizes splitting on spaces and punctuation. Falls back on splitting\r\n * mid-word if there's no other option.\r\n *\r\n * @param text Text\r\n * @param maxChars Maximum number of characters per line\r\n * @return An array of split text\r\n */\r\nexport function splitTextByCharCount(text, maxChars, fullWords, rtl, fullWordFallback) {\r\n // Maybe the text fits?\r\n if (text.length <= maxChars) {\r\n return [text];\r\n }\r\n // Init result\r\n var res = [];\r\n // Split by words or by charts\r\n if (fullWords) {\r\n // Split by words first\r\n // Split by spacing\r\n var currentIndex = -1;\r\n //let tmpText = text.replace(/([,;:!?\\\\\\/\\.]+[\\s]+|[\\s])/g, $strings.PLACEHOLDER + \"$1\" + $strings.PLACEHOLDER);\r\n var tmpText = text.replace(/([,;:!?\\\\\\/]+|[\\s])/g, $strings.PLACEHOLDER + \"$1\" + $strings.PLACEHOLDER);\r\n var words = tmpText.split($strings.PLACEHOLDER);\r\n // Glue end-of-word punctuation to the word itself\r\n for (var i = 1; i < words.length; i++) {\r\n var word = words[i];\r\n if ((word == \".\" || word == \",\") && words[i - 1].match(/[\\w]+$/)) {\r\n words[i - 1] += word;\r\n words[i] = \"\";\r\n }\r\n }\r\n // Process each word\r\n for (var i = 0; i < words.length; i++) {\r\n // Get word and symbol count\r\n var word = words[i];\r\n var wordLength = word.length;\r\n // Ignore empty words\r\n if (wordLength === 0) {\r\n continue;\r\n }\r\n // Check word length\r\n if ((wordLength > maxChars) && (fullWords !== true || fullWordFallback != false)) {\r\n //if (wordLength > maxChars) {\r\n // A single word is longer than allowed symbol count\r\n // Break it up\r\n if (rtl) {\r\n word = reverseString(word);\r\n }\r\n var parts = word.match(new RegExp(\".{1,\" + maxChars + \"}\", \"g\"));\r\n // TODO is this correct ?\r\n if (parts) {\r\n if (rtl) {\r\n for (var x = 0; x < parts.length; x++) {\r\n parts[x] = reverseString(parts[x]);\r\n }\r\n //parts.reverse();\r\n }\r\n res = res.concat(parts);\r\n }\r\n }\r\n else {\r\n // Init current line\r\n if (currentIndex === -1) {\r\n res.push(\"\");\r\n currentIndex = 0;\r\n }\r\n // Check if we need to break into another line\r\n if (((res[currentIndex].length + wordLength + 1) > maxChars) && res[currentIndex] !== \"\") {\r\n res.push(\"\");\r\n currentIndex++;\r\n }\r\n // Add word\r\n res[currentIndex] += word;\r\n }\r\n // Update index\r\n currentIndex = res.length - 1;\r\n }\r\n }\r\n else {\r\n // Splitting by anywhere (living la vida facil)\r\n var parts = text.match(new RegExp(\".{1,\" + maxChars + \"}\", \"g\"));\r\n if (parts) {\r\n if (rtl) {\r\n for (var x = 0; x < parts.length; x++) {\r\n parts[x] = reverseString(parts[x]);\r\n }\r\n }\r\n res = parts;\r\n }\r\n }\r\n // Do we have only one word that does not fit?\r\n // Since fullWords is set and we can't split the word, we end up with empty\r\n // set.\r\n if (res.length == 1 && fullWords && fullWordFallback && (res[0].length > maxChars)) {\r\n res = [];\r\n }\r\n return res;\r\n}\r\n/**\r\n * Truncates the text to certain character count.\r\n *\r\n * Will add ellipsis if the string is truncated. Optionally, can truncate on\r\n * full words only.\r\n *\r\n * For RTL support, pass in the fifth parameter as `true`.\r\n *\r\n * @param text Input text\r\n * @param maxChars Maximum character count of output\r\n * @param ellipsis Ellipsis string, i.e. \"...\"\r\n * @param fullWords If `true`, will not break mid-word, unless there's a single word and it does not with into `maxChars`\r\n * @param rtl Is this an RTL text?\r\n * @return Truncated text\r\n */\r\nexport function truncateWithEllipsis(text, maxChars, ellipsis, fullWords, rtl) {\r\n if (text.length <= maxChars) {\r\n return text;\r\n }\r\n // Calc max chars\r\n maxChars -= ellipsis.length;\r\n if (maxChars < 1) {\r\n maxChars = 1;\r\n //ellipsis = \"\";\r\n }\r\n // Get lines\r\n var lines = splitTextByCharCount(text, maxChars, fullWords, rtl);\r\n // Use first line\r\n return (lines[0] || \"\") + ellipsis;\r\n}\r\n/**\r\n * Removes whitespace from beginning and end of the string.\r\n *\r\n * @param str Input\r\n * @return Output\r\n */\r\nexport function trim(str) {\r\n return str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, \"\");\r\n}\r\n;\r\n/**\r\n * Removes whitespace from end of the string.\r\n *\r\n * @param str Input\r\n * @return Output\r\n */\r\nexport function rtrim(str) {\r\n return str.replace(/[\\s\\uFEFF\\xA0]+$/g, \"\");\r\n}\r\n;\r\n/**\r\n * Removes whitespace from beginning of the string.\r\n *\r\n * @param str Input\r\n * @return Output\r\n */\r\nexport function ltrim(str) {\r\n return str.replace(/^[\\s\\uFEFF\\xA0]+/g, \"\");\r\n}\r\n;\r\n/**\r\n * Reverses string.\r\n *\r\n * @param str Input\r\n * @return Output\r\n */\r\nexport function reverseString(str) {\r\n return str.split(\"\").reverse().join(\"\");\r\n}\r\n/**\r\n * Removes quotes from the string.\r\n *\r\n * @param str Input\r\n * @return Output\r\n */\r\nexport function unquote(str) {\r\n var res = str.trim();\r\n res = str.replace(/^'(.*)'$/, \"$1\");\r\n if (res == str) {\r\n res = str.replace(/^\"(.*)\"$/, \"$1\");\r\n }\r\n return res;\r\n}\r\n/**\r\n * Pads a string with additional characters to certain length.\r\n *\r\n * @param value A numeric value\r\n * @param len Result string length in characters\r\n * @param char A character to use for padding\r\n * @return Padded value as string\r\n */\r\nexport function padString(value, len, char) {\r\n if (len === void 0) { len = 0; }\r\n if (char === void 0) { char = \"0\"; }\r\n if (typeof value !== \"string\") {\r\n value = value.toString();\r\n }\r\n return len > value.length ? Array(len - value.length + 1).join(char) + value : value;\r\n}\r\n/**\r\n * Tries to determine format type.\r\n *\r\n * @ignore Exclude from docs\r\n * @param format Format string\r\n * @return Format type (\"string\" | \"number\" | \"date\" | \"duration\")\r\n */\r\nexport function getFormat(format) {\r\n // Undefined?\r\n if (typeof format === \"undefined\") {\r\n return $strings.STRING;\r\n }\r\n // Cleanup and lowercase format\r\n format = format.toLowerCase().replace(/^\\[[^\\]]*\\]/, \"\");\r\n // Remove style tags\r\n format = format.replace(/\\[[^\\]]+\\]/, \"\");\r\n // Trim\r\n format = format.trim();\r\n // Check for any explicit format hints (i.e. /Date)\r\n var hints = format.match(/\\/(date|number|duration)$/);\r\n if (hints) {\r\n return hints[1];\r\n }\r\n // Check for explicit hints\r\n if (format === $strings.NUMBER) {\r\n return $strings.NUMBER;\r\n }\r\n if (format === $strings.DATE) {\r\n return $strings.DATE;\r\n }\r\n if (format === $strings.DURATION) {\r\n return $strings.DURATION;\r\n }\r\n // Detect number formatting symbols\r\n if (format.match(/[#0]/)) {\r\n return $strings.NUMBER;\r\n }\r\n // Detect date formatting symbols\r\n if (format.match(/[ymwdhnsqaxkzgtei]/)) {\r\n return $strings.DATE;\r\n }\r\n // Nothing? Let's display as string\r\n return $strings.STRING;\r\n}\r\n/**\r\n * Cleans up format:\r\n * * Strips out formatter hints\r\n *\r\n * @ignore Exclude from docs\r\n * @param format Format\r\n * @return Cleaned format\r\n */\r\nexport function cleanFormat(format) {\r\n return format.replace(/\\/(date|number|duration)$/i, \"\");\r\n}\r\n/**\r\n * Strips all tags from the string.\r\n *\r\n * @param text Source string\r\n * @return String without tags\r\n */\r\nexport function stripTags(text) {\r\n return text ? text.replace(/<[^>]*>/g, \"\") : text;\r\n}\r\n/**\r\n * Removes new lines and tags from a string.\r\n *\r\n * @param text String to conver\r\n * @return Converted string\r\n */\r\nexport function plainText(text) {\r\n return text ? stripTags((\"\" + text).replace(/[\\n\\r]+/g, \". \")) : text;\r\n}\r\n/**\r\n * ============================================================================\r\n * TYPE CONVERSION FUNCTIONS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Converts numeric value into string. Deals with large or small numbers that\r\n * would otherwise use exponents.\r\n *\r\n * @param value Numeric value\r\n * @return Numeric value as string\r\n */\r\nexport function numberToString(value) {\r\n // TODO handle Infinity and -Infinity\r\n if ($type.isNaN(value)) {\r\n return \"NaN\";\r\n }\r\n if (value === Infinity) {\r\n return \"Infinity\";\r\n }\r\n if (value === -Infinity) {\r\n return \"-Infinity\";\r\n }\r\n // Negative 0\r\n if ((value === 0) && (1 / value === -Infinity)) {\r\n return \"-0\";\r\n }\r\n // Preserve negative and deal with absoute values\r\n var negative = value < 0;\r\n value = Math.abs(value);\r\n // TODO test this\r\n var parsed = $type.getValue(/^([0-9]+)(?:\\.([0-9]+))?(?:e[\\+\\-]([0-9]+))?$/.exec(\"\" + value));\r\n var digits = parsed[1];\r\n var decimals = parsed[2] || \"\";\r\n var res;\r\n // Leave the nummber as it is if it does not use exponents\r\n if (parsed[3] == null) {\r\n res = (decimals === \"\" ? digits : digits + \".\" + decimals);\r\n }\r\n else {\r\n var exponent = +parsed[3];\r\n // Deal with decimals\r\n if (value < 1) {\r\n var zeros = exponent - 1;\r\n res = \"0.\" + $string.repeat(\"0\", zeros) + digits + decimals;\r\n // Deal with integers\r\n }\r\n else {\r\n var zeros = exponent - decimals.length;\r\n if (zeros === 0) {\r\n res = digits + decimals;\r\n }\r\n else if (zeros < 0) {\r\n res = digits + decimals.slice(0, zeros) + \".\" + decimals.slice(zeros);\r\n }\r\n else {\r\n res = digits + decimals + $string.repeat(\"0\", zeros);\r\n }\r\n }\r\n }\r\n return negative ? \"-\" + res : res;\r\n}\r\n/**\r\n * Converts anything to Date object.\r\n *\r\n * @param value A value of any type\r\n * @return Date object representing a value\r\n */\r\nexport function anyToDate(value) {\r\n if ($type.isDate(value)) {\r\n // TODO maybe don't create a new Date ?\r\n var date = new Date(value);\r\n // This is needed because IE does not copy over milliseconds\r\n date.setMilliseconds(value.getMilliseconds());\r\n return date;\r\n }\r\n else if ($type.isNumber(value)) {\r\n return new Date(value);\r\n }\r\n else {\r\n // Try converting to number (assuming timestamp)\r\n var num = Number(value);\r\n if (!$type.isNumber(num)) {\r\n return new Date(value);\r\n }\r\n else {\r\n return new Date(num);\r\n }\r\n }\r\n}\r\n/**\r\n * Tries converting any value to a number.\r\n *\r\n * @param value Source value\r\n * @return Number\r\n */\r\nexport function anyToNumber(value) {\r\n if ($type.isDate(value)) {\r\n return value.getTime();\r\n }\r\n else if ($type.isNumber(value)) {\r\n return value;\r\n }\r\n else if ($type.isString(value)) {\r\n // Try converting to number (assuming timestamp)\r\n var num = Number(value);\r\n if (!$type.isNumber(num)) {\r\n // Failing\r\n return undefined;\r\n }\r\n else {\r\n return num;\r\n }\r\n }\r\n}\r\n/**\r\n * ============================================================================\r\n * DATE-RELATED FUNCTIONS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Returns a year day.\r\n *\r\n * @param date Date\r\n * @param utc Assume UTC dates?\r\n * @return Year day\r\n * @todo Account for UTC\r\n */\r\nexport function getYearDay(date, utc) {\r\n if (utc === void 0) { utc = false; }\r\n var start = new Date(date.getFullYear(), 0, 0);\r\n var diff = (date.getTime() - start.getTime()) + ((start.getTimezoneOffset() - date.getTimezoneOffset()) * 60 * 1000);\r\n var oneDay = 1000 * 60 * 60 * 24;\r\n return Math.floor(diff / oneDay);\r\n}\r\n/**\r\n * Returns week number for a given date.\r\n *\r\n * @param date Date\r\n * @param utc Assume UTC dates?\r\n * @return Week number\r\n * @todo Account for UTC\r\n */\r\nexport function getWeek(date, _utc) {\r\n if (_utc === void 0) { _utc = false; }\r\n var d = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()));\r\n var day = d.getUTCDay() || 7;\r\n d.setUTCDate(d.getUTCDate() + 4 - day);\r\n var firstDay = new Date(Date.UTC(d.getUTCFullYear(), 0, 1));\r\n return Math.ceil((((d.getTime() - firstDay.getTime()) / 86400000) + 1) / 7);\r\n}\r\n/**\r\n * Returns a week number in the month.\r\n *\r\n * @param date Source Date\r\n * @param utc Assume UTC dates?\r\n * @return Week number in month\r\n */\r\nexport function getMonthWeek(date, utc) {\r\n if (utc === void 0) { utc = false; }\r\n var firstWeek = getWeek(new Date(date.getFullYear(), date.getMonth(), 1), utc);\r\n var currentWeek = getWeek(date, utc);\r\n if (currentWeek == 1) {\r\n currentWeek = 53;\r\n }\r\n return currentWeek - firstWeek + 1;\r\n}\r\n/**\r\n * Returns a year day out of the given week number.\r\n *\r\n * @param week Week\r\n * @param year Year\r\n * @param weekday Weekday\r\n * @param utc Assume UTC dates\r\n * @return Day in a year\r\n */\r\nexport function getDayFromWeek(week, year, weekday, utc) {\r\n if (weekday === void 0) { weekday = 1; }\r\n if (utc === void 0) { utc = false; }\r\n var date = new Date(year, 0, 4, 0, 0, 0, 0);\r\n if (utc) {\r\n date.setUTCFullYear(year);\r\n }\r\n var day = week * 7 + weekday - ((date.getDay() || 7) + 3);\r\n return day;\r\n}\r\n/**\r\n * Returns 12-hour representation out of the 24-hour hours.\r\n *\r\n * @param hours 24-hour number\r\n * @return 12-hour number\r\n */\r\nexport function get12Hours(hours, base) {\r\n if (hours > 12) {\r\n hours -= 12;\r\n }\r\n else if (hours === 0) {\r\n hours = 12;\r\n }\r\n return $type.hasValue(base) ? hours + (base - 1) : hours;\r\n}\r\n/**\r\n * Returns a string name of the tome zone.\r\n *\r\n * @param date Date object\r\n * @param long Should return long (\"Pacific Standard Time\") or short abbreviation (\"PST\")\r\n * @param savings Include information if it's in daylight savings mode\r\n * @param utc Assume UTC dates\r\n * @return Time zone name\r\n */\r\nexport function getTimeZone(date, long, savings, utc) {\r\n if (long === void 0) { long = false; }\r\n if (savings === void 0) { savings = false; }\r\n if (utc === void 0) { utc = false; }\r\n if (utc) {\r\n return long ? \"Coordinated Universal Time\" : \"UTC\";\r\n }\r\n var wotz = date.toLocaleString(\"UTC\");\r\n var wtz = date.toLocaleString(\"UTC\", { timeZoneName: long ? \"long\" : \"short\" }).substr(wotz.length);\r\n //wtz = wtz.replace(/[+-]+[0-9]+$/, \"\");\r\n if (savings === false) {\r\n wtz = wtz.replace(/ (standard|daylight|summer|winter) /i, \" \");\r\n }\r\n return wtz;\r\n}\r\n/**\r\n * ============================================================================\r\n * NUMBER-RELATED FUNCTIONS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Returns a random number between `from` and `to`.\r\n *\r\n * @param from From number\r\n * @param to To number\r\n * @return Random number\r\n */\r\nexport function random(from, to) {\r\n return Math.floor(Math.random() * (to - from)) + from;\r\n}\r\n/**\r\n * Fits the number into specific `min` and `max` bounds.\r\n *\r\n * @param value Input value\r\n * @param min Minimum value\r\n * @param max Maximum value\r\n * @return Possibly adjusted value\r\n */\r\nexport function fitNumber(value, min, max) {\r\n if (value > max) {\r\n return max;\r\n }\r\n else if (value < min) {\r\n return min;\r\n }\r\n return value;\r\n}\r\n/**\r\n * Fits the number into specific `min` and `max` bounds.\r\n *\r\n * If the value is does not fit withing specified range, it \"wraps\" around the\r\n * values.\r\n *\r\n * For example, if we have input value 10 with min set at 1 and max set at 8,\r\n * the value will not fit. The remainder that does not fit (2) will be added\r\n * to `min`, resulting in 3.\r\n *\r\n * The output of regular `fitNumber()` would return 8 instead.\r\n *\r\n * @param value Input value\r\n * @param min Minimum value\r\n * @param max Maximum value\r\n * @return Possibly adjusted value\r\n */\r\nexport function fitNumberRelative(value, min, max) {\r\n var gap = max - min;\r\n if (value > max) {\r\n value = min + (value - gap * Math.floor(value / gap));\r\n }\r\n else if (value < min) {\r\n value = min + (value - gap * Math.floor(value / gap));\r\n }\r\n return value;\r\n}\r\n/**\r\n * ============================================================================\r\n * SPRITE-RELATED FUNCTIONS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Converts SVG element coordinates to coordinates within specific [[Sprite]].\r\n *\r\n * @param point SVG coordinates\r\n * @param sprite Sprite\r\n * @return Sprite coordinates\r\n */\r\nexport function svgPointToSprite(point, sprite) {\r\n var x = point.x;\r\n var y = point.y;\r\n var sprites = [];\r\n if (sprite) {\r\n while ($type.hasValue(sprite.parent)) {\r\n sprites.push(sprite);\r\n sprite = sprite.parent;\r\n }\r\n sprites.reverse();\r\n for (var i = 0; i < sprites.length; i++) {\r\n var sprite_1 = sprites[i];\r\n var angle = sprite_1.rotation;\r\n var relativeX = x - sprite_1.pixelX - sprite_1.ex;\r\n var relativeY = y - sprite_1.pixelY - sprite_1.ey;\r\n if (sprite_1.dx) {\r\n x -= sprite_1.dx;\r\n }\r\n if (sprite_1.dy) {\r\n y -= sprite_1.dy;\r\n }\r\n var scale = sprite_1.scale;\r\n // this handles nonscaling\r\n if (sprite_1.group) {\r\n scale = sprite_1.group.scale;\r\n }\r\n x = ($math.cos(-angle) * relativeX - $math.sin(-angle) * relativeY) / scale - sprite_1.pixelPaddingLeft;\r\n y = ($math.cos(-angle) * relativeY + $math.sin(-angle) * relativeX) / scale - sprite_1.pixelPaddingTop;\r\n }\r\n }\r\n return { x: x, y: y };\r\n}\r\n/**\r\n * Converts coordinates within [[Sprite]] to coordinates relative to the whole\r\n * SVG element.\r\n *\r\n * @param point Sprite coordinates\r\n * @param sprite Sprite\r\n * @return SVG coordinates\r\n */\r\nexport function spritePointToSvg(point, sprite) {\r\n var x = point.x;\r\n var y = point.y;\r\n if (sprite) {\r\n while ($type.hasValue(sprite.parent)) {\r\n var angle = sprite.rotation;\r\n x += sprite.pixelPaddingLeft + sprite.ex;\r\n y += sprite.pixelPaddingTop + sprite.ey;\r\n var scale = sprite.scale;\r\n // this handles nonscaling\r\n if (sprite.group) {\r\n scale = sprite.group.scale;\r\n }\r\n var relativeX = sprite.pixelX + ((x * $math.cos(angle) - y * $math.sin(angle))) * scale;\r\n var relativeY = sprite.pixelY + ((x * $math.sin(angle) + y * $math.cos(angle))) * scale;\r\n if (sprite.dx) {\r\n relativeX += sprite.dx;\r\n }\r\n if (sprite.dy) {\r\n relativeY += sprite.dy;\r\n }\r\n x = relativeX;\r\n y = relativeY;\r\n sprite = sprite.parent;\r\n }\r\n }\r\n return { x: x, y: y };\r\n}\r\n/**\r\n * Converts coordinates of one sprite to another.\r\n *\r\n * @param point Sprite coordinates\r\n * @param sprite Sprite\r\n * @param toSprite Sprite\r\n * @return converted coordinates\r\n */\r\nexport function spritePointToSprite(point, sprite, toSprite) {\r\n return svgPointToSprite(spritePointToSvg(point, sprite), toSprite);\r\n}\r\n/**\r\n * Converts a rectangle expressed in SVG element coordinates to coordinates\r\n * within specific [[Sprite]].\r\n *\r\n * @param rect SVG rectangle\r\n * @param sprite Sprite\r\n * @return Sprite rectangle\r\n */\r\nexport function svgRectToSprite(rect, sprite) {\r\n var p1 = svgPointToSprite(rect, sprite);\r\n var p2 = svgPointToSprite({ x: rect.x + rect.width, y: rect.y + rect.height }, sprite);\r\n return { x: p1.x, y: p1.y, width: p2.x - p1.x, height: p2.y - p1.y };\r\n}\r\n/**\r\n * Converts a rectangle expressed in [[Sprite]] coordinates to SVG coordinates.\r\n *\r\n * @param rect Sprite rectangle\r\n * @param sprite Sprite\r\n * @return SVG rectangle\r\n */\r\nexport function spriteRectToSvg(rect, sprite) {\r\n var p1 = spritePointToSvg(rect, sprite);\r\n var p2 = spritePointToSvg({ x: rect.x + rect.width, y: rect.y + rect.height }, sprite);\r\n return { x: p1.x, y: p1.y, width: p2.x - p1.x, height: p2.y - p1.y };\r\n}\r\n/**\r\n * Converts global document-wide coordinates to coordinates within SVG element.\r\n *\r\n * @param point Global coordinates\r\n * @param svgContainer SVG element\r\n * @return SVG coordinates\r\n */\r\nexport function documentPointToSvg(point, svgContainer, cssScale) {\r\n try {\r\n var bbox = svgContainer.getBoundingClientRect();\r\n if (!$type.isNumber(cssScale)) {\r\n cssScale = 1;\r\n }\r\n return {\r\n \"x\": (point.x - bbox.left) / cssScale,\r\n \"y\": (point.y - bbox.top) / cssScale\r\n };\r\n }\r\n catch (e) {\r\n return point;\r\n }\r\n}\r\n/**\r\n * Converts SVG coordinates to global document-wide coordinates.\r\n *\r\n * @param point SVG coordinates\r\n * @param svgContainer SVG element\r\n * @return Global coordinates\r\n */\r\nexport function svgPointToDocument(point, svgContainer) {\r\n try {\r\n var bbox = svgContainer.getBoundingClientRect();\r\n return {\r\n \"x\": point.x + bbox.left,\r\n \"y\": point.y + bbox.top\r\n };\r\n }\r\n catch (e) {\r\n return point;\r\n }\r\n}\r\n/**\r\n * Converts document-wide global coordinates to coordinates within specific\r\n * [[Sprite]].\r\n *\r\n * @param point Global coordinates\r\n * @param sprite Sprite\r\n * @return Sprite coordinates\r\n */\r\nexport function documentPointToSprite(point, sprite) {\r\n if (sprite && sprite.htmlContainer) {\r\n var svgPoint = documentPointToSvg(point, $type.getValue(sprite.htmlContainer), sprite.svgContainer.cssScale);\r\n return svgPointToSprite(svgPoint, sprite);\r\n }\r\n else {\r\n return point;\r\n }\r\n}\r\n/**\r\n * Converts coordinates within [[Sprite]] to global document coordinates.\r\n *\r\n * @param point Sprite coordinates\r\n * @param sprite Sprite\r\n * @return Global coordinates\r\n */\r\nexport function spritePointToDocument(point, sprite) {\r\n if (sprite && sprite.htmlContainer) {\r\n var svgPoint = spritePointToSvg(point, sprite);\r\n return svgPointToDocument(svgPoint, $type.getValue(sprite.htmlContainer));\r\n }\r\n else {\r\n return point;\r\n }\r\n}\r\n/**\r\n * ============================================================================\r\n * DEPRECATED FUNCTIONS\r\n * @todo Review and remove\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Returns element's width.\r\n *\r\n * @ignore Exclude from docs\r\n * @param element Element\r\n * @return Width (px)\r\n * @deprecated Not used anywhere\r\n */\r\nexport function width(element) {\r\n var cs = getComputedStyle(element);\r\n var paddingX = parseFloat(cs.paddingLeft) + parseFloat(cs.paddingRight);\r\n var borderX = parseFloat(cs.borderLeftWidth) + parseFloat(cs.borderRightWidth);\r\n return element.clientWidth - paddingX - borderX;\r\n}\r\n/**\r\n * Returns element's height.\r\n *\r\n * @ignore Exclude from docs\r\n * @param element Element\r\n * @return Height (px)\r\n * @deprecated Not used anywhere\r\n */\r\nexport function height(element) {\r\n var cs = getComputedStyle(element);\r\n var paddingY = parseFloat(cs.paddingTop) + parseFloat(cs.paddingBottom);\r\n var borderY = parseFloat(cs.borderTopWidth) + parseFloat(cs.borderBottomWidth);\r\n return element.clientHeight - paddingY - borderY;\r\n}\r\n/**\r\n * Returns number of decimals\r\n *\r\n * @ignore Exclude from docs\r\n * @param number Input number\r\n * @return Number of decimals\r\n */\r\nexport function decimalPlaces(number) {\r\n var match = ('' + number).match(/(?:\\.(\\d+))?(?:[eE]([+-]?\\d+))?$/);\r\n if (!match) {\r\n return 0;\r\n }\r\n return Math.max(0, (match[1] ? match[1].length : 0) - (match[2] ? +match[2] : 0));\r\n}\r\nvar urlRegexp = /^([a-zA-Z][a-zA-Z0-9\\+\\.\\-]*:)?(?:(\\/\\/)([^\\@]+\\@)?([^\\/\\?\\#\\:]*)(\\:[0-9]+)?)?([^\\?\\#]*)(\\?[^\\#]*)?(\\#.*)?$/;\r\n/**\r\n * Parses a URL\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n// TODO test this\r\nexport function parseUrl(url) {\r\n var match = urlRegexp.exec(url);\r\n return {\r\n protocol: (match && match[1]) || \"\",\r\n separator: (match && match[2]) || \"\",\r\n authority: (match && match[3]) || \"\",\r\n domain: (match && match[4]) || \"\",\r\n port: (match && match[5]) || \"\",\r\n path: (match && match[6]) || \"\",\r\n query: (match && match[7]) || \"\",\r\n hash: (match && match[8]) || \"\"\r\n };\r\n}\r\n/**\r\n * Serializes a Url into a string\r\n *\r\n * @ignore Exclude from docs\r\n */\r\nexport function serializeUrl(url) {\r\n return url.protocol + url.separator + url.authority + url.domain + url.port + url.path + url.query + url.hash;\r\n}\r\n/**\r\n * Checks whether a Url is relative or not\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n// TODO is this correct ?\r\nfunction isRelativeUrl(url) {\r\n return url.protocol === \"\" &&\r\n url.separator === \"\" &&\r\n url.authority === \"\" &&\r\n url.domain === \"\" &&\r\n url.port === \"\";\r\n}\r\n/**\r\n * Joins together two URLs, resolving relative URLs correctly\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n// TODO test this\r\nexport function joinUrl(left, right) {\r\n var parsedLeft = parseUrl(left);\r\n var parsedRight = parseUrl(right);\r\n if (isRelativeUrl(parsedLeft)) {\r\n throw new Error(\"Left URL is not absolute\");\r\n }\r\n if (isRelativeUrl(parsedRight)) {\r\n // TODO is this correct ?\r\n if (parsedRight.path !== \"\") {\r\n if (parsedRight.path[0] === \"/\") {\r\n parsedLeft.path = parsedRight.path;\r\n // TODO is this correct ?\r\n }\r\n else {\r\n var leftPath = parsedLeft.path.split(/\\//);\r\n var rightPath = parsedRight.path.split(/\\//);\r\n // TODO is this correct ?\r\n if (leftPath.length === 0) {\r\n if (rightPath.length !== 0) {\r\n leftPath.push(\"\");\r\n }\r\n }\r\n else if (leftPath.length > 1) {\r\n leftPath.pop();\r\n }\r\n $array.pushAll(leftPath, rightPath);\r\n parsedLeft.path = leftPath.join(\"/\");\r\n if (parsedLeft.path !== \"\" && parsedLeft.path[0] !== \"/\") {\r\n throw new Error(\"URL path must start with /\");\r\n }\r\n }\r\n }\r\n // TODO is this correct ?\r\n parsedLeft.query = parsedRight.query;\r\n parsedLeft.hash = parsedRight.hash;\r\n return serializeUrl(parsedLeft);\r\n }\r\n else {\r\n return serializeUrl(parsedRight);\r\n }\r\n}\r\n/**\r\n * Detects MSIE.\r\n *\r\n * @return Is IE?\r\n */\r\nexport function isIE() {\r\n return !!window.MSInputMethodContext && !!document.documentMode;\r\n}\r\n","/**\r\n * This module defines a [[Validatable]] class which can be used by all\r\n * non-[[Sprite]] classes to use system beats to revalidate themselves.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { BaseObjectEvents } from \"../Base\";\r\nimport { registry } from \"../Registry\";\r\n/**\r\n * This module defines a [[Validatable]] class which can be used by all\r\n * non-[[Sprite]] classes to use system update cycle to revalidate themselves.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\nvar Validatable = /** @class */ (function (_super) {\r\n __extends(Validatable, _super);\r\n function Validatable() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n /**\r\n * Is invalid and should be revalidated?\r\n */\r\n _this._validateDisposer = null;\r\n return _this;\r\n }\r\n /**\r\n * Invalidates the element, so that it can re-validate/redraw itself in the\r\n * next cycle.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Validatable.prototype.invalidate = function () {\r\n if (this._validateDisposer === null) {\r\n this._validateDisposer = registry.events.on(\"exitframe\", this.validate, this);\r\n }\r\n };\r\n /**\r\n * Validates itself.\r\n *\r\n * Most probably the extending class will have an overriding `validate()`\r\n * method which will do actual work, as well as call this method using\r\n * `super.validate()`.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Validatable.prototype.validate = function () {\r\n if (this._validateDisposer !== null) {\r\n this._validateDisposer.dispose();\r\n this._validateDisposer = null;\r\n }\r\n };\r\n Validatable.prototype.dispose = function () {\r\n if (this._validateDisposer !== null) {\r\n this._validateDisposer.dispose();\r\n this._validateDisposer = null;\r\n }\r\n _super.prototype.dispose.call(this);\r\n };\r\n return Validatable;\r\n}(BaseObjectEvents));\r\nexport { Validatable };\r\n","/**\r\n * Ellipse module.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Circle } from \"./Circle\";\r\nimport { registry } from \"../Registry\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Draws an ellipse\r\n * @see {@link IEllipseEvents} for a list of available events\r\n * @see {@link IEllipseAdapters} for a list of available Adapters\r\n */\r\nvar Ellipse = /** @class */ (function (_super) {\r\n __extends(Ellipse, _super);\r\n /**\r\n * Constructor\r\n */\r\n function Ellipse() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"Ellipse\";\r\n _this.element = _this.paper.add(\"ellipse\");\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * Draws the ellipsis.\r\n */\r\n Ellipse.prototype.draw = function () {\r\n _super.prototype.draw.call(this);\r\n this.element.attr({ \"rx\": this.radius });\r\n this.element.attr({ \"ry\": this.radiusY });\r\n };\r\n Object.defineProperty(Ellipse.prototype, \"radiusY\", {\r\n /**\r\n * @return Vertical radius\r\n */\r\n get: function () {\r\n return this.innerHeight / 2;\r\n },\r\n /**\r\n * Vertical radius.\r\n *\r\n * It's a relative size to the `radius`.\r\n *\r\n * E.g. 0.8 will mean the height of the ellipsis will be 80% of it's\r\n * horizontal radius.\r\n *\r\n * @param value Vertical radius\r\n */\r\n set: function (value) {\r\n this.height = value * 2;\r\n this.invalidate();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Ellipse.prototype, \"radius\", {\r\n /**\r\n * @return Horizontal radius\r\n */\r\n get: function () {\r\n return this.innerWidth / 2;\r\n },\r\n /**\r\n * Horizontal radius.\r\n *\r\n * @param value Horizontal radius\r\n */\r\n set: function (value) {\r\n this.width = value * 2;\r\n this.invalidate();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return Ellipse;\r\n}(Circle));\r\nexport { Ellipse };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"Ellipse\"] = Ellipse;\r\n","/**\r\n * Functionality for adding images in SVG tree.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Sprite } from \"../Sprite\";\r\nimport { registry } from \"../Registry\";\r\nimport * as $dom from \"../utils/DOM\";\r\nimport * as $type from \"../utils/Type\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Used to add `<image>` elements to SVG.\r\n *\r\n * @see {@link IImageEvents} for a list of available events\r\n * @see {@link IImageAdapters} for a list of available Adapters\r\n */\r\nvar Image = /** @class */ (function (_super) {\r\n __extends(Image, _super);\r\n /**\r\n * Constructor\r\n */\r\n function Image() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"Image\";\r\n _this.element = _this.paper.add(\"image\");\r\n _this.applyTheme();\r\n _this.width = 50;\r\n _this.height = 50;\r\n return _this;\r\n }\r\n /**\r\n * Draws an `<image>` element.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Image.prototype.draw = function () {\r\n _super.prototype.draw.call(this);\r\n if (this.href) {\r\n var width = this.innerWidth;\r\n var height = this.innerHeight;\r\n if ($type.isNumber(this.widthRatio)) {\r\n width = height * this.widthRatio;\r\n this.width = width;\r\n }\r\n if ($type.isNumber(this.heightRatio)) {\r\n height = width * this.heightRatio;\r\n this.height = height;\r\n }\r\n this.element.attr({\r\n \"width\": width,\r\n \"height\": height\r\n });\r\n this.element.attrNS($dom.XLINK, \"xlink:href\", this.href);\r\n }\r\n };\r\n Object.defineProperty(Image.prototype, \"href\", {\r\n /**\r\n * @return Image URI\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"href\");\r\n },\r\n /**\r\n * An image URI.\r\n *\r\n * @param value Image URI\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"href\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Image.prototype, \"widthRatio\", {\r\n /**\r\n * @return Ratio\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"widthRatio\");\r\n },\r\n /**\r\n * Sets image `width` relatively to its `height`.\r\n *\r\n * If image's `height = 100` and `widthRatio = 0.5` the actual width will be\r\n * `50`.\r\n *\r\n * @param value Ratio\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"widthRatio\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Image.prototype, \"heightRatio\", {\r\n /**\r\n * @return Ratio\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"heightRatio\");\r\n },\r\n /**\r\n * Sets image `height` relatively to its `width`.\r\n *\r\n * If image's `width = 100` and `heightRatio = 0.5` the actual height will be\r\n * `50`.\r\n *\r\n * @param value Ratio\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"heightRatio\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Image.prototype, \"bbox\", {\r\n /**\r\n * Returns bounding box (square) for this element.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n get: function () {\r\n return {\r\n x: 0,\r\n y: 0,\r\n width: this.pixelWidth,\r\n height: this.pixelHeight\r\n };\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return Image;\r\n}(Sprite));\r\nexport { Image };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"Image\"] = Image;\r\n","/**\r\n * Slice module.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Container } from \"../Container\";\r\nimport { Sprite } from \"../Sprite\";\r\nimport { registry } from \"../Registry\";\r\nimport * as $math from \"../utils/Math\";\r\nimport * as $path from \"../rendering/Path\";\r\nimport * as $type from \"../utils/Type\";\r\nimport * as $utils from \"../utils/Utils\";\r\nimport { Percent } from \"../utils/Percent\";\r\nimport { RadialGradient } from \"../rendering/fills/RadialGradient\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Draws a wedged semi-circle - slice. Usually used for Pie/Donut charts.\r\n *\r\n * @see {@link ISliceEvents} for a list of available events\r\n * @see {@link ISliceAdapters} for a list of available Adapters\r\n */\r\nvar Slice = /** @class */ (function (_super) {\r\n __extends(Slice, _super);\r\n /**\r\n * Constructor\r\n */\r\n function Slice() {\r\n var _this = \r\n // Init\r\n _super.call(this) || this;\r\n _this.className = \"Slice\";\r\n // Set defaults\r\n _this.setPropertyValue(\"cornerRadius\", 0);\r\n _this.setPropertyValue(\"startAngle\", 0);\r\n _this.setPercentProperty(\"innerRadius\", 0);\r\n _this.setPercentProperty(\"radius\", 0);\r\n _this.setPropertyValue(\"arc\", 0);\r\n _this.setPropertyValue(\"shiftRadius\", 0);\r\n _this.strokeOpacity = 1;\r\n _this.setPropertyValue(\"layout\", \"none\");\r\n // Create a slice wedge element\r\n _this.slice = _this.createChild(Sprite);\r\n _this.slice.isMeasured = false;\r\n _this._disposers.push(_this.slice);\r\n //this.element.attr({ \"stroke-linejoin\": \"round\" });\r\n //this.element.attr({ \"stroke-linecap\": \"round\" });\r\n // Apply theme\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * Draws the element.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Slice.prototype.draw = function () {\r\n _super.prototype.draw.call(this);\r\n var radiusY = this.radiusY;\r\n if (this.radius > 0 && radiusY == 0) {\r\n radiusY = 0.01;\r\n }\r\n this.slice.path = $path.arc(this.startAngle, this.arc, this.radius, this.pixelInnerRadius, radiusY, this.cornerRadius, this.innerCornerRadius);\r\n this.slice.invalidate();\r\n this.shiftRadius = this.shiftRadius;\r\n if (this.realFill instanceof RadialGradient) {\r\n this.updateGradient(this.realFill);\r\n }\r\n if (this.realStroke instanceof RadialGradient) {\r\n this.updateGradient(this.realStroke);\r\n }\r\n };\r\n Slice.prototype.updateGradient = function (gradient) {\r\n gradient.element.attr({ \"gradientUnits\": \"userSpaceOnUse\" });\r\n gradient.element.attr({ \"r\": this.radius });\r\n gradient.cx = 0;\r\n gradient.cy = 0;\r\n gradient.element.attr({ radius: this.radius });\r\n };\r\n Object.defineProperty(Slice.prototype, \"bbox\", {\r\n /**\r\n * Returns bounding box (square) for this element.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n get: function () {\r\n if (this.definedBBox) {\r\n return this.definedBBox;\r\n }\r\n if (this.isMeasured) {\r\n var innerRect = $math.getArcRect(this.startAngle, this.startAngle + this.arc, this.pixelInnerRadius);\r\n var outerRect = $math.getArcRect(this.startAngle, this.startAngle + this.arc, this.radius);\r\n return $math.getCommonRectangle([innerRect, outerRect]);\r\n }\r\n else {\r\n return { x: 0, y: 0, width: 0, height: 0 };\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Slice.prototype, \"startAngle\", {\r\n /**\r\n * @return Angle (0-360)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"startAngle\");\r\n },\r\n /**\r\n * The angle at which left edge of the slice is drawn. (0-360)\r\n *\r\n * 0 is to the right of the center.\r\n *\r\n * @param value Angle (0-360)\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"startAngle\", $math.normalizeAngle(value), true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Slice.prototype, \"arc\", {\r\n /**\r\n * @return [description]\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"arc\");\r\n },\r\n /**\r\n * [arc description]\r\n *\r\n * @todo Description\r\n * @param value [description]\r\n */\r\n set: function (value) {\r\n if (!$type.isNumber(value)) {\r\n value = 0;\r\n }\r\n this.setPropertyValue(\"arc\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Slice.prototype, \"radius\", {\r\n /**\r\n * @return Radius (px)\r\n */\r\n get: function () {\r\n var radius = this.getPropertyValue(\"radius\");\r\n if (!$type.isNumber(radius)) {\r\n radius = 0;\r\n }\r\n return radius;\r\n },\r\n /**\r\n * Radius of the slice in pixels.\r\n *\r\n * @param value Radius (px)\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"radius\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Slice.prototype, \"radiusY\", {\r\n /**\r\n * @return Vertical radius (0-1)\r\n */\r\n get: function () {\r\n var value = this.getPropertyValue(\"radiusY\");\r\n if (!$type.isNumber(value)) {\r\n value = this.radius;\r\n }\r\n return value;\r\n },\r\n /**\r\n * Vertical radius for creating skewed slices.\r\n *\r\n * This is relevant to `radius`, e.g. 0.5 will set vertical radius to half\r\n * the `radius`.\r\n *\r\n * @param value Vertical radius (0-1)\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"radiusY\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Slice.prototype, \"innerRadius\", {\r\n /**\r\n * @return Radius (px or %)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"innerRadius\");\r\n },\r\n /**\r\n * Inner radius of the slice for creating cut out (donut) slices.\r\n *\r\n * @default 0\r\n * @param value Radius (px or %)\r\n */\r\n set: function (value) {\r\n this.setPercentProperty(\"innerRadius\", value, true, false, 10, false);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Slice.prototype, \"pixelInnerRadius\", {\r\n /**\r\n * @return Radius px\r\n */\r\n get: function () {\r\n return $utils.relativeToValue(this.innerRadius, this.radius);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Slice.prototype, \"cornerRadius\", {\r\n /**\r\n * @return Radius (px)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"cornerRadius\");\r\n },\r\n /**\r\n * Radius of slice's outer corners in pixels.\r\n *\r\n * @default 0\r\n * @param value Radius (px)\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"cornerRadius\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Slice.prototype, \"innerCornerRadius\", {\r\n /**\r\n * @return Radius (px)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"innerCornerRadius\");\r\n },\r\n /**\r\n * Radius of slice's inner corners in pixels.\r\n *\r\n * @default 0\r\n * @param value Radius (px)\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"innerCornerRadius\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Slice.prototype, \"shiftRadius\", {\r\n /**\r\n * @return Radius shift\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"shiftRadius\");\r\n },\r\n /**\r\n * Indicates how far (relatively to center) a slice should be moved.\r\n *\r\n * The value is relative to the radius of the slice. Meaning 0 no shift,\r\n * 1 - slice shifted outside by whole of its radius.\r\n *\r\n * @param value Radius shift\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"shiftRadius\", value);\r\n value = this.getPropertyValue(\"shiftRadius\");\r\n this.dx = value * this.radius * this.ix;\r\n this.dy = value * this.radiusY * this.iy;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Slice.prototype, \"ix\", {\r\n /**\r\n * [ix description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @return [description]\r\n */\r\n get: function () {\r\n return $math.cos(this.middleAngle);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Slice.prototype, \"iy\", {\r\n /**\r\n * [iy description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @return [description]\r\n */\r\n get: function () {\r\n return $math.sin(this.middleAngle);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Slice.prototype, \"middleAngle\", {\r\n /**\r\n * An angle of the slice's middle.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Angle\r\n */\r\n get: function () {\r\n return this.startAngle + this.arc / 2;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * X coordinate for the slice tooltip.\r\n *\r\n * @return X\r\n */\r\n Slice.prototype.getTooltipX = function () {\r\n var value = this.getPropertyValue(\"tooltipX\");\r\n if ($type.isNumber(value)) {\r\n return value;\r\n }\r\n var p = 0.5;\r\n if (value instanceof Percent) {\r\n p = value.value;\r\n }\r\n var innerRadius = $utils.relativeToValue(this.innerRadius, this.radius);\r\n return this.ix * (innerRadius + (this.radius - innerRadius) * p);\r\n };\r\n /**\r\n * Y coordinate for the slice tooltip.\r\n *\r\n * @return Y\r\n */\r\n Slice.prototype.getTooltipY = function () {\r\n var value = this.getPropertyValue(\"tooltipY\");\r\n if ($type.isNumber(value)) {\r\n return value;\r\n }\r\n var p = 0.5;\r\n if (value instanceof Percent) {\r\n p = value.value;\r\n }\r\n var innerRadius = $utils.relativeToValue(this.innerRadius, this.radius);\r\n return this.iy * (innerRadius + (this.radius - innerRadius) * p) + this.slice.dy;\r\n };\r\n return Slice;\r\n}(Container));\r\nexport { Slice };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"Slice\"] = Slice;\r\n","/**\r\n * Preloader module.\r\n *\r\n * Preloader is a progress indicator.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Container } from \"../Container\";\r\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\r\nimport { Slice } from \"./Slice\";\r\nimport { Label } from \"./Label\";\r\nimport { registry } from \"../Registry\";\r\nimport { percent } from \"../../core/utils/Percent\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * A class used to draw and display progress indicator.\r\n *\r\n * @see {@link IPreloaderEvents} for a list of available events\r\n * @see {@link IPreloaderAdapters} for a list of available Adapters\r\n */\r\nvar Preloader = /** @class */ (function (_super) {\r\n __extends(Preloader, _super);\r\n /**\r\n * Constructor\r\n */\r\n function Preloader() {\r\n var _this = \r\n // Init\r\n _super.call(this) || this;\r\n _this.className = \"Preloader\";\r\n // Set dimensions\r\n _this.width = percent(100);\r\n _this.height = percent(100);\r\n var interfaceColors = new InterfaceColorSet();\r\n // Create main container\r\n var sliceContainer = _this.createChild(Container);\r\n sliceContainer.shouldClone = false;\r\n // Add background (100%) slice\r\n var backgroundSlice = sliceContainer.createChild(Slice);\r\n backgroundSlice.shouldClone = false;\r\n backgroundSlice.radius = 53;\r\n backgroundSlice.arc = 360;\r\n backgroundSlice.fill = interfaceColors.getFor(\"fill\");\r\n backgroundSlice.fillOpacity = 0.8;\r\n backgroundSlice.innerRadius = 42;\r\n backgroundSlice.isMeasured = false;\r\n _this.backgroundSlice = backgroundSlice;\r\n // Add progress slice\r\n var progressSlice = sliceContainer.createChild(Slice);\r\n progressSlice.shouldClone = false;\r\n progressSlice.radius = 50;\r\n progressSlice.innerRadius = 45;\r\n progressSlice.fill = interfaceColors.getFor(\"alternativeBackground\");\r\n progressSlice.fillOpacity = 0.2;\r\n progressSlice.isMeasured = false;\r\n _this.progressSlice = progressSlice;\r\n // Add text label element\r\n var label = sliceContainer.createChild(Label);\r\n label.shouldClone = false;\r\n label.horizontalCenter = \"middle\";\r\n label.verticalCenter = \"middle\";\r\n label.isMeasured = false;\r\n label.fill = interfaceColors.getFor(\"text\");\r\n label.align = \"center\";\r\n label.valign = \"middle\";\r\n label.textAlign = \"middle\";\r\n label.fillOpacity = 0.4;\r\n _this.label = label;\r\n // Set defaults\r\n _this.background.opacity = 1;\r\n _this.background.fill = interfaceColors.getFor(\"background\");\r\n _this.contentAlign = \"center\";\r\n _this.contentValign = \"middle\";\r\n _this.delay = 300;\r\n // Create hidden state\r\n var hiddenState = _this.states.create(\"hidden\");\r\n hiddenState.properties.opacity = 0;\r\n // Hide by default\r\n _this.visible = false;\r\n _this.hide(0);\r\n _this.__disabled = true;\r\n // Make it disposable\r\n // @todo Maybe it's enough to just dispose `sliceContainer`?\r\n _this._disposers.push(_this.backgroundSlice);\r\n _this._disposers.push(_this.progressSlice);\r\n _this._disposers.push(_this.label);\r\n _this._disposers.push(sliceContainer);\r\n return _this;\r\n }\r\n Object.defineProperty(Preloader.prototype, \"progress\", {\r\n /**\r\n * @return Progress (0-1)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"progress\");\r\n },\r\n /**\r\n * Current preload progress. (0-1)\r\n *\r\n * * 0 - 0%\r\n * * 0.5 - 50%\r\n * * 1 - 100%\r\n *\r\n * Setting this to a value less than 1, will automatically reveal the\r\n * preloader, while setting it to 1 (100%) will hide it.\r\n *\r\n * @param value Progress (0-1)\r\n */\r\n set: function (value) {\r\n var _this = this;\r\n this.__disabled = false;\r\n this.validateLayout(); // show not in center without this\r\n this.setPropertyValue(\"progress\", value);\r\n /*if (!this.visible && value == 1) {\r\n return;\r\n }*/\r\n this.progressSlice.arc = 360 * value;\r\n if (this.label) {\r\n this.label.text = Math.round(value * 100) + \"%\";\r\n }\r\n if (value >= 1) {\r\n // Cancel the timeout\r\n if (this._started) {\r\n this._started = undefined;\r\n }\r\n // TODO remove closure ?\r\n registry.events.once(\"enterframe\", function () {\r\n var animation = _this.hide();\r\n if (animation && !animation.isFinished()) {\r\n animation.events.once(\"animationended\", function () {\r\n _this.__disabled = true;\r\n });\r\n }\r\n else {\r\n _this.__disabled = true;\r\n }\r\n });\r\n this.interactionsEnabled = false;\r\n this.setPropertyValue(\"progress\", 0);\r\n }\r\n else if (value > 0) {\r\n if (this.delay) {\r\n if (!this._started) {\r\n this._started = new Date().getTime();\r\n }\r\n else if ((this._started + this.delay) <= new Date().getTime()) {\r\n this.__disabled = false;\r\n this.show();\r\n this.interactionsEnabled = true;\r\n }\r\n }\r\n else {\r\n this.__disabled = false;\r\n this.show();\r\n this.interactionsEnabled = true;\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Preloader.prototype, \"delay\", {\r\n /**\r\n * @return Delay (ms)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"delay\");\r\n },\r\n /**\r\n * Delay display of preloader by X milliseconds.\r\n *\r\n * When loading starts (`progress` is set to <1) and finishes (`progress` is\r\n * set to 1) before `delay` ms, the loader is never shown.\r\n *\r\n * This is used to avoid brief flashing of the preload for very quick loads.\r\n *\r\n * @default 1000\r\n * @param value Delay (ms)\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"delay\", value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return Preloader;\r\n}(Container));\r\nexport { Preloader };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"Preloader\"] = Preloader;\r\n","/**\r\n * Zoom out button functionality.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Button } from \"./Button\";\r\nimport { Sprite } from \"../Sprite\";\r\nimport { registry } from \"../Registry\";\r\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\r\nimport * as $path from \"../rendering/Path\";\r\nimport * as $type from \"../../core/utils/Type\";\r\nimport { MouseCursorStyle } from \"../../core/interaction/Mouse\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Creates a zoom out button.\r\n *\r\n * @see {@link ICloseButtonEvents} for a list of available events\r\n * @see {@link ICloseButtonAdapters} for a list of available Adapters\r\n */\r\nvar CloseButton = /** @class */ (function (_super) {\r\n __extends(CloseButton, _super);\r\n /**\r\n * Constructor\r\n */\r\n function CloseButton() {\r\n var _this = \r\n // Init\r\n _super.call(this) || this;\r\n _this.className = \"CloseButton\";\r\n _this.padding(8, 8, 8, 8);\r\n _this.showSystemTooltip = true;\r\n _this.width = 30;\r\n _this.height = 30;\r\n var interfaceColors = new InterfaceColorSet();\r\n _this.cursorOverStyle = MouseCursorStyle.pointer;\r\n var background = _this.background;\r\n background.cornerRadius(20, 20, 20, 20);\r\n var bgc = interfaceColors.getFor(\"background\");\r\n background.fill = bgc;\r\n background.stroke = interfaceColors.getFor(\"primaryButton\");\r\n background.strokeOpacity = 1;\r\n background.strokeWidth = 1;\r\n var downColor = interfaceColors.getFor(\"primaryButtonActive\");\r\n var bhs = background.states.getKey(\"hover\");\r\n bhs.properties.strokeWidth = 3;\r\n bhs.properties.fill = bgc;\r\n var bds = background.states.getKey(\"down\");\r\n bds.properties.stroke = downColor;\r\n bds.properties.fill = bgc;\r\n // Create an icon\r\n var icon = new Sprite();\r\n icon.element = _this.paper.add(\"path\");\r\n icon.stroke = background.stroke;\r\n _this.icon = icon;\r\n // Apply theme\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n CloseButton.prototype.validate = function () {\r\n _super.prototype.validate.call(this);\r\n var w = this.pixelWidth / 3;\r\n var h = this.pixelHeight / 3;\r\n var path = $path.moveTo({ x: -w / 2, y: -h / 2 });\r\n path += $path.lineTo({ x: w / 2, y: h / 2 });\r\n path += $path.moveTo({ x: w / 2, y: -h / 2 });\r\n path += $path.lineTo({ x: -w / 2, y: h / 2 });\r\n this.icon.path = path;\r\n this.invalidateLayout();\r\n };\r\n /**\r\n * Sets defaults that instantiate some objects that rely on parent, so they\r\n * cannot be set in constructor.\r\n */\r\n CloseButton.prototype.applyInternalDefaults = function () {\r\n _super.prototype.applyInternalDefaults.call(this);\r\n if (!$type.hasValue(this.readerTitle)) {\r\n this.readerTitle = this.language.translate(\"Close\");\r\n }\r\n };\r\n return CloseButton;\r\n}(Button));\r\nexport { CloseButton };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"CloseButton\"] = CloseButton;\r\n","/**\r\n * Functionality for drawing simple SwitchButtons.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Container } from \"../Container\";\r\nimport { Label } from \"./Label\";\r\nimport { Button } from \"../elements/Button\";\r\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\r\nimport { Circle } from \"../../core/elements/Circle\";\r\nimport { percent } from \"../../core/utils/Percent\";\r\nimport { registry } from \"../Registry\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * SwitchButton class is capable of drawing a simple rectangular SwitchButton with\r\n * optionally rounded corners and an icon in it.\r\n *\r\n * @see {@link ISwitchButtonEvents} for a list of available events\r\n * @see {@link ISwitchButtonAdapters} for a list of available Adapters\r\n */\r\nvar SwitchButton = /** @class */ (function (_super) {\r\n __extends(SwitchButton, _super);\r\n /**\r\n * Constructor\r\n */\r\n function SwitchButton() {\r\n var _this = \r\n // Init\r\n _super.call(this) || this;\r\n _this.className = \"SwitchButton\";\r\n _this.tooltipY = 0;\r\n // Set defaults\r\n _this.layout = \"horizontal\";\r\n _this.contentAlign = \"center\";\r\n _this.contentValign = \"middle\";\r\n _this.padding(8, 16, 8, 16);\r\n _this.setStateOnChildren = true;\r\n _this.states.create(\"active\");\r\n var interfaceColors = new InterfaceColorSet();\r\n // Create the label element\r\n var leftLabel = new Label();\r\n leftLabel.fillOpacity = 0.3;\r\n var llas = leftLabel.states.create(\"active\");\r\n llas.properties.fillOpacity = 1;\r\n leftLabel.isActive = true;\r\n _this.leftLabel = leftLabel;\r\n var button = new Button();\r\n var circle = new Circle();\r\n button.contentValign = \"none\";\r\n button.padding(0, 0, 0, 0);\r\n circle.radius = 10;\r\n button.icon = circle;\r\n button.icon.valign = \"middle\";\r\n button.label = undefined;\r\n var p100 = percent(100);\r\n button.background.cornerRadius(p100, p100, p100, p100);\r\n button.width = circle.radius * 3.5;\r\n button.height = circle.radius * 2.1;\r\n button.marginLeft = 8;\r\n button.marginRight = 8;\r\n button.togglable = true;\r\n circle.dx = -circle.radius * 0.7;\r\n circle.fill = interfaceColors.getFor(\"primaryButton\");\r\n var hs = circle.states.create(\"hover\");\r\n hs.properties.fill = interfaceColors.getFor(\"primaryButtonHover\");\r\n var as = circle.states.create(\"active\");\r\n as.properties.fill = interfaceColors.getFor(\"primaryButtonActive\");\r\n as.properties.dx = circle.radius * 0.7;\r\n _this.switchButton = button;\r\n _this.events.on(\"toggled\", function () {\r\n _this.leftLabel.isActive = !_this.isActive;\r\n _this.rightLabel.isActive = _this.isActive;\r\n });\r\n // Create the label element\r\n var rightLabel = new Label();\r\n rightLabel.fillOpacity = 0.3;\r\n var rlas = rightLabel.states.create(\"active\");\r\n rlas.properties.fillOpacity = 1;\r\n _this.rightLabel = rightLabel;\r\n // Set up accessibility\r\n // A Button should be always focusable\r\n _this.role = \"button\";\r\n _this.focusable = true;\r\n rightLabel.valign = \"middle\";\r\n leftLabel.valign = \"middle\";\r\n button.valign = \"middle\";\r\n // Apply theme\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n Object.defineProperty(SwitchButton.prototype, \"leftLabel\", {\r\n /**\r\n * @return Left label element\r\n */\r\n get: function () {\r\n return this._leftLabel;\r\n },\r\n /**\r\n * [[Label]] element to be used for left text.\r\n *\r\n * @param left label element\r\n */\r\n set: function (label) {\r\n if (this._leftLabel) {\r\n this.removeDispose(this._leftLabel);\r\n }\r\n this._leftLabel = label;\r\n if (label) {\r\n label.parent = this;\r\n label.interactionsEnabled = false;\r\n label.shouldClone = false;\r\n this._disposers.push(this._leftLabel);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(SwitchButton.prototype, \"rightLabel\", {\r\n /**\r\n * @return Rigth label element\r\n */\r\n get: function () {\r\n return this._rightLabel;\r\n },\r\n /**\r\n * [[Label]] element to be used for left text.\r\n *\r\n * @param rigth label element\r\n */\r\n set: function (label) {\r\n if (this._rightLabel) {\r\n this.removeDispose(this._rightLabel);\r\n }\r\n this._rightLabel = label;\r\n if (label) {\r\n label.parent = this;\r\n label.interactionsEnabled = false;\r\n label.shouldClone = false;\r\n this._disposers.push(this._rightLabel);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(SwitchButton.prototype, \"switch\", {\r\n /**\r\n * @ignore\r\n * @deprecated Use `switchButton` instead\r\n */\r\n get: function () {\r\n return this._switchButton;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(SwitchButton.prototype, \"switchButton\", {\r\n /**\r\n * @return Button\r\n */\r\n get: function () {\r\n return this._switchButton;\r\n },\r\n /**\r\n * A [[Button]] element for switch.\r\n *\r\n * @param Button\r\n */\r\n set: function (button) {\r\n if (this._switchButton) {\r\n this.removeDispose(this._switchButton);\r\n }\r\n this._switchButton = button;\r\n if (button) {\r\n button.parent = this;\r\n button.shouldClone = false;\r\n this._disposers.push(this._switchButton);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Copies properties and other attributes.\r\n *\r\n * @param source Source\r\n */\r\n SwitchButton.prototype.copyFrom = function (source) {\r\n _super.prototype.copyFrom.call(this, source);\r\n if (source.leftLabel) {\r\n this.leftLabel.copyFrom(source.leftLabel);\r\n }\r\n if (source.rightLabel) {\r\n this.rightLabel.copyFrom(source.rightLabel);\r\n }\r\n if (source.switchButton) {\r\n this.switchButton.copyFrom(source.switchButton);\r\n }\r\n };\r\n return SwitchButton;\r\n}(Container));\r\nexport { SwitchButton };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"SwitchButton\"] = SwitchButton;\r\n","/**\r\n * Slider is a scrollbar with just one selection grip.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Scrollbar } from \"../../core/elements/Scrollbar\";\r\nimport { registry } from \"../Registry\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Creates a slider - a version of scrollbar with just one grip.\r\n *\r\n * @see {@link ISliderEvents} for a list of available events\r\n * @see {@link ISliderAdapters} for a list of available Adapters\r\n */\r\nvar Slider = /** @class */ (function (_super) {\r\n __extends(Slider, _super);\r\n /**\r\n * Constructor\r\n */\r\n function Slider() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"Slider\";\r\n _this.thumb.opacity = 0;\r\n _this.thumb.interactionsEnabled = false;\r\n _this.endGrip.opacity = 0;\r\n _this.endGrip.interactionsEnabled = false;\r\n _this.startGrip.events.on(\"drag\", function () {\r\n _this.endGrip.x = _this.startGrip.x;\r\n _this.endGrip.y = _this.startGrip.y;\r\n });\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n Object.defineProperty(Slider.prototype, \"__end\", {\r\n /**\r\n * @return [description]\r\n */\r\n get: function () {\r\n return this._start;\r\n },\r\n set: function (value) {\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Slider.prototype, \"end\", {\r\n /**\r\n * @return [description]\r\n */\r\n get: function () {\r\n return this._start;\r\n },\r\n /**\r\n * Relative position (0-1) of the end grip.\r\n *\r\n * @param position Position (0-1)\r\n */\r\n set: function (position) {\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Slider.prototype, \"start\", {\r\n /**\r\n * @return Position (0-1)\r\n */\r\n get: function () {\r\n return this._start;\r\n },\r\n /**\r\n * Relative position (0-1) of the start grip.\r\n *\r\n * @param position Position (0-1)\r\n */\r\n set: function (position) {\r\n if (!this._isBusy) {\r\n this.__start = position;\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return Slider;\r\n}(Scrollbar));\r\nexport { Slider };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"Slider\"] = Slider;\r\n","/**\r\n * A module that defines Text element used to indicate links.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Label } from \"../../core/elements/Label\";\r\nimport { MouseCursorStyle } from \"../../core/interaction/Mouse\";\r\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\r\nimport { registry } from \"../Registry\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Creates a text element with a link.\r\n *\r\n * @see {@link ITextLinkEvents} for a list of available events\r\n * @see {@link ITextLinkAdapters} for a list of available Adapters\r\n */\r\nvar TextLink = /** @class */ (function (_super) {\r\n __extends(TextLink, _super);\r\n /**\r\n * Constructor\r\n */\r\n function TextLink() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"TextLink\";\r\n _this.selectable = true;\r\n var interfaceColors = new InterfaceColorSet();\r\n _this.fill = interfaceColors.getFor(\"primaryButton\").brighten(0.3);\r\n var hoverState = _this.states.create(\"hover\");\r\n hoverState.properties.fill = interfaceColors.getFor(\"primaryButtonHover\").brighten(0.3);\r\n var downState = _this.states.create(\"down\");\r\n downState.properties.fill = interfaceColors.getFor(\"primaryButtonDown\").brighten(0.3);\r\n _this.cursorOverStyle = MouseCursorStyle.pointer;\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n return TextLink;\r\n}(Label));\r\nexport { TextLink };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"TextLink\"] = TextLink;\r\n","/**\r\n * Functionality for drawing a trapezoid.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Sprite } from \"../Sprite\";\r\nimport { percent } from \"../../core/utils/Percent\";\r\nimport { registry } from \"../Registry\";\r\nimport * as $utils from \"../utils/Utils\";\r\nimport * as $type from \"../utils/Type\";\r\nimport * as $path from \"../rendering/Path\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Used to draw a Trapezoid.\r\n *\r\n * @see {@link ITrapezoidEvents} for a list of available events\r\n * @see {@link ITrapezoidAdapters} for a list of available Adapters\r\n */\r\nvar Trapezoid = /** @class */ (function (_super) {\r\n __extends(Trapezoid, _super);\r\n /**\r\n * Constructor\r\n */\r\n function Trapezoid() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"Trapezoid\";\r\n _this.element = _this.paper.add(\"path\");\r\n _this.topSide = percent(100);\r\n _this.bottomSide = percent(100);\r\n _this.leftSide = percent(100);\r\n _this.rightSide = percent(100);\r\n _this.isMeasured = false; // todo: add measureElement\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * Draws the element.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Trapezoid.prototype.draw = function () {\r\n _super.prototype.draw.call(this);\r\n var w = this.pixelWidth;\r\n var h = this.pixelHeight;\r\n var ts = $utils.relativeToValue(this.topSide, w);\r\n var bs = $utils.relativeToValue(this.bottomSide, w);\r\n var ls = $utils.relativeToValue(this.leftSide, h);\r\n var rs = $utils.relativeToValue(this.rightSide, h);\r\n // 1----2\r\n // | |\r\n // 4----3\r\n var x0 = (w - ts) / 2;\r\n var y0 = (h - ls) / 2;\r\n var x1 = w - (w - ts) / 2;\r\n var y1 = (h - rs) / 2;\r\n var x2 = w - (w - bs) / 2;\r\n var y2 = h - (h - rs) / 2;\r\n var x3 = (w - bs) / 2;\r\n var y3 = h - (h - ls) / 2;\r\n var mt = \"\";\r\n var mr = \"\";\r\n var mb = \"\";\r\n var ml = \"\";\r\n if ($type.hasValue(this.horizontalNeck)) {\r\n var hn = this.horizontalNeck.value;\r\n mt = $path.lineTo({ x: w * hn, y: Math.max(y0, y1) });\r\n mb = $path.lineTo({ x: w * hn, y: Math.min(y2, y3) });\r\n }\r\n if ($type.hasValue(this.verticalNeck)) {\r\n var vn = this.verticalNeck.value;\r\n mr = $path.lineTo({ x: Math.min(x1, x2), y: h * vn });\r\n ml = $path.lineTo({ x: Math.max(x0, x3), y: h * vn });\r\n }\r\n var path = $path.moveTo({ x: x0, y: y0 })\r\n + mt\r\n + $path.lineTo({ x: x1, y: y1 })\r\n + mr\r\n + $path.lineTo({ x: x2, y: y2 })\r\n + mb\r\n + $path.lineTo({ x: x3, y: y3 })\r\n + ml;\r\n this.path = path;\r\n };\r\n Object.defineProperty(Trapezoid.prototype, \"topSide\", {\r\n /**\r\n * @return Width\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"topSide\");\r\n },\r\n /**\r\n * Wdith of the top side. Absolute (px) or relative ([[Percent]]).\r\n *\r\n * @default Percent(100)\r\n * @param value Width\r\n */\r\n set: function (value) {\r\n this.setPercentProperty(\"topSide\", value, true, false, 10, false);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Trapezoid.prototype, \"bottomSide\", {\r\n /**\r\n * @return Width\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"bottomSide\");\r\n },\r\n /**\r\n * Wdith of the bottom side. Absolute (px) or relative ([[Percent]]).\r\n *\r\n * @default Percent(100)\r\n * @param value Width\r\n */\r\n set: function (value) {\r\n this.setPercentProperty(\"bottomSide\", value, true, false, 10, false);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Trapezoid.prototype, \"leftSide\", {\r\n /**\r\n * @return Height\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"leftSide\");\r\n },\r\n /**\r\n * Height of the left side. Absolute (px) or relative ([[Percent]]).\r\n *\r\n * @default Percent(100)\r\n * @param value Height\r\n */\r\n set: function (value) {\r\n this.setPercentProperty(\"leftSide\", value, true, false, 10, false);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Trapezoid.prototype, \"rightSide\", {\r\n /**\r\n * @return Height\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"rightSide\");\r\n },\r\n /**\r\n * Height of the right side. Absolute (px) or relative ([[Percent]]).\r\n *\r\n * @default Percent(100)\r\n * @param value Height\r\n */\r\n set: function (value) {\r\n this.setPercentProperty(\"rightSide\", value, true, false, 10, false);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Trapezoid.prototype, \"horizontalNeck\", {\r\n /**\r\n * @return Horizontal neck position\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"horizontalNeck\");\r\n },\r\n /**\r\n * A relative vertical position of the \"neck\". If the top and bottom sides\r\n * are of different width, and `horizontalNeck` is set, a choke point\r\n * will be created at that position, creating a funnel shape.\r\n *\r\n * @param value Horizontal neck position\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"horizontalNeck\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Trapezoid.prototype, \"verticalNeck\", {\r\n /**\r\n * @return Vertical neck position\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"verticalNeck\");\r\n },\r\n /**\r\n * A relative horizontal position of the \"neck\". If the left and right sides\r\n * are of different height, and `verticalNeck` is set, a choke point\r\n * will be created at that position, creating a funnel shape.\r\n *\r\n * @param value Vertical neck position\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"verticalNeck\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return Trapezoid;\r\n}(Sprite));\r\nexport { Trapezoid };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"Trapezoid\"] = Trapezoid;\r\n","/**\r\n * Functionality for drawing waved circles.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Circle } from \"./Circle\";\r\nimport { registry } from \"../Registry\";\r\nimport * as $path from \"../rendering/Path\";\r\nimport * as $math from \"../utils/Math\";\r\nimport * as $utils from \"../utils/Utils\";\r\nimport * as $smoothing from \"../../core/rendering/Smoothing\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Draws a waved circle.\r\n *\r\n * @see {@link IWavedCircleEvents} for a list of available events\r\n * @see {@link IWavedCircleAdapters} for a list of available Adapters\r\n */\r\nvar WavedCircle = /** @class */ (function (_super) {\r\n __extends(WavedCircle, _super);\r\n /**\r\n * Constructor\r\n */\r\n function WavedCircle() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"WavedCircle\";\r\n _this.element = _this.paper.add(\"path\");\r\n _this.waveLength = 16;\r\n _this.waveHeight = 4;\r\n _this.fill = undefined;\r\n _this.fillOpacity = 0;\r\n _this.tension = 0.8;\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * Draws the waved line.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n WavedCircle.prototype.draw = function () {\r\n var path = \"\";\r\n var radius = this.pixelRadius;\r\n if (radius > 0) {\r\n var points = this.getPoints(radius);\r\n path = $path.moveTo(points[0]) + new $smoothing.Tension(this.tension, this.tension).smooth(points);\r\n }\r\n var innerRadius = this.pixelInnerRadius;\r\n if (innerRadius > 0) {\r\n var points = this.getPoints(innerRadius);\r\n points.reverse();\r\n path += $path.moveTo(points[0]) + new $smoothing.Tension(this.tension, this.tension).smooth(points);\r\n }\r\n this.path = path;\r\n };\r\n /**\r\n * Returns points that circle consists of.\r\n *\r\n * @param radius Radius (px)\r\n * @return Points\r\n */\r\n WavedCircle.prototype.getPoints = function (radius) {\r\n var circleLength = radius * Math.PI * 2;\r\n var halfWaveHeight = this.waveHeight / 2;\r\n var waveLength = circleLength / Math.round(circleLength / this.waveLength);\r\n var halfWaveLength = waveLength / 2;\r\n var points = [];\r\n var count = circleLength / waveLength;\r\n for (var i = 0; i <= count; i++) {\r\n var angle1 = (i * waveLength) / circleLength * 360;\r\n var angle2 = (i * waveLength + halfWaveLength) / circleLength * 360;\r\n points.push({ x: (radius - halfWaveHeight) * $math.cos(angle1), y: (radius - halfWaveHeight) * $math.sin(angle1) });\r\n points.push({ x: (radius + halfWaveHeight) * $math.cos(angle2), y: (radius + halfWaveHeight) * $math.sin(angle2) });\r\n }\r\n points.pop();\r\n return points;\r\n };\r\n Object.defineProperty(WavedCircle.prototype, \"innerRadius\", {\r\n /**\r\n * @return Inner radius\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"innerRadius\");\r\n },\r\n /**\r\n * Inner radius of the circle in pixels (absolute) or [[Percent]] (relative).\r\n *\r\n * @param value Inner radius\r\n */\r\n set: function (value) {\r\n this.setPercentProperty(\"innerRadius\", value, true, false, 10, false);\r\n this.invalidate();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(WavedCircle.prototype, \"pixelInnerRadius\", {\r\n /**\r\n * Calculated inner radius of the circle in pixels.\r\n *\r\n * @readonly\r\n * @return Inner radius (px)\r\n */\r\n get: function () {\r\n return $utils.relativeToValue(this.innerRadius, $math.min(this.innerWidth / 2, this.innerHeight / 2));\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(WavedCircle.prototype, \"waveLength\", {\r\n /**\r\n * @return Wave length (px)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"waveLength\");\r\n },\r\n /**\r\n * Wave length in pixels.\r\n *\r\n * @default 16\r\n * @param value Wave length (px)\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"waveLength\", value);\r\n this.invalidate();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(WavedCircle.prototype, \"waveHeight\", {\r\n /**\r\n * @return Wave height (px)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"waveHeight\");\r\n },\r\n /**\r\n * Wave height in pixels.\r\n *\r\n * @default 4\r\n * @param value Wave height (px)\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"waveHeight\", value);\r\n this.invalidate();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(WavedCircle.prototype, \"tension\", {\r\n /**\r\n * @return Tension\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"tension\");\r\n },\r\n /**\r\n * Tension of the wave.\r\n *\r\n * @default 0.8\r\n * @param value Tension\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"tension\", value);\r\n this.invalidate();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return WavedCircle;\r\n}(Circle));\r\nexport { WavedCircle };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"WavedCircle\"] = WavedCircle;\r\n","/**\r\n * Zoom out button functionality.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Button } from \"./Button\";\r\nimport { Sprite } from \"../Sprite\";\r\nimport { registry } from \"../Registry\";\r\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\r\nimport * as $path from \"../rendering/Path\";\r\nimport * as $type from \"../../core/utils/Type\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Creates a zoom out button.\r\n *\r\n * @see {@link IZoomOutButtonEvents} for a list of available events\r\n * @see {@link IZoomOutButtonAdapters} for a list of available Adapters\r\n */\r\nvar ZoomOutButton = /** @class */ (function (_super) {\r\n __extends(ZoomOutButton, _super);\r\n /**\r\n * Constructor\r\n */\r\n function ZoomOutButton() {\r\n var _this = \r\n // Init\r\n _super.call(this) || this;\r\n _this.className = \"ZoomOutButton\";\r\n _this.padding(9, 9, 9, 9);\r\n //this.dx = - 5;\r\n //this.dy = 5;\r\n _this.showSystemTooltip = true;\r\n var interfaceColors = new InterfaceColorSet();\r\n var background = _this.background;\r\n background.cornerRadius(20, 20, 20, 20);\r\n background.fill = interfaceColors.getFor(\"primaryButton\");\r\n background.stroke = interfaceColors.getFor(\"primaryButtonStroke\");\r\n background.strokeOpacity = 0;\r\n background.states.getKey(\"hover\").properties.fill = interfaceColors.getFor(\"primaryButtonHover\");\r\n background.states.getKey(\"down\").properties.fill = interfaceColors.getFor(\"primaryButtonActive\");\r\n // Create an icon\r\n var icon = new Sprite();\r\n icon.element = _this.paper.add(\"path\");\r\n var path = $path.moveTo({ x: 0, y: 0 });\r\n path += $path.lineTo({ x: 11, y: 0 });\r\n icon.path = path;\r\n icon.pixelPerfect = true;\r\n icon.padding(8, 3, 8, 3);\r\n icon.stroke = interfaceColors.getFor(\"primaryButtonText\");\r\n _this.icon = icon;\r\n // Apply theme\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * Sets defaults that instantiate some objects that rely on parent, so they\r\n * cannot be set in constructor.\r\n */\r\n ZoomOutButton.prototype.applyInternalDefaults = function () {\r\n _super.prototype.applyInternalDefaults.call(this);\r\n if (!$type.hasValue(this.readerTitle)) {\r\n this.readerTitle = this.language.translate(\"Zoom Out\");\r\n }\r\n };\r\n return ZoomOutButton;\r\n}(Button));\r\nexport { ZoomOutButton };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"ZoomOutButton\"] = ZoomOutButton;\r\n","/**\r\n * Play button functionality.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Button } from \"./Button\";\r\nimport { RoundedRectangle } from \"./RoundedRectangle\";\r\nimport { registry } from \"../Registry\";\r\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\r\nimport { Triangle } from \"./Triangle\";\r\nimport * as $type from \"../../core/utils/Type\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Creates a zoom out button.\r\n *\r\n * @see {@link IPlayButtonEvents} for a list of available events\r\n * @see {@link IPlayButtonAdapters} for a list of available Adapters\r\n */\r\nvar PlayButton = /** @class */ (function (_super) {\r\n __extends(PlayButton, _super);\r\n /**\r\n * Constructor\r\n */\r\n function PlayButton() {\r\n var _this = \r\n // Init\r\n _super.call(this) || this;\r\n _this.className = \"PlayButton\";\r\n _this.padding(12, 12, 12, 12);\r\n _this.showSystemTooltip = true;\r\n var interfaceColors = new InterfaceColorSet();\r\n var background = _this.background;\r\n background.cornerRadius(25, 25, 25, 25);\r\n background.fill = interfaceColors.getFor(\"primaryButton\");\r\n background.stroke = interfaceColors.getFor(\"primaryButtonStroke\");\r\n background.strokeOpacity = 0;\r\n background.states.getKey(\"hover\").properties.fill = interfaceColors.getFor(\"primaryButtonHover\");\r\n background.states.getKey(\"down\").properties.fill = interfaceColors.getFor(\"primaryButtonActive\");\r\n // Create a play icon\r\n var playIcon = new Triangle();\r\n playIcon.direction = \"right\";\r\n playIcon.width = 9;\r\n playIcon.height = 11;\r\n playIcon.marginLeft = 1;\r\n playIcon.marginRight = 1;\r\n playIcon.horizontalCenter = \"middle\";\r\n playIcon.verticalCenter = \"middle\";\r\n playIcon.stroke = interfaceColors.getFor(\"primaryButtonText\");\r\n playIcon.fill = playIcon.stroke;\r\n _this.icon = playIcon;\r\n // Create a play icon\r\n var stopIcon = new RoundedRectangle();\r\n stopIcon.width = 11;\r\n stopIcon.height = 11;\r\n stopIcon.horizontalCenter = \"middle\";\r\n stopIcon.verticalCenter = \"middle\";\r\n stopIcon.cornerRadius(0, 0, 0, 0);\r\n stopIcon.stroke = interfaceColors.getFor(\"primaryButtonText\");\r\n stopIcon.fill = playIcon.stroke;\r\n _this.togglable = true;\r\n var activeState = _this.states.create(\"active\");\r\n activeState.transitionDuration = 0;\r\n activeState.properties.icon = stopIcon;\r\n _this.defaultState.transitionDuration = 0;\r\n // Apply theme\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * Sets defaults that instantiate some objects that rely on parent, so they\r\n * cannot be set in constructor.\r\n */\r\n PlayButton.prototype.applyInternalDefaults = function () {\r\n _super.prototype.applyInternalDefaults.call(this);\r\n if (!$type.hasValue(this.readerTitle)) {\r\n this.readerTitle = this.language.translate(\"Play\");\r\n }\r\n };\r\n return PlayButton;\r\n}(Button));\r\nexport { PlayButton };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"PlayButton\"] = PlayButton;\r\n","import { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { BaseObject } from \"../../Base\";\r\nimport { registry } from \"../../Registry\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * A base class for color modifiers.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\nvar ColorModifier = /** @class */ (function (_super) {\r\n __extends(ColorModifier, _super);\r\n /**\r\n * Constructor\r\n */\r\n function ColorModifier() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"ColorModifier\";\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * Modifies color value.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Original color\r\n * @return Modified\r\n */\r\n ColorModifier.prototype.modify = function (value) {\r\n return value;\r\n };\r\n return ColorModifier;\r\n}(BaseObject));\r\nexport { ColorModifier };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"ColorModifier\"] = ColorModifier;\r\n","import { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { ColorModifier } from \"./ColorModifier\";\r\nimport { registry } from \"../../Registry\";\r\nimport * as $math from \"../../utils/Math\";\r\nimport * as $type from \"../../utils/Type\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * This class can be used to modify linear gradient steps, changing visual\r\n * properties like lightness, brightness, opacity of each set.\r\n *\r\n * It can also set offsets for each gradient step.\r\n *\r\n * E.g. if I want to fill a columns in a column series to be a solid fill from\r\n * top to 80% of height, then gradually fades out, I can use the following\r\n * gradient modifier as a `fillModifier`:\r\n *\r\n * ```TypeScript\r\n * let fillModifier = new am4core.GradientModifier();\r\n * fillModifier.opacities = [1, 1, 0];\r\n * fillModifier.offsets = [0, 0.8, 1];\r\n * columnSeries.columns.template.fillModifier = fillModifier;\r\n * ```\r\n * ```JavaScript\r\n * var fillModifier = new am4core.GradientModifier();\r\n * fillModifier.opacities = [1, 1, 0];\r\n * fillModifier.offsets = [0, 0.8, 1];\r\n * columnSeries.columns.template.fillModifier = fillModifier;\r\n * ```\r\n * ```JSON\r\n * \"series\": [{\r\n * \"type\": \"ColumnSeries\",\r\n * \"columns\": {\r\n * \"fillModifier\": {\r\n * \"type\": \"GradientModifier\",\r\n * \"opacities\": [1, 1, 0],\r\n * \"offsets\": [0, 0.8, 1]\r\n * }\r\n * }\r\n * }]\r\n * ```\r\n */\r\nvar GradientModifier = /** @class */ (function (_super) {\r\n __extends(GradientModifier, _super);\r\n /**\r\n * Constructor.\r\n */\r\n function GradientModifier() {\r\n var _this = _super.call(this) || this;\r\n _this.lightnesses = [];\r\n _this.brightnesses = [];\r\n _this.opacities = [];\r\n _this.offsets = [];\r\n _this.className = \"GradientModifier\";\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n Object.defineProperty(GradientModifier.prototype, \"lightnesses\", {\r\n /**\r\n * @return Lightness values\r\n */\r\n get: function () {\r\n return this._lightnesses;\r\n },\r\n /**\r\n * An array of lightness values for each step.\r\n *\r\n * @param value Lightness values\r\n */\r\n set: function (value) {\r\n this._lightnesses = value;\r\n this._brightnesses = [];\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(GradientModifier.prototype, \"brightnesses\", {\r\n /**\r\n * @return Brightness values\r\n */\r\n get: function () {\r\n return this._brightnesses;\r\n },\r\n /**\r\n * An array of brightness values for each step.\r\n *\r\n * @param value Brightness values\r\n */\r\n set: function (value) {\r\n this._brightnesses = value;\r\n this._lightnesses = [];\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(GradientModifier.prototype, \"opacities\", {\r\n /**\r\n * @return Opacity values\r\n */\r\n get: function () {\r\n return this._opacities;\r\n },\r\n /**\r\n * An array of opacity values for each step.\r\n *\r\n * @param value Opacity values\r\n */\r\n set: function (value) {\r\n this._opacities = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(GradientModifier.prototype, \"offsets\", {\r\n /**\r\n * @return Offsets\r\n */\r\n get: function () {\r\n return this._offsets;\r\n },\r\n /**\r\n * An array of relative position (0-1) for each step.\r\n *\r\n * If not set, all steps will be of equal relative length.\r\n *\r\n * @param value Offsets\r\n */\r\n set: function (value) {\r\n this._offsets = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Modifies the color based on step setting.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Source color\r\n * @return A gradient that matches set modification rules\r\n */\r\n GradientModifier.prototype.modify = function (value) {\r\n // Clear current gradient\r\n this.gradient.clear();\r\n // Get step count\r\n var count = 0;\r\n if (this.opacities) {\r\n count = $math.max(count, this.opacities.length);\r\n }\r\n if (this.lightnesses) {\r\n count = $math.max(count, this.lightnesses.length);\r\n }\r\n if (this.brightnesses) {\r\n count = $math.max(count, this.brightnesses.length);\r\n }\r\n // Init step values\r\n var opacity = 1, lightness, brightness;\r\n // Apply steps\r\n for (var i = 0; i < count; i++) {\r\n // Take base color\r\n var color = value;\r\n // Check if there are any parameters for this step\r\n if (this.opacities && $type.isNumber(this.opacities[i])) {\r\n opacity = this.opacities[i];\r\n }\r\n if (this.lightnesses && $type.isNumber(this.lightnesses[i])) {\r\n lightness = this.lightnesses[i];\r\n brightness = undefined;\r\n }\r\n if (this.brightnesses && $type.isNumber(this.brightnesses[i])) {\r\n brightness = this.brightnesses[i];\r\n lightness = undefined;\r\n }\r\n // Check if we need to brighten/lighten color\r\n if ($type.isNumber(brightness)) {\r\n color = value.brighten(this.brightnesses[i]);\r\n }\r\n else if ($type.isNumber(lightness)) {\r\n color = value.lighten(this.lightnesses[i]);\r\n }\r\n // Get offset (it's OK if it's undefined)\r\n var offset = this.offsets[i];\r\n // Apply step\r\n this.gradient.addColor(color, opacity, offset);\r\n }\r\n return this.gradient;\r\n };\r\n GradientModifier.prototype.copyFrom = function (source) {\r\n _super.prototype.copyFrom.call(this, source);\r\n this._offsets = source.offsets;\r\n this._brightnesses = source.brightnesses;\r\n this._lightnesses = source.lightnesses;\r\n this._opacities = source.opacities;\r\n };\r\n return GradientModifier;\r\n}(ColorModifier));\r\nexport { GradientModifier };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"GradientModifier\"] = GradientModifier;\r\n","import { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { LinearGradient } from \"./LinearGradient\";\r\nimport { GradientModifier } from \"./GradientModifier\";\r\nimport { registry } from \"../../Registry\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * This class can be used to modify linear gradient steps, changing visual\r\n * properties like lightness, brightness, opacity of each set.\r\n *\r\n * It can also set offsets for each gradient step.\r\n *\r\n * E.g. if I want to fill a columns in a column series to be a solid fill from\r\n * top to 80% of height, then gradually fades out, I can use the following\r\n * gradient modifier as a `fillModifier`:\r\n *\r\n * ```TypeScript\r\n * let fillModifier = new am4core.LinearGradientModifier();\r\n * fillModifier.opacities = [1, 1, 0];\r\n * fillModifier.offsets = [0, 0.8, 1];\r\n * columnSeries.columns.template.fillModifier = fillModifier;\r\n * ```\r\n * ```JavaScript\r\n * var fillModifier = new am4core.LinearGradientModifier();\r\n * fillModifier.opacities = [1, 1, 0];\r\n * fillModifier.offsets = [0, 0.8, 1];\r\n * columnSeries.columns.template.fillModifier = fillModifier;\r\n * ```\r\n * ```JSON\r\n * \"series\": [{\r\n * \"type\": \"ColumnSeries\",\r\n * \"columns\": {\r\n * \"fillModifier\": {\r\n * \"type\": \"LinearGradientModifier\",\r\n * \"opacities\": [1, 1, 0],\r\n * \"offsets\": [0, 0.8, 1]\r\n * }\r\n * }\r\n * }]\r\n * ```\r\n */\r\nvar LinearGradientModifier = /** @class */ (function (_super) {\r\n __extends(LinearGradientModifier, _super);\r\n /**\r\n * Constructor.\r\n */\r\n function LinearGradientModifier() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"LinearGradientModifier\";\r\n _this.gradient = new LinearGradient();\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n LinearGradientModifier.prototype.copyFrom = function (source) {\r\n _super.prototype.copyFrom.call(this, source);\r\n this.gradient = source.gradient.clone();\r\n };\r\n return LinearGradientModifier;\r\n}(GradientModifier));\r\nexport { LinearGradientModifier };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"LinearGradientModifier\"] = LinearGradientModifier;\r\n","/**\r\n * Cone module.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Container } from \"../../Container\";\r\nimport { Sprite, visualProperties } from \"../../Sprite\";\r\nimport { Ellipse } from \"../../elements/Ellipse\";\r\nimport { LinearGradientModifier } from \"../../rendering/fills/LinearGradientModifier\";\r\nimport { percent } from \"../../utils/Percent\";\r\nimport * as $object from \"../../utils/Object\";\r\nimport * as $path from \"../../rendering/Path\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Builds a round cone/cylinder.\r\n *\r\n * @see {@link IConeEvents} for a list of available events\r\n * @see {@link IConeAdapters} for a list of available Adapters\r\n */\r\nvar Cone = /** @class */ (function (_super) {\r\n __extends(Cone, _super);\r\n /**\r\n * Constructor\r\n */\r\n function Cone() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"Cone\";\r\n _this.angle = 30;\r\n _this.radius = percent(100);\r\n _this.topRadius = percent(100);\r\n _this.top = _this.createChild(Ellipse);\r\n _this.top.shouldClone = false;\r\n _this.bottom = _this.createChild(Ellipse);\r\n _this.bottom.shouldClone = false;\r\n _this.body = _this.createChild(Sprite);\r\n _this.body.shouldClone = false;\r\n _this.body.setElement(_this.paper.add(\"path\"));\r\n _this.layout = \"none\";\r\n _this.bodyFillModifier = new LinearGradientModifier();\r\n _this.bodyFillModifier.lightnesses = [0, -0.25, 0];\r\n _this.body.fillModifier = _this.bodyFillModifier;\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * Draws the element.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Cone.prototype.draw = function () {\r\n _super.prototype.draw.call(this);\r\n $object.copyProperties(this, this.top, visualProperties);\r\n $object.copyProperties(this, this.bottom, visualProperties);\r\n $object.copyProperties(this, this.body, visualProperties);\r\n var w = this.innerWidth;\r\n var h = this.innerHeight;\r\n var bottom = this.bottom;\r\n var top = this.top;\r\n var angle = this.angle;\r\n var radiusBase;\r\n var dx;\r\n var dy;\r\n if (this.orientation == \"horizontal\") {\r\n radiusBase = h / 2;\r\n bottom.y = h / 2;\r\n top.y = h / 2;\r\n top.x = w;\r\n dx = (90 - angle) / 90;\r\n dy = 0;\r\n this.bodyFillModifier.gradient.rotation = 90;\r\n }\r\n else {\r\n dx = 0;\r\n dy = (90 - angle) / 90;\r\n radiusBase = w / 2;\r\n bottom.y = h;\r\n bottom.x = w / 2;\r\n top.x = w / 2;\r\n this.bodyFillModifier.gradient.rotation = 0;\r\n }\r\n var radius = this.radius.value * radiusBase;\r\n var topRadius = this.topRadius.value * radiusBase;\r\n bottom.radius = radius - radius * dx;\r\n bottom.radiusY = radius - radius * dy;\r\n top.radius = topRadius - topRadius * dx;\r\n top.radiusY = topRadius - topRadius * dy;\r\n var path;\r\n if (this.orientation == \"horizontal\") {\r\n path = $path.moveTo({ x: 0, y: h / 2 - bottom.radiusY }) + $path.arcTo(-90, -180, bottom.radius, bottom.radiusY) + $path.lineTo({ x: w, y: h / 2 + top.radiusY }) + $path.arcTo(90, 180, top.radius, top.radiusY) + $path.closePath();\r\n }\r\n else {\r\n path = $path.moveTo({ x: w / 2 - top.radius, y: 0 }) + $path.arcTo(180, -180, top.radius, top.radiusY) + $path.lineTo({ x: w / 2 + bottom.radius, y: h }) + $path.arcTo(0, 180, bottom.radius, bottom.radiusY) + $path.closePath();\r\n }\r\n this.body.path = path;\r\n };\r\n Object.defineProperty(Cone.prototype, \"angle\", {\r\n /**\r\n * @return Angle\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"angle\");\r\n },\r\n /**\r\n * Angle of the point of view to the 3D element. (0-360)\r\n *\r\n * @default 30\r\n * @param value Angle\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"angle\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Cone.prototype, \"radius\", {\r\n /**\r\n * @return Bottom radius\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"radius\");\r\n },\r\n /**\r\n * A relative radius of the cone's bottom (base).\r\n *\r\n * It is relevant to the inner width or height of the element.\r\n *\r\n * @default Percent(100)\r\n * @param value Bottom radius\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"radius\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Cone.prototype, \"topRadius\", {\r\n /**\r\n * @return Top radius\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"topRadius\");\r\n },\r\n /**\r\n * A relative radius of the cone's top (tip).\r\n *\r\n * It is relevant to the inner width or height of the element.\r\n *\r\n * @default Percent(0)\r\n * @param value Top radius\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"topRadius\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Cone.prototype, \"orientation\", {\r\n /**\r\n * Orientation\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"orientation\");\r\n },\r\n /**\r\n * Orientation of the cone\r\n *\r\n * @default \"vertical\"\r\n * @param value Orientation\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"orientation\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return Cone;\r\n}(Container));\r\nexport { Cone };\r\n","/**\r\n * Module for \"Lighten\" filter.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Filter } from \"./Filter\";\r\nimport { registry } from \"../../Registry\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Creates a \"Lighten\" filter.\r\n */\r\nvar LightenFilter = /** @class */ (function (_super) {\r\n __extends(LightenFilter, _super);\r\n /**\r\n * Constructor\r\n */\r\n function LightenFilter() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"LightenFilter\";\r\n // Create elements\r\n // NOTE: we do not need to add each individual element to `_disposers`\r\n // because `filterPrimitives` has an event handler which automatically adds\r\n // anything added to it to `_disposers`\r\n _this.feColorMatrix = _this.paper.add(\"feColorMatrix\");\r\n _this.feColorMatrix.attr({ \"type\": \"matrix\" });\r\n _this.filterPrimitives.push(_this.feColorMatrix);\r\n // Set default properties\r\n _this.lightness = 0;\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n Object.defineProperty(LightenFilter.prototype, \"lightness\", {\r\n /**\r\n * @return Lightness\r\n */\r\n get: function () {\r\n return this.properties[\"lightness\"];\r\n },\r\n /**\r\n * Lightness of the target colors.\r\n *\r\n * If `lightness` is a positive number, the filter will make all colors\r\n * lighter.\r\n *\r\n * If `lightness` is negative, colors will be darkened.\r\n *\r\n * @param value Lightness\r\n */\r\n set: function (value) {\r\n this.properties[\"lightness\"] = value;\r\n var v = value + 1;\r\n this.feColorMatrix.attr({ \"values\": v + \" 0 0 0 0 0 \" + v + \" 0 0 0 0 0 \" + v + \" 0 0 0 0 0 1 0\" });\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return LightenFilter;\r\n}(Filter));\r\nexport { LightenFilter };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"LightenFilter\"] = LightenFilter;\r\n","/**\r\n * Creates a 3D rectangle.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Container } from \"../../Container\";\r\nimport { Sprite } from \"../../Sprite\";\r\nimport * as $math from \"../../utils/Math\";\r\nimport * as $path from \"../../rendering/Path\";\r\nimport { Color, color, toColor } from \"../../utils/Color\";\r\nimport { RadialGradient } from \"../../rendering/fills/RadialGradient\";\r\nimport { LinearGradient } from \"../../rendering/fills/LinearGradient\";\r\nimport { LightenFilter } from \"../../rendering/filters/LightenFilter\";\r\nimport * as $type from \"../../utils/Type\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Builds a 3D rectangle\r\n * @see {@link IRectangle3DEvents} for a list of available events\r\n * @see {@link IRectangle3DAdapters} for a list of available Adapters\r\n */\r\nvar Rectangle3D = /** @class */ (function (_super) {\r\n __extends(Rectangle3D, _super);\r\n /**\r\n * Constructor\r\n */\r\n function Rectangle3D() {\r\n var _this = _super.call(this) || this;\r\n _this.angle = 30;\r\n _this.depth = 30;\r\n _this.className = \"Rectangle3D\";\r\n _this.layout = \"none\";\r\n var sideBack = _this.createChild(Sprite);\r\n sideBack.shouldClone = false;\r\n sideBack.setElement(_this.paper.add(\"path\"));\r\n sideBack.isMeasured = false;\r\n _this.sideBack = sideBack;\r\n _this._disposers.push(_this.sideBack);\r\n var sideBottom = _this.createChild(Sprite);\r\n sideBottom.shouldClone = false;\r\n sideBottom.setElement(_this.paper.add(\"path\"));\r\n sideBottom.isMeasured = false;\r\n _this.sideBottom = sideBottom;\r\n _this._disposers.push(_this.sideBottom);\r\n var sideLeft = _this.createChild(Sprite);\r\n sideLeft.shouldClone = false;\r\n sideLeft.setElement(_this.paper.add(\"path\"));\r\n sideLeft.isMeasured = false;\r\n _this.sideLeft = sideLeft;\r\n _this._disposers.push(_this.sideLeft);\r\n var sideRight = _this.createChild(Sprite);\r\n sideRight.shouldClone = false;\r\n sideRight.setElement(_this.paper.add(\"path\"));\r\n sideRight.isMeasured = false;\r\n _this.sideRight = sideRight;\r\n _this._disposers.push(_this.sideRight);\r\n var sideTop = _this.createChild(Sprite);\r\n sideTop.shouldClone = false;\r\n sideTop.setElement(_this.paper.add(\"path\"));\r\n sideTop.isMeasured = false;\r\n _this.sideTop = sideTop;\r\n _this._disposers.push(_this.sideTop);\r\n var sideFront = _this.createChild(Sprite);\r\n sideFront.shouldClone = false;\r\n sideFront.setElement(_this.paper.add(\"path\"));\r\n sideFront.isMeasured = false;\r\n _this.sideFront = sideFront;\r\n _this._disposers.push(_this.sideFront);\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * Draws the element.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Rectangle3D.prototype.draw = function () {\r\n _super.prototype.draw.call(this);\r\n var w = this.innerWidth;\r\n var h = this.innerHeight;\r\n var depth = this.depth;\r\n var angle = this.angle;\r\n var sin = $math.sin(angle);\r\n var cos = $math.cos(angle);\r\n var a = { x: 0, y: 0 };\r\n var b = { x: w, y: 0 };\r\n var c = { x: w, y: h };\r\n var d = { x: 0, y: h };\r\n var ah = { x: depth * cos, y: -depth * sin };\r\n var bh = { x: depth * cos + w, y: -depth * sin };\r\n var ch = { x: depth * cos + w, y: -depth * sin + h };\r\n var dh = { x: depth * cos, y: -depth * sin + h };\r\n this.sideFront.path = $path.moveTo(a) + $path.lineTo(b) + $path.lineTo(c) + $path.lineTo(d) + $path.closePath();\r\n this.sideBack.path = $path.moveTo(ah) + $path.lineTo(bh) + $path.lineTo(ch) + $path.lineTo(dh) + $path.closePath();\r\n this.sideLeft.path = $path.moveTo(a) + $path.lineTo(ah) + $path.lineTo(dh) + $path.lineTo(d) + $path.closePath();\r\n this.sideRight.path = $path.moveTo(b) + $path.lineTo(bh) + $path.lineTo(ch) + $path.lineTo(c) + $path.closePath();\r\n this.sideBottom.path = $path.moveTo(d) + $path.lineTo(dh) + $path.lineTo(ch) + $path.lineTo(c) + $path.closePath();\r\n this.sideTop.path = $path.moveTo(a) + $path.lineTo(ah) + $path.lineTo(bh) + $path.lineTo(b) + $path.closePath();\r\n };\r\n Object.defineProperty(Rectangle3D.prototype, \"depth\", {\r\n /**\r\n * @return Depth (px)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"depth\");\r\n },\r\n /**\r\n * Depth (Z dimension) of the 3D rectangle in pixels.\r\n *\r\n * @default 30\r\n * @param value Depth (px)\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"depth\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Rectangle3D.prototype, \"angle\", {\r\n /**\r\n * @return Angle\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"angle\");\r\n },\r\n /**\r\n * Angle of the point of view to the 3D element. (0-360)\r\n *\r\n * @default 30\r\n * @param value Angle\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"angle\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Sets actual `fill` property on the SVG element, including applicable color\r\n * modifiers.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Fill\r\n */\r\n Rectangle3D.prototype.setFill = function (value) {\r\n _super.prototype.setFill.call(this, value);\r\n if (!$type.isObject(value) || \"r\" in value) {\r\n value = toColor(value);\r\n }\r\n var colorStr;\r\n if (value instanceof Color) {\r\n colorStr = value.hex;\r\n }\r\n else if (value instanceof LinearGradient || value instanceof RadialGradient) {\r\n colorStr = value.stops.getIndex(0).color.hex;\r\n }\r\n else {\r\n var filter = new LightenFilter();\r\n filter.lightness = -0.2;\r\n this.sideBack.filters.push(filter);\r\n var filter2 = filter.clone();\r\n filter2.lightness = -0.4;\r\n this.sideLeft.filters.push(filter2);\r\n var filter3 = filter.clone();\r\n filter3.lightness = -0.2;\r\n this.sideRight.filters.push(filter3);\r\n var filter4 = filter.clone();\r\n filter4.lightness = -0.1;\r\n this.sideTop.filters.push(filter4);\r\n var filter5 = filter.clone();\r\n filter5.lightness = -0.5;\r\n this.sideBottom.filters.push(filter5);\r\n }\r\n if (colorStr) {\r\n this.sideBack.fill = color(colorStr).lighten(-0.2);\r\n this.sideLeft.fill = color(colorStr).lighten(-0.4);\r\n this.sideRight.fill = color(colorStr).lighten(-0.2);\r\n this.sideTop.fill = color(colorStr).lighten(-0.1);\r\n this.sideBottom.fill = color(colorStr).lighten(-0.5);\r\n }\r\n };\r\n /**\r\n * Copies all properties and related data from a different instance of Rectangle3D.\r\n *\r\n * @param source Source Rectangle3D\r\n */\r\n Rectangle3D.prototype.copyFrom = function (source) {\r\n _super.prototype.copyFrom.call(this, source);\r\n this.sideBack.copyFrom(source.sideBack);\r\n this.sideLeft.copyFrom(source.sideLeft);\r\n this.sideRight.copyFrom(source.sideRight);\r\n this.sideTop.copyFrom(source.sideTop);\r\n this.sideBottom.copyFrom(source.sideBottom);\r\n };\r\n return Rectangle3D;\r\n}(Container));\r\nexport { Rectangle3D };\r\n","/**\r\n * 3D slice module\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Slice } from \"../Slice\";\r\nimport { Sprite } from \"../../Sprite\";\r\nimport * as $math from \"../../utils/Math\";\r\nimport * as $path from \"../../rendering/Path\";\r\nimport * as $type from \"../../utils/Type\";\r\nimport { Color, color } from \"../../utils/Color\";\r\nimport { RadialGradient } from \"../../rendering/fills/RadialGradient\";\r\nimport { LinearGradient } from \"../../rendering/fills/LinearGradient\";\r\nimport { LightenFilter } from \"../../rendering/filters/LightenFilter\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Used to draw a 3D slice of a Pie chart.\r\n *\r\n * @see {@link ISlice3DEvents} for a list of available events\r\n * @see {@link ISlice3DAdapters} for a list of available Adapters\r\n */\r\nvar Slice3D = /** @class */ (function (_super) {\r\n __extends(Slice3D, _super);\r\n /**\r\n * Constructor\r\n */\r\n function Slice3D() {\r\n var _this = \r\n // Init\r\n _super.call(this) || this;\r\n _this.className = \"Slice3D\";\r\n _this.layout = \"none\";\r\n // Create edge container\r\n var edge = _this.createChild(Sprite);\r\n _this.edge = edge;\r\n edge.shouldClone = false;\r\n edge.isMeasured = false;\r\n edge.toBack();\r\n // Set defaults\r\n _this.angle = 30;\r\n _this.depth = 20;\r\n // Create side A element\r\n var sideA = _this.createChild(Sprite);\r\n _this.sideA = sideA;\r\n sideA.shouldClone = false;\r\n sideA.isMeasured = false;\r\n //sideA.setElement(this.paper.add(\"path\"));\r\n //sideA.strokeOpacity = 0;\r\n // Crate side B element\r\n var sideB = _this.createChild(Sprite);\r\n _this.sideB = sideB;\r\n sideB.shouldClone = false;\r\n sideB.isMeasured = false;\r\n //sideB.setElement(this.paper.add(\"path\"));\r\n //sideB.strokeOpacity = 0;\r\n // Apply theme\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * Sets actual `fill` property on the SVG element, including applicable color\r\n * modifiers.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Fill\r\n */\r\n Slice3D.prototype.setFill = function (value) {\r\n _super.prototype.setFill.call(this, value);\r\n var colorStr;\r\n if (value instanceof Color) {\r\n colorStr = value.hex;\r\n }\r\n else if (value instanceof LinearGradient || value instanceof RadialGradient) {\r\n colorStr = value.stops.getIndex(0).color.hex;\r\n }\r\n else {\r\n var filter = new LightenFilter();\r\n filter.lightness = -0.25;\r\n this.edge.filters.push(filter);\r\n this.sideA.filters.push(filter.clone());\r\n this.sideB.filters.push(filter.clone());\r\n }\r\n if (colorStr) {\r\n var edgeFill = color(colorStr).lighten(-0.25);\r\n this.edge.fill = edgeFill;\r\n this.sideA.fill = edgeFill;\r\n this.sideB.fill = edgeFill;\r\n this.edge.stroke = edgeFill;\r\n this.sideA.stroke = edgeFill;\r\n this.sideB.stroke = edgeFill;\r\n }\r\n };\r\n /**\r\n * Draws the element.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Slice3D.prototype.draw = function () {\r\n this.cornerRadius = 0;\r\n this.innerCornerRadius = 0;\r\n _super.prototype.draw.call(this);\r\n if (this.arc !== 0 && this.radius > 0 && this.depth > 0) {\r\n this.sideB.show(0);\r\n this.sideA.show(0);\r\n this.edge.show(0);\r\n var startAngle = this.startAngle;\r\n var arc = this.arc;\r\n var innerRadius = this.pixelInnerRadius || 0;\r\n var radiusY = this.radiusY || 0;\r\n //let cornerRadius = this.cornerRadius || 0;\r\n //let innerCornerRadius = this.innerCornerRadius;\r\n var radius = this.radius;\r\n // this is code duplicate with $path.arc. @todo to think how to avoid it\r\n var endAngle = startAngle + arc;\r\n //let crSin = $math.sin($math.min(arc, 45) / 2);\r\n //innerCornerRadius = innerCornerRadius || cornerRadius;\r\n var innerRadiusY = (radiusY / radius) * innerRadius;\r\n //let cornerRadiusY = (radiusY / radius) * cornerRadius;\r\n //let innerCornerRadiusY = (radiusY / radius) * innerCornerRadius;\r\n //cornerRadius = $math.fitToRange(cornerRadius, 0, (radius - innerRadius) / 2);\r\n //cornerRadiusY = $math.fitToRange(cornerRadiusY, 0, (radiusY - innerRadiusY) / 2);\r\n //innerCornerRadius = $math.fitToRange(innerCornerRadius, 0, (radius - innerRadius) / 2);\r\n //innerCornerRadiusY = $math.fitToRange(innerCornerRadiusY, 0, (radiusY - innerRadiusY) / 2);\r\n //cornerRadius = $math.fitToRange(cornerRadius, 0, radius * crSin);\r\n //cornerRadiusY = $math.fitToRange(cornerRadiusY, 0, radiusY * crSin);\r\n //innerCornerRadius = $math.fitToRange(innerCornerRadius, 0, innerRadius * crSin);\r\n //innerCornerRadiusY = $math.fitToRange(innerCornerRadiusY, 0, innerRadiusY * crSin);\r\n //let crAngle: number = Math.asin(cornerRadius / radius / 2) * $math.DEGREES * 2;\r\n //let crAngleY: number = Math.asin(cornerRadiusY / radiusY / 2) * $math.DEGREES * 2;\r\n //if (innerRadius < innerCornerRadius) {\r\n //\tinnerRadius = innerCornerRadius;\r\n //}\r\n //if (innerRadiusY < innerCornerRadiusY) {\r\n //\tinnerRadiusY = innerCornerRadiusY;\r\n //}\r\n //let crInnerAngle: number = Math.asin(innerCornerRadius / innerRadius / 2) * $math.DEGREES * 2;\r\n //let crInnerAngleY: number = Math.asin(innerCornerRadiusY / innerRadiusY / 2) * $math.DEGREES * 2;\r\n //if (!$type.isNumber(crInnerAngle)) {\r\n //\tcrInnerAngle = 0;\r\n //}\r\n //if (!$type.isNumber(crInnerAngleY)) {\r\n //\tcrInnerAngleY = 0;\r\n //}\r\n //let middleAngle = startAngle + arc / 2;\r\n //let mPoint = { x: $math.round($math.cos(middleAngle) * innerRadius, 4), y: $math.round($math.sin(middleAngle) * innerRadiusY, 4) };\r\n var a0 = { x: $math.cos(startAngle) * (innerRadius), y: $math.sin(startAngle) * (innerRadiusY) };\r\n var b0 = { x: $math.cos(startAngle) * (radius), y: $math.sin(startAngle) * (radiusY) };\r\n var c0 = { x: $math.cos(endAngle) * (radius), y: $math.sin(endAngle) * (radiusY) };\r\n var d0 = { x: $math.cos(endAngle) * (innerRadius), y: $math.sin(endAngle) * (innerRadiusY) };\r\n // end of duplicate\r\n var h = this.depth;\r\n var ah = { x: a0.x, y: a0.y - h };\r\n var bh = { x: b0.x, y: b0.y - h };\r\n var ch = { x: c0.x, y: c0.y - h };\r\n var dh = { x: d0.x, y: d0.y - h };\r\n var edgePath = \"\";\r\n var count = Math.ceil(arc / 5);\r\n var step = arc / count;\r\n var mangle = startAngle;\r\n var prevPoint = bh;\r\n for (var i = 0; i < count; i++) {\r\n mangle += step;\r\n if (mangle > 0 && mangle < 180) {\r\n edgePath += $path.moveTo(prevPoint);\r\n var pp = { x: $math.cos(mangle) * (radius), y: $math.sin(mangle) * (radiusY) - h };\r\n edgePath += $path.lineTo({ x: prevPoint.x, y: prevPoint.y + h });\r\n edgePath += $path.arcToPoint({ x: pp.x, y: pp.y + h }, radius, radiusY, true);\r\n edgePath += $path.lineTo(pp);\r\n edgePath += $path.arcToPoint(prevPoint, radius, radiusY);\r\n edgePath += \"z\";\r\n prevPoint = pp;\r\n }\r\n else {\r\n edgePath += $path.moveTo(prevPoint);\r\n var pp = { x: $math.cos(mangle) * (radius), y: $math.sin(mangle) * (radiusY) - h };\r\n edgePath += $path.arcToPoint(pp, radius, radiusY, true);\r\n edgePath += $path.lineTo({ x: pp.x, y: pp.y + h });\r\n edgePath += $path.arcToPoint({ x: prevPoint.x, y: prevPoint.y + h }, radius, radiusY);\r\n edgePath += $path.lineTo(prevPoint);\r\n edgePath += \"z\";\r\n prevPoint = pp;\r\n }\r\n }\r\n prevPoint = ah;\r\n mangle = startAngle;\r\n for (var i = 0; i < count; i++) {\r\n mangle += step;\r\n if (mangle > 0 && mangle < 180) {\r\n edgePath += $path.moveTo(prevPoint);\r\n var pp = { x: $math.cos(mangle) * (innerRadius), y: $math.sin(mangle) * (innerRadiusY) - h };\r\n edgePath += $path.lineTo({ x: prevPoint.x, y: prevPoint.y + h });\r\n edgePath += $path.arcToPoint({ x: pp.x, y: pp.y + h }, innerRadius, innerRadiusY, true);\r\n edgePath += $path.lineTo(pp);\r\n edgePath += $path.arcToPoint(prevPoint, innerRadius, innerRadiusY);\r\n edgePath += \"z\";\r\n prevPoint = pp;\r\n }\r\n else {\r\n edgePath += $path.moveTo(prevPoint);\r\n var pp = { x: $math.cos(mangle) * (innerRadius), y: $math.sin(mangle) * (innerRadiusY) - h };\r\n edgePath += $path.arcToPoint(pp, innerRadius, innerRadiusY, true);\r\n edgePath += $path.lineTo({ x: pp.x, y: pp.y + h });\r\n edgePath += $path.arcToPoint({ x: prevPoint.x, y: prevPoint.y + h }, innerRadius, innerRadiusY);\r\n edgePath += $path.lineTo(prevPoint);\r\n edgePath += \"z\";\r\n prevPoint = pp;\r\n }\r\n }\r\n this.edge.path = edgePath;\r\n /*\r\n a0 = { x: $math.cos(startAngle) * (innerRadius + innerCornerRadius), y: $math.sin(startAngle) * (innerRadiusY + innerCornerRadiusY) };\r\n b0 = { x: $math.cos(startAngle) * (radius - cornerRadius), y: $math.sin(startAngle) * (radiusY - cornerRadiusY) };\r\n c0 = { x: $math.cos(endAngle) * (radius - cornerRadius), y: $math.sin(endAngle) * (radiusY - cornerRadiusY) };\r\n d0 = { x: $math.cos(endAngle) * (innerRadius + innerCornerRadius), y: $math.sin(endAngle) * (innerRadiusY + innerCornerRadiusY) };\r\n // end of duplicate\r\n \r\n ah = { x: a0.x, y: a0.y - h };\r\n bh = { x: b0.x, y: b0.y - h };\r\n ch = { x: c0.x, y: c0.y - h };\r\n dh = { x: d0.x, y: d0.y - h };\r\n */\r\n this.sideA.path = $path.moveTo(a0) + $path.lineTo(b0) + $path.lineTo(bh) + $path.lineTo(ah) + $path.closePath();\r\n this.sideB.path = $path.moveTo(c0) + $path.lineTo(d0) + $path.lineTo(dh) + $path.lineTo(ch) + $path.closePath();\r\n if (this.startAngle < 90) {\r\n this.sideA.toBack();\r\n }\r\n else {\r\n this.sideA.toFront();\r\n }\r\n if (this.startAngle + this.arc > 90) {\r\n this.sideB.toBack();\r\n }\r\n else {\r\n this.sideB.toFront();\r\n }\r\n this.slice.dy = -h;\r\n }\r\n else {\r\n this.sideA.hide(0);\r\n this.sideB.hide(0);\r\n this.edge.hide(0);\r\n }\r\n };\r\n Object.defineProperty(Slice3D.prototype, \"depth\", {\r\n /**\r\n * @return Depth (px)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"depth\");\r\n },\r\n /**\r\n * Depth (height) of the 3D slice in pixels.\r\n *\r\n * @default 20\r\n * @param depth Depth (px)\r\n */\r\n set: function (depth) {\r\n this.setPropertyValue(\"depth\", depth, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Slice3D.prototype, \"angle\", {\r\n /**\r\n * @return Angle\r\n */\r\n get: function () {\r\n var angle = this.getPropertyValue(\"angle\");\r\n if (!$type.isNumber(angle)) {\r\n angle = 0;\r\n }\r\n return angle;\r\n },\r\n /**\r\n * Angle of the point of view to the 3D element. (0-360)\r\n *\r\n * @default 30\r\n * @param value Angle\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"angle\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Slice3D.prototype, \"radiusY\", {\r\n /**\r\n * @return Vertical radius (0-1)\r\n */\r\n get: function () {\r\n var radiusY = this.getPropertyValue(\"radiusY\");\r\n if (!$type.isNumber(radiusY)) {\r\n radiusY = this.radius - this.radius * this.angle / 90;\r\n }\r\n return radiusY;\r\n },\r\n /**\r\n * Vertical radius for creating skewed slices.\r\n *\r\n * This is relevant to `radius`, e.g. 0.5 will set vertical radius to half\r\n * the `radius`.\r\n *\r\n * @param value Vertical radius (0-1)\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"radiusY\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Copies all properties and related data from a different instance of Axis.\r\n *\r\n * @param source Source Axis\r\n */\r\n Slice3D.prototype.copyFrom = function (source) {\r\n _super.prototype.copyFrom.call(this, source);\r\n this.edge.copyFrom(source.edge);\r\n this.sideA.copyFrom(source.sideA);\r\n this.sideB.copyFrom(source.sideB);\r\n };\r\n return Slice3D;\r\n}(Slice));\r\nexport { Slice3D };\r\n","import { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { RadialGradient } from \"./RadialGradient\";\r\nimport { GradientModifier } from \"./GradientModifier\";\r\nimport { registry } from \"../../Registry\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * This class can be used to modify radial gradient steps, changing visual\r\n * properties like lightness, brightness, opacity of each set.\r\n *\r\n * It can also set offsets for each gradient step.\r\n *\r\n * E.g. if I want to fill a columns in a column series to be a solid fill from\r\n * top to 80% of height, then gradually fades out, I can use the following\r\n * gradient modifier as a `fillModifier`:\r\n *\r\n * ```TypeScript\r\n * let fillModifier = new am4core.LinearGradientModifier();\r\n * fillModifier.opacities = [1, 1, 0];\r\n * fillModifier.offsets = [0, 0.8, 1];\r\n * columnSeries.columns.template.fillModifier = fillModifier;\r\n * ```\r\n * ```JavaScript\r\n * var fillModifier = new am4core.LinearGradientModifier();\r\n * fillModifier.opacities = [1, 1, 0];\r\n * fillModifier.offsets = [0, 0.8, 1];\r\n * columnSeries.columns.template.fillModifier = fillModifier;\r\n * ```\r\n * ```JSON\r\n * \"series\": [{\r\n * \"type\": \"ColumnSeries\",\r\n * \"columns\": {\r\n * \"fillModifier\": {\r\n * \"type\": \"LinearGradientModifier\",\r\n * \"opacities\": [1, 1, 0],\r\n * \"offsets\": [0, 0.8, 1]\r\n * }\r\n * }\r\n * }]\r\n * ```\r\n */\r\nvar RadialGradientModifier = /** @class */ (function (_super) {\r\n __extends(RadialGradientModifier, _super);\r\n /**\r\n * Constructor.\r\n */\r\n function RadialGradientModifier() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"RadialGradientModifier\";\r\n _this.gradient = new RadialGradient();\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n RadialGradientModifier.prototype.copyFrom = function (source) {\r\n _super.prototype.copyFrom.call(this, source);\r\n this.gradient = source.gradient.clone();\r\n };\r\n return RadialGradientModifier;\r\n}(GradientModifier));\r\nexport { RadialGradientModifier };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"RadialGradientModifier\"] = RadialGradientModifier;\r\n","import { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Pattern } from \"./Pattern\";\r\nimport { registry } from \"../../Registry\";\r\nimport * as $path from \"../../rendering/Path\";\r\n;\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Line pattern.\r\n */\r\nvar LinePattern = /** @class */ (function (_super) {\r\n __extends(LinePattern, _super);\r\n /**\r\n * Constructor\r\n */\r\n function LinePattern() {\r\n var _this = _super.call(this) || this;\r\n _this.properties[\"gap\"] = 0;\r\n _this._line = _this.paper.add(\"path\");\r\n _this.addElement(_this._line);\r\n return _this;\r\n }\r\n /**\r\n * Draws the pattern.\r\n */\r\n LinePattern.prototype.draw = function () {\r\n _super.prototype.draw.call(this);\r\n if (Math.round(this.rotation / 90) != this.rotation / 90) {\r\n this.properties[\"shapeRendering\"] = \"auto\";\r\n }\r\n if (this._line) {\r\n var w = this.width;\r\n var h = this.height;\r\n var path = \"\";\r\n if (!this.gap) {\r\n if (Math.round(this.rotation / 90) != this.rotation / 90) {\r\n path = $path.moveTo({ x: -w, y: h / 2 }) + $path.lineTo({ x: w * 2, y: h / 2 });\r\n this.properties[\"rotationX\"] = this.width / 2;\r\n this.properties[\"rotationY\"] = this.height / 2;\r\n }\r\n else {\r\n path = $path.moveTo({ x: 0, y: 0 }) + $path.lineTo({ x: w, y: 0 });\r\n }\r\n }\r\n else {\r\n var step = this.gap + this.strokeWidth;\r\n var count = this.height / step;\r\n for (var i = -count / 2; i < count * 1.5; i++) {\r\n if (Math.round(this.rotation / 90) != this.rotation / 90) {\r\n path += $path.moveTo({ x: -w, y: (i + 0.5) * step }) + $path.lineTo({ x: w * 2, y: (i + 0.5) * step });\r\n this.properties[\"rotationX\"] = this.width / 2;\r\n this.properties[\"rotationY\"] = this.height / 2;\r\n }\r\n else {\r\n path += $path.moveTo({ x: -w, y: i * step }) + $path.lineTo({ x: w * 2, y: i * step });\r\n }\r\n }\r\n }\r\n this._line.attr({ \"d\": path });\r\n }\r\n };\r\n Object.defineProperty(LinePattern.prototype, \"gap\", {\r\n /**\r\n * @return gap\r\n */\r\n get: function () {\r\n return this.properties[\"gap\"];\r\n },\r\n /**\r\n * Number of pixels between pattern lines.\r\n *\r\n * The pattern will automatically draw required number of lines to fill\r\n * pattern area maintaining `gap` distance between them.\r\n *\r\n * 0 (zero) means only single line will be drawn.\r\n *\r\n * @default 0\r\n * @since 4.7.7\r\n */\r\n set: function (value) {\r\n this.properties[\"gap\"] = value;\r\n this.draw();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return LinePattern;\r\n}(Pattern));\r\nexport { LinePattern };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"LinePattern\"] = LinePattern;\r\n","/**\r\n * Rectangular pattern module.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Pattern } from \"./Pattern\";\r\nimport { registry } from \"../../Registry\";\r\n;\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Circular pattern\r\n */\r\nvar CirclePattern = /** @class */ (function (_super) {\r\n __extends(CirclePattern, _super);\r\n /**\r\n * Constructor\r\n */\r\n function CirclePattern() {\r\n var _this = _super.call(this) || this;\r\n _this.properties[\"radius\"] = 2;\r\n _this._circle = _this.paper.add(\"circle\");\r\n _this.addElement(_this._circle);\r\n _this.shapeRendering = \"auto\";\r\n return _this;\r\n }\r\n /**\r\n * Draws the circle element.\r\n */\r\n CirclePattern.prototype.draw = function () {\r\n _super.prototype.draw.call(this);\r\n if (this._circle) {\r\n this._circle.attr({ \"r\": this.radius, \"cx\": this.width / 2, \"cy\": this.height / 2 });\r\n }\r\n };\r\n Object.defineProperty(CirclePattern.prototype, \"radius\", {\r\n /**\r\n * @return Radius (px)\r\n */\r\n get: function () {\r\n return this.properties[\"radius\"];\r\n },\r\n /**\r\n * Circle radius in pixels.\r\n *\r\n * @param value Radius (px)\r\n */\r\n set: function (value) {\r\n this.properties[\"radius\"] = value;\r\n this.draw();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return CirclePattern;\r\n}(Pattern));\r\nexport { CirclePattern };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"CirclePattern\"] = CirclePattern;\r\n","/**\r\n * Rectangular pattern module.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Pattern } from \"./Pattern\";\r\nimport { registry } from \"../../Registry\";\r\n;\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Rectangular pattern\r\n */\r\nvar RectPattern = /** @class */ (function (_super) {\r\n __extends(RectPattern, _super);\r\n /**\r\n * Constructor\r\n */\r\n function RectPattern() {\r\n var _this = _super.call(this) || this;\r\n _this.rectHeight = 1;\r\n _this.rectWidth = 1;\r\n _this._rect = _this.paper.add(\"rect\");\r\n _this.addElement(_this._rect);\r\n return _this;\r\n }\r\n /**\r\n * Draws the rectangular element.\r\n */\r\n RectPattern.prototype.draw = function () {\r\n _super.prototype.draw.call(this);\r\n this.properties[\"rotationX\"] = this.width / 2;\r\n this.properties[\"rotationY\"] = this.height / 2;\r\n if (this._rect) {\r\n this._rect.attr({ \"width\": this.rectWidth, \"height\": this.rectHeight, \"x\": (this.width - this.rectWidth) / 2, \"y\": (this.height - this.rectHeight) / 2 });\r\n }\r\n };\r\n Object.defineProperty(RectPattern.prototype, \"rectWidth\", {\r\n /**\r\n * @return Width (px)\r\n */\r\n get: function () {\r\n return this.properties[\"rectWidth\"];\r\n },\r\n /**\r\n * Rectangle width in pixels.\r\n *\r\n * @param value Width (px)\r\n */\r\n set: function (value) {\r\n this.properties[\"rectWidth\"] = value;\r\n this.draw();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(RectPattern.prototype, \"rectHeight\", {\r\n /**\r\n * @return Height (px)\r\n */\r\n get: function () {\r\n return this.properties[\"rectHeight\"];\r\n },\r\n /**\r\n * Rectangle height in pixels.\r\n *\r\n * @param value Height (px)\r\n */\r\n set: function (value) {\r\n this.properties[\"rectHeight\"] = value;\r\n this.draw();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return RectPattern;\r\n}(Pattern));\r\nexport { RectPattern };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"RectPattern\"] = RectPattern;\r\n","/**\r\n * Module for \"Colorize\" filter.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Filter } from \"./Filter\";\r\nimport { registry } from \"../../Registry\";\r\n;\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Creates a \"Colorize\" filter.\r\n */\r\nvar ColorizeFilter = /** @class */ (function (_super) {\r\n __extends(ColorizeFilter, _super);\r\n /**\r\n * Constructor\r\n */\r\n function ColorizeFilter() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"ColorizeFilter\";\r\n // Create elements\r\n // NOTE: we do not need to add each individual element to `_disposers`\r\n // because `filterPrimitives` has an event handler which automatically adds\r\n // anything added to it to `_disposers`\r\n _this.feColorMatrix = _this.paper.add(\"feColorMatrix\");\r\n _this.feColorMatrix.attr({ \"type\": \"matrix\" });\r\n //this.feColorMatrix.setAttribute(\"in\", \"SourceAlpha\");\r\n _this.filterPrimitives.push(_this.feColorMatrix);\r\n // Set default properties\r\n _this.intensity = 1;\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * (Re)applies colors to the already existing filter by modifying filyer's\r\n * color matrix element.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n ColorizeFilter.prototype.applyFilter = function () {\r\n var i = this.intensity;\r\n var ii = 1 - i;\r\n var r;\r\n var g;\r\n var b;\r\n var color = this.color;\r\n if (color && color.rgb) {\r\n r = color.rgb.r / 255 * i;\r\n g = color.rgb.g / 255 * i;\r\n b = color.rgb.b / 255 * i;\r\n }\r\n else {\r\n r = 0;\r\n g = 0;\r\n b = 0;\r\n }\r\n this.feColorMatrix.attr({ \"values\": ii + \" 0 0 0 \" + r + \" 0 \" + ii + \" 0 0 \" + g + \" 0 0 \" + ii + \" 0 \" + b + \" 0 0 0 1 0\" });\r\n };\r\n Object.defineProperty(ColorizeFilter.prototype, \"color\", {\r\n /**\r\n * @return Color\r\n */\r\n get: function () {\r\n return this.properties[\"color\"];\r\n },\r\n /**\r\n * Target color to apply to the element.\r\n *\r\n * Depending on the `intensity`, all colors of the target element will steer\r\n * towards this color.\r\n *\r\n * E.g. setting to `am4core.color(\"greener\")` will make all colors greener.\r\n *\r\n * @param value Color\r\n */\r\n set: function (value) {\r\n this.properties[\"color\"] = value;\r\n this.applyFilter();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ColorizeFilter.prototype, \"intensity\", {\r\n /**\r\n * @return Intensity (0-1)\r\n */\r\n get: function () {\r\n return this.properties.intensity;\r\n },\r\n /**\r\n * Intensity of the color (0-1).\r\n *\r\n * The bigger the number the more of a `color` target's colors will become.\r\n *\r\n * 0 means the colors will remain as they are.\r\n * 1 means all colors will become the target `color`.\r\n *\r\n * @default 1\r\n * @param value Intensity (0-1)\r\n */\r\n set: function (value) {\r\n this.properties.intensity = value;\r\n this.applyFilter();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return ColorizeFilter;\r\n}(Filter));\r\nexport { ColorizeFilter };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"ColorizeFilter\"] = ColorizeFilter;\r\n","/**\r\n * Module for \"Desaturate\" filter.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Filter } from \"./Filter\";\r\nimport { registry } from \"../../Registry\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Creats a \"Desaturate\" filter\r\n */\r\nvar DesaturateFilter = /** @class */ (function (_super) {\r\n __extends(DesaturateFilter, _super);\r\n /**\r\n * Constructor\r\n */\r\n function DesaturateFilter() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"DesaturateFilter\";\r\n // Create elements\r\n // NOTE: we do not need to add each individual element to `_disposers`\r\n // because `filterPrimitives` has an event handler which automatically adds\r\n // anything added to it to `_disposers`\r\n _this.feColorMatrix = _this.paper.add(\"feColorMatrix\");\r\n _this.feColorMatrix.attr({ \"type\": \"saturate\" });\r\n _this.filterPrimitives.push(_this.feColorMatrix);\r\n // Set default properties\r\n _this.width = 120;\r\n _this.height = 120;\r\n _this.saturation = 0;\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n Object.defineProperty(DesaturateFilter.prototype, \"saturation\", {\r\n /**\r\n * @return Saturation (0-1)\r\n */\r\n get: function () {\r\n return this.properties[\"saturation\"];\r\n },\r\n /**\r\n * Saturation.\r\n *\r\n * 0 - completely desaturated.\r\n * 1 - fully saturated (gray).\r\n *\r\n * @param value Saturation (0-1)\r\n */\r\n set: function (value) {\r\n this.properties[\"saturation\"] = value;\r\n this.feColorMatrix.attr({ \"values\": value.toString() });\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return DesaturateFilter;\r\n}(Filter));\r\nexport { DesaturateFilter };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"DesaturateFilter\"] = DesaturateFilter;\r\n","/**\r\n * Module for \"Blur\" filter.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Filter } from \"./Filter\";\r\nimport { registry } from \"../../Registry\";\r\n;\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Creates a \"Blur\" filter.\r\n */\r\nvar BlurFilter = /** @class */ (function (_super) {\r\n __extends(BlurFilter, _super);\r\n /**\r\n * Constructor\r\n */\r\n function BlurFilter() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"BlurFilter\";\r\n // Create elements\r\n // NOTE: we do not need to add each individual element to `_disposers`\r\n // because `filterPrimitives` has an event handler which automatically adds\r\n // anything added to it to `_disposers`\r\n _this.feGaussianBlur = _this.paper.add(\"feGaussianBlur\");\r\n _this.feGaussianBlur.attr({ \"result\": \"blurOut\", \"in\": \"SourceGraphic\" });\r\n _this.filterPrimitives.push(_this.feGaussianBlur);\r\n // Set default properties\r\n _this.width = 200;\r\n _this.height = 200;\r\n _this.blur = 1.5;\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n Object.defineProperty(BlurFilter.prototype, \"blur\", {\r\n /**\r\n * @return Blur\r\n */\r\n get: function () {\r\n return this.properties.blur;\r\n },\r\n /**\r\n * Blur value.\r\n *\r\n * The bigger the value, the blurrier the target element will become.\r\n *\r\n * @default 1.5\r\n * @param value Blur\r\n */\r\n set: function (value) {\r\n this.properties.blur = value;\r\n this.feGaussianBlur.attr({ \"stdDeviation\": value / this.scale });\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return BlurFilter;\r\n}(Filter));\r\nexport { BlurFilter };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"BlurFilter\"] = BlurFilter;\r\n","/**\r\n * Module for \"Focus\" filter.\r\n */\r\nimport { __extends } from \"tslib\";\r\nimport { Filter } from \"./Filter\";\r\nimport { InterfaceColorSet } from \"../../utils/InterfaceColorSet\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Creates a \"Focus\" filter.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/accessibility/} more about accessibility\r\n * @see {@link https://www.amcharts.com/docs/v4/tutorials/changing-appearance-of-focused-items/} cusomizing focus appearance\r\n */\r\nvar FocusFilter = /** @class */ (function (_super) {\r\n __extends(FocusFilter, _super);\r\n /**\r\n * Constructor\r\n */\r\n function FocusFilter() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"FocusFilter\";\r\n // Create elements\r\n // NOTE: we do not need to add each individual element to `_disposers`\r\n // because `filterPrimitives` has an event handler which automatically adds\r\n // anything added to it to `_disposers`\r\n _this.feFlood = _this.paper.add(\"feFlood\");\r\n _this.feFlood.attr({ \"flood-color\": new InterfaceColorSet().getFor(\"primaryButtonHover\"), \"result\": \"base\" });\r\n _this.filterPrimitives.push(_this.feFlood);\r\n _this.feMorphology = _this.paper.add(\"feMorphology\");\r\n _this.feMorphology.attr({ \"result\": \"bigger\", \"in\": \"SourceGraphic\", \"operator\": \"dilate\", \"radius\": \"2\" });\r\n _this.filterPrimitives.push(_this.feMorphology);\r\n _this.feColorMatrix = _this.paper.add(\"feColorMatrix\");\r\n _this.feColorMatrix.attr({ \"result\": \"mask\", \"in\": \"bigger\", \"type\": \"matrix\", \"values\": \"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0\" });\r\n _this.filterPrimitives.push(_this.feColorMatrix);\r\n _this.feComposite = _this.paper.add(\"feComposite\");\r\n _this.feComposite.attr({ \"result\": \"drop\", \"in\": \"base\", \"in2\": \"mask\", \"operator\": \"in\" });\r\n _this.filterPrimitives.push(_this.feComposite);\r\n _this.feBlend = _this.paper.add(\"feBlend\");\r\n _this.feBlend.attr({ \"in\": \"SourceGraphic\", \"in2\": \"drop\", \"mode\": \"normal\" });\r\n _this.filterPrimitives.push(_this.feBlend);\r\n // Set default properties\r\n _this.width = 130;\r\n _this.height = 130;\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n Object.defineProperty(FocusFilter.prototype, \"stroke\", {\r\n /**\r\n * @return Color\r\n */\r\n get: function () {\r\n return this.properties[\"stroke\"];\r\n },\r\n /**\r\n * Stroke (outline) color.\r\n *\r\n * @param value Color\r\n */\r\n set: function (value) {\r\n this.properties[\"stroke\"] = value;\r\n this.feFlood.attr({ \"flood-color\": value });\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(FocusFilter.prototype, \"strokeWidth\", {\r\n /**\r\n * @return Outline thickness (px)\r\n */\r\n get: function () {\r\n return this.properties[\"strokeWidth\"];\r\n },\r\n /**\r\n * Stroke (outline) thickness in pixels.\r\n *\r\n * @param value Outline thickness (px)\r\n */\r\n set: function (value) {\r\n this.properties[\"strokeWidth\"] = value;\r\n this.feMorphology.attr({ \"radius\": value });\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(FocusFilter.prototype, \"opacity\", {\r\n /**\r\n * @return Outline opacity (0-1)\r\n */\r\n get: function () {\r\n return this.properties[\"opacity\"];\r\n },\r\n /**\r\n * Opacity of the outline. (0-1)\r\n *\r\n * @param value Outline opacity (0-1)\r\n */\r\n set: function (value) {\r\n this.properties[\"opacity\"] = value;\r\n this.feColorMatrix.attr({ \"values\": \"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 \" + value + \" 0\" });\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Sets filter's target element.\r\n *\r\n * In addition it also disables built-in focus outline on element this\r\n * filter is applied to.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Element filter is being attached to\r\n */\r\n FocusFilter.prototype.setSprite = function (value) {\r\n if (this._sprite && this._sprite != value) {\r\n this._sprite.group.removeStyle(\"outline\");\r\n }\r\n value.group.addStyle({\r\n \"outline\": \"none\"\r\n });\r\n _super.prototype.setSprite.call(this, value);\r\n };\r\n return FocusFilter;\r\n}(Filter));\r\nexport { FocusFilter };\r\n","/**\r\n * This module contains PatternSet object definition\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { BaseObject } from \"../Base\";\r\nimport { Color } from \"./Color\";\r\nimport { InterfaceColorSet } from \"./InterfaceColorSet\";\r\nimport { LinePattern } from \"../rendering/fills/LinePattern\";\r\nimport { RectPattern } from \"../rendering/fills/RectPattern\";\r\nimport { CirclePattern } from \"../rendering/fills/CirclePattern\";\r\nimport { registry } from \"../Registry\";\r\n/**\r\n * ============================================================================\r\n * REQUISITES\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Defines an interable list of distinctive patterns that can be used in\r\n * conjunction to colors to generate various fill patterns.\r\n *\r\n * @important\r\n * @since 4.7.5\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/colors/} for color-related info\r\n */\r\nvar PatternSet = /** @class */ (function (_super) {\r\n __extends(PatternSet, _super);\r\n /**\r\n * Constructor\r\n */\r\n function PatternSet() {\r\n var _this = _super.call(this) || this;\r\n /**\r\n * Holds the list of the colors in this set. (preset or auto-generated)\r\n */\r\n _this._list = [];\r\n /**\r\n * Current step.\r\n */\r\n _this._currentStep = 0;\r\n /**\r\n * If set to non-zero value, the PatternSet will start iterating patterns from\r\n * that particular index, not the first pattern in the list.\r\n */\r\n _this._startIndex = 0;\r\n /**\r\n * Current pass in cycle. Once all patterns in the list are iterated,\r\n * iteration restarts from beginning and currentPass is incremented.\r\n */\r\n _this._currentPass = 0;\r\n /**\r\n * A base color. If there are no colors pre-set in the color list, ColorSet\r\n * will use this color as a base when generating new ones, applying\r\n * `stepOptions` and `passOptions` to this base color.\r\n */\r\n _this.baseColor = new Color({\r\n r: 103,\r\n g: 183,\r\n b: 220\r\n });\r\n _this.className = \"PatternSet\";\r\n // Set base color to be used for pattern elements\r\n var interfaceColors = new InterfaceColorSet();\r\n // Set default patterns\r\n _this.list = [\r\n _this.getLinePattern(1000, 45, 1, 6),\r\n _this.getRectPattern(10, 0, 4),\r\n _this.getLinePattern(1000, -45, 1, 6),\r\n _this.getCirclePattern(11, 2, true),\r\n _this.getLinePattern(6, 90, 1),\r\n _this.getRectPattern(12, 45, 6, true),\r\n _this.getLinePattern(6, 0, 1),\r\n _this.getRectPattern(7, 0, 4),\r\n _this.getLinePattern(1000, 45, 2, 3, \"4,2\"),\r\n _this.getCirclePattern(9, 3, false),\r\n _this.getLinePattern(1000, -45, 2, 3, \"4,2\"),\r\n _this.getRectPattern(10, 45, Math.sqrt(50)),\r\n _this.getLinePattern(1000, -45, 2, 1),\r\n _this.getRectPattern(10, 0, 9),\r\n _this.getLinePattern(1000, 45, 2, 1),\r\n _this.getLinePattern(1000, 0, 3, 1),\r\n _this.getRectPattern(10, 45, 10),\r\n _this.getLinePattern(1000, 90, 3, 1)\r\n ];\r\n _this.baseColor = interfaceColors.getFor(\"stroke\");\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n PatternSet.prototype.getLinePattern = function (size, rotation, thickness, gap, strokeDashArray) {\r\n var pattern = new LinePattern();\r\n pattern.width = size;\r\n pattern.height = size;\r\n pattern.stroke = this.baseColor;\r\n pattern.gap = gap;\r\n pattern.strokeDasharray = strokeDashArray;\r\n pattern.strokeWidth = thickness;\r\n pattern.rotation = rotation;\r\n return pattern;\r\n };\r\n PatternSet.prototype.getRectPattern = function (size, rotation, thickness, outline) {\r\n var pattern = new RectPattern();\r\n pattern.width = size;\r\n pattern.height = size;\r\n pattern.rectWidth = thickness;\r\n pattern.rectHeight = thickness;\r\n if (outline) {\r\n pattern.stroke = this.baseColor;\r\n pattern.strokeWidth = 1;\r\n pattern.fillOpacity = 0;\r\n }\r\n else {\r\n pattern.fill = this.baseColor;\r\n pattern.strokeWidth = 0;\r\n }\r\n if (rotation != 0) {\r\n pattern.shapeRendering = \"auto\";\r\n }\r\n pattern.rotation = rotation;\r\n return pattern;\r\n };\r\n PatternSet.prototype.getCirclePattern = function (size, radius, outline) {\r\n var pattern = new CirclePattern();\r\n pattern.width = size;\r\n pattern.height = size;\r\n pattern.shapeRendering = \"auto\";\r\n pattern.radius = radius;\r\n if (outline) {\r\n pattern.stroke = this.baseColor;\r\n pattern.strokeWidth = 1;\r\n pattern.fillOpacity = 0;\r\n }\r\n else {\r\n pattern.fill = this.baseColor;\r\n pattern.strokeWidth = 0;\r\n }\r\n return pattern;\r\n };\r\n Object.defineProperty(PatternSet.prototype, \"list\", {\r\n /**\r\n * @return Pattern list\r\n */\r\n get: function () {\r\n return this._list;\r\n },\r\n /**\r\n * List of pre-defined patterns to be used in set.\r\n *\r\n * @param value Pattern list\r\n */\r\n set: function (value) {\r\n this._list = value;\r\n this.reset();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Returns the next pattern in list.\r\n *\r\n * @return Pattern\r\n */\r\n PatternSet.prototype.next = function () {\r\n var pattern = this.getIndex(this.currentStep);\r\n this._currentStep++;\r\n return pattern;\r\n };\r\n /**\r\n * Returns a color at specific index in the list.\r\n *\r\n * @param i Index\r\n * @return Pattern\r\n */\r\n PatternSet.prototype.getIndex = function (i) {\r\n var pattern;\r\n while (this.list.length <= i) {\r\n this.generatePatterns();\r\n }\r\n pattern = this.list[i];\r\n return pattern.clone();\r\n };\r\n /**\r\n * Generates a new set of patterns.\r\n */\r\n PatternSet.prototype.generatePatterns = function () {\r\n var count = this.list.length / (this._currentPass + 1);\r\n this._currentPass++;\r\n for (var i = 0; i < count; i++) {\r\n this.list.push(this.list[i].clone());\r\n }\r\n };\r\n /**\r\n * Resets internal iterator.\r\n *\r\n * Calling `next()` after this will return the very first color in the color\r\n * list, even if it was already returned before.\r\n */\r\n PatternSet.prototype.reset = function () {\r\n this._currentStep = this._startIndex;\r\n };\r\n Object.defineProperty(PatternSet.prototype, \"currentStep\", {\r\n /**\r\n * @return Step\r\n */\r\n get: function () {\r\n return this._currentStep;\r\n },\r\n /**\r\n * Sets current color iteration. You can use this property to skip some\r\n * colors from iteration. E.g. setting it to `10` will skip first ten\r\n * colors.\r\n *\r\n * Please note that the number is zero-based.\r\n *\r\n * @param value Step\r\n */\r\n set: function (value) {\r\n this._currentStep = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(PatternSet.prototype, \"startIndex\", {\r\n /**\r\n * @return Index\r\n */\r\n get: function () {\r\n return this._startIndex;\r\n },\r\n /**\r\n * If set to non-zero value, the ColorSet will start iterating colors from\r\n * that particular index, not the first color in the list.\r\n *\r\n * @default 0\r\n * @param value Index\r\n */\r\n set: function (value) {\r\n this._startIndex = value;\r\n this.reset();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Processes JSON-based config before it is applied to the object.\r\n *\r\n * @ignore Exclude from docs\r\n * @param config Config\r\n */\r\n PatternSet.prototype.processConfig = function (config) {\r\n // if (config) {\r\n // \t// Set up axis ranges\r\n // \tif ($type.hasValue(config.list) && $type.isArray(config.list)) {\r\n // \t\tfor (let i = 0, len = config.list.length; i < len; i++) {\r\n // \t\t\tif (!(config.list[i] instanceof Color)) {\r\n // \t\t\t\tconfig.list[i] = color(config.list[i]);\r\n // \t\t\t}\r\n // \t\t}\r\n // \t}\r\n // }\r\n _super.prototype.processConfig.call(this, config);\r\n };\r\n return PatternSet;\r\n}(BaseObject));\r\nexport { PatternSet };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"PatternSet\"] = PatternSet;\r\n","/**\r\n * A plugin base class.\r\n */\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * This is a base class that provides core functionality for plugins.\r\n *\r\n * The easiest way to start off with a new plugin is to extend this class.\r\n *\r\n * It will provide all the mandatory functionality, such as disposers.\r\n *\r\n * @since 4.2.2\r\n */\r\nvar Plugin = /** @class */ (function () {\r\n /**\r\n * Constructor\r\n */\r\n function Plugin() {\r\n /**\r\n * Is this object disposed?\r\n */\r\n this._disposed = false;\r\n /**\r\n * List of IDisposer which will be disposed when the BaseObject is disposed.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n this._disposers = [];\r\n // Nothing to do here\r\n }\r\n /**\r\n * Decorates series with required events and adapters used to hijack its\r\n * data.\r\n */\r\n Plugin.prototype.init = function () {\r\n // Does nothing\r\n // Override it\r\n };\r\n /**\r\n * Returns if this element is already disposed.\r\n *\r\n * @return Is disposed?\r\n */\r\n Plugin.prototype.isDisposed = function () {\r\n return this._disposed;\r\n };\r\n /**\r\n * Disposes this object and related stuff.\r\n */\r\n Plugin.prototype.dispose = function () {\r\n if (!this._disposed) {\r\n this._disposed = true;\r\n var a = this._disposers;\r\n this._disposers = null;\r\n while (a.length !== 0) {\r\n var disposer = a.shift();\r\n disposer.dispose();\r\n }\r\n }\r\n };\r\n return Plugin;\r\n}());\r\nexport { Plugin };\r\n","/**\r\n * AmChartsLogo module.\r\n *\r\n * AmChartsLogo shows amCharts logo for non-commercial users of a library.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Container } from \"../Container\";\r\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\r\nimport { Polyspline } from \"./Polyspline\";\r\nimport { color } from \"../utils/Color\";\r\nimport { LinearGradient } from \"../rendering/fills/LinearGradient\";\r\nimport { DesaturateFilter } from \"../rendering/filters/DesaturateFilter\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * A class used to draw and display progress indicator.\r\n *\r\n * @see {@link IAmChartsLogoEvents} for a list of available events\r\n * @see {@link IAmChartsLogoAdapters} for a list of available Adapters\r\n * @ignore Exclude from docs\r\n */\r\nvar AmChartsLogo = /** @class */ (function (_super) {\r\n __extends(AmChartsLogo, _super);\r\n /**\r\n * Constructor\r\n */\r\n function AmChartsLogo() {\r\n var _this = \r\n // Init\r\n _super.call(this) || this;\r\n _this.className = \"AmChartsLogo\";\r\n _this.valign = \"bottom\";\r\n var d = 0.3;\r\n _this.opacity = 0.3;\r\n _this.defaultState.properties.opacity = 0.4;\r\n _this.url = \"https://www.amcharts.com/\";\r\n _this.urlTarget = \"_blank\";\r\n _this.showSystemTooltip = true;\r\n _this.readerTitle = \"Chart created using amCharts library\";\r\n _this.width = 220 * d;\r\n _this.height = 70 * d;\r\n _this.background.opacity = 0;\r\n var aColor = color(\"#474758\");\r\n if (new InterfaceColorSet().getFor(\"background\").alternative.hex == \"#ffffff\") {\r\n aColor = color(\"#ffffff\");\r\n }\r\n var aGradient = new LinearGradient();\r\n aGradient.addColor(aColor);\r\n aGradient.addColor(aColor, 1, 0.75);\r\n aGradient.addColor(color(\"#3cabff\"), 1, 0.755);\r\n aGradient.rotation = -10;\r\n var aStroke = aGradient;\r\n var m = _this.createChild(Polyspline);\r\n m.shouldClone = false;\r\n m.isMeasured = false;\r\n m.segments = [[{ x: 50 * d, y: 50 * d }, { x: 90 * d, y: 50 * d }, { x: 120 * d, y: 20 * d }, { x: 135 * d, y: 35 * d }, { x: 150 * d, y: 20 * d }, { x: 180 * d, y: 50 * d }, { x: 200 * d, y: 50 * d }]];\r\n m.strokeWidth = 6 * d;\r\n m.tensionX = 0.8;\r\n m.tensionY = 1;\r\n m.stroke = color(\"#3cabff\");\r\n var a = _this.createChild(Polyspline);\r\n a.shouldClone = false;\r\n a.isMeasured = false;\r\n a.segments = [[{ x: 20 * d, y: 50 * d }, { x: 50 * d, y: 50 * d }, { x: 90 * d, y: 12 * d }, { x: 133 * d, y: 50 * d }, { x: 170 * d, y: 50 * d }, { x: 200 * d, y: 50 * d }]];\r\n a.strokeWidth = 6 * d;\r\n a.tensionX = 0.75;\r\n a.tensionY = 1;\r\n a.stroke = aStroke;\r\n _this._disposers.push(a);\r\n var desaturateFilter = new DesaturateFilter();\r\n _this.filters.push(desaturateFilter);\r\n var desaturateFilterHover = new DesaturateFilter();\r\n desaturateFilterHover.saturation = 1;\r\n var hoverState = _this.states.create(\"hover\");\r\n hoverState.properties.opacity = 1;\r\n hoverState.filters.push(desaturateFilterHover);\r\n // Apply theme\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n return AmChartsLogo;\r\n}(Container));\r\nexport { AmChartsLogo };\r\n","import { __read, __spread } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { system } from \"../System\";\r\nimport { registry } from \"../Registry\";\r\nimport { Container } from \"../Container\";\r\nimport { Component } from \"../Component\";\r\nimport { Paper } from \"../rendering/Paper\";\r\nimport { SVGContainer, svgContainers } from \"../rendering/SVGContainer\";\r\nimport { FocusFilter } from \"../rendering/filters/FocusFilter\";\r\nimport { Preloader } from \"../elements/Preloader\";\r\nimport { AmChartsLogo } from \"../elements/AmChartsLogo\";\r\nimport { Tooltip } from \"../elements/Tooltip\";\r\nimport { Disposer, MultiDisposer } from \"../utils/Disposer\";\r\nimport { percent } from \"./Percent\";\r\nimport { options } from \"../Options\";\r\nimport * as $array from \"./Array\";\r\nimport * as $type from \"./Type\";\r\nimport * as $dom from \"./DOM\";\r\nimport * as $utils from \"./Utils\";\r\nimport * as $log from \"./Log\";\r\n/**\r\n * ============================================================================\r\n * INSTANTIATION FUNCTIONS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Creates all HTML and SVG containers needed for the chart instance, as well\r\n * as the new [[Sprite]] (as specified in `classType` parameter).\r\n *\r\n * @param htmlElement A container to creat elements in\r\n * @param classType A class definition of the new element to create\r\n * @return Newly-created Sprite object\r\n */\r\nfunction createChild(htmlElement, classType) {\r\n var htmlContainer = $dom.getElement(htmlElement);\r\n // If there's no container available yet, we create a fake one\r\n var tmpContainer = false;\r\n if (!htmlContainer) {\r\n htmlContainer = document.createElement(\"div\");\r\n htmlContainer.style.width = \"200px\";\r\n htmlContainer.style.height = \"200px\";\r\n htmlContainer.style.top = \"0\";\r\n htmlContainer.style.left = \"0\";\r\n htmlContainer.style.visibility = \"hidden\";\r\n htmlContainer.style.position = \"absolute\";\r\n document.body.appendChild(htmlContainer);\r\n tmpContainer = true;\r\n }\r\n if (htmlContainer) {\r\n htmlContainer.innerHTML = \"\";\r\n //htmlContainer.style.overflow = \"hidden\";\r\n var svgDiv_1 = new SVGContainer(htmlContainer);\r\n var paper = new Paper(svgDiv_1.SVGContainer, \"svg-\" + (svgContainers.length - 1));\r\n // the approach with masks is chosen because overflow:visible is set on SVG element in order tooltips could go outside\r\n // svg area - this is often needed when working with small charts.\r\n // main container which holds content container and tooltips container\r\n var container_1 = new Container();\r\n container_1.htmlContainer = htmlContainer;\r\n container_1.svgContainer = svgDiv_1;\r\n container_1.width = percent(100);\r\n container_1.height = percent(100);\r\n container_1.background.fillOpacity = 0;\r\n container_1.paper = paper;\r\n paper.append(container_1.group);\r\n // Set up moving to proper element container if it's not yet ready at call time\r\n if (tmpContainer) {\r\n $dom.ready(function () {\r\n container_1.moveHtmlContainer(htmlElement);\r\n });\r\n }\r\n // this is set from parent container, but this one doesn't have, so do it manually.\r\n container_1.relativeWidth = 1;\r\n container_1.relativeHeight = 1;\r\n svgDiv_1.container = container_1;\r\n // creating classType instance\r\n var sprite_1 = container_1.createChild(classType);\r\n sprite_1.topParent = container_1;\r\n var uid = sprite_1.uid;\r\n registry.invalidSprites[uid] = [];\r\n registry.invalidDatas[uid] = [];\r\n registry.invalidPositions[uid] = [];\r\n registry.invalidLayouts[uid] = [];\r\n container_1.baseId = uid;\r\n sprite_1.isBaseSprite = true;\r\n sprite_1.focusFilter = new FocusFilter();\r\n registry.baseSprites.push(sprite_1);\r\n registry.baseSpritesByUid[uid] = sprite_1;\r\n sprite_1.maskRectangle = { x: 0, y: 0, width: Math.max(svgDiv_1.width || 0, 0), height: Math.max(svgDiv_1.height || 0, 0) };\r\n // this solves issues with display:none, as all children are measured as 0x0\r\n container_1.events.on(\"maxsizechanged\", function (event) {\r\n if (event.previousWidth == 0 || event.previousHeight == 0) {\r\n container_1.deepInvalidate();\r\n }\r\n if (sprite_1.maskRectangle) {\r\n sprite_1.maskRectangle = { x: 0, y: 0, width: Math.max(svgDiv_1.width || 0, 0), height: Math.max(svgDiv_1.height || 0, 0) };\r\n }\r\n });\r\n var loopTimer_1 = null;\r\n // Checks to see whether the chart was properly disposed or not\r\n var loop_1 = function () {\r\n if (!sprite_1.isDisposed()) {\r\n if ($dom.getRoot(sprite_1.dom) == null) {\r\n if (options.autoDispose) {\r\n container_1.htmlContainer = undefined;\r\n svgDiv_1.htmlElement = undefined;\r\n sprite_1.dispose();\r\n }\r\n else {\r\n $log.warn(\"Chart was not disposed\", sprite_1.uid);\r\n }\r\n loopTimer_1 = null;\r\n }\r\n else {\r\n loopTimer_1 = window.setTimeout(loop_1, 1000);\r\n }\r\n }\r\n else {\r\n loopTimer_1 = null;\r\n }\r\n };\r\n loop_1();\r\n sprite_1.addDisposer(new Disposer(function () {\r\n if (loopTimer_1 !== null) {\r\n clearTimeout(loopTimer_1);\r\n }\r\n $array.remove(registry.baseSprites, sprite_1);\r\n registry.baseSpritesByUid[sprite_1.uid] = undefined;\r\n }));\r\n // TODO figure out a better way of doing this\r\n sprite_1.addDisposer(container_1);\r\n // tooltip container\r\n var tooltipContainer_1 = container_1.createChild(Container);\r\n tooltipContainer_1.topParent = container_1;\r\n tooltipContainer_1.width = percent(100);\r\n tooltipContainer_1.height = percent(100);\r\n tooltipContainer_1.isMeasured = false;\r\n container_1.tooltipContainer = tooltipContainer_1;\r\n sprite_1.tooltip = new Tooltip();\r\n sprite_1.tooltip.hide(0);\r\n sprite_1.tooltip.setBounds({ x: 0, y: 0, width: tooltipContainer_1.maxWidth, height: tooltipContainer_1.maxHeight });\r\n tooltipContainer_1.events.on(\"maxsizechanged\", function () {\r\n $type.getValue(sprite_1.tooltip).setBounds({ x: 0, y: 0, width: tooltipContainer_1.maxWidth, height: tooltipContainer_1.maxHeight });\r\n }, undefined, false);\r\n //@todo: maybe we don't need to create one by default but only on request?\r\n var preloader_1 = new Preloader();\r\n preloader_1.events.on(\"inited\", function () {\r\n preloader_1.__disabled = true;\r\n }, undefined, false);\r\n container_1.preloader = preloader_1;\r\n //if (!options.commercialLicense) {\r\n if (sprite_1 instanceof Container && !sprite_1.hasLicense()) {\r\n var logo_1 = tooltipContainer_1.createChild(AmChartsLogo);\r\n tooltipContainer_1.events.on(\"maxsizechanged\", function (ev) {\r\n if ((tooltipContainer_1.maxWidth <= 100) || (tooltipContainer_1.maxHeight <= 50)) {\r\n logo_1.hide();\r\n }\r\n else if (logo_1.isHidden || logo_1.isHiding) {\r\n logo_1.show();\r\n }\r\n }, undefined, false);\r\n sprite_1.logo = logo_1;\r\n logo_1.align = \"left\";\r\n logo_1.valign = \"bottom\";\r\n }\r\n $utils.used(sprite_1.numberFormatter); // need to create one.\r\n // Set this as an autonomouse instance\r\n // Controls like Preloader, Export will use this.\r\n container_1.isStandaloneInstance = true;\r\n if (options.onlyShowOnViewport) {\r\n if (!$dom.isElementInViewport(htmlContainer, options.viewportTarget)) {\r\n sprite_1.__disabled = true;\r\n sprite_1.tooltipContainer.__disabled = true;\r\n var disposers = [\r\n $dom.addEventListener(window, \"DOMContentLoaded\", function () { viewPortHandler(sprite_1); }),\r\n $dom.addEventListener(window, \"load\", function () { viewPortHandler(sprite_1); }),\r\n $dom.addEventListener(window, \"resize\", function () { viewPortHandler(sprite_1); }),\r\n $dom.addEventListener(window, \"scroll\", function () { viewPortHandler(sprite_1); })\r\n ];\r\n if (options.viewportTarget) {\r\n var targets = $type.isArray(options.viewportTarget) ? options.viewportTarget : options.viewportTarget ? [options.viewportTarget] : [];\r\n for (var i = 0; i < targets.length; i++) {\r\n var target = targets[i];\r\n disposers.push($dom.addEventListener(target, \"resize\", function () { viewPortHandler(sprite_1); }));\r\n disposers.push($dom.addEventListener(target, \"scroll\", function () { viewPortHandler(sprite_1); }));\r\n }\r\n }\r\n var disposer = new MultiDisposer(disposers);\r\n sprite_1.addDisposer(disposer);\r\n sprite_1.vpDisposer = disposer;\r\n }\r\n else if (options.queue) {\r\n addToQueue(sprite_1);\r\n }\r\n }\r\n else if (options.queue) {\r\n addToQueue(sprite_1);\r\n }\r\n return sprite_1;\r\n }\r\n else {\r\n system.log(\"html container not found\");\r\n throw new Error(\"html container not found\");\r\n }\r\n}\r\n/**\r\n * Disposes all of the currently active charts.\r\n */\r\nexport function disposeAllCharts() {\r\n while (registry.baseSprites.length !== 0) {\r\n registry.baseSprites.pop().dispose();\r\n }\r\n}\r\nexport function addToQueue(sprite) {\r\n if (registry.queue.indexOf(sprite) == -1) {\r\n sprite.__disabled = true;\r\n sprite.tooltipContainer.__disabled = true;\r\n sprite.events.disableType(\"appeared\");\r\n if (registry.queue.length == 0) {\r\n registry.events.once(\"exitframe\", function () {\r\n queueHandler(sprite);\r\n });\r\n system.requestFrame();\r\n }\r\n sprite.addDisposer(new Disposer(function () {\r\n removeFromQueue(sprite);\r\n }));\r\n registry.queue.push(sprite);\r\n }\r\n}\r\nexport function removeFromQueue(sprite) {\r\n var index = registry.queue.indexOf(sprite);\r\n if (index >= 0) {\r\n registry.queue.splice(registry.queue.indexOf(sprite), 1);\r\n var nextSprite = registry.queue[index];\r\n if (nextSprite) {\r\n queueHandler(nextSprite);\r\n }\r\n }\r\n}\r\n/**\r\n * Checks whether the chart was not initialized fully due to setting\r\n * of `onlyShowOnViewport`. If it hasn't and is now in the viewport\r\n * the chart will be initialized.\r\n *\r\n * @since 4.9.12\r\n * @param sprite Top-level chart object\r\n */\r\nexport function viewPortHandler(sprite) {\r\n if (sprite.__disabled && $dom.isElementInViewport(sprite.htmlContainer, options.viewportTarget)) {\r\n if (sprite.vpDisposer) {\r\n sprite.vpDisposer.dispose();\r\n }\r\n addToQueue(sprite);\r\n }\r\n}\r\nexport function queueHandler(sprite) {\r\n if (sprite && sprite.tooltipContainer) {\r\n sprite.__disabled = false;\r\n sprite.tooltipContainer.__disabled = false;\r\n sprite.events.enableType(\"appeared\");\r\n sprite.dispatch(\"removedfromqueue\");\r\n if (sprite.showOnInit) {\r\n sprite.events.on(\"appeared\", function () {\r\n removeFromQueue(sprite);\r\n });\r\n }\r\n if (sprite.vpDisposer) {\r\n sprite.vpDisposer.dispose();\r\n }\r\n if (sprite instanceof Container) {\r\n sprite.invalidateLabels();\r\n }\r\n if (sprite.tooltipContainer) {\r\n sprite.tooltipContainer.invalidateLayout();\r\n }\r\n if (sprite instanceof Component) {\r\n sprite.invalidateData();\r\n sprite.reinit();\r\n sprite.events.once(\"datavalidated\", function () {\r\n if (sprite.showOnInit) {\r\n sprite.appear();\r\n }\r\n else {\r\n removeFromQueue(sprite);\r\n }\r\n });\r\n }\r\n else {\r\n sprite.reinit();\r\n sprite.events.once(\"inited\", function () {\r\n removeFromQueue(sprite);\r\n });\r\n if (sprite.showOnInit) {\r\n sprite.appear();\r\n }\r\n }\r\n }\r\n}\r\n/**\r\n * A shortcut to creating a chart instance.\r\n *\r\n * The first argument is either a reference to or an id of a DOM element to be\r\n * used as a container for the chart.\r\n *\r\n * The second argument is the type reference of the chart type. (for plain\r\n * JavaScript users this can also be a string indicating chart type)\r\n *\r\n * ```TypeScript\r\n * let chart = am4core.create(\"chartdiv\", am4charts.PieChart);\r\n * ```\r\n * ```JavaScript\r\n * // Can pass in chart type reference like this:\r\n * var chart = am4core.create(\"chartdiv\", am4charts.PieChart);\r\n *\r\n * // ... or chart class type as a string:\r\n * var chart = am4core.create(\"chartdiv\", \"PieChart\");\r\n * ```\r\n *\r\n * @param htmlElement Reference or id of the target container element\r\n * @param classType Class type of the target chart type\r\n * @return Chart instance\r\n */\r\nexport function create(htmlElement, classType) {\r\n // This is a nasty hack for the benefit of vanilla JS users, who do not\r\n // enjoy benefits of type-check anyway.\r\n // We're allowing passing in a name of the class rather than type reference\r\n // itself.\r\n var classError;\r\n if ($type.isString(classType)) {\r\n if ($type.hasValue(registry.registeredClasses[classType])) {\r\n classType = registry.registeredClasses[classType];\r\n }\r\n else {\r\n classType = registry.registeredClasses[\"Container\"];\r\n classError = new Error(\"Class [\" + classType + \"] is not loaded.\");\r\n }\r\n }\r\n // Create the chart\r\n var chart = createChild(htmlElement, classType);\r\n // Error?\r\n if (classError) {\r\n chart.raiseCriticalError(classError);\r\n }\r\n return chart;\r\n}\r\n/**\r\n * A shortcut to creating a chart from a config object.\r\n *\r\n * Example:\r\n *\r\n * ```TypeScript\r\n * let chart am4core.createFromConfig({ ... }, \"chartdiv\", am4charts.XYChart );\r\n * ```\r\n * ```JavaScript\r\n * var chart am4core.createFromConfig({ ... }, \"chartdiv\", \"XYChart\" );\r\n * ```\r\n *\r\n * If `chartType` parameter is not supplied it must be set in a config object,\r\n * via reference to chart type, e.g.:\r\n *\r\n * ```TypeScript\r\n * {\r\n * \"type\": am4charts.XYChart,\r\n * // ...\r\n * }\r\n * ```\r\n * ```JavaScript\r\n * {\r\n * \"type\": am4charts.XYChart,\r\n * // ...\r\n * }\r\n * ```\r\n *\r\n * Or via string: (if you are using JavaScript)\r\n *\r\n * ```TypeScript\r\n * {\r\n * \"type\": \"XYChart\",\r\n * // ...\r\n * }\r\n * ```\r\n * ```JavaScript\r\n * {\r\n * \"type\": \"XYChart\",\r\n * // ...\r\n * }\r\n * ```\r\n *\r\n * A `container` can either be a reference to an HTML container to put chart\r\n * in, or it's unique id.\r\n *\r\n * If `container` is not specified, it must be included in the config object:\r\n *\r\n * ```TypeScript\r\n * {\r\n * \"type\": \"XYChart\",\r\n * \"container\": \"chartdiv\",\r\n * // ...\r\n * }\r\n * ```\r\n * ```JavaScript\r\n * {\r\n * \"type\": \"XYChart\",\r\n * \"container\": \"chartdiv\",\r\n * // ...\r\n * }\r\n * ```\r\n *\r\n * @param config Config object in property/value pairs\r\n * @param htmlElement Container reference or ID\r\n * @param objectType Chart type\r\n * @return A newly created chart instance\r\n * @todo Throw exception if type is not correct\r\n */\r\nexport function createFromConfig(config, htmlElement, classType) {\r\n // Extract chart type from config if necessary\r\n if (!$type.hasValue(classType)) {\r\n classType = config.type;\r\n delete config.type;\r\n }\r\n // Extract element from config if necessary\r\n if (!$type.hasValue(htmlElement)) {\r\n htmlElement = config.container;\r\n delete config.container;\r\n }\r\n // Check if we need to extract actual type reference\r\n var finalType;\r\n var classError;\r\n if ($type.isString(classType) && $type.hasValue(registry.registeredClasses[classType])) {\r\n finalType = registry.registeredClasses[classType];\r\n }\r\n else if (typeof classType !== \"function\") {\r\n finalType = Container;\r\n classError = new Error(\"Class [\" + classType + \"] is not loaded.\");\r\n }\r\n else {\r\n finalType = classType;\r\n }\r\n // Create the chart\r\n var chart = createChild(htmlElement, finalType);\r\n // Set config\r\n if (classError) {\r\n chart.raiseCriticalError(classError);\r\n }\r\n else {\r\n chart.config = config;\r\n }\r\n return chart;\r\n}\r\n/**\r\n * Useful in creating real queues form mult-chart creation.\r\n *\r\n * Accepts a reference to a function which crates and returns actual chart\r\n * object.\r\n *\r\n * It returns a `Promise` which you can use to catch chart instance once it's\r\n * created.\r\n *\r\n * ```TypeScript\r\n * am4core.createDeferred(function(div) {\r\n * // Create first chart\r\n * let chart = am4core.create(div, am4charts.XYChart);\r\n * // ...\r\n * return chart;\r\n * }, \"chartdiv1\").then(chart) {\r\n * // `chart` variable holds an instance of the chart\r\n * console.log(\"Chart ready\", chart);\r\n * }\r\n *\r\n * am4core.createDeferred(function(div) {\r\n * // Create second chart\r\n * let chart = am4core.create(div, am4charts.PieChart);\r\n * // ...\r\n * return chart;\r\n * }, \"chartdiv2\").then(chart) {\r\n * // `chart` variable holds an instance of the chart\r\n * console.log(\"Chart ready\", chart);\r\n * }\r\n * ```\r\n * ```JavaScript\r\n * am4core.createDeferred(function(div) {\r\n * // Create first chart\r\n * var chart = am4core.create(div, am4charts.XYChart);\r\n * // ...\r\n * return chart;\r\n * }, \"chartdiv1\").then(chart) {\r\n * // `chart` variable holds an instance of the chart\r\n * console.log(\"Chart ready\", chart);\r\n * }\r\n *\r\n * am4core.createDeferred(function(div) {\r\n * // Create second chart\r\n * var chart = am4core.create(div, am4charts.PieChart);\r\n * // ...\r\n * return chart;\r\n * }, \"chartdiv2\").then(chart) {\r\n * // `chart` variable holds an instance of the chart\r\n * console.log(\"Chart ready\", chart);\r\n * }\r\n * ```\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/performance/#Deferred_daisy_chained_instantiation} for more information\r\n * @since 4.10.0\r\n * @param callback Callback function that creates chart\r\n * @param scope Scope to call callback in\r\n * @param ...rest Parameters to pass into callback\r\n * @return Promise with chart instance\r\n */\r\nexport function createDeferred(callback, scope) {\r\n var rest = [];\r\n for (var _i = 2; _i < arguments.length; _i++) {\r\n rest[_i - 2] = arguments[_i];\r\n }\r\n return new Promise(function (resolve, reject) {\r\n registry.deferred.push({\r\n scope: scope,\r\n callback: callback,\r\n args: rest,\r\n resolve: resolve\r\n });\r\n if (registry.deferred.length == 1) {\r\n processNextDeferred();\r\n }\r\n });\r\n}\r\nfunction processNextDeferred() {\r\n var _a;\r\n var next = registry.deferred[0];\r\n if (next) {\r\n var sprite_2 = (_a = next.callback).call.apply(_a, __spread([next.scope], next.args));\r\n sprite_2.events.on(\"ready\", function () {\r\n next.resolve(sprite_2);\r\n registry.deferred.shift();\r\n if (options.deferredDelay) {\r\n setTimeout(processNextDeferred, options.deferredDelay);\r\n }\r\n else {\r\n processNextDeferred();\r\n }\r\n });\r\n }\r\n}\r\n/**\r\n * Applies a theme to System, and subsequently all chart instances created\r\n * from that point forward.\r\n *\r\n * amCharts supports multiple themes. Calling `useTheme` multiple times will\r\n * make the System apply multiple themes, rather than overwrite previously\r\n * set one.\r\n *\r\n * This enables combining features from multiple themes on the same chart.\r\n * E.g.:\r\n *\r\n * ```TypeScript\r\n * am4core.useTheme(am4themes.material);\r\n * am4core.useTheme(am4themes.animated);\r\n * ```\r\n * ```JavaScript\r\n * am4core.useTheme(am4themes.material);\r\n * am4core.useTheme(am4themes.animated);\r\n * ```\r\n *\r\n * The above will apply both the Material color and animation options to all\r\n * charts created.\r\n *\r\n * @param value A reference to a theme\r\n */\r\nexport function useTheme(value) {\r\n if (registry.themes.indexOf(value) === -1) {\r\n registry.themes.push(value);\r\n }\r\n}\r\n/**\r\n * Removes a theme from \"active themes\" list, so it won't get applied to any\r\n * charts created subsequently.\r\n *\r\n * @param value A reference to a theme\r\n */\r\nexport function unuseTheme(value) {\r\n $array.remove(registry.themes, value);\r\n}\r\n/**\r\n * Removes all \"active\" themes. Any charts created subsequently will not have\r\n * any theme applied to them.\r\n */\r\nexport function unuseAllThemes() {\r\n registry.themes = [];\r\n}\r\n/**\r\n * Adds a license, e.g.:\r\n *\r\n * ```TypeScript\r\n * am4core.addLicense(\"xxxxxxxx\");\r\n * ```\r\n * ```JavaScript\r\n * am4core.addLicense(\"xxxxxxxx\");\r\n * ```\r\n *\r\n * Multiple licenses can be added to cover for multiple products.\r\n *\r\n * @since 4.5.16\r\n * @param license License key\r\n */\r\nexport function addLicense(license) {\r\n options.licenses.push(license);\r\n}\r\n","/**\r\n * Legend-related functionality.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Component } from \"../core/Component\";\r\nimport { DataItem } from \"../core/DataItem\";\r\nimport { ListTemplate, ListDisposer } from \"../core/utils/List\";\r\nimport { RoundedRectangle } from \"../core/elements/RoundedRectangle\";\r\nimport { Container } from \"../core/Container\";\r\nimport { Label } from \"../core/elements/Label\";\r\nimport { keyboard } from \"../core/utils/Keyboard\";\r\nimport { registry } from \"../core/Registry\";\r\nimport { getInteraction } from \"../core/interaction/Interaction\";\r\nimport { percent, Percent } from \"../core/utils/Percent\";\r\nimport { InterfaceColorSet } from \"../core/utils/InterfaceColorSet\";\r\nimport * as $utils from \"../core/utils/Utils\";\r\nimport * as $type from \"../core/utils/Type\";\r\nimport * as $math from \"../core/utils/Math\";\r\nimport { Sprite } from \"../core/Sprite\";\r\nimport { Disposer } from \"../core/utils/Disposer\";\r\nimport { MouseCursorStyle } from \"../core/interaction/Mouse\";\r\nimport { defaultRules, ResponsiveBreakpoints } from \"../core/utils/Responsive\";\r\nimport { Scrollbar } from \"../core/elements/Scrollbar\";\r\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Defines a [[DataItem]] for [[Legend]].\r\n *\r\n * @see {@link DataItem}\r\n */\r\nvar LegendDataItem = /** @class */ (function (_super) {\r\n __extends(LegendDataItem, _super);\r\n /**\r\n * Constructor\r\n */\r\n function LegendDataItem() {\r\n var _this = _super.call(this) || this;\r\n /**\r\n * @ignore\r\n */\r\n _this.childrenCreated = false;\r\n _this.className = \"LegendDataItem\";\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n Object.defineProperty(LegendDataItem.prototype, \"label\", {\r\n /**\r\n * A legend item's [[Label]] element.\r\n *\r\n * @return Label\r\n */\r\n get: function () {\r\n var _this = this;\r\n if (!this._label) {\r\n var label_1 = this.component.labels.create();\r\n this._label = label_1;\r\n this.addSprite(label_1);\r\n this._disposers.push(label_1);\r\n label_1.parent = this.itemContainer;\r\n this._disposers.push(new Disposer(function () {\r\n if ($type.hasValue(_this.component)) {\r\n _this.component.labels.removeValue(label_1);\r\n }\r\n }));\r\n }\r\n return this._label;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LegendDataItem.prototype, \"color\", {\r\n /**\r\n * @return Main color\r\n */\r\n get: function () {\r\n return this.properties.color;\r\n },\r\n /**\r\n * Main color of legend data item.\r\n *\r\n * This is set by the target element this legend item represents, like\r\n * a Series or a Slice.\r\n *\r\n * It can be used to derive a color in legend's sub-items, like label:\r\n *\r\n * ```TypeScript\r\n * chart.legend.labels.template.text = \"[{color}]{name}[/]\";\r\n * ```\r\n * ```JavaScript\r\n * chart.legend.labels.template.text = \"[{color}]{name}[/]\";\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"legend\": {\r\n * // ...\r\n * \"labels\": {\r\n * \"text\": \"[{color}]{name}[/]\"\r\n * }\r\n * }\r\n * }\r\n * ```\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/legend/#Legend_labels} For more information about configuring legend labels.\r\n * @param value Main color\r\n */\r\n set: function (value) {\r\n this.setProperty(\"color\", value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LegendDataItem.prototype, \"valueLabel\", {\r\n /**\r\n * A legend item's [[Label]] element for \"value label\".\r\n *\r\n * @return Label\r\n */\r\n get: function () {\r\n var _this = this;\r\n if (!this._valueLabel) {\r\n var valueLabel_1 = this.component.valueLabels.create();\r\n this._valueLabel = valueLabel_1;\r\n this.addSprite(valueLabel_1);\r\n this._disposers.push(valueLabel_1);\r\n valueLabel_1.parent = this.itemContainer;\r\n this._disposers.push(new Disposer(function () {\r\n if ($type.hasValue(_this.component)) {\r\n _this.component.valueLabels.removeValue(valueLabel_1);\r\n }\r\n }));\r\n }\r\n return this._valueLabel;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LegendDataItem.prototype, \"itemContainer\", {\r\n /**\r\n * A reference to the main [[Container]] that holds legend item's elements:\r\n * marker and labels.\r\n *\r\n * @return Item container\r\n */\r\n get: function () {\r\n var _this = this;\r\n if (!this._itemContainer) {\r\n var component_1 = this.component;\r\n var itemContainer_1 = component_1.itemContainers.create();\r\n itemContainer_1.parent = component_1;\r\n this._itemContainer = itemContainer_1;\r\n this.addSprite(itemContainer_1);\r\n this._disposers.push(itemContainer_1);\r\n // Add click/tap event to toggle item\r\n if (itemContainer_1.togglable) {\r\n itemContainer_1.events.on(\"toggled\", function (ev) {\r\n component_1.toggleDataItem(ev.target.dataItem);\r\n }, undefined, false);\r\n }\r\n // Add focus event so that we can track which object is currently in focus\r\n // for keyboard toggling\r\n if (itemContainer_1.focusable) {\r\n itemContainer_1.events.on(\"hit\", function (ev) {\r\n // We need this here in order to reset focused item when it is clicked\r\n // normally so that it is not toggled by ENTER afterwards\r\n component_1.focusedItem = undefined;\r\n }, undefined, false);\r\n itemContainer_1.events.on(\"focus\", function (ev) {\r\n component_1.focusedItem = ev.target.dataItem;\r\n }, undefined, false);\r\n itemContainer_1.events.on(\"blur\", function (ev) {\r\n component_1.focusedItem = undefined;\r\n }, undefined, false);\r\n }\r\n this._disposers.push(new Disposer(function () {\r\n if ($type.hasValue(_this.component)) {\r\n _this.component.itemContainers.removeValue(itemContainer_1);\r\n }\r\n }));\r\n if (this.dataContext.uidAttr) {\r\n itemContainer_1.readerControls = this.dataContext.uidAttr();\r\n itemContainer_1.readerLabelledBy = this.dataContext.uidAttr();\r\n }\r\n var sprite = this.dataContext;\r\n if ((sprite instanceof DataItem || sprite instanceof Sprite) && !sprite.isDisposed()) {\r\n var visibilitychanged = function (ev) {\r\n itemContainer_1.readerChecked = ev.visible;\r\n itemContainer_1.events.disableType(\"toggled\");\r\n itemContainer_1.isActive = !ev.visible;\r\n itemContainer_1.events.enableType(\"toggled\");\r\n };\r\n sprite.addDisposer(new Disposer(function () {\r\n if (_this.component) {\r\n _this.component.dataItems.remove(_this);\r\n }\r\n }));\r\n if (sprite instanceof Sprite) {\r\n itemContainer_1.addDisposer(sprite.events.on(\"visibilitychanged\", visibilitychanged, undefined, false));\r\n itemContainer_1.addDisposer(sprite.events.on(\"hidden\", function (ev) {\r\n itemContainer_1.readerChecked = false;\r\n itemContainer_1.events.disableType(\"toggled\");\r\n itemContainer_1.isActive = true;\r\n itemContainer_1.events.enableType(\"toggled\");\r\n }, undefined, false));\r\n itemContainer_1.addDisposer(sprite.events.on(\"shown\", function (ev) {\r\n itemContainer_1.readerChecked = true;\r\n itemContainer_1.events.disableType(\"toggled\");\r\n itemContainer_1.isActive = false;\r\n itemContainer_1.events.enableType(\"toggled\");\r\n }, undefined, false));\r\n }\r\n else {\r\n itemContainer_1.addDisposer(sprite.events.on(\"visibilitychanged\", visibilitychanged, undefined, false));\r\n }\r\n }\r\n }\r\n return this._itemContainer;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LegendDataItem.prototype, \"marker\", {\r\n /**\r\n * A [[Container]] that holds legend item's marker element.\r\n *\r\n * @return Marker\r\n */\r\n get: function () {\r\n var _this = this;\r\n if (!this._marker) {\r\n var marker_1 = this.component.markers.create();\r\n this._marker = marker_1;\r\n marker_1.parent = this.itemContainer;\r\n this.addSprite(marker_1);\r\n this._disposers.push(marker_1);\r\n this._disposers.push(new Disposer(function () {\r\n if ($type.hasValue(_this.component)) {\r\n _this.component.markers.removeValue(marker_1);\r\n }\r\n }));\r\n }\r\n return this._marker;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return LegendDataItem;\r\n}(DataItem));\r\nexport { LegendDataItem };\r\n/**\r\n * ============================================================================\r\n * REQUISITES\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Defines a class that carries legend settings.\r\n *\r\n * A legend might change its settings dynamically. Legend can also be shared\r\n * by several elements, requiring different settings.\r\n *\r\n * Having legend's settings in a separate object is a good way to \"hot swap\"\r\n * a set of settings for the legend.\r\n */\r\nvar LegendSettings = /** @class */ (function () {\r\n function LegendSettings() {\r\n /**\r\n * Should marker be created for each legend item.\r\n */\r\n this.createMarker = true;\r\n }\r\n return LegendSettings;\r\n}());\r\nexport { LegendSettings };\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * [[Legend]] class is used to create legend for the chart.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/legend/} for Legend documentation\r\n * @see {@link ILegendEvents} for a list of available events\r\n * @see {@link ILegendAdapters} for a list of available Adapters\r\n */\r\nvar Legend = /** @class */ (function (_super) {\r\n __extends(Legend, _super);\r\n /**\r\n * Constructor\r\n */\r\n function Legend() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"Legend\";\r\n // Set defaults\r\n _this.layout = \"grid\";\r\n _this.setPropertyValue(\"useDefaultMarker\", false);\r\n _this.setPropertyValue(\"scrollable\", false);\r\n _this.setPropertyValue(\"contentAlign\", \"center\");\r\n // Create a template container and list for legend items\r\n var itemContainer = new Container();\r\n itemContainer.applyOnClones = true;\r\n itemContainer.padding(8, 0, 8, 0);\r\n itemContainer.margin(0, 10, 0, 10);\r\n itemContainer.layout = \"horizontal\";\r\n itemContainer.clickable = true;\r\n itemContainer.focusable = true;\r\n itemContainer.role = \"switch\";\r\n itemContainer.togglable = true;\r\n itemContainer.cursorOverStyle = MouseCursorStyle.pointer;\r\n itemContainer.background.fillOpacity = 0; // creates hit area\r\n // Create container list using item template we just created\r\n _this.itemContainers = new ListTemplate(itemContainer);\r\n _this._disposers.push(new ListDisposer(_this.itemContainers));\r\n _this._disposers.push(_this.itemContainers.template);\r\n // Set up global keyboard events for toggling elements\r\n _this._disposers.push(getInteraction().body.events.on(\"keyup\", function (ev) {\r\n if (keyboard.isKey(ev.event, \"enter\") && _this.focusedItem) {\r\n var focusedItem = _this.focusedItem;\r\n var target = focusedItem.itemContainer;\r\n if (target.togglable) {\r\n _this.toggleDataItem(focusedItem);\r\n }\r\n else if (target.clickable && target.events.isEnabled(\"hit\")) {\r\n target.dispatchImmediately(\"hit\", { event: ev });\r\n // We need this here because \"hit\" event resets `this.focusedItem`\r\n // And we need it here\r\n _this.focusedItem = focusedItem;\r\n }\r\n }\r\n }, _this));\r\n var interfaceColors = new InterfaceColorSet();\r\n // Create a template container and list for the a marker\r\n var marker = new Container();\r\n marker.width = 23;\r\n marker.height = 23;\r\n marker.interactionsEnabled = false;\r\n marker.applyOnClones = true;\r\n marker.setStateOnChildren = true;\r\n marker.background.fillOpacity = 0;\r\n marker.background.strokeOpacity = 0;\r\n marker.propertyFields.fill = \"fill\";\r\n marker.valign = \"middle\";\r\n var disabledColor = interfaceColors.getFor(\"disabledBackground\");\r\n marker.events.on(\"childadded\", function (event) {\r\n var child = event.newValue;\r\n var activeState = child.states.create(\"active\");\r\n activeState.properties.stroke = disabledColor;\r\n activeState.properties.fill = disabledColor;\r\n });\r\n _this.markers = new ListTemplate(marker);\r\n _this._disposers.push(new ListDisposer(_this.markers));\r\n _this._disposers.push(_this.markers.template);\r\n // Create a legend background element\r\n var rectangle = marker.createChild(RoundedRectangle);\r\n rectangle.width = percent(100);\r\n rectangle.height = percent(100);\r\n rectangle.applyOnClones = true;\r\n rectangle.propertyFields.fill = \"fill\"; //othrwise old edge doesn't like as the same pattern is set both on parent and child https://codepen.io/team/amcharts/pen/72d7a98f3fb811d3118795220ff63182\r\n rectangle.strokeOpacity = 0;\r\n // Create a template container and list for item labels\r\n var label = new Label();\r\n label.text = \"{name}\";\r\n label.margin(0, 5, 0, 5);\r\n label.valign = \"middle\";\r\n label.applyOnClones = true;\r\n label.states.create(\"active\").properties.fill = interfaceColors.getFor(\"disabledBackground\");\r\n _this.labels = new ListTemplate(label);\r\n _this._disposers.push(new ListDisposer(_this.labels));\r\n _this._disposers.push(_this.labels.template);\r\n label.interactionsEnabled = false;\r\n label.truncate = true;\r\n label.fullWords = false;\r\n // Create a template container and list for item value labels\r\n var valueLabel = new Label();\r\n valueLabel.margin(0, 5, 0, 0);\r\n valueLabel.valign = \"middle\";\r\n valueLabel.width = 50; // to avoid rearranging legend entries when value changes.\r\n valueLabel.align = \"right\";\r\n valueLabel.textAlign = \"end\";\r\n valueLabel.applyOnClones = true;\r\n valueLabel.states.create(\"active\").properties.fill = interfaceColors.getFor(\"disabledBackground\");\r\n valueLabel.interactionsEnabled = false;\r\n _this.valueLabels = new ListTemplate(valueLabel);\r\n _this._disposers.push(new ListDisposer(_this.valueLabels));\r\n _this._disposers.push(_this.valueLabels.template);\r\n _this.position = \"bottom\"; // don't use setPropertyValue here!\r\n // Create a state for disabled legend items\r\n itemContainer.states.create(\"active\");\r\n itemContainer.setStateOnChildren = true;\r\n // Apply accessibility settings\r\n _this.role = \"group\";\r\n _this.events.on(\"layoutvalidated\", _this.handleScrollbar, _this, false);\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * Sets defaults that instantiate some objects that rely on parent, so they\r\n * cannot be set in constructor.\r\n */\r\n Legend.prototype.applyInternalDefaults = function () {\r\n _super.prototype.applyInternalDefaults.call(this);\r\n if (!$type.hasValue(this.readerTitle)) {\r\n this.readerTitle = this.language.translate(\"Legend\");\r\n }\r\n };\r\n /**\r\n * Returns a new/empty DataItem of the type appropriate for this object.\r\n *\r\n * @see {@link DataItem}\r\n * @return Data Item\r\n */\r\n Legend.prototype.createDataItem = function () {\r\n return new LegendDataItem();\r\n };\r\n /**\r\n * [validateDataElements description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\r\n Legend.prototype.validateDataElements = function () {\r\n if (this.scrollbar) {\r\n this.scrollbar.start = 0;\r\n this.scrollbar.end = 1;\r\n }\r\n _super.prototype.validateDataElements.call(this);\r\n };\r\n /**\r\n * [validateDataElement description]\r\n *\r\n * @ignore Exclude from docs\r\n * @param dataItem Data item\r\n * @todo Description\r\n * @todo Figure out how to update appearance of legend item without losing focus\r\n * @todo Update legend marker appearance as apperance of related series changes\r\n */\r\n Legend.prototype.validateDataElement = function (dataItem) {\r\n _super.prototype.validateDataElement.call(this, dataItem);\r\n // Get data item (legend item's) container\r\n var container = dataItem.itemContainer;\r\n var marker = dataItem.marker;\r\n $utils.used(dataItem.label);\r\n var valueLabel = dataItem.valueLabel;\r\n // Set parent and update current state\r\n container.readerChecked = dataItem.dataContext.visible;\r\n // Tell series its legend data item\r\n dataItem.dataContext.legendDataItem = dataItem;\r\n var tempMaxWidth = dataItem.label.maxWidth;\r\n if (!(dataItem.label.width instanceof Percent)) {\r\n dataItem.label.width = undefined;\r\n }\r\n if (tempMaxWidth > 0) {\r\n dataItem.label.maxWidth = tempMaxWidth;\r\n }\r\n if (valueLabel.align == \"right\") {\r\n valueLabel.width = undefined;\r\n }\r\n var legendSettings = dataItem.dataContext.legendSettings;\r\n // If we are not using default markers, create a unique legend marker based\r\n // on the data item type\r\n var dataContext = dataItem.dataContext;\r\n if (dataContext.createLegendMarker && (!this.useDefaultMarker || !(dataContext instanceof Sprite))) {\r\n if (!dataItem.childrenCreated) {\r\n dataContext.createLegendMarker(marker);\r\n dataItem.childrenCreated = true;\r\n }\r\n }\r\n else {\r\n this.markers.template.propertyFields.fill = undefined;\r\n }\r\n if (dataContext.updateLegendValue) {\r\n dataContext.updateLegendValue(); // this solves issue with external legend, as legend is created after chart updates legend values\r\n }\r\n if (dataContext.component && dataContext.component.updateLegendValue) {\r\n dataContext.component.updateLegendValue(dataContext);\r\n }\r\n if (valueLabel.invalid) {\r\n valueLabel.validate();\r\n }\r\n if (valueLabel.text == \"\" || valueLabel.text == undefined) {\r\n valueLabel.__disabled = true;\r\n }\r\n else {\r\n valueLabel.__disabled = false;\r\n }\r\n if (legendSettings && (legendSettings.itemValueText != undefined || legendSettings.valueText != undefined)) {\r\n valueLabel.__disabled = false;\r\n }\r\n var visible = dataItem.dataContext.visible;\r\n if (visible === undefined) {\r\n visible = true;\r\n }\r\n visible = $type.toBoolean(visible);\r\n dataItem.dataContext.visible = visible;\r\n container.events.disableType(\"toggled\");\r\n container.isActive = !visible;\r\n if (container.isActive) {\r\n container.setState(\"active\", 0);\r\n }\r\n else {\r\n container.setState(\"default\", 0);\r\n }\r\n container.events.enableType(\"toggled\");\r\n };\r\n Legend.prototype.afterDraw = function () {\r\n var _this = this;\r\n var maxWidth = this.getPropertyValue(\"maxWidth\");\r\n var maxLabelWidth = 0;\r\n this.labels.each(function (label) {\r\n if (label.invalid) {\r\n label.maxWidth = undefined;\r\n label.validate();\r\n }\r\n if (label.measuredWidth + label.pixelMarginLeft + label.pixelMarginRight > maxLabelWidth) {\r\n maxLabelWidth = label.measuredWidth + label.pixelMarginLeft + label.pixelMarginRight;\r\n }\r\n });\r\n var maxValueLabelWidth = 0;\r\n this.valueLabels.each(function (label) {\r\n if (label.invalid) {\r\n label.validate();\r\n }\r\n if (label.measuredWidth + label.pixelMarginLeft + label.pixelMarginRight > maxValueLabelWidth) {\r\n maxValueLabelWidth = label.measuredWidth + label.pixelMarginLeft + label.pixelMarginRight;\r\n }\r\n });\r\n var maxMarkerWidth = 0;\r\n this.markers.each(function (marker) {\r\n if (marker.invalid) {\r\n marker.validate();\r\n }\r\n if (marker.measuredWidth + marker.pixelMarginLeft + marker.pixelMarginRight > maxMarkerWidth) {\r\n maxMarkerWidth = marker.measuredWidth + marker.pixelMarginLeft + marker.pixelMarginRight;\r\n }\r\n });\r\n var itemContainer = this.itemContainers.template;\r\n var margin = itemContainer.pixelMarginRight + itemContainer.pixelMarginLeft;\r\n var maxAdjustedLabelWidth;\r\n var trueMaxWidth = maxLabelWidth + maxValueLabelWidth + maxMarkerWidth;\r\n if (!$type.isNumber(maxWidth)) {\r\n maxAdjustedLabelWidth = maxLabelWidth;\r\n }\r\n else {\r\n maxWidth = maxWidth - margin;\r\n if (maxWidth > trueMaxWidth) {\r\n maxWidth = trueMaxWidth;\r\n }\r\n maxAdjustedLabelWidth = maxWidth - maxMarkerWidth - maxValueLabelWidth;\r\n }\r\n this.labels.each(function (label) {\r\n if (_this.valueLabels.template.align == \"right\" || label.measuredWidth > maxAdjustedLabelWidth) {\r\n if (!(label.width instanceof Percent)) {\r\n label.width = Math.min(label.maxWidth, maxAdjustedLabelWidth - label.pixelMarginLeft - label.pixelMarginRight);\r\n label.maxWidth = label.width;\r\n }\r\n }\r\n });\r\n if (this.valueLabels.template.align == \"right\") {\r\n this.valueLabels.each(function (valueLabel) {\r\n valueLabel.width = maxValueLabelWidth - valueLabel.pixelMarginRight - valueLabel.pixelMarginLeft;\r\n });\r\n }\r\n _super.prototype.afterDraw.call(this);\r\n };\r\n Legend.prototype.handleScrollbar = function () {\r\n var scrollbar = this.scrollbar;\r\n if (this.scrollable && scrollbar) {\r\n scrollbar.height = this.measuredHeight;\r\n scrollbar.x = this.measuredWidth - scrollbar.pixelWidth - scrollbar.pixelMarginLeft;\r\n if (this.contentHeight > this.measuredHeight) {\r\n scrollbar.visible = true;\r\n scrollbar.thumb.height = scrollbar.height * this.measuredHeight / this.contentHeight;\r\n this.paddingRight = scrollbar.pixelWidth + scrollbar.pixelMarginLeft + +scrollbar.pixelMarginRight;\r\n }\r\n else {\r\n scrollbar.visible = false;\r\n }\r\n scrollbar.handleThumbPosition();\r\n this.updateMasks();\r\n }\r\n };\r\n Object.defineProperty(Legend.prototype, \"position\", {\r\n /**\r\n * @return Position\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"position\");\r\n },\r\n /**\r\n * Position of the legend.\r\n *\r\n * Options: \"left\", \"right\", \"top\", \"bottom\" (default), or \"absolute\".\r\n *\r\n * IMPORTANT: [[MapChart]] will ignore this setting, as it is using different\r\n * layout structure than other charts.\r\n *\r\n * To position legend in [[MapChart]] set legend's `align` (`\"left\"` or\r\n * `\"right\"`) and `valign` (`\"top\"` or `\"bottom\"`) properties instead.\r\n *\r\n * @default \"bottom\"\r\n * @param value Position\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"position\", value)) {\r\n if (value == \"left\" || value == \"right\") {\r\n this.margin(10, 5, 10, 10);\r\n this.valign = \"middle\";\r\n this.contentAlign = \"none\";\r\n this.valueLabels.template.align = \"right\";\r\n if (!$type.isNumber(this.maxColumns)) {\r\n this.maxColumns = 1;\r\n }\r\n this.width = undefined;\r\n this.maxWidth = 220;\r\n }\r\n else {\r\n this.maxColumns = undefined;\r\n this.width = percent(100);\r\n this.valueLabels.template.align = \"left\";\r\n }\r\n this.invalidate();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Legend.prototype, \"useDefaultMarker\", {\r\n /**\r\n * @return Use default marker?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"useDefaultMarker\");\r\n },\r\n /**\r\n * Should legend try to mirror the look of the related item when building\r\n * the marker for legend item?\r\n *\r\n * If set to `false` it will try to make the marker look like its related\r\n * item.\r\n *\r\n * E.g. if an item is for a Line Series, it will display a line of the\r\n * same thickness, color, and will use the same bullets if series have them.\r\n *\r\n * If set to `true`, all markers will be shown as squares, regardless of te\r\n * series type.\r\n *\r\n * @default false\r\n * @param value Use default marker?\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"useDefaultMarker\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Legend.prototype, \"scrollable\", {\r\n /**\r\n * @return Legend Scrollable?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"scrollable\");\r\n },\r\n /**\r\n * If set to `true` the Legend will display a scrollbar if its contents do\r\n * not fit into its `maxHeight`.\r\n *\r\n * Please note that `maxHeight` is automatically set for Legend when its\r\n * `position` is set to `\"left\"` or `\"right\"`.\r\n *\r\n * @default false\r\n * @since 4.8.0\r\n * @param value Legend Scrollable?\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"scrollable\", value, true)) {\r\n if (value) {\r\n var scrollbar = this.createChild(Scrollbar);\r\n this.scrollbar = scrollbar;\r\n scrollbar.isMeasured = false;\r\n scrollbar.orientation = \"vertical\";\r\n scrollbar.endGrip.__disabled = true;\r\n scrollbar.startGrip.__disabled = true;\r\n scrollbar.visible = false;\r\n scrollbar.marginLeft = 5;\r\n this._mouseWheelDisposer = this.events.on(\"wheel\", this.handleWheel, this, false);\r\n this._disposers.push(this._mouseWheelDisposer);\r\n this._disposers.push(scrollbar.events.on(\"rangechanged\", this.updateMasks, this, false));\r\n }\r\n else {\r\n if (this._mouseWheelDisposer) {\r\n this._mouseWheelDisposer.dispose();\r\n if (this.scrollbar) {\r\n this.scrollbar.dispose();\r\n this.scrollbar = undefined;\r\n }\r\n }\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Handles mouse wheel scrolling of legend.\r\n *\r\n * @param event Event\r\n */\r\n Legend.prototype.handleWheel = function (event) {\r\n var shift = event.shift.y;\r\n var scrollbar = this.scrollbar;\r\n if (scrollbar) {\r\n var ds = (shift / 1000 * this.measuredHeight / this.contentHeight);\r\n var delta = scrollbar.end - scrollbar.start;\r\n if (shift > 0) {\r\n scrollbar.start = $math.max(0, scrollbar.start - ds);\r\n scrollbar.end = scrollbar.start + delta;\r\n }\r\n else {\r\n scrollbar.end = $math.min(1, scrollbar.end - ds);\r\n scrollbar.start = scrollbar.end - delta;\r\n }\r\n }\r\n };\r\n /**\r\n * @ignore\r\n */\r\n Legend.prototype.updateMasks = function () {\r\n var _this = this;\r\n if (this.scrollbar) {\r\n this.itemContainers.each(function (itemContainer) {\r\n itemContainer.dy = -_this.scrollbar.thumb.pixelY * _this.contentHeight / _this.measuredHeight;\r\n itemContainer.maskRectangle = { x: 0, y: -itemContainer.dy, width: _this.measuredWidth, height: _this.measuredHeight };\r\n });\r\n }\r\n };\r\n /**\r\n * Toggles a legend item.\r\n *\r\n * @ignore Exclude from docs\r\n * @param item Legend item\r\n * @todo Maybe do it with togglable instead\r\n */\r\n Legend.prototype.toggleDataItem = function (item) {\r\n var dataContext = item.dataContext;\r\n if (!dataContext.visible || dataContext.isHiding || (dataContext instanceof Sprite && dataContext.isHidden)) {\r\n item.color = item.colorOrig;\r\n dataContext.appeared = true;\r\n item.itemContainer.isActive = false;\r\n if (dataContext.hidden === true) {\r\n dataContext.hidden = false;\r\n }\r\n if (dataContext.show) {\r\n dataContext.show();\r\n }\r\n else {\r\n dataContext.visible = true;\r\n }\r\n this.svgContainer.readerAlert(this.language.translate(\"%1 shown\", this.language.locale, item.label.readerTitle));\r\n }\r\n else {\r\n item.itemContainer.isActive = true;\r\n dataContext.appeared = true;\r\n if (dataContext.hide) {\r\n dataContext.hide();\r\n }\r\n else {\r\n dataContext.visible = false;\r\n }\r\n this.svgContainer.readerAlert(this.language.translate(\"%1 hidden\", this.language.locale, item.label.readerTitle));\r\n item.color = new InterfaceColorSet().getFor(\"disabledBackground\");\r\n }\r\n };\r\n Object.defineProperty(Legend.prototype, \"preloader\", {\r\n /**\r\n * Override preloader method so that legend does not accidentally show its\r\n * own preloader.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Always `undefined`\r\n */\r\n get: function () {\r\n return;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * [handleDataItemPropertyChange description]\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Legend.prototype.handleDataItemPropertyChange = function (dataItem, name) {\r\n dataItem.valueLabel.invalidate();\r\n dataItem.label.invalidate();\r\n };\r\n return Legend;\r\n}(Component));\r\nexport { Legend };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"Legend\"] = Legend;\r\n/**\r\n * Add default responsive rules\r\n */\r\n/**\r\n * Move legend to below the chart if chart is narrow\r\n */\r\ndefaultRules.push({\r\n relevant: ResponsiveBreakpoints.widthXS,\r\n state: function (target, stateId) {\r\n if (target instanceof Legend && (target.position == \"left\" || target.position == \"right\")) {\r\n var state = target.states.create(stateId);\r\n state.properties.position = \"bottom\";\r\n return state;\r\n }\r\n return null;\r\n }\r\n});\r\n/**\r\n * Move legend to the right if chart is very short\r\n */\r\ndefaultRules.push({\r\n relevant: ResponsiveBreakpoints.heightXS,\r\n state: function (target, stateId) {\r\n if (target instanceof Legend && (target.position == \"top\" || target.position == \"bottom\")) {\r\n var state = target.states.create(stateId);\r\n state.properties.position = \"right\";\r\n return state;\r\n }\r\n return null;\r\n }\r\n});\r\n/**\r\n * Disable legend altogether on small charts\r\n */\r\ndefaultRules.push({\r\n relevant: ResponsiveBreakpoints.isXS,\r\n state: function (target, stateId) {\r\n if (target instanceof Legend) {\r\n var state = target.states.create(stateId);\r\n state.properties.disabled = true;\r\n return state;\r\n }\r\n return null;\r\n }\r\n});\r\n","/**\r\n * Axis break module\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Container } from \"../../core/Container\";\r\nimport { MutableValueDisposer } from \"../../core/utils/Disposer\";\r\nimport { WavedLine } from \"../../core/elements/WavedLine\";\r\nimport { List } from \"../../core/utils/List\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport { color } from \"../../core/utils/Color\";\r\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Base class to define \"breaks\" on axes.\r\n *\r\n * @see {@link IAxisBreakEvents} for a list of available events\r\n * @see {@link IAxisBreakAdapters} for a list of available Adapters\r\n * @important\r\n */\r\nvar AxisBreak = /** @class */ (function (_super) {\r\n __extends(AxisBreak, _super);\r\n /**\r\n * Constructor\r\n */\r\n function AxisBreak() {\r\n var _this = \r\n // Init\r\n _super.call(this) || this;\r\n /**\r\n * Reference to parent Axis.\r\n */\r\n _this._axis = new MutableValueDisposer();\r\n /**\r\n * A list of axis data items which fall within this break.\r\n */\r\n _this.dataItems = new List();\r\n _this.className = \"AxisBreak\";\r\n // Set defaults\r\n _this.breakSize = 0.01;\r\n _this.marginLeft = -5;\r\n _this.marginRight = -5;\r\n _this.marginTop = -5;\r\n _this.marginBottom = -5;\r\n var interfaceColors = new InterfaceColorSet();\r\n // Create elements\r\n // (these won't be used actually, just for setting properties)\r\n var fillShape = new WavedLine();\r\n fillShape.fill = interfaceColors.getFor(\"background\");\r\n fillShape.stroke = color();\r\n fillShape.fillOpacity = 0.9;\r\n fillShape.zIndex = 0;\r\n _this._fillShape = fillShape;\r\n var startLine = new WavedLine();\r\n startLine.fill = color();\r\n startLine.stroke = interfaceColors.getFor(\"grid\");\r\n startLine.strokeOpacity = 0.3;\r\n startLine.zIndex = 1;\r\n _this._startLine = startLine;\r\n var endLine = new WavedLine();\r\n endLine.fill = color();\r\n endLine.stroke = color(\"#000000\"); // interfaceColors.getFor(\"grid\");\r\n endLine.strokeOpacity = 0.3;\r\n endLine.zIndex = 2;\r\n _this._endLine = endLine;\r\n _this._disposers.push(_this._axis);\r\n // Apply theme\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n AxisBreak.prototype.dispose = function () {\r\n _super.prototype.dispose.call(this);\r\n if (this._fillShape) {\r\n this._fillShape.dispose();\r\n }\r\n if (this._startLine) {\r\n this._startLine.dispose();\r\n }\r\n if (this._endLine) {\r\n this._endLine.dispose();\r\n }\r\n };\r\n Object.defineProperty(AxisBreak.prototype, \"startLine\", {\r\n /**\r\n * @return Element\r\n */\r\n get: function () {\r\n return this._startLine;\r\n },\r\n /**\r\n * An element used for the starting line of the break.\r\n *\r\n * @param sprite Element\r\n */\r\n set: function (sprite) {\r\n if (this._startLine) {\r\n this._startLine.dispose();\r\n }\r\n this._startLine = sprite;\r\n this.addBreakSprite(sprite);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(AxisBreak.prototype, \"endLine\", {\r\n /**\r\n * @return Element\r\n */\r\n get: function () {\r\n return this._endLine;\r\n },\r\n /**\r\n * An element used for the end line of the break.\r\n *\r\n * @param sprite Element\r\n */\r\n set: function (sprite) {\r\n if (this._endLine) {\r\n this._endLine.dispose();\r\n }\r\n this._endLine = sprite;\r\n this.addBreakSprite(sprite);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(AxisBreak.prototype, \"fillShape\", {\r\n /**\r\n * @return Element\r\n */\r\n get: function () {\r\n return this._fillShape;\r\n },\r\n /**\r\n * An element used for fill of the break.\r\n *\r\n * @param sprite Element\r\n */\r\n set: function (sprite) {\r\n if (this._fillShape) {\r\n this._fillShape.dispose();\r\n }\r\n this._fillShape = sprite;\r\n this.addBreakSprite(sprite);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Adds a break element (e.g. lines, fill) to the break, which is\r\n * [[Container]].\r\n *\r\n * @ignore Exclude from docs\r\n * @param sprite Element to add\r\n */\r\n AxisBreak.prototype.addBreakSprite = function (sprite) {\r\n sprite.parent = this;\r\n sprite.isMeasured = false;\r\n this._disposers.push(sprite);\r\n };\r\n Object.defineProperty(AxisBreak.prototype, \"axis\", {\r\n /**\r\n * @return Axis\r\n */\r\n get: function () {\r\n return this._axis.get();\r\n },\r\n /**\r\n * An Axis this Break is associated with.\r\n *\r\n * @param axis Axis\r\n */\r\n set: function (axis) {\r\n if (this._axis.get() !== axis) {\r\n this._axis.set(axis, axis.renderer.gridContainer.events.on(\"transformed\", this.invalidate, this, false));\r\n axis.renderer.createBreakSprites(this);\r\n // this can't go to copyFrom, as axis is set later\r\n var breakTemplate = axis.axisBreaks.template;\r\n this.startLine.copyFrom(breakTemplate.startLine);\r\n this.endLine.copyFrom(breakTemplate.endLine);\r\n this.fillShape.copyFrom(breakTemplate.fillShape);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(AxisBreak.prototype, \"breakSize\", {\r\n /**\r\n * @return Relative axis break\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"breakSize\");\r\n },\r\n /**\r\n * A size of the break relative to the actual size of the scope break spans.\r\n *\r\n * For example, if `breakSize = 0.1` and unbroken scope of values it spans\r\n * would be 100 pixels, the break would be 10 pixels wide.\r\n *\r\n * 0 means the break will completely collapse and hide the values.\r\n * 1 means break would be not collapse at all, which would make it\r\n * effectively useless.\r\n *\r\n * @default 0.01\r\n * @param value Relative axis break\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"breakSize\", value)) {\r\n if (this.axis) {\r\n this.axis.invalidate();\r\n this.axis.invalidateSeries();\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(AxisBreak.prototype, \"startPoint\", {\r\n /**\r\n * Returns pixel coordinates of axis break's start.\r\n *\r\n * @return Start point\r\n */\r\n get: function () {\r\n var renderer = this.axis.renderer;\r\n if (renderer) {\r\n return renderer.positionToPoint(this.startPosition);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(AxisBreak.prototype, \"endPoint\", {\r\n /**\r\n * Returns pixel coordinates of axis break's end.\r\n *\r\n * @return End point\r\n */\r\n get: function () {\r\n var renderer = this.axis.renderer;\r\n if (renderer) {\r\n return renderer.positionToPoint(this.endPosition);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(AxisBreak.prototype, \"startPosition\", {\r\n /**\r\n * Returns a relative position at which axis break starts.\r\n *\r\n * This is a calculated position, meaning it shows relative position of the\r\n * break after break is applied.\r\n *\r\n * @return Start position\r\n */\r\n get: function () {\r\n return;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(AxisBreak.prototype, \"endPosition\", {\r\n /**\r\n * Returns a relative position at which axis break ends.\r\n *\r\n * This is a calculated position, meaning it shows relative position of the\r\n * break after break is applied.\r\n *\r\n * @return End position\r\n */\r\n get: function () {\r\n return;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Draws the axis break.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n AxisBreak.prototype.draw = function () {\r\n _super.prototype.draw.call(this);\r\n if (this.axis) {\r\n var renderer = this.axis.renderer;\r\n renderer.updateBreakElement(this);\r\n }\r\n };\r\n Object.defineProperty(AxisBreak.prototype, \"startValue\", {\r\n /**\r\n * @return Starting value\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"startValue\");\r\n },\r\n /**\r\n * A starting value for the break.\r\n *\r\n * @param value Starting value\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"startValue\", value)) {\r\n if (this.axis) {\r\n this.axis.invalidate();\r\n this.axis.invalidateSeries();\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(AxisBreak.prototype, \"endValue\", {\r\n /**\r\n * @return End value\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"endValue\");\r\n },\r\n /**\r\n * An end value for the break.\r\n *\r\n * @param value End value\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"endValue\", value)) {\r\n if (this.axis) {\r\n this.axis.invalidate();\r\n this.axis.invalidateSeries();\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return AxisBreak;\r\n}(Container));\r\nexport { AxisBreak };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"AxisBreak\"] = AxisBreak;\r\n","/**\r\n * Base class for all Axis\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Component } from \"../../core/Component\";\r\nimport { Container } from \"../../core/Container\";\r\nimport { DataItem } from \"../../core/DataItem\";\r\nimport { AxisBreak } from \"./AxisBreak\";\r\nimport { Label } from \"../../core/elements/Label\";\r\nimport { Tooltip } from \"../../core/elements/Tooltip\";\r\nimport { SortedListTemplate } from \"../../core/utils/SortedList\";\r\nimport { List, ListTemplate, ListDisposer } from \"../../core/utils/List\";\r\nimport { Disposer, MultiDisposer } from \"../../core/utils/Disposer\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\r\nimport * as $iter from \"../../core/utils/Iterator\";\r\nimport * as $math from \"../../core/utils/Math\";\r\nimport * as $utils from \"../../core/utils/Utils\";\r\nimport * as $number from \"../../core/utils/Number\";\r\nimport * as $array from \"../../core/utils/Array\";\r\nimport * as $type from \"../../core/utils/Type\";\r\nimport { defaultRules, ResponsiveBreakpoints } from \"../../core/utils/Responsive\";\r\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Defines a [[DataItem]] for [[Axis]].\r\n *\r\n * @see {@link DataItem}\r\n */\r\nvar AxisDataItem = /** @class */ (function (_super) {\r\n __extends(AxisDataItem, _super);\r\n /**\r\n * Constructor\r\n */\r\n function AxisDataItem() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"AxisDataItem\";\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n Object.defineProperty(AxisDataItem.prototype, \"grid\", {\r\n /**\r\n * @return Grid element\r\n */\r\n get: function () {\r\n if (!this._grid) {\r\n var component_1 = this.component;\r\n if (component_1) {\r\n var template = void 0;\r\n var grid_1;\r\n if (this.isRange) {\r\n template = component_1.axisRanges.template.grid;\r\n if (template.disabled) {\r\n return;\r\n }\r\n else {\r\n grid_1 = template.clone();\r\n }\r\n }\r\n else {\r\n template = component_1.renderer.grid.template;\r\n if (template.disabled) {\r\n return;\r\n }\r\n else {\r\n grid_1 = component_1.renderer.grid.create();\r\n this._disposers.push(new Disposer(function () {\r\n component_1.renderer.grid.removeValue(grid_1);\r\n }));\r\n }\r\n }\r\n this.grid = grid_1;\r\n grid_1.shouldClone = false;\r\n this._disposers.push(grid_1);\r\n grid_1.axis = this.component;\r\n }\r\n }\r\n return this._grid;\r\n },\r\n /**\r\n * A [[Grid]] element associated with this data item.\r\n *\r\n * If there is no grid element associated with data item, a new one is\r\n * created and returned.\r\n *\r\n * @param grid Grid element\r\n */\r\n set: function (grid) {\r\n if (this._grid && this._grid != grid) {\r\n $array.remove(this.sprites, this._grid);\r\n this._grid.dataItem = undefined;\r\n }\r\n if (grid) {\r\n if (grid.dataItem && grid.dataItem != this) {\r\n $array.remove(grid.dataItem.sprites, grid);\r\n grid.dataItem.grid = undefined;\r\n }\r\n this.addSprite(grid);\r\n }\r\n this._grid = grid;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(AxisDataItem.prototype, \"tick\", {\r\n /**\r\n * @return Tick element\r\n */\r\n get: function () {\r\n if (!this._tick) {\r\n var component_2 = this.component;\r\n if (component_2) {\r\n var template = void 0;\r\n var tick_1;\r\n if (this.isRange) {\r\n template = component_2.axisRanges.template.tick;\r\n if (template.disabled) {\r\n return;\r\n }\r\n else {\r\n tick_1 = template.clone();\r\n }\r\n }\r\n else {\r\n template = component_2.renderer.ticks.template;\r\n if (template.disabled) {\r\n return;\r\n }\r\n else {\r\n tick_1 = component_2.renderer.ticks.create();\r\n this._disposers.push(new Disposer(function () {\r\n component_2.renderer.ticks.removeValue(tick_1);\r\n }));\r\n }\r\n }\r\n this.tick = tick_1;\r\n tick_1.axis = this.component;\r\n tick_1.shouldClone = false;\r\n this._disposers.push(tick_1);\r\n }\r\n }\r\n return this._tick;\r\n },\r\n /**\r\n * An [[AxisTick]] element associated with this data item.\r\n *\r\n * If there is no tick element associated with data item, a new one is\r\n * created and returned.\r\n *\r\n * @param tick Tick element\r\n */\r\n set: function (tick) {\r\n if (this._tick && this._tick != tick) {\r\n $array.remove(this.sprites, this._tick);\r\n this._tick.dataItem = undefined;\r\n }\r\n if (tick) {\r\n if (tick.dataItem && tick.dataItem != this) {\r\n $array.remove(tick.dataItem.sprites, tick);\r\n tick.dataItem.tick = undefined;\r\n }\r\n this.addSprite(tick);\r\n }\r\n this._tick = tick;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(AxisDataItem.prototype, \"label\", {\r\n /**\r\n * @return Label element\r\n */\r\n get: function () {\r\n if (!this._label) {\r\n var component_3 = this.component;\r\n if (component_3) {\r\n var template = void 0;\r\n var label_1;\r\n if (this.isRange) {\r\n template = component_3.axisRanges.template.label;\r\n if (template.disabled) {\r\n return;\r\n }\r\n else {\r\n label_1 = template.clone();\r\n }\r\n }\r\n else {\r\n template = component_3.renderer.labels.template;\r\n if (template.disabled) {\r\n return;\r\n }\r\n else {\r\n label_1 = component_3.renderer.labels.create();\r\n this._disposers.push(new Disposer(function () {\r\n component_3.renderer.labels.removeValue(label_1);\r\n }));\r\n }\r\n }\r\n this._disposers.push(label_1);\r\n this.label = label_1;\r\n label_1.shouldClone = false;\r\n label_1.axis = this.component;\r\n label_1.virtualParent = component_3;\r\n }\r\n }\r\n return this._label;\r\n },\r\n /**\r\n * An [[AxisLabel]] element associated with this data item.\r\n *\r\n * If there is no label element associated with data item, a new one is\r\n * created and returned.\r\n *\r\n * @param label Label element\r\n */\r\n set: function (label) {\r\n if (this._label && this._label != label) {\r\n $array.remove(this.sprites, this._label);\r\n this._label.dataItem = undefined;\r\n }\r\n if (label) {\r\n if (label.dataItem && label.dataItem != this) {\r\n $array.remove(label.dataItem.sprites, label);\r\n label.dataItem.label = undefined;\r\n }\r\n this.addSprite(label);\r\n }\r\n this._label = label;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(AxisDataItem.prototype, \"axisFill\", {\r\n /**\r\n * @return Label element\r\n */\r\n get: function () {\r\n if (!this._axisFill) {\r\n var component_4 = this.component;\r\n if (component_4) {\r\n var template = void 0;\r\n var axisFill_1;\r\n if (this.isRange) {\r\n template = component_4.axisRanges.template.axisFill;\r\n if (!this.isTemplate && template.disabled) {\r\n return;\r\n }\r\n else {\r\n axisFill_1 = template.clone();\r\n }\r\n }\r\n else {\r\n template = component_4.renderer.axisFills.template;\r\n if (template.disabled) {\r\n return;\r\n }\r\n else {\r\n axisFill_1 = component_4.renderer.axisFills.create();\r\n this._disposers.push(new Disposer(function () {\r\n component_4.renderer.axisFills.removeValue(axisFill_1);\r\n }));\r\n }\r\n }\r\n this.axisFill = axisFill_1;\r\n axisFill_1.shouldClone = false;\r\n this._disposers.push(axisFill_1);\r\n }\r\n }\r\n return this._axisFill;\r\n },\r\n /**\r\n * An [[AxisFill]] associated element with this data item.\r\n *\r\n * If there is no fill element associated with data item, a new one is\r\n * created and returned.\r\n *\r\n * @param label Label element\r\n */\r\n set: function (axisFill) {\r\n if (this._axisFill && this._axisFill != axisFill) {\r\n $array.remove(this.sprites, this._axisFill);\r\n this._axisFill.dataItem = undefined;\r\n }\r\n if (axisFill) {\r\n if (axisFill.dataItem && axisFill.dataItem != this) {\r\n $array.remove(axisFill.dataItem.sprites, axisFill);\r\n axisFill.dataItem.axisFill = undefined;\r\n }\r\n axisFill.axis = this.component;\r\n this.addSprite(axisFill);\r\n }\r\n this._axisFill = axisFill;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(AxisDataItem.prototype, \"text\", {\r\n /**\r\n * @return Text label\r\n */\r\n get: function () {\r\n return this._text;\r\n },\r\n /**\r\n * Text to be used as data item's label.\r\n *\r\n * @param text Text label\r\n */\r\n set: function (text) {\r\n this._text = text;\r\n if (this._label) { // do not use getter, it will create unwanted instances!\r\n this._label.text = text;\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(AxisDataItem.prototype, \"mask\", {\r\n /**\r\n * Data item's mask.\r\n *\r\n * @return Mask\r\n */\r\n get: function () {\r\n return this._mask;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(AxisDataItem.prototype, \"contents\", {\r\n /**\r\n * Returns a [[Container]] to place all visual elements, related to data item\r\n * in.\r\n *\r\n * If there is no Container, a new one is created.\r\n *\r\n * @return Contents container\r\n */\r\n get: function () {\r\n if (!this._contents) {\r\n var contents = new Container();\r\n this.addSprite(contents);\r\n contents.isMeasured = false;\r\n this._contents = contents;\r\n var component = this.component;\r\n if (component) {\r\n var mask = component.renderer.createFill(this.component);\r\n mask.disabled = false;\r\n mask.axis = component;\r\n this.addSprite(mask);\r\n this._mask = mask;\r\n contents.mask = mask;\r\n }\r\n }\r\n return this._contents;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(AxisDataItem.prototype, \"axisBreak\", {\r\n /**\r\n * @return Axis break\r\n */\r\n get: function () {\r\n return this._axisBreak;\r\n },\r\n /**\r\n * An [[AxisBreak]] this data item falls within.\r\n *\r\n * @param axisBreak Axis break\r\n */\r\n set: function (axisBreak) {\r\n if (this._axisBreak) {\r\n this._axisBreak.dataItems.removeValue(this);\r\n }\r\n if (axisBreak) {\r\n axisBreak.dataItems.push(this);\r\n }\r\n this._axisBreak = axisBreak;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Re-draws the element.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n AxisDataItem.prototype.validate = function () {\r\n if (this.component) {\r\n this.component.validateDataElement(this);\r\n }\r\n };\r\n /**\r\n * Appends data item's elements to the parent [[Container]].\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n AxisDataItem.prototype.appendChildren = function () {\r\n if (this.component) {\r\n this.component.appendDataItem(this);\r\n }\r\n };\r\n /**\r\n * Checks if data item has particular property set.\r\n *\r\n * @param prop Property name\r\n * @return Property set?\r\n */\r\n AxisDataItem.prototype.hasProperty = function (prop) {\r\n return prop == \"component\" ? true : _super.prototype.hasProperty.call(this, prop);\r\n };\r\n /**\r\n * Copies all parameters from another [[AxisDataItem]].\r\n *\r\n * @param source Source AxisDataItem\r\n */\r\n AxisDataItem.prototype.copyFrom = function (source) {\r\n _super.prototype.copyFrom.call(this, source);\r\n this.text = source.text;\r\n if (source.bullet) {\r\n this.bullet = source.bullet.clone();\r\n }\r\n this.minPosition = source.minPosition;\r\n this.maxPosition = source.maxPosition;\r\n };\r\n /**\r\n * Sets visibility of the Data Item.\r\n *\r\n * @param value Data Item\r\n */\r\n AxisDataItem.prototype.setVisibility = function (value, noChangeValues) {\r\n _super.prototype.setVisibility.call(this, value, noChangeValues);\r\n if (this._contents) {\r\n this._contents.visible = value;\r\n }\r\n };\r\n Object.defineProperty(AxisDataItem.prototype, \"bullet\", {\r\n /**\r\n * @return Bullet\r\n */\r\n get: function () {\r\n return this._bullet;\r\n },\r\n /**\r\n * Set it to an instance of any [[Sprite]]. It will be displayed as an axis\r\n * bullet in the middle of the cell, or specific value.\r\n *\r\n * If you need position bullet relatively to the cell, use [[AxisBullet]]\r\n * instead. It has a `location` property which can be used to indicate\r\n * precise relative location within cell/range.\r\n *\r\n * Also, [[AxisBullet]] is a [[Container]] so you can push any other element\r\n * into it.\r\n *\r\n * NOTE: `location` is relative to the parent axis range's scope, i.e.\r\n * between its `date` and `endDate` for [[DateAxis]], or `value`/`endValue`\r\n * ([[ValueAxis]]), or `category`/`endCategory` ([[categoryAxis]]).\r\n *\r\n * ```TypeScript\r\n * let range = dateAxis.axisRanges.create();\r\n * range.date = new Date(2018, 0, 5);\r\n *\r\n * let flag = new am4plugins_bullets.FlagBullet();\r\n * flag.label.text = \"Hello\";\r\n *\r\n * range.bullet = flag;\r\n * ```\r\n * ```JavaScript\r\n * var range = dateAxis.axisRanges.create();\r\n * range.date = new Date(2018, 0, 5);\r\n *\r\n * var flag = new am4plugins_bullets.FlagBullet();\r\n * flag.label.text = \"Hello\";\r\n *\r\n * range.bullet = flag;\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"xAxes\": [{\r\n * \"type\": \"DateAxis\",\r\n * // ...\r\n * \"axisRanges\": [{\r\n * \"date\": new Date(2018, 0, 5),\r\n * \"bullet: {\r\n * \"type\": \"FlagBullet\",\r\n * \"label\": {\r\n * \"text\": \"Hello\"\r\n * }\r\n * }\r\n * }]\r\n * }]\r\n * }\r\n * ```\r\n *\r\n * @since 4.5.9\r\n * @param value Bullet\r\n */\r\n set: function (value) {\r\n if (this._bullet && this._bullet != value) {\r\n $array.remove(this.sprites, this._bullet);\r\n this._bullet.dataItem = undefined;\r\n }\r\n this._bullet = value;\r\n if (value) {\r\n this.addSprite(value);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return AxisDataItem;\r\n}(DataItem));\r\nexport { AxisDataItem };\r\n/**\r\n * ============================================================================\r\n * REQUISITES\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Defines named positions for data item's location within [[Axis]].\r\n */\r\nexport var AxisItemLocation;\r\n(function (AxisItemLocation) {\r\n AxisItemLocation[AxisItemLocation[\"Start\"] = 0] = \"Start\";\r\n AxisItemLocation[AxisItemLocation[\"Middle\"] = 0.5] = \"Middle\";\r\n AxisItemLocation[AxisItemLocation[\"End\"] = 1] = \"End\";\r\n})(AxisItemLocation || (AxisItemLocation = {}));\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * A base class for all Axis elements.\r\n *\r\n * @see {@link IAxisEvents} for a list of available Events\r\n * @see {@link IAxisAdapters} for a list of available Adapters\r\n */\r\nvar Axis = /** @class */ (function (_super) {\r\n __extends(Axis, _super);\r\n /**\r\n * Constructor\r\n */\r\n function Axis() {\r\n var _this = \r\n // Init\r\n _super.call(this) || this;\r\n /**\r\n * Number of Grid elements on the axis.\r\n */\r\n _this._gridCount = 10;\r\n /**\r\n * A list of [[XYSeries]] that are using this Axis.\r\n */\r\n _this._series = new List();\r\n /**\r\n * Specifies if axis should be automatically disposed when removing from\r\n * chart's axis list.\r\n *\r\n * @default true\r\n */\r\n _this.autoDispose = true;\r\n /**\r\n * @ignore\r\n */\r\n _this._axisItemCount = 0;\r\n if (_this.constructor === Axis) {\r\n throw new Error(\"'Axis' cannot be instantiated directly. Please use a specific axis type.\");\r\n }\r\n _this.hideTooltipWhileZooming = true;\r\n _this.minWidth = 0.0001;\r\n _this.minHeight = 0.0001;\r\n _this.className = \"Axis\";\r\n _this.shouldClone = false;\r\n _this.setPropertyValue(\"cursorTooltipEnabled\", true);\r\n _this.toggleZoomOutButton = true;\r\n _this.zoomable = true;\r\n var interfaceColors = new InterfaceColorSet();\r\n // Create title\r\n _this.title = new Label();\r\n _this.title.shouldClone = false;\r\n _this._disposers.push(_this.title);\r\n _this.setPropertyValue(\"startLocation\", 0);\r\n _this.setPropertyValue(\"endLocation\", 1);\r\n // Data item iterator\r\n _this._dataItemsIterator = new $iter.ListIterator(_this.dataItems, function () { return _this.dataItems.create(); });\r\n _this._dataItemsIterator.createNewItems = true;\r\n // Create tooltip\r\n var tooltip = new Tooltip();\r\n _this._disposers.push(tooltip);\r\n tooltip.label.padding(5, 10, 5, 10);\r\n tooltip.background.pointerLength = 5;\r\n tooltip.fitPointerToBounds = true;\r\n tooltip.background.filters.clear();\r\n // Set virtual parentfor the tooltip so that it can properly inheirt\r\n // formatters from the axis.\r\n tooltip.virtualParent = _this;\r\n // Create background element for the tooltip\r\n var background = tooltip.background;\r\n background.cornerRadius = 0;\r\n background.fill = interfaceColors.getFor(\"alternativeBackground\");\r\n background.stroke = background.fill;\r\n background.strokeWidth = 1;\r\n background.fillOpacity = 1;\r\n tooltip.label.fill = interfaceColors.getFor(\"alternativeText\");\r\n _this.tooltip = tooltip;\r\n // Accessibility\r\n _this.readerHidden = true;\r\n _this.events.on(\"rangechangestarted\", function () {\r\n _this.series.each(function (series) {\r\n if (series.hideTooltipWhileZooming) {\r\n series.tooltip.hide();\r\n series.tooltip.preventShow = true;\r\n }\r\n });\r\n if (_this.hideTooltipWhileZooming) {\r\n _this.tooltip.hide();\r\n _this.tooltip.preventShow = true;\r\n }\r\n }, undefined, false);\r\n _this.events.on(\"rangechangeended\", function () {\r\n _this.series.each(function (series) {\r\n if (series.hideTooltipWhileZooming) {\r\n series.tooltip.hide();\r\n series.tooltip.preventShow = false;\r\n }\r\n });\r\n if (_this.hideTooltipWhileZooming) {\r\n _this.tooltip.hide();\r\n _this.tooltip.preventShow = false;\r\n }\r\n }, undefined, false);\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * Holds reference to a function that accepts a DataItem and its index as\r\n * parameters.\r\n *\r\n * It can either return a fill opacity for a fill, or manipulate data item\r\n * directly, to create various highlighting scenarios.\r\n *\r\n * For example, you can set it up to highlight only weekends on a\r\n * [[DateAxis]].\r\n */\r\n Axis.prototype.fillRule = function (dataItem, index) {\r\n if (!$type.isNumber(index)) {\r\n index = dataItem.index;\r\n }\r\n if (index / 2 == Math.round(index / 2)) {\r\n dataItem.axisFill.__disabled = true;\r\n dataItem.axisFill.opacity = 0;\r\n }\r\n else {\r\n dataItem.axisFill.opacity = 1;\r\n dataItem.axisFill.__disabled = false;\r\n }\r\n };\r\n /**\r\n * Returns a new/empty DataItem of the type appropriate for this object.\r\n *\r\n * @see {@link DataItem}\r\n * @return Data Item\r\n */\r\n Axis.prototype.createDataItem = function () {\r\n return new AxisDataItem();\r\n };\r\n /**\r\n * Invalidates layout.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Axis.prototype.invalidateLayout = function () {\r\n _super.prototype.invalidateLayout.call(this);\r\n // this puts series after axis in invalidation order also makes series update it's data items in case widht/height of a series is not 100%\r\n $iter.each(this.series.iterator(), function (series) {\r\n series.invalidateLayout();\r\n });\r\n };\r\n /**\r\n * Invalidates series of this axis.\r\n */\r\n Axis.prototype.invalidateSeries = function () {\r\n // this puts series after axis in invalidation order also makes series update it's data items in case widht/height of a series is not 100%\r\n $iter.each(this.series.iterator(), function (series) {\r\n series.invalidate();\r\n });\r\n };\r\n /**\r\n * Override to cancel super call for data element validation.\r\n * @ignore\r\n */\r\n Axis.prototype.validateDataElements = function () {\r\n this._axisItemCount = 0;\r\n if (this.ghostLabel) {\r\n this.renderer.updateLabelElement(this.ghostLabel, this.start, this.end);\r\n this.ghostLabel.validate();\r\n }\r\n };\r\n /**\r\n * Recalculates the number of grid items on the axis.\r\n */\r\n Axis.prototype.updateGridCount = function () {\r\n if (this.renderer) {\r\n var gridCount = this.axisLength / this.renderer.minGridDistance;\r\n if (gridCount != this._gridCount) {\r\n this._gridCount = gridCount;\r\n this.clearCache();\r\n }\r\n }\r\n };\r\n /**\r\n * Redraws the element.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Axis.prototype.validateLayout = function () {\r\n this.axisFullLength = this.axisLength / (this.end - this.start);\r\n _super.prototype.validateLayout.call(this);\r\n this.updateGridCount();\r\n var renderer = this.renderer;\r\n if (renderer) {\r\n renderer.updateAxisLine();\r\n renderer.updateTooltip();\r\n renderer.updateBaseGridElement();\r\n }\r\n if (this._prevLength != this.axisLength) {\r\n this.dispatchImmediately(\"lengthchanged\");\r\n this._prevLength = this.axisLength;\r\n }\r\n };\r\n /**\r\n * Initializes Axis' renderer.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Axis.prototype.initRenderer = function () {\r\n };\r\n /**\r\n * Adds a data item to the Axis.\r\n *\r\n * @param dataItem Data item\r\n */\r\n Axis.prototype.appendDataItem = function (dataItem) {\r\n var renderer = this.renderer;\r\n var tick = dataItem.tick;\r\n if (tick) {\r\n if (tick.above) {\r\n tick.parent = renderer.bulletsContainer;\r\n }\r\n else {\r\n tick.parent = renderer.gridContainer;\r\n }\r\n }\r\n if (dataItem.label) {\r\n dataItem.label.parent = renderer;\r\n }\r\n var axisFill = dataItem.axisFill;\r\n if (axisFill) {\r\n if (axisFill.above) {\r\n axisFill.parent = renderer.bulletsContainer;\r\n }\r\n else {\r\n axisFill.parent = renderer.gridContainer;\r\n }\r\n }\r\n var grid = dataItem.grid;\r\n if (grid) {\r\n if (grid.above) {\r\n grid.parent = renderer.bulletsContainer;\r\n }\r\n else {\r\n grid.parent = renderer.gridContainer;\r\n }\r\n }\r\n if (dataItem.bullet) {\r\n dataItem.bullet.parent = renderer.bulletsContainer;\r\n }\r\n };\r\n /**\r\n * Redraws Axis' related items.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Axis.prototype.validate = function () {\r\n _super.prototype.validate.call(this);\r\n this.validateLayout();\r\n this.renderer.updateGridContainer();\r\n };\r\n /**\r\n * Redars Axis ranges.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Axis.prototype.validateAxisRanges = function () {\r\n var _this = this;\r\n $iter.each(this.axisRanges.iterator(), function (axisRange) {\r\n _this.appendDataItem(axisRange);\r\n _this.validateDataElement(axisRange);\r\n if (axisRange.grid) {\r\n axisRange.grid.validate();\r\n }\r\n if (axisRange.tick) {\r\n axisRange.tick.validate();\r\n }\r\n if (axisRange.axisFill) {\r\n axisRange.axisFill.validate();\r\n }\r\n if (axisRange.label) {\r\n axisRange.label.validate();\r\n }\r\n });\r\n };\r\n /**\r\n * Invalidates all axis breaks, so they are redrawn.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Axis.prototype.validateBreaks = function () {\r\n if (this._axisBreaks) {\r\n $iter.each(this._axisBreaks.iterator(), function (axisBreak) {\r\n axisBreak.invalidate();\r\n });\r\n }\r\n };\r\n /**\r\n * Associates an Axis break with this Axis, after it is inserted into\r\n * `axisBreaks`.\r\n *\r\n * @ignore Exclude from docs\r\n * @param event Event\r\n */\r\n Axis.prototype.processBreak = function (event) {\r\n var axisBreak = event.newValue;\r\n axisBreak.parent = this.renderer.breakContainer;\r\n axisBreak.axis = this;\r\n };\r\n /**\r\n * Registers a [[XYSeries]] element with this Axis.\r\n *\r\n * Returns a [[Disposer]] for all events, added to Series for watching\r\n * changes in Axis, and vice versa.\r\n * @ignore\r\n * @param series Series\r\n * @return Event disposer\r\n */\r\n Axis.prototype.registerSeries = function (series) {\r\n var _this = this;\r\n this.series.moveValue(series);\r\n return new MultiDisposer([\r\n new Disposer(function () {\r\n _this.series.removeValue(series);\r\n }),\r\n this.events.on(\"lengthchanged\", series.invalidate, series, false),\r\n this.events.on(\"lengthchanged\", series.createMask, series, false),\r\n this.events.on(\"startchanged\", series.invalidate, series, false),\r\n this.events.on(\"endchanged\", series.invalidate, series, false),\r\n ]);\r\n };\r\n Object.defineProperty(Axis.prototype, \"renderer\", {\r\n /**\r\n * @return Renderer\r\n */\r\n get: function () {\r\n return this._renderer;\r\n },\r\n /**\r\n * An [[AxisRenderer]] to be used to render this Axis.\r\n *\r\n * Please note that most of the settings, related to Axis' appearance are set\r\n * via its renderer. Not directly on the Axis.\r\n *\r\n * E.g.:\r\n *\r\n * ```TypeScript\r\n * axis.renderer.inside = true;\r\n * axis.renderer.minLabelPosition = 0.1;\r\n * axis.renderer.maxLabelPosition = 0.9;\r\n * ```\r\n * ```JavaScript\r\n * axis.renderer.inside = true;\r\n * axis.renderer.minLabelPosition = 0.1;\r\n * axis.renderer.maxLabelPosition = 0.9;\r\n * ```\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/axes/} for more info\r\n * @param renderer Renderer\r\n */\r\n set: function (renderer) {\r\n if (renderer != this._renderer) {\r\n this._renderer = renderer;\r\n renderer.chart = this.chart;\r\n renderer.axis = this;\r\n renderer.parent = this;\r\n this.title.parent = this; // we add title to axis and set layout in renderer to avoid one extra container, as otherwise axis container would be used for holding renderer only\r\n this.initRenderer();\r\n this._disposers.push(renderer.gridContainer.events.on(\"maxsizechanged\", this.invalidate, this, false));\r\n var ghostLabel_1 = this.renderer.labels.create();\r\n this._disposers.push(ghostLabel_1);\r\n ghostLabel_1.dataItem = this.dataItems.template.clone(); // just for the adapters not to fail\r\n ghostLabel_1.text = \"L\";\r\n ghostLabel_1.parent = this.renderer;\r\n ghostLabel_1.shouldClone = false;\r\n ghostLabel_1.fillOpacity = 0;\r\n ghostLabel_1.opacity = 0;\r\n ghostLabel_1.strokeOpacity = 0;\r\n ghostLabel_1.interactionsEnabled = false;\r\n ghostLabel_1.validate();\r\n this.ghostLabel = ghostLabel_1;\r\n this.events.on(\"beforedatavalidated\", function () {\r\n ghostLabel_1.text = \"L\";\r\n }, undefined, false);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Converts a relative position to angle. (for circular axes)\r\n *\r\n * @param position Position (0-1)\r\n * @return Angle\r\n */\r\n Axis.prototype.positionToAngle = function (position) {\r\n return this.renderer.positionToAngle(position);\r\n };\r\n /**\r\n * Converts pixel coordinates to a relative position. (0-1)\r\n *\r\n * @param point Coorinates (px)\r\n * @return Position (0-1)\r\n */\r\n Axis.prototype.pointToPosition = function (point) {\r\n return this.renderer.pointToPosition(point);\r\n };\r\n /**\r\n * Converts relative position to coordinate.\r\n *\r\n * @since 4.7.15\r\n * @param position (0-1)\r\n * @return coordinate (px)\r\n */\r\n Axis.prototype.positionToCoordinate = function (position) {\r\n return this.renderer.positionToCoordinate(position);\r\n };\r\n /**\r\n * [getAnyRangePath description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param start [description]\r\n * @param end [description]\r\n * @return [description]\r\n */\r\n Axis.prototype.getAnyRangePath = function (start, end) {\r\n return this.renderer.getPositionRangePath(start, end);\r\n };\r\n /**\r\n * Converts any positional parameter to a relative position on axis.\r\n *\r\n * @todo Description (review)\r\n * @param value Pisition\r\n * @return Position (0-1)\r\n */\r\n Axis.prototype.anyToPosition = function (value) {\r\n return 0;\r\n };\r\n /**\r\n * Converts any positional parameter to a relative position on axis.\r\n *\r\n * @todo Description (review)\r\n * @param value Pisition\r\n * @return Orientation point\r\n */\r\n Axis.prototype.anyToPoint = function (value) {\r\n return { x: 0, y: 0, angle: 0 };\r\n };\r\n /**\r\n * [getPositionRangePath description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param startPosition [description]\r\n * @param endPosition [description]\r\n * @return [description]\r\n */\r\n Axis.prototype.getPositionRangePath = function (startPosition, endPosition) {\r\n if (this.renderer) {\r\n return this.renderer.getPositionRangePath(startPosition, endPosition);\r\n }\r\n return \"\";\r\n };\r\n Object.defineProperty(Axis.prototype, \"axisLength\", {\r\n /**\r\n * Actual axis length in pixels.\r\n *\r\n * @return Axis length (px)\r\n */\r\n get: function () {\r\n if (this.renderer) {\r\n return this.renderer.axisLength;\r\n }\r\n return 0;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Axis.prototype, \"cursorTooltipEnabled\", {\r\n /**\r\n * @return Display tooltip?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"cursorTooltipEnabled\");\r\n },\r\n /**\r\n * Indicates if axis should display a tooltip for chart's cursor.\r\n *\r\n * @param value Display tooltip?\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"cursorTooltipEnabled\", value)) {\r\n if (value && this.renderer) {\r\n this.renderer.updateTooltip();\r\n }\r\n else if (this.tooltip) {\r\n this.tooltip.hide(0);\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Axis.prototype, \"toggleZoomOutButton\", {\r\n /**\r\n * @return Toggle zoom out button?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"toggleZoomOutButton\");\r\n },\r\n /**\r\n * Normally, when axis is zoomed in, a zoom out button is shown by a chart,\r\n * and vice versa: when axis is zoomed out completely, zoom out button is\r\n * hidden.\r\n *\r\n * Setting this to `false` will disable this behavior. Zooming in our out\r\n * this axis will not reveal or hide zoom out button.\r\n *\r\n * @default true\r\n * @since 4.6.2\r\n * @param value Toggle zoom out button?\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"toggleZoomOutButton\", value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Hides element's [[Tooltip]].\r\n *\r\n * @see {@link Tooltip}\r\n */\r\n Axis.prototype.hideTooltip = function (duration) {\r\n _super.prototype.hideTooltip.call(this, duration);\r\n this._tooltipPosition = undefined;\r\n };\r\n /**\r\n * Shows Axis tooltip at specific relative position within Axis. (0-1)\r\n *\r\n * @param position Position (0-1)\r\n * @param local or global position\r\n */\r\n Axis.prototype.showTooltipAtPosition = function (position, local) {\r\n var tooltip = this._tooltip;\r\n if (!tooltip || this.dataItems.length <= 0) {\r\n this._tooltipPosition = undefined;\r\n }\r\n else {\r\n if (!local) {\r\n position = this.toAxisPosition(position);\r\n }\r\n if (!$type.isNumber(position) || position < this.start || position > this.end) {\r\n tooltip.hide(0);\r\n this._tooltipPosition = undefined;\r\n return;\r\n }\r\n var renderer = this.renderer;\r\n //@todo: think of how to solve this better\r\n if (!tooltip.parent) {\r\n tooltip.parent = this.tooltipContainer;\r\n }\r\n var tooltipLocation = renderer.tooltipLocation;\r\n var startPosition = this.getCellStartPosition(position);\r\n var endPosition = this.getCellEndPosition(position);\r\n if (this.tooltipPosition == \"fixed\") {\r\n position = startPosition + (endPosition - startPosition) * tooltipLocation;\r\n }\r\n position = $math.fitToRange(position, this.start, this.end);\r\n if (this._tooltipPosition != position) {\r\n this._tooltipPosition = position;\r\n var tooltipLocation2 = renderer.tooltipLocation2;\r\n var startPoint = renderer.positionToPoint(startPosition, tooltipLocation2);\r\n var endPoint = renderer.positionToPoint(endPosition, tooltipLocation2);\r\n // save values so cursor could use them\r\n this.currentItemStartPoint = startPoint;\r\n this.currentItemEndPoint = endPoint;\r\n if (renderer.fullWidthTooltip) {\r\n tooltip.width = endPoint.x - startPoint.x;\r\n tooltip.height = endPoint.y - startPoint.y;\r\n }\r\n var point = renderer.positionToPoint(position, tooltipLocation2);\r\n var globalPoint = $utils.spritePointToSvg(point, this.renderer.line);\r\n tooltip.text = this.getTooltipText(position);\r\n if (tooltip.text) {\r\n tooltip.delayedPointTo(globalPoint);\r\n tooltip.show();\r\n }\r\n }\r\n if (!this.cursorTooltipEnabled || this.tooltip.disabled) {\r\n tooltip.hide(0);\r\n }\r\n }\r\n };\r\n /**\r\n * Converts relative position (0-1) to Axis position with zoom level and\r\n * inversed taken into account.\r\n *\r\n * @param position Global position (0-1)\r\n * @return Position within Axis (0-1)\r\n */\r\n Axis.prototype.toAxisPosition = function (position) {\r\n position = this.renderer.toAxisPosition(position);\r\n if (position == undefined) {\r\n return;\r\n }\r\n position = position * (this.end - this.start);\r\n if (this.renderer.inversed) {\r\n position = this.end - position;\r\n }\r\n else {\r\n position = this.start + position;\r\n }\r\n return position;\r\n };\r\n /**\r\n * Converts position on the axis with zoom level and\r\n * inversed taken into account to global position.\r\n *\r\n * @param position Axis position (0-1)\r\n * @return Global position (0-1)\r\n */\r\n Axis.prototype.toGlobalPosition = function (position) {\r\n if (this.renderer.inversed) {\r\n position = this.end - position;\r\n }\r\n else {\r\n position = position - this.start;\r\n }\r\n return position / (this.end - this.start);\r\n };\r\n /**\r\n * Returns text to be used for cursor's Axis tooltip.\r\n *\r\n * This is a placeholder to override for extending classes.\r\n *\r\n * @ignore Exclude from docs\r\n * @param position Position coordinate (px)\r\n * @return Label text\r\n */\r\n Axis.prototype.getTooltipText = function (position) {\r\n return;\r\n };\r\n /**\r\n * Updates Axis' tooltip's position and possibly size, and pointer (stem)\r\n * place.\r\n *\r\n * @ignore Exclude from docs\r\n * @param pointerOrientation Pointer (stem) orientation\r\n * @param boundingRectangle A rectangle for tooltip to fit within\r\n */\r\n Axis.prototype.updateTooltip = function (pointerOrientation, boundingRectangle) {\r\n var tooltip = this._tooltip;\r\n if (tooltip) {\r\n tooltip.fixDoc = false;\r\n tooltip.pointerOrientation = pointerOrientation;\r\n tooltip.setBounds($utils.spriteRectToSvg(boundingRectangle, this.renderer.line));\r\n }\r\n };\r\n /**\r\n * [roundPosition description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param position Relative position\r\n * @param location Location on axis\r\n * @return Rounded position\r\n */\r\n Axis.prototype.roundPosition = function (position, location, axisLocation) {\r\n return position;\r\n };\r\n /**\r\n * [getCellStartPosition description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param position [description]\r\n * @return [description]\r\n */\r\n Axis.prototype.getCellStartPosition = function (position) {\r\n return position;\r\n };\r\n /**\r\n * [getCellEndPosition description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param position [description]\r\n * @return [description]\r\n */\r\n Axis.prototype.getCellEndPosition = function (position) {\r\n return position;\r\n };\r\n Object.defineProperty(Axis.prototype, \"axisRanges\", {\r\n /**\r\n * A list of axis ranges for this Axis.\r\n *\r\n * @return Axis ranges\r\n */\r\n get: function () {\r\n if (!this._axisRanges) {\r\n var dataItem = this.createDataItem();\r\n dataItem.isRange = true;\r\n dataItem.axisFill = this.renderer.axisFills.template.clone();\r\n dataItem.grid = this.renderer.grid.template.clone();\r\n dataItem.tick = this.renderer.ticks.template.clone();\r\n dataItem.label = this.renderer.labels.template.clone();\r\n dataItem.isTemplate = true;\r\n dataItem.component = this;\r\n dataItem.axisFill.disabled = false;\r\n dataItem.tick.disabled = false;\r\n dataItem.grid.disabled = false;\r\n dataItem.label.disabled = false;\r\n this._axisRanges = new ListTemplate(dataItem);\r\n this._axisRanges.events.on(\"inserted\", this.processAxisRange, this, false);\r\n this._disposers.push(new ListDisposer(this._axisRanges));\r\n this._disposers.push(this._axisRanges.template);\r\n }\r\n return this._axisRanges;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Decorates an axis range after it has been added to the axis range list.\r\n *\r\n * @param event Event\r\n */\r\n Axis.prototype.processAxisRange = function (event) {\r\n var axisRange = event.newValue;\r\n axisRange.component = this;\r\n axisRange.isRange = true;\r\n };\r\n Object.defineProperty(Axis.prototype, \"axisBreaks\", {\r\n /**\r\n * A list of axis breaks on this Axis.\r\n *\r\n * @return Axis breaks.\r\n */\r\n get: function () {\r\n if (!this._axisBreaks) {\r\n this._axisBreaks = new SortedListTemplate(this.createAxisBreak(), function (a, b) {\r\n return $number.order(a.adjustedStartValue, b.adjustedStartValue);\r\n });\r\n this._axisBreaks.events.on(\"inserted\", this.processBreak, this, false);\r\n this._disposers.push(new ListDisposer(this._axisBreaks));\r\n this._disposers.push(this._axisBreaks.template);\r\n }\r\n return this._axisBreaks;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Creates a new axis break.\r\n *\r\n * @return Axis break\r\n */\r\n Axis.prototype.createAxisBreak = function () {\r\n return new AxisBreak();\r\n };\r\n Object.defineProperty(Axis.prototype, \"series\", {\r\n /**\r\n * A list of Series currently associated with this Axis.\r\n *\r\n * @return Series\r\n */\r\n get: function () {\r\n if (!this._series) {\r\n this._series = new List();\r\n }\r\n return this._series;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Processes Series' data items.\r\n *\r\n * This is a placeholder to override for extending classes.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Axis.prototype.processSeriesDataItems = function () {\r\n };\r\n /**\r\n * Processes Series' single data item.\r\n *\r\n * This is a placeholder to override for extending classes.\r\n *\r\n * @ignore Exclude from docs\r\n * @param dataItem Data item\r\n */\r\n Axis.prototype.processSeriesDataItem = function (dataItem, axisLetter) {\r\n };\r\n /**\r\n * Post-processes Serie's data items.\r\n *\r\n * This is a placeholder to override for extending classes.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Axis.prototype.postProcessSeriesDataItems = function (series) {\r\n };\r\n /**\r\n * Post-processes Serie's single data item.\r\n *\r\n * This is a placeholder to override for extending classes.\r\n *\r\n * @ignore Exclude from docs\r\n * @param dataItem Data item\r\n */\r\n Axis.prototype.postProcessSeriesDataItem = function (dataItem) {\r\n };\r\n //\r\n /**\r\n * Updates Axis based on all Series that might influence it.\r\n *\r\n * Called by Series after Series data is validated.\r\n *\r\n * This is a placeholder to override for extending classes.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Axis.prototype.updateAxisBySeries = function () {\r\n };\r\n /**\r\n * Hides unused data items.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Axis.prototype.hideUnusedDataItems = function () {\r\n var _this = this;\r\n // hide all unused\r\n var dataItemsIterator = this._dataItemsIterator;\r\n dataItemsIterator.createNewItems = false;\r\n $iter.each(dataItemsIterator.iterator(), function (dataItem) {\r\n _this.validateDataElement(dataItem); // solves shrinking\r\n dataItem.__disabled = true;\r\n });\r\n dataItemsIterator.clear();\r\n dataItemsIterator.createNewItems = true;\r\n };\r\n /**\r\n * Returns a Series' data item that corresponds to specific position on Axis.\r\n *\r\n * This is a placeholder to override for extending classes.\r\n *\r\n * @ignore Exclude from docs\r\n * @param series Series\r\n * @param position Position (0-1)\r\n * @param findNearest Should axis try to find nearest tooltip if there is no data item at exact position\r\n * @return Data item\r\n */\r\n Axis.prototype.getSeriesDataItem = function (series, position, findNearest) {\r\n return;\r\n };\r\n /**\r\n * Returns an angle that corresponds to specific position on axis.\r\n *\r\n * This is a placeholder to override for extending classes.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description (review)\r\n * @param dataItem Data item\r\n * @param key ???\r\n * @param location Location\r\n * @param stackKey ???\r\n * @return Angle\r\n */\r\n Axis.prototype.getAngle = function (dataItem, key, location, stackKey, range) {\r\n return;\r\n };\r\n /**\r\n * [getX description]\r\n *\r\n * This is a placeholder to override for extending classes.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description (review)\r\n * @param dataItem [description]\r\n * @param key [description]\r\n * @param location [description]\r\n * @param stackKey [description]\r\n * @return [description]\r\n */\r\n Axis.prototype.getX = function (dataItem, key, location, stackKey, range) {\r\n return;\r\n };\r\n /**\r\n * [getX description]\r\n *\r\n * This is a placeholder to override for extending classes.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description (review)\r\n * @param dataItem [description]\r\n * @param key [description]\r\n * @param location [description]\r\n * @param stackKey [description]\r\n * @return [description]\r\n */\r\n Axis.prototype.getPositionX = function (dataItem, key, location, stackKey, range) {\r\n return;\r\n };\r\n /**\r\n * [getY description]\r\n *\r\n * This is a placeholder to override for extending classes.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description (review)\r\n * @param dataItem [description]\r\n * @param key [description]\r\n * @param location [description]\r\n * @param stackKey [description]\r\n * @return [description]\r\n */\r\n Axis.prototype.getY = function (dataItem, key, location, stackKey, range) {\r\n return;\r\n };\r\n /**\r\n * [getY description]\r\n *\r\n * This is a placeholder to override for extending classes.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description (review)\r\n * @param dataItem [description]\r\n * @param key [description]\r\n * @param location [description]\r\n * @param stackKey [description]\r\n * @return [description]\r\n */\r\n Axis.prototype.getPositionY = function (dataItem, key, location, stackKey, range) {\r\n return;\r\n };\r\n Object.defineProperty(Axis.prototype, \"basePoint\", {\r\n /**\r\n * Coordinates of the actual axis start.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Base point coordinates\r\n */\r\n get: function () {\r\n return { x: 0, y: 0 };\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * [dataChangeUpdate description]\r\n *\r\n * This is a placeholder to override for extending classes.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\r\n Axis.prototype.dataChangeUpdate = function () {\r\n };\r\n /**\r\n * [dataChangeUpdate description]\r\n *\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\r\n Axis.prototype.seriesDataChangeUpdate = function (series) {\r\n };\r\n /**\r\n * Removes axis breaks that fall between `min` and `max` (???)\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description (review)\r\n * @param min Start value\r\n * @param max End value\r\n * @return Spread o\r\n */\r\n Axis.prototype.adjustDifference = function (min, max) {\r\n var difference = max - min;\r\n if ($type.isNumber(difference)) {\r\n if (this._axisBreaks) {\r\n $iter.eachContinue(this._axisBreaks.iterator(), function (axisBreak) {\r\n var startValue = axisBreak.adjustedStartValue;\r\n var endValue = axisBreak.adjustedEndValue;\r\n if ($type.isNumber(startValue) && $type.isNumber(endValue)) {\r\n // breaks are sorted, we don't need go further anymore\r\n if (startValue > max) {\r\n return false;\r\n }\r\n if (endValue >= min) {\r\n if ($type.isNumber(startValue) && $type.isNumber(endValue)) {\r\n var breakSize = axisBreak.breakSize;\r\n var intersection = $math.intersection({ start: startValue, end: endValue }, { start: min, end: max });\r\n if (intersection) {\r\n difference -= (intersection.end - intersection.start) * (1 - breakSize);\r\n }\r\n }\r\n }\r\n return true;\r\n }\r\n });\r\n }\r\n return difference;\r\n }\r\n };\r\n /**\r\n * Checks if specific value falls within a break.\r\n *\r\n * Returns [[AxisBreak]] the value falls into.\r\n *\r\n * @param value Value to check\r\n * @return Axis break\r\n */\r\n Axis.prototype.isInBreak = function (value) {\r\n if (this._axisBreaks) {\r\n return $iter.find(this._axisBreaks.iterator(), function (axisBreak) {\r\n return value >= axisBreak.adjustedStartValue &&\r\n value <= axisBreak.adjustedEndValue;\r\n });\r\n }\r\n };\r\n /**\r\n * [fixAxisBreaks description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\r\n Axis.prototype.fixAxisBreaks = function () {\r\n var _this = this;\r\n if (this._axisBreaks) {\r\n var axisBreaks = this._axisBreaks;\r\n if (axisBreaks.length > 0) {\r\n // first make sure that startValue is <= end value\r\n // This needs to make a copy of axisBreaks because it mutates the list while traversing\r\n // TODO very inefficient\r\n $array.each($iter.toArray(axisBreaks.iterator()), function (axisBreak) {\r\n var startValue = $math.min(axisBreak.startValue, axisBreak.endValue);\r\n var endValue = $math.max(axisBreak.startValue, axisBreak.endValue);\r\n axisBreak.adjustedStartValue = startValue;\r\n axisBreak.adjustedEndValue = endValue;\r\n _this._axisBreaks.update(axisBreak);\r\n });\r\n var firstAxisBreak = axisBreaks.first;\r\n var previousEndValue_1 = Math.min(firstAxisBreak.startValue, firstAxisBreak.endValue);\r\n // process breaks\r\n // TODO does this need to call axisBreaks.update ?\r\n $iter.each(axisBreaks.iterator(), function (axisBreak) {\r\n var startValue = axisBreak.adjustedStartValue;\r\n var endValue = axisBreak.adjustedEndValue;\r\n // breaks can't overlap\r\n // if break starts before previous break ends\r\n if (startValue < previousEndValue_1) {\r\n startValue = previousEndValue_1;\r\n if (endValue < previousEndValue_1) {\r\n endValue = previousEndValue_1;\r\n }\r\n }\r\n axisBreak.adjustedStartValue = startValue;\r\n axisBreak.adjustedEndValue = endValue;\r\n });\r\n }\r\n }\r\n };\r\n Object.defineProperty(Axis.prototype, \"startIndex\", {\r\n /**\r\n * @ignore Exclude from docs\r\n * @return [description]\r\n */\r\n get: function () {\r\n return 0;\r\n },\r\n /**\r\n * We need start/end indexes of axes to be 0 - `dataItems.length`.\r\n *\r\n * Yes, also for category axis, this helps to avoid jumping of categories\r\n * while scrolling and does not do a lot of extra work as we use\r\n * protected `_startIndex` and `_endIndex` when working with items.\r\n *\r\n * @hidden\r\n */\r\n /**\r\n * [startIndex description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param value [description]\r\n */\r\n set: function (value) {\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Axis.prototype, \"endIndex\", {\r\n /**\r\n * @ignore Exclude from docs\r\n * @return [description]\r\n */\r\n get: function () {\r\n return this.dataItems.length;\r\n },\r\n /**\r\n * [endIndex description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param value [description]\r\n */\r\n set: function (value) {\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Returns a formatted label based on position.\r\n *\r\n * Individual axis types should override this method to generate a label\r\n * that is relevant to axis type.\r\n *\r\n * Please note that `position` represents position within axis which may be\r\n * zoomed and not correspond to Cursor's `position`.\r\n *\r\n * To convert Cursor's `position` to Axis' `position` use `toAxisPosition()` method.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/tutorials/tracking-cursors-position-via-api/#Tracking_Cursor_s_position} For more information about cursor tracking.\r\n * @param position Relative position on axis (0-1)\r\n * @return Position label\r\n */\r\n Axis.prototype.getPositionLabel = function (position) {\r\n return Math.round(position * 100) + \"%x\";\r\n };\r\n Object.defineProperty(Axis.prototype, \"chart\", {\r\n /**\r\n * @return Chart\r\n */\r\n get: function () {\r\n return this._chart;\r\n },\r\n /**\r\n * A Chart this Axis belongs to.\r\n *\r\n * @param value Chart\r\n */\r\n set: function (value) {\r\n this._chart = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Creates a data item for a Series range.\r\n *\r\n * @param series Target Series\r\n * @return Range data item\r\n */\r\n Axis.prototype.createSeriesRange = function (series) {\r\n var range = this.axisRanges.create();\r\n range.component = this;\r\n range.axisFill = this.renderer.axisFills.template.clone();\r\n range.axisFill.disabled = false;\r\n range.axisFill.fillOpacity = 0;\r\n range.grid = this.renderer.grid.template.clone();\r\n range.grid.disabled = true;\r\n range.tick = this.renderer.ticks.template.clone();\r\n range.tick.disabled = true;\r\n range.label = this.renderer.labels.template.clone();\r\n range.label.disabled = true;\r\n range.addDisposer(new Disposer(function () {\r\n series.axisRanges.removeValue(range);\r\n }));\r\n series.axisRanges.push(range);\r\n return range;\r\n };\r\n /**\r\n * Copies all properties and related data from a different instance of Axis.\r\n *\r\n * @param source Source Axis\r\n */\r\n Axis.prototype.copyFrom = function (source) {\r\n _super.prototype.copyFrom.call(this, source);\r\n if (this.renderer) {\r\n this.renderer.copyFrom(source.renderer);\r\n }\r\n else {\r\n if (source.renderer) {\r\n this.renderer = source.renderer.clone();\r\n this._disposers.push(this.renderer);\r\n }\r\n }\r\n if (source.title) {\r\n if (!this.title) {\r\n this.title = source.title.clone();\r\n this.title.parent = this;\r\n }\r\n else {\r\n this.title.copyFrom(source.title);\r\n }\r\n this._disposers.push(this.title);\r\n }\r\n };\r\n /**\r\n * Resets internal iterator.\r\n */\r\n Axis.prototype.resetIterators = function () {\r\n this._dataItemsIterator.reset();\r\n };\r\n /**\r\n * Processes JSON-based config before it is applied to the object.\r\n *\r\n * @ignore Exclude from docs\r\n * @param config Config\r\n */\r\n Axis.prototype.processConfig = function (config) {\r\n if (config) {\r\n // Set up axis ranges\r\n if ($type.hasValue(config.axisRanges) && $type.isArray(config.axisRanges)) {\r\n for (var i = 0, len = config.axisRanges.length; i < len; i++) {\r\n var range = config.axisRanges[i];\r\n // If `series` is set, we know it's a series range\r\n if ($type.hasValue(range[\"series\"])) {\r\n if ($type.isString(range[\"series\"])) {\r\n if (this.map.hasKey(range[\"series\"])) {\r\n //range[\"series\"] = this.map.getKey(range[\"series\"]);\r\n config.axisRanges[i] = this.createSeriesRange(this.map.getKey(range[\"series\"]));\r\n delete (range[\"series\"]);\r\n config.axisRanges[i].config = range;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n _super.prototype.processConfig.call(this, config);\r\n };\r\n /**\r\n * Ordering function used in JSON setup.\r\n *\r\n * @param a Item A\r\n * @param b Item B\r\n * @return Order\r\n */\r\n Axis.prototype.configOrder = function (a, b) {\r\n if (a == b) {\r\n return 0;\r\n }\r\n // last\r\n else if (a == \"title\") {\r\n return 1;\r\n }\r\n else if (b == \"title\") {\r\n return -1;\r\n }\r\n // first\r\n else if (a == \"component\") {\r\n return -1;\r\n }\r\n else if (b == \"component\") {\r\n return 1;\r\n }\r\n else {\r\n return _super.prototype.configOrder.call(this, a, b);\r\n }\r\n };\r\n Object.defineProperty(Axis.prototype, \"startLocation\", {\r\n /**\r\n * @return Location (0-1)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"startLocation\");\r\n },\r\n /**\r\n * Axis start location. Works on Date/Category axis, doesn't work on Value axis.\r\n *\r\n * * 0 - Full first cell is shown.\r\n * * 0.5 - Half of first cell is shown.\r\n * * 1 - None of the first cell is visible. (you probably don't want that)\r\n *\r\n * @param value Location (0-1)\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"startLocation\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Axis.prototype, \"endLocation\", {\r\n /**\r\n * @return Location (0-1)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"endLocation\");\r\n },\r\n /**\r\n * Axis end location. Works on Date/Category axis, doesn't work on Value axis.\r\n *\r\n * * 0 - None of the last cell is shown. (don't do that)\r\n * * 0.5 - Half of the last cell is shown.\r\n * * 1 - Full last cell is shown.\r\n *\r\n * @param value Location (0-1)\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"endLocation\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Axis.prototype.setDisabled = function (value) {\r\n var changed = _super.prototype.setDisabled.call(this, value);\r\n if (this.renderer) {\r\n this.renderer.gridContainer.disabled = value;\r\n }\r\n return changed;\r\n };\r\n Object.defineProperty(Axis.prototype, \"title\", {\r\n /**\r\n * @return Title label\r\n */\r\n get: function () {\r\n return this._title;\r\n },\r\n /**\r\n * A reference to a [[Label]] element which serves as a title to the axis.\r\n *\r\n * When axis is created it aleready has an element, so you can just modify\r\n * it.\r\n *\r\n * Or you can replace it with your own instance of `Label`.\r\n *\r\n * @param value Title label\r\n */\r\n set: function (value) {\r\n if (this._title && this._title != value) {\r\n this._title.dispose();\r\n }\r\n if (value) {\r\n this._title = value;\r\n value.parent = this;\r\n value.shouldClone = false;\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Axis.prototype, \"hideTooltipWhileZooming\", {\r\n /**\r\n * @return Hide tooltip while zooming?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"hideTooltipWhileZooming\");\r\n },\r\n /**\r\n * Indicates if axis' tooltip should be hidden while axis range is animating\r\n * (zooming)\r\n *\r\n * @default true\r\n * @since 4.7.16\r\n * @param value Hide tooltip while zooming?\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"hideTooltipWhileZooming\", value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Axis.prototype, \"zoomable\", {\r\n /**\r\n * @return Zoomable?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"zoomable\");\r\n },\r\n /**\r\n * Should the axis be zoomed with scrollbar/cursor?\r\n *\r\n * @default true\r\n * @since 4.9.28\r\n * @param value Zoomable?\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"zoomable\", value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return Axis;\r\n}(Component));\r\nexport { Axis };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"Axis\"] = Axis;\r\nregistry.registeredClasses[\"AxisDataItem\"] = AxisDataItem;\r\n/**\r\n * Add default responsive rules\r\n */\r\n/**\r\n * Disable axis tooltips.\r\n */\r\ndefaultRules.push({\r\n relevant: ResponsiveBreakpoints.maybeXS,\r\n state: function (target, stateId) {\r\n if (target instanceof Axis && target.tooltip) {\r\n var state = target.states.create(stateId);\r\n state.properties.cursorTooltipEnabled = false;\r\n return state;\r\n }\r\n return null;\r\n }\r\n});\r\n","/**\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Sprite } from \"../../core/Sprite\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport { color } from \"../../core/utils/Color\";\r\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Used to draw Axis line.\r\n *\r\n * @see {@link IAxisLineEvents} for a list of available events\r\n * @see {@link IAxisLineAdapters} for a list of available Adapters\r\n */\r\nvar AxisLine = /** @class */ (function (_super) {\r\n __extends(AxisLine, _super);\r\n /**\r\n * Constructor\r\n */\r\n function AxisLine() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"AxisLine\";\r\n _this.element = _this.paper.add(\"path\");\r\n var interfaceColors = new InterfaceColorSet();\r\n _this.stroke = interfaceColors.getFor(\"grid\");\r\n _this.strokeOpacity = 0.15;\r\n _this.pixelPerfect = true;\r\n _this.fill = color();\r\n _this.applyTheme();\r\n _this.interactionsEnabled = false;\r\n return _this;\r\n //this.element.moveTo({ x: 0, y: 0 });\r\n }\r\n return AxisLine;\r\n}(Sprite));\r\nexport { AxisLine };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"AxisLine\"] = AxisLine;\r\n","import { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Sprite } from \"../../core/Sprite\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\r\nimport * as $type from \"../../core/utils/Type\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * AxisFill is a base class used to defines fill shapes for various\r\n * type-specific Axes.\r\n *\r\n * Axis fills are used to add fills to specific ranges of those axes.\r\n *\r\n * @see {@link IAxisFillEvents} for a list of available events\r\n * @see {@link IAxisFillAdapters} for a list of available Adapters\r\n * @important\r\n */\r\nvar AxisFill = /** @class */ (function (_super) {\r\n __extends(AxisFill, _super);\r\n /**\r\n * Constructor.\r\n *\r\n * @param axis Axis\r\n */\r\n function AxisFill(axis) {\r\n var _this = _super.call(this) || this;\r\n _this.axis = axis;\r\n _this.element = _this.paper.add(\"path\");\r\n _this.className = \"AxisFill\";\r\n _this.isMeasured = false;\r\n _this.location = 0;\r\n _this.above = false;\r\n var interfaceColors = new InterfaceColorSet();\r\n _this.fill = interfaceColors.getFor(\"alternativeBackground\");\r\n _this.fillOpacity = 0;\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * @ignore\r\n */\r\n AxisFill.prototype.setDisabled = function (value) {\r\n var changed = _super.prototype.setDisabled.call(this, value);\r\n if (this.axis) {\r\n this.axis.invalidateDataItems();\r\n }\r\n return changed;\r\n };\r\n /**\r\n * Draws the fill element.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n AxisFill.prototype.draw = function () {\r\n _super.prototype.draw.call(this);\r\n if (this.__disabled || this.disabled) {\r\n return;\r\n }\r\n if (this.axis && $type.isNumber(this.startPosition) && $type.isNumber(this.endPosition)) {\r\n this.fillPath = this.axis.getPositionRangePath(this.startPosition, this.endPosition);\r\n this.path = this.fillPath;\r\n if (this.isMeasured) {\r\n this.measure();\r\n }\r\n }\r\n };\r\n Object.defineProperty(AxisFill.prototype, \"startPosition\", {\r\n /**\r\n * @return Start position\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"startPosition\");\r\n },\r\n /**\r\n * An actual starting position of the fill.\r\n *\r\n * @param value Starting position\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"startPosition\", value);\r\n this.invalidate(); // this is needed as relative position might not change when zooming\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(AxisFill.prototype, \"endPosition\", {\r\n /**\r\n * @return End position\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"endPosition\");\r\n },\r\n /**\r\n * An actual end position of the fill.\r\n *\r\n * @param value End position\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"endPosition\", value);\r\n this.invalidate(); // this is needed as relative position might not change when zooming\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(AxisFill.prototype, \"location\", {\r\n /**\r\n * @return Location (0-1)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"location\");\r\n },\r\n /**\r\n * Relative location of the fill. (0-1)\r\n *\r\n * @param value Location (0-1)\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"location\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * @ignore\r\n */\r\n AxisFill.prototype.setPath = function (value) {\r\n if (this.setPropertyValue(\"path\", value)) {\r\n this.element.attr({ \"d\": value });\r\n return true;\r\n }\r\n return false;\r\n };\r\n Object.defineProperty(AxisFill.prototype, \"above\", {\r\n /**\r\n * @return Draw above series?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"above\");\r\n },\r\n /**\r\n * Normally fill goes below series. Set this to `true` to go above.\r\n *\r\n * @default false\r\n * @since 4.5.9\r\n * @param value Draw above series?\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"above\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return AxisFill;\r\n}(Sprite));\r\nexport { AxisFill };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"AxisFill\"] = AxisFill;\r\n","/**\r\n * A module defining functionality for axis grid elements.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Sprite } from \"../../core/Sprite\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport { color } from \"../../core/utils/Color\";\r\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\r\nimport { defaultRules, ResponsiveBreakpoints } from \"../../core/utils/Responsive\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Displays an axis grid line.\r\n *\r\n * @see {@link IGridEvents} for a list of available events\r\n * @see {@link IGridAdapters} for a list of available Adapters\r\n * @todo Review: container is better, as we'll be able to attach something to the grid, also with 3d charts we might need some additional elements\r\n * @important\r\n */\r\nvar Grid = /** @class */ (function (_super) {\r\n __extends(Grid, _super);\r\n /**\r\n * Constructor\r\n */\r\n function Grid() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"Grid\";\r\n _this.element = _this.paper.add(\"path\");\r\n _this.location = 0.5;\r\n _this.isMeasured = false;\r\n _this.above = false;\r\n var interfaceColors = new InterfaceColorSet();\r\n _this.stroke = interfaceColors.getFor(\"grid\");\r\n _this.pixelPerfect = true;\r\n _this.strokeOpacity = 0.15;\r\n _this.fill = color(); // \"none\";\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n Object.defineProperty(Grid.prototype, \"location\", {\r\n /**\r\n * @return Location (0-1)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"location\");\r\n },\r\n /**\r\n * Location within axis cell to place grid line on.\r\n *\r\n * * 0 - start\r\n * * 0.5 - middle\r\n * * 1 - end\r\n *\r\n * @param value Location (0-1)\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"location\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Grid.prototype, \"above\", {\r\n /**\r\n * @return Draw above series?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"above\");\r\n },\r\n /**\r\n * Normally fill goes below series. Set this to `true` to go above.\r\n *\r\n * @default false\r\n * @since 4.5.9\r\n * @param value Draw above series?\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"above\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * @ignore\r\n */\r\n Grid.prototype.setDisabled = function (value) {\r\n var changed = _super.prototype.setDisabled.call(this, value);\r\n if (this.axis) {\r\n this.axis.invalidateDataItems();\r\n }\r\n return changed;\r\n };\r\n return Grid;\r\n}(Sprite));\r\nexport { Grid };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"Grid\"] = Grid;\r\n/**\r\n * Add default responsive rules\r\n */\r\n/**\r\n * Disable grid on smaller charts\r\n */\r\ndefaultRules.push({\r\n relevant: ResponsiveBreakpoints.maybeXS,\r\n state: function (target, stateId) {\r\n if (target instanceof Grid) {\r\n var state = target.states.create(stateId);\r\n state.properties.disabled = true;\r\n return state;\r\n }\r\n return null;\r\n }\r\n});\r\n","/**\r\n * Axis Label module\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Label } from \"../../core/elements/Label\";\r\nimport { registry } from \"../../core/Registry\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Use to create labels on Axis.\r\n *\r\n * @see {@link IAxisLabelEvents} for a list of available events\r\n * @see {@link IAxisLabelAdapters} for a list of available Adapters\r\n * @important\r\n */\r\nvar AxisLabel = /** @class */ (function (_super) {\r\n __extends(AxisLabel, _super);\r\n /**\r\n * Constructor\r\n */\r\n function AxisLabel() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"AxisLabel\";\r\n _this.isMeasured = false;\r\n _this.padding(10, 10, 10, 10);\r\n _this.location = 0.5;\r\n //this.nonScaling = true; // not good for perf\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n Object.defineProperty(AxisLabel.prototype, \"location\", {\r\n /**\r\n * @return Location (0-1)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"location\");\r\n },\r\n /**\r\n * Relative location of the label. (0-1)\r\n *\r\n * @param value Location (0-1)\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"location\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(AxisLabel.prototype, \"inside\", {\r\n /**\r\n * Returns if label is set to be drawn inside axis.\r\n *\r\n * @return Inside?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"inside\");\r\n },\r\n /**\r\n * Sets if label should be drawn inside axis.\r\n *\r\n * @param value Inside?\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"inside\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * @ignore\r\n */\r\n AxisLabel.prototype.setDisabled = function (value) {\r\n var changed = _super.prototype.setDisabled.call(this, value);\r\n if (this.axis) {\r\n this.axis.invalidateDataItems();\r\n }\r\n return changed;\r\n };\r\n return AxisLabel;\r\n}(Label));\r\nexport { AxisLabel };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"AxisLabel\"] = AxisLabel;\r\n","/**\r\n * Tick module\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Sprite } from \"../../core/Sprite\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * A basic Tick class.\r\n *\r\n * A tick is a short dash, mainly connecting an object like axis or slice to\r\n * it's textual label.\r\n *\r\n * @see {@link ITickEvents} for a list of available events\r\n * @see {@link ITickAdapters} for a list of available Adapters\r\n * @important\r\n */\r\nvar Tick = /** @class */ (function (_super) {\r\n __extends(Tick, _super);\r\n /**\r\n * Constructor\r\n */\r\n function Tick() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"Tick\";\r\n var interfaceColors = new InterfaceColorSet();\r\n _this.fillOpacity = 0;\r\n _this.length = 6;\r\n _this.strokeOpacity = 0.2;\r\n _this.stroke = interfaceColors.getFor(\"grid\");\r\n _this.isMeasured = false;\r\n _this.nonScalingStroke = true;\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n Object.defineProperty(Tick.prototype, \"length\", {\r\n /**\r\n * @return Length (px)\r\n */\r\n get: function () {\r\n if (this.disabled) {\r\n return 0;\r\n }\r\n return this.getPropertyValue(\"length\");\r\n },\r\n /**\r\n * Length of the tick in pixels.\r\n *\r\n * @param value Length (px)\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"length\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return Tick;\r\n}(Sprite));\r\nexport { Tick };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"Tick\"] = Tick;\r\n","/**\r\n * Axis Tick module\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Tick } from \"../elements/Tick\";\r\nimport { registry } from \"../../core/Registry\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Draws an axis tick\r\n * @see {@link IAxisTickEvents} for a list of available events\r\n * @see {@link IAxisTickAdapters} for a list of available Adapters\r\n */\r\nvar AxisTick = /** @class */ (function (_super) {\r\n __extends(AxisTick, _super);\r\n function AxisTick() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"AxisTick\";\r\n _this.element = _this.paper.add(\"path\");\r\n _this.location = 0.5;\r\n _this.above = false;\r\n _this.isMeasured = false;\r\n _this.pixelPerfect = true;\r\n _this.strokeOpacity = 0;\r\n _this.length = 5;\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n Object.defineProperty(AxisTick.prototype, \"location\", {\r\n /**\r\n * @return Location (0-1)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"location\");\r\n },\r\n /**\r\n * Relative location of the tick. (0-1)\r\n *\r\n * @param value Location (0-1)\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"location\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(AxisTick.prototype, \"inside\", {\r\n /**\r\n * Returns if label is set to be drawn inside axis.\r\n *\r\n * @return Inside?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"inside\");\r\n },\r\n /**\r\n * Sets if tick should be drawn inside axis.\r\n *\r\n * @param value Inside?\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"inside\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(AxisTick.prototype, \"above\", {\r\n /**\r\n * @return Draw above series?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"above\");\r\n },\r\n /**\r\n * Normally tick goes below series. Set this to `true` to go above.\r\n *\r\n * @default false\r\n * @since 4.5.9\r\n * @param value Draw above series?\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"above\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * @ignore\r\n */\r\n AxisTick.prototype.setDisabled = function (value) {\r\n var changed = _super.prototype.setDisabled.call(this, value);\r\n if (this.axis) {\r\n this.axis.invalidateDataItems();\r\n }\r\n return changed;\r\n };\r\n return AxisTick;\r\n}(Tick));\r\nexport { AxisTick };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"AxisTick\"] = AxisTick;\r\n","/**\r\n * Module, defining base Axis Renderer.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Container } from \"../../core/Container\";\r\nimport { MutableValueDisposer } from \"../../core/utils/Disposer\";\r\nimport { AxisDataItem } from \"./Axis\";\r\nimport { AxisLine } from \"./AxisLine\";\r\nimport { AxisFill } from \"./AxisFill\";\r\nimport { Grid } from \"./Grid\";\r\nimport { AxisLabel } from \"./AxisLabel\";\r\nimport { AxisTick } from \"./AxisTick\";\r\nimport { ListTemplate, ListDisposer } from \"../../core/utils/List\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport { percent } from \"../../core/utils/Percent\";\r\nimport * as $math from \"../../core/utils/Math\";\r\nimport * as $type from \"../../core/utils/Type\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * A base class for all axis renderers.\r\n *\r\n * @see {@link IAxisRendererEvents} for a list of available events\r\n * @see {@link IAxisRendererAdapters} for a list of available Adapters\r\n */\r\nvar AxisRenderer = /** @class */ (function (_super) {\r\n __extends(AxisRenderer, _super);\r\n /**\r\n * Constructor.\r\n *\r\n * @param axis Related axis\r\n */\r\n function AxisRenderer() {\r\n var _this = \r\n // Init\r\n _super.call(this) || this;\r\n /**\r\n * A related chart.\r\n */\r\n _this._chart = new MutableValueDisposer();\r\n _this.className = \"AxisRenderer\";\r\n // Set defaults\r\n _this.minGridDistance = 50;\r\n _this.inside = false;\r\n _this.inversed = false;\r\n _this.tooltipLocation = 0.5;\r\n _this.fullWidthTooltip = false;\r\n _this.cellStartLocation = 0;\r\n _this.cellEndLocation = 1;\r\n _this.minLabelPosition = 0;\r\n _this.maxLabelPosition = 1;\r\n _this.shouldClone = false;\r\n var gridContainer = _this.createChild(Container);\r\n gridContainer.shouldClone = false;\r\n gridContainer.layout = \"none\";\r\n //\tgridContainer.isMeasured = false;\r\n gridContainer.virtualParent = _this;\r\n gridContainer.width = percent(100);\r\n gridContainer.height = percent(100);\r\n _this.gridContainer = gridContainer;\r\n // not good without this\r\n gridContainer.events.on(\"maxsizechanged\", function () {\r\n if (_this.inited) {\r\n _this.invalidateAxisItems();\r\n }\r\n }, _this, false);\r\n var breakContainer = _this.createChild(Container);\r\n breakContainer.shouldClone = false;\r\n breakContainer.isMeasured = false;\r\n breakContainer.layout = \"none\";\r\n breakContainer.width = percent(100);\r\n breakContainer.height = percent(100);\r\n _this.breakContainer = breakContainer;\r\n var bulletsContainer = _this.createChild(Container);\r\n bulletsContainer.shouldClone = false;\r\n bulletsContainer.isMeasured = false;\r\n bulletsContainer.layout = \"none\";\r\n bulletsContainer.width = percent(100);\r\n bulletsContainer.height = percent(100);\r\n _this.bulletsContainer = bulletsContainer;\r\n _this.line = _this.createChild(AxisLine);\r\n _this.line.shouldClone = false;\r\n _this.line.strokeOpacity = 0;\r\n var baseGrid = _this.createChild(Grid);\r\n baseGrid.shouldClone = false;\r\n _this.baseGrid = baseGrid;\r\n // Make elements disposable\r\n var disposers = _this._disposers;\r\n disposers.push(baseGrid);\r\n disposers.push(_this.line);\r\n disposers.push(gridContainer);\r\n disposers.push(breakContainer);\r\n disposers.push(bulletsContainer);\r\n disposers.push(_this._chart);\r\n _this.ticks.template.disabled = true;\r\n _this.axisFills.template.disabled = true;\r\n _this.axisFills.template.interactionsEnabled = false;\r\n // Apply theme\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n Object.defineProperty(AxisRenderer.prototype, \"axis\", {\r\n /**\r\n * Axis of a renderer\r\n * @return axis Axis\r\n */\r\n get: function () {\r\n return this._axis;\r\n },\r\n /**\r\n * Axis of a renderer\r\n * @param axis Axis\r\n */\r\n set: function (axis) {\r\n this.setAxis(axis);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * @ignore\r\n */\r\n AxisRenderer.prototype.setAxis = function (axis) {\r\n this._axis = axis;\r\n this.baseGrid.parent = axis;\r\n this.line.parent = axis;\r\n this.gridContainer.bind(\"opacity\", axis);\r\n };\r\n /**\r\n * Called when rendered is attached to an Axis, as well as a property of\r\n * Axis that might affect the appearance is updated.\r\n *\r\n * E.g. `axis.opposite`, `axis.inside`, etc.\r\n *\r\n * This method is called **before** draw, so that any related setting\r\n * changed in this method can be changed.\r\n *\r\n * @todo Description (review)\r\n * @ignore Exclude from docs\r\n */\r\n AxisRenderer.prototype.processRenderer = function () {\r\n this.events.on(\"sizechanged\", this.updateTooltip, this, false);\r\n this.events.on(\"positionchanged\", this.updateTooltip, this, false);\r\n this.labels.template.inside = this.inside;\r\n this.ticks.template.inside = this.inside;\r\n };\r\n /**\r\n * Updates Axis' tooltip.\r\n *\r\n * @todo Description (review)\r\n * @ignore Exclude from docs\r\n */\r\n AxisRenderer.prototype.updateTooltip = function () {\r\n // This is a placeholder method for extending classes to override.\r\n };\r\n Object.defineProperty(AxisRenderer.prototype, \"axisLength\", {\r\n /**\r\n * Returns actual length of the Axis, in pixels.\r\n *\r\n * @return Length (px)\r\n */\r\n get: function () {\r\n // This is a placeholder method for extending classes to override.\r\n return 0;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Re-positions an element to new coordinates.\r\n *\r\n * @ignore Exclude from docs\r\n * @param item A target element\r\n * @param point New coordinates\r\n */\r\n AxisRenderer.prototype.positionItem = function (item, point) {\r\n if (item) {\r\n item.moveTo(point);\r\n }\r\n };\r\n /**\r\n * Converts relative position on axis to point coordinates.\r\n *\r\n * @param position Position (0-1)\r\n * @return Point\r\n */\r\n AxisRenderer.prototype.positionToPoint = function (position, position2) {\r\n // This is a placeholder method for extending classes to override.\r\n return { x: 0, y: 0 };\r\n };\r\n /**\r\n * Converts relative position on axis to angle.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description (review / units)\r\n * @param position Position (0-1)\r\n * @return Angle\r\n */\r\n AxisRenderer.prototype.positionToAngle = function (position) {\r\n // This is a placeholder method for extending classes to override.\r\n return 0;\r\n };\r\n /**\r\n * Converts relative position (0-1) on axis to a pixel coordinate.\r\n *\r\n * @param position Position (0-1)\r\n * @return Coordinate (px)\r\n */\r\n AxisRenderer.prototype.positionToCoordinate = function (position) {\r\n var coordinate;\r\n var axis = this.axis;\r\n var axisFullLength = axis.axisFullLength;\r\n if (axis.renderer.inversed) {\r\n coordinate = (axis.end - position) * axisFullLength;\r\n }\r\n else {\r\n coordinate = (position - axis.start) * axisFullLength;\r\n }\r\n return coordinate;\r\n };\r\n AxisRenderer.prototype.updateGridContainer = function () {\r\n };\r\n AxisRenderer.prototype.getHeight = function () {\r\n var gridContainer = this.gridContainer;\r\n if (gridContainer.parent) {\r\n return gridContainer.parent.pixelHeight;\r\n }\r\n return this.gridContainer.pixelHeight || 0;\r\n };\r\n AxisRenderer.prototype.getWidth = function () {\r\n var gridContainer = this.gridContainer;\r\n if (gridContainer.parent) {\r\n return gridContainer.parent.pixelWidth;\r\n }\r\n return this.gridContainer.pixelWidth || 0;\r\n };\r\n /**\r\n * Converts a coordinate in pixels to a relative position. (0-1)\r\n *\r\n * @param coordinate Coordinate (px)\r\n * @param coordinate2 Coordinate of a second axis, only needed for complex axes systems, like timeline (px)\r\n * @return Position (0-1)\r\n */\r\n AxisRenderer.prototype.coordinateToPosition = function (coordinate, coordinate2) {\r\n var position;\r\n var axis = this.axis;\r\n var axisFullLength = axis.axisFullLength;\r\n if (axis.renderer.inversed) {\r\n position = axis.end - coordinate / axisFullLength;\r\n }\r\n else {\r\n position = coordinate / axisFullLength + axis.start;\r\n }\r\n return $math.round(position, 5);\r\n };\r\n /**\r\n * Converts a point at specific coordinates to a relative position (0-1)\r\n * on the axis.\r\n *\r\n * @ignore Exclude from docs\r\n * @param point Point\r\n * @return Position (0-1)\r\n */\r\n AxisRenderer.prototype.pointToPosition = function (point) {\r\n // This is a placeholder method for extending classes to override.\r\n return 0;\r\n };\r\n /**\r\n * [getPositionRangePath description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param startPosition Starting position\r\n * @param endPosition End position\r\n * @return SVG path\r\n */\r\n AxisRenderer.prototype.getPositionRangePath = function (startPosition, endPosition) {\r\n return \"\";\r\n };\r\n /**\r\n * Invalidates all axis data items, effectively causing them re-evaluated.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description (review)\r\n */\r\n AxisRenderer.prototype.invalidateAxisItems = function () {\r\n var axis = this.axis;\r\n if (axis) {\r\n axis.invalidateDataItems();\r\n }\r\n };\r\n /**\r\n * Updates and positions a grid element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param grid Grid element\r\n * @param position Starting position\r\n * @param endPosition End position\r\n */\r\n AxisRenderer.prototype.updateGridElement = function (grid, position, endPosition) {\r\n // This is a placeholder method for extending classes to override.\r\n };\r\n /**\r\n * Updates and positions a tick element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param tick Tick element\r\n * @param position Starting position\r\n * @param endPosition End position\r\n */\r\n AxisRenderer.prototype.updateTickElement = function (tick, position, endPosition) {\r\n // This is a placeholder method for extending classes to override.\r\n };\r\n /**\r\n * Updates and positions axis bullet.\r\n *\r\n * @ignore Exclude from docs\r\n * @param bullet AxisBullet element\r\n * @param position Starting position\r\n * @param endPosition End position\r\n */\r\n AxisRenderer.prototype.updateBullet = function (bullet, position, endPosition) {\r\n // This is a placeholder method for extending classes to override.\r\n };\r\n /**\r\n * Updates and positions a label element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param label Label element\r\n * @param position Starting position\r\n * @param endPosition Ending position\r\n */\r\n AxisRenderer.prototype.updateLabelElement = function (label, position, endPosition, location) {\r\n // This is a placeholder method for extending classes to override.\r\n };\r\n /**\r\n * Updates and positions the axis fill element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param fill Fill element\r\n * @param position Starting position\r\n * @param endPosition Ending position\r\n */\r\n AxisRenderer.prototype.updateFillElement = function (fill, position, endPosition) {\r\n fill.startPosition = position;\r\n fill.endPosition = endPosition;\r\n };\r\n /**\r\n * Updates and positions the axis line element.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n AxisRenderer.prototype.updateAxisLine = function () {\r\n // This is a placeholder method for extending classes to override.\r\n };\r\n /**\r\n * Updates and positions the base grid element.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n AxisRenderer.prototype.updateBaseGridElement = function () {\r\n // This is a placeholder method for extending classes to override.\r\n };\r\n /**\r\n * Updates and positions an axis break element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param axisBreak Break element\r\n */\r\n AxisRenderer.prototype.updateBreakElement = function (axisBreak) {\r\n this.positionItem(axisBreak.startLine, axisBreak.startPoint);\r\n this.toggleVisibility(axisBreak.startLine, axisBreak.startPosition, 0, 1);\r\n this.positionItem(axisBreak.endLine, axisBreak.endPoint);\r\n this.toggleVisibility(axisBreak.endLine, axisBreak.endPosition, 0, 1);\r\n };\r\n Object.defineProperty(AxisRenderer.prototype, \"minGridDistance\", {\r\n /**\r\n * @return Min distance (px)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"minGridDistance\");\r\n },\r\n /**\r\n * Minimum distance in pixels between grid elements.\r\n *\r\n * Use it to control density of the grid/labels on the axis.element.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/axes/positioning-axis-elements/#Setting_the_density_of_the_the_grid_labels} for more info\r\n * @param value Min distance (px)\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"minGridDistance\", value)) {\r\n if (this.axis) {\r\n this.axis.invalidateDataItems();\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(AxisRenderer.prototype, \"chart\", {\r\n /**\r\n * @ignore Exclude from docs\r\n * @return Chart\r\n */\r\n get: function () {\r\n return this._chart.get();\r\n },\r\n /**\r\n * A chart, associated with the Axis.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Chart\r\n */\r\n set: function (value) {\r\n this._chart.set(value, null);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Toggles visibility of an element, based on its current position and\r\n * min/max position settings.\r\n *\r\n * E.g. labels based on `minLabelPosition` and `maxLabelPosition`.\r\n *\r\n * @ignore Exclude from docs\r\n * @param sprite An element to toggle\r\n * @param position Elements current position\r\n * @param minPosition Min position setting\r\n * @param maxPosition Max position setting\r\n */\r\n AxisRenderer.prototype.toggleVisibility = function (sprite, position, minPosition, maxPosition) {\r\n var axis = this.axis;\r\n var dataItem = sprite.dataItem;\r\n if (dataItem && dataItem instanceof AxisDataItem) {\r\n if ($type.isNumber(dataItem.minPosition)) {\r\n minPosition = dataItem.minPosition;\r\n }\r\n if ($type.isNumber(dataItem.maxPosition)) {\r\n maxPosition = dataItem.maxPosition;\r\n }\r\n }\r\n var updatedStart = axis.start + (axis.end - axis.start) * (minPosition - 0.0001);\r\n var updatedEnd = axis.start + (axis.end - axis.start) * (maxPosition + 0.0001);\r\n if (!sprite.disabled) {\r\n if (position < updatedStart || position > updatedEnd) {\r\n sprite.__disabled = true;\r\n }\r\n else {\r\n sprite.__disabled = false;\r\n }\r\n }\r\n };\r\n /**\r\n * Creates visual elements for and axis break.\r\n *\r\n * @ignore Exclude from docs\r\n * @param axisBreak Axis break\r\n */\r\n AxisRenderer.prototype.createBreakSprites = function (axisBreak) {\r\n // This is a placeholder method for extending classes to override.\r\n };\r\n Object.defineProperty(AxisRenderer.prototype, \"axisFills\", {\r\n /**\r\n * A list of Axis' Fill elements.\r\n *\r\n * Those are fill elements that cover the space between every second set\r\n * of grid lines, and can be configured to create striped charts.\r\n *\r\n * Please note that these are disabled by default. To enable them, set\r\n * template to true.\r\n *\r\n * ```TypeScript\r\n * categoryAxis.renderer.axisFills.template.disabled = false;\r\n * ```\r\n * ```JavaScript\r\n * categoryAxis.renderer.axisFills.template.disabled = false;\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"xAxes\": [{\r\n * // ...\r\n * \"renderer\": {\r\n * \"axisFills\": {\r\n * \"disabled\": false\r\n * }\r\n * }\r\n * }]\r\n * }\r\n * ```\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/tutorials/alternated-axis-fills/} this tutorial for more info.\r\n * @return Fill elements\r\n */\r\n get: function () {\r\n if (!this._axisFills) {\r\n var fill = this.createFill(this.axis);\r\n this._axisFills = new ListTemplate(fill);\r\n fill.applyOnClones = true;\r\n fill.events.on(\"enabled\", this.invalidateAxisItems, this, false);\r\n this._disposers.push(new ListDisposer(this._axisFills));\r\n this._disposers.push(this._axisFills.template);\r\n }\r\n return this._axisFills;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Returns a new fill element, suitable for this Axis Renderer type.\r\n *\r\n * @return Fill element\r\n */\r\n AxisRenderer.prototype.createFill = function (axis) {\r\n return new AxisFill(axis);\r\n };\r\n Object.defineProperty(AxisRenderer.prototype, \"grid\", {\r\n /**\r\n * A list of Axis' Grid elements.\r\n *\r\n * @return Grid elements\r\n */\r\n get: function () {\r\n if (!this._grid) {\r\n var grid = this.createGrid();\r\n this._grid = new ListTemplate(grid);\r\n grid.applyOnClones = true;\r\n grid.events.on(\"enabled\", this.invalidateAxisItems, this, false);\r\n this._disposers.push(new ListDisposer(this._grid));\r\n this._disposers.push(this._grid.template);\r\n }\r\n return this._grid;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Returns a new grid element, suitable for this Axis Renderer type.\r\n *\r\n * @return Grid element\r\n */\r\n AxisRenderer.prototype.createGrid = function () {\r\n return new Grid();\r\n };\r\n Object.defineProperty(AxisRenderer.prototype, \"ticks\", {\r\n /**\r\n * A list of Axis' Tick elements.\r\n *\r\n * Please note that these are disabled by default. To enable ticks, you'll\r\n * need to set `disabled` and `strokeOpacity` properties of the tick template.\r\n *\r\n * ```TypeScript\r\n * categoryAxis.renderer.ticks.template.disabled = false;\r\n * categoryAxis.renderer.ticks.template.strokeOpacity = 0.5;\r\n * ```\r\n * ```JavaScript\r\n * categoryAxis.renderer.ticks.template.disabled = false;\r\n * categoryAxis.renderer.ticks.template.strokeOpacity = 0.5;\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"xAxes\": [{\r\n * // ...\r\n * \"renderer\": {\r\n * \"ticks\": {\r\n * \"disabled\": false,\r\n * \"strokeOpacity\": 0.5\r\n * }\r\n * }\r\n * }]\r\n * }\r\n * ```\r\n *\r\n * @return Tick elements\r\n */\r\n get: function () {\r\n if (!this._ticks) {\r\n var tick = this.createTick();\r\n tick.applyOnClones = true;\r\n tick.isMeasured = false;\r\n tick.events.on(\"enabled\", this.invalidateAxisItems, this, false);\r\n this._ticks = new ListTemplate(tick);\r\n this._disposers.push(new ListDisposer(this._ticks));\r\n this._disposers.push(this._ticks.template);\r\n }\r\n return this._ticks;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Returns a new tick element, suitable for this Axis Renderer type.\r\n *\r\n * @return Tick element\r\n */\r\n AxisRenderer.prototype.createTick = function () {\r\n return new AxisTick();\r\n };\r\n Object.defineProperty(AxisRenderer.prototype, \"labels\", {\r\n /**\r\n * A list of Axis' Label elements.\r\n *\r\n * @return Label elements\r\n */\r\n get: function () {\r\n if (!this._labels) {\r\n var label = this.createLabel();\r\n this._labels = new ListTemplate(label);\r\n label.applyOnClones = true;\r\n label.events.on(\"enabled\", this.invalidateAxisItems, this, false);\r\n this._disposers.push(new ListDisposer(this._labels));\r\n this._disposers.push(this._labels.template);\r\n }\r\n return this._labels;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Returns a new label element, suitable for this Axis Renderer type.\r\n *\r\n * @return Label element\r\n */\r\n AxisRenderer.prototype.createLabel = function () {\r\n return new AxisLabel();\r\n };\r\n Object.defineProperty(AxisRenderer.prototype, \"inside\", {\r\n /**\r\n * @return Labels inside?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"inside\");\r\n },\r\n /**\r\n * Indicates whether Axis' labels and ticks should be drawn inside Plot area.\r\n *\r\n * Does not work with all renderers, like AxisRendererRadial.\r\n *\r\n * @param value Labels inside?\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"inside\", value)) {\r\n if (this.axis) {\r\n this.axis.invalidate();\r\n }\r\n }\r\n if (value) {\r\n this.width = 0;\r\n this.height = 0;\r\n }\r\n else {\r\n this.width = undefined;\r\n this.height = undefined;\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(AxisRenderer.prototype, \"opposite\", {\r\n /**\r\n * @return Draw axis on opposite side?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"opposite\");\r\n },\r\n /**\r\n * Indicates whether Axis should be drawn on the opposite side of the plot\r\n * area than it would normally be drawn based on chart's settings.\r\n *\r\n * Does not work with all renderers, like [[AxisRendererRadial]] and\r\n * [[AxisRenderer Circular].\r\n *\r\n * @param value Draw axis on opposite side?\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"opposite\", value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(AxisRenderer.prototype, \"fullWidthTooltip\", {\r\n /**\r\n * @return Full width tooltip?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"fullWidthTooltip\");\r\n },\r\n /**\r\n * Indicates if Axis tooltip should take the whole width of the axis cell.\r\n * (between two grid lines)\r\n *\r\n * NOTE: this setting is ignored on circular axis types.\r\n *\r\n * @param value Full width tooltip?\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"fullWidthTooltip\", value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(AxisRenderer.prototype, \"tooltipLocation\", {\r\n /**\r\n * @return Tooltip location\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"tooltipLocation\");\r\n },\r\n /**\r\n * Location within axis cell to show tooltip on. (0-1)\r\n *\r\n * 0 - show at the start\r\n * 0.5 - show right in the middle\r\n * 1 - show at the end\r\n *\r\n * @param value Tooltip location\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"tooltipLocation\", value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(AxisRenderer.prototype, \"tooltipLocation2\", {\r\n /**\r\n * @return Tooltip location\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"tooltipLocation2\");\r\n },\r\n /**\r\n * Location within secondary axis cell to show tooltip on. (0-1)\r\n *\r\n * 0 - show at the start\r\n * 0.5 - show right in the middle\r\n * 1 - show at the end\r\n *\r\n * @param value Tooltip location\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"tooltipLocation2\", value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(AxisRenderer.prototype, \"cellStartLocation\", {\r\n /**\r\n * @return Cell start (0-1)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"cellStartLocation\");\r\n },\r\n /**\r\n * Location for the cell start.\r\n *\r\n * Normally a \"cell\" is the whole available width in a category.\r\n *\r\n * If there are several clustered column-like series available, the whole\r\n * space is divided between each clustered column, or column stacks.\r\n *\r\n * `cellStartLocation` identifies where, within available space, the actual\r\n * cell starts.\r\n *\r\n * This, together with column series' `width` will affect actual width of\r\n * columns, and thus gaps between them.\r\n *\r\n * This will affect category-like axes only, like [[DateAxis]], or\r\n * [[CategoryAxis]].\r\n *\r\n * This is used to limit a space occupied by series like column.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/axes/positioning-axis-elements/} for more info.\r\n * @param value Cell start (0-1)\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"cellStartLocation\", value)) {\r\n if (this.axis) {\r\n this.axis.invalidateSeries();\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(AxisRenderer.prototype, \"cellEndLocation\", {\r\n /**\r\n * @return Cell end (0-1)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"cellEndLocation\");\r\n },\r\n /**\r\n * Location for the cell end.\r\n *\r\n * Normally a \"cell\" is the whole available width in a category.\r\n *\r\n * If there are several clustered column-like series available, the whole\r\n * space is divided between each clustered column, or column stacks.\r\n *\r\n * `cellEndLocation` identifies where, within available space, the actual\r\n * cell ends.\r\n *\r\n * This, together with column series' `width` will affect actual width of\r\n * columns, and thus gaps between them.\r\n *\r\n * This will affect category-like axes only, like [[DateAxis]], or\r\n * [[CategoryAxis]].\r\n *\r\n * This is used to limit a space occupied by series like column.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/axes/positioning-axis-elements/} for more info.\r\n * @param value Cell end (0-1)\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"cellEndLocation\", value)) {\r\n if (this.axis) {\r\n this.axis.invalidateSeries();\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(AxisRenderer.prototype, \"inversed\", {\r\n /**\r\n * @return Flip axis?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"inversed\");\r\n },\r\n /**\r\n * Indicates if the scale of the axis should be flipped.\r\n *\r\n * @param value Flip axis?\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"inversed\", value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(AxisRenderer.prototype, \"minLabelPosition\", {\r\n /**\r\n * @return Min label position (0-1)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"minLabelPosition\");\r\n },\r\n /**\r\n * Minimum position along the Axis, for labels.\r\n *\r\n * Labels, which have their position closer to the start of the Axis, will be\r\n * automatically hidden.\r\n *\r\n * E.g., setting this to 0.05 (5% of total axis length) would hide labels,\r\n * that would otherwise be drawn very near start of the Axis.\r\n *\r\n * This is especially usefull with `inside = true`, or if the chart hasn't\r\n * got any extra margins.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/axes/positioning-axis-elements/} for more info.\r\n * @param value Min label position (0-1)\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"minLabelPosition\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(AxisRenderer.prototype, \"maxLabelPosition\", {\r\n /**\r\n * @return Max label position (0-1)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"maxLabelPosition\");\r\n },\r\n /**\r\n * Maximum position along the Axis, for labels.\r\n *\r\n * Labels, which have their position closer to the and of the Axis, will be\r\n * automatically hidden.\r\n *\r\n * E.g., setting this to 0.95 (95% of total axis length) would hide labels,\r\n * that would otherwise be drawn very near end of the Axis.\r\n *\r\n * This is especially usefull with `inside = true`, or if the chart hasn't\r\n * got any extra margins.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/axes/positioning-axis-elements/} for more info.\r\n * @param value Max label position (0-1)\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"maxLabelPosition\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Copies all settings and related items from another object of the same\r\n * type.\r\n *\r\n * @param source Source object\r\n */\r\n AxisRenderer.prototype.copyFrom = function (source) {\r\n _super.prototype.copyFrom.call(this, source);\r\n this.grid.template.copyFrom(source.grid.template);\r\n this.ticks.template.copyFrom(source.ticks.template);\r\n this.labels.template.copyFrom(source.labels.template);\r\n this.axisFills.template.copyFrom(source.axisFills.template);\r\n this.line.copyFrom(source.line);\r\n this.baseGrid.copyFrom(source.baseGrid);\r\n };\r\n /**\r\n * @ignore\r\n */\r\n AxisRenderer.prototype.toAxisPosition = function (value) {\r\n return value;\r\n };\r\n /**\r\n * Sets `visibility` property:\r\n *\r\n * * `true` - visible\r\n * * `false` - hidden\r\n *\r\n * @param value true - visible, false - hidden\r\n * @return Current visibility\r\n */\r\n AxisRenderer.prototype.setVisibility = function (value) {\r\n _super.prototype.setVisibility.call(this, value);\r\n this.bulletsContainer.visible = value;\r\n };\r\n return AxisRenderer;\r\n}(Container));\r\nexport { AxisRenderer };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"AxisRenderer\"] = AxisRenderer;\r\n","/**\r\n * Axis Bullet module.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Container } from \"../../core/Container\";\r\nimport { registry } from \"../../core/Registry\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Used to draw a positioned bullet (element) on an Axis.\r\n *\r\n * ```TypeScript\r\n * let range = dateAxis.axisRanges.create();\r\n * range.date = new Date(2018, 0, 5);\r\n *\r\n * let flag = new am4plugins_bullets.FlagBullet();\r\n * flag.label.text = \"Hello\";\r\n *\r\n * range.bullet = flag;\r\n * ```\r\n * ```JavaScript\r\n * var range = dateAxis.axisRanges.create();\r\n * range.date = new Date(2018, 0, 5);\r\n *\r\n * var flag = new am4plugins_bullets.FlagBullet();\r\n * flag.label.text = \"Hello\";\r\n *\r\n * range.bullet = flag;\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"xAxes\": [{\r\n * \"type\": \"DateAxis\",\r\n * // ...\r\n * \"axisRanges\": [{\r\n * \"date\": new Date(2018, 0, 5),\r\n * \"bullet: {\r\n * \"type\": \"FlagBullet\",\r\n * \"label\": {\r\n * \"text\": \"Hello\"\r\n * }\r\n * }\r\n * }]\r\n * }]\r\n * }\r\n * ```\r\n *\r\n * @since 4.5.9\r\n * @see {@link IAxisBulletEvents} for a list of available events\r\n * @see {@link IAxisBulletAdapters} for a list of available Adapters\r\n * @important\r\n */\r\nvar AxisBullet = /** @class */ (function (_super) {\r\n __extends(AxisBullet, _super);\r\n function AxisBullet() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"AxisBullet\";\r\n _this.location = 0.5;\r\n _this.isMeasured = false;\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n Object.defineProperty(AxisBullet.prototype, \"location\", {\r\n /**\r\n * @return Location (0-1)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"location\");\r\n },\r\n /**\r\n * Relative position within cell/range.\r\n *\r\n * Value range is from from `0` (beginning) to `1` (end).\r\n *\r\n * NOTE: `location` is relative to the parent axis range's scope, i.e.\r\n * between its `date` and `endDate` for [[DateAxis]], or `value`/`endValue`\r\n * ([[ValueAxis]]), or `category`/`endCategory` ([[categoryAxis]]).\r\n *\r\n * ```TypeScript\r\n * let range = dateAxis.axisRanges.create();\r\n * range.date = new Date(2018, 0, 5);\r\n * range.endDate = new Date(2018, 0, 6);\r\n *\r\n * let bullet = new am4charts.AxisBullet();\r\n * bullet.location = 1;\r\n *\r\n * let flag = bullet.createChild(am4plugins_bullets.FlagBullet);\r\n * flag.label.text = \"Hello\";\r\n * ```\r\n * ```JavaScript\r\n * var range = dateAxis.axisRanges.create();\r\n * range.date = new Date(2018, 0, 5);\r\n * range.endDate = new Date(2018, 0, 6);\r\n *\r\n * var bullet = new am4charts.AxisBullet();\r\n * bullet.location = 1;\r\n *\r\n * var flag = bullet.createChild(am4plugins_bullets.FlagBullet);\r\n * flag.label.text = \"Hello\";\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"xAxes\": [{\r\n * \"type\": \"DateAxis\",\r\n * // ...\r\n * \"axisRanges\": [{\r\n * \"date\": new Date(2018, 0, 5),\r\n * \"endDate\": new Date(2018, 0, 6),\r\n * \"bullet: {\r\n * \"type\": \"AxisBullet\",\r\n * \"location\": 1,\r\n * \"children\": [{\r\n * \"type\": \"FlagBullet\",\r\n * \"label\": {\r\n * \"text\": \"Hello\"\r\n * }\r\n * }]\r\n * }\r\n * }]\r\n * }]\r\n * }\r\n * ```\r\n *\r\n * @default 0.5\r\n * @param value Location (0-1)\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"location\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * @ignore\r\n */\r\n AxisBullet.prototype.setDisabled = function (value) {\r\n var changed = _super.prototype.setDisabled.call(this, value);\r\n if (this.axis) {\r\n this.axis.invalidateDataItems();\r\n }\r\n return changed;\r\n };\r\n return AxisBullet;\r\n}(Container));\r\nexport { AxisBullet };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"AxisBullet\"] = AxisBullet;\r\n","/**\r\n * Module, defining Axis Renderer for vertical axes.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { AxisRenderer } from \"./AxisRenderer\";\r\nimport { WavedLine } from \"../../core/elements/WavedLine\";\r\nimport { WavedRectangle } from \"../../core/elements/WavedRectangle\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport { percent, Percent } from \"../../core/utils/Percent\";\r\nimport * as $math from \"../../core/utils/Math\";\r\nimport * as $path from \"../../core/rendering/Path\";\r\nimport * as $utils from \"../../core/utils/Utils\";\r\nimport * as $type from \"../../core/utils/Type\";\r\nimport { defaultRules, ResponsiveBreakpoints } from \"../../core/utils/Responsive\";\r\nimport { AxisBullet } from \"./AxisBullet\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * A renderer for vertical axis.\r\n *\r\n * @see {@link IAxisRendererYEvents} for a list of available events\r\n * @see {@link IAxisRendererYAdapters} for a list of available Adapters\r\n */\r\nvar AxisRendererY = /** @class */ (function (_super) {\r\n __extends(AxisRendererY, _super);\r\n /**\r\n * Constructor.\r\n *\r\n * @param axis Related axis\r\n */\r\n function AxisRendererY() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"AxisRendererY\";\r\n _this.minGridDistance = 40;\r\n _this.opposite = false;\r\n _this.height = percent(100);\r\n _this.labels.template.verticalCenter = \"middle\";\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * @ignore\r\n */\r\n AxisRendererY.prototype.setAxis = function (axis) {\r\n _super.prototype.setAxis.call(this, axis);\r\n axis.layout = \"horizontal\";\r\n };\r\n /**\r\n * @ignore\r\n */\r\n AxisRendererY.prototype.updateGridContainer = function () {\r\n var axis = this.axis;\r\n if (axis) {\r\n var gridContainer = this.gridContainer;\r\n gridContainer.y = axis.pixelY;\r\n gridContainer.height = axis.axisLength;\r\n }\r\n };\r\n /**\r\n * @ignore\r\n */\r\n AxisRendererY.prototype.toAxisPosition = function (value) {\r\n var axis = this.axis;\r\n if (axis) {\r\n var inversedPosition = 1 - value;\r\n var relativePositionSprite = axis.relativePositionSprite;\r\n var y = axis.pixelY;\r\n if (relativePositionSprite) {\r\n y = $utils.spritePointToSprite({ x: 0, y: this.pixelY }, this.parent, relativePositionSprite).y;\r\n }\r\n else {\r\n relativePositionSprite = axis.parent;\r\n }\r\n if (relativePositionSprite) {\r\n var relativeY = y / relativePositionSprite.innerHeight;\r\n var relativeHeight = axis.axisLength / relativePositionSprite.innerHeight;\r\n return 1 - (inversedPosition - relativeY) / relativeHeight;\r\n }\r\n }\r\n return value;\r\n };\r\n /**\r\n * Called when rendered is attached to an Axis, as well as a property of\r\n * Axis that might affect the appearance is updated.\r\n *\r\n * E.g. `axis.opposite`, `axis.inside`, etc.\r\n *\r\n * This method is called **before** draw, so that any related setting\r\n * changed in this method can be changed.\r\n *\r\n * @todo Description (review)\r\n * @ignore Exclude from docs\r\n */\r\n AxisRendererY.prototype.processRenderer = function () {\r\n _super.prototype.processRenderer.call(this);\r\n var axis = this.axis;\r\n if (axis) {\r\n var title = axis.title;\r\n title.valign = \"middle\";\r\n if (!(axis.height instanceof Percent)) {\r\n axis.height = percent(100);\r\n }\r\n if (this.opposite) {\r\n title.rotation = 90;\r\n this.line.toBack();\r\n title.toFront();\r\n }\r\n else {\r\n title.rotation = -90;\r\n title.toBack();\r\n this.line.toFront();\r\n }\r\n }\r\n };\r\n /**\r\n * Updates some of the Axis tooltip's visual properties, related to\r\n * rendering of the Axis.\r\n *\r\n * @todo Description (review)\r\n * @ignore Exclude from docs\r\n */\r\n AxisRendererY.prototype.updateTooltip = function () {\r\n var axis = this.axis;\r\n if (axis) {\r\n var bigNum = 2000;\r\n var bbx = 0;\r\n var bby = 0;\r\n var bbw = bigNum;\r\n var bbh = this.axisLength;\r\n // right\r\n if (this.opposite) {\r\n if (this.inside) {\r\n bbx = -bigNum;\r\n bbw = bigNum;\r\n }\r\n }\r\n // left\r\n else {\r\n if (!this.inside) {\r\n bbx = -bigNum;\r\n bbw = bigNum;\r\n }\r\n }\r\n this.axis.updateTooltip(\"horizontal\", { x: bbx, y: bby, width: bbw, height: bbh });\r\n }\r\n };\r\n Object.defineProperty(AxisRendererY.prototype, \"axisLength\", {\r\n /**\r\n * Returns actual length of the Axis, in pixels.\r\n *\r\n * @return Length (px)\r\n */\r\n get: function () {\r\n var axis = this.axis;\r\n return (axis.measuredHeight - axis.pixelPaddingTop - axis.pixelPaddingBottom) || 0;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Converts relative position on axis to point coordinates.\r\n *\r\n * @param position Position (0-1)\r\n * @param position2 Position (0-1) Position on the second axis\r\n * @return Point\r\n */\r\n AxisRendererY.prototype.positionToPoint = function (position, position2) {\r\n return { x: 0, y: this.positionToCoordinate(position) };\r\n };\r\n /**\r\n * Converts a point at specific coordinates to a relative position (0-1)\r\n * on the axis.\r\n *\r\n * @param point Point\r\n * @return Position (0-1)\r\n */\r\n AxisRendererY.prototype.pointToPosition = function (point) {\r\n return this.coordinateToPosition(point.y, point.x);\r\n };\r\n /**\r\n * Converts a coordinate in pixels to a relative position. (0-1)\r\n *\r\n * @param coordinate Coordinate (px)\r\n * @param coordinate2 Coordinate of a second axis, only needed for complex axes systems, like timeline (px)\r\n * @return Position (0-1)\r\n */\r\n AxisRendererY.prototype.coordinateToPosition = function (coordinate, coordinate2) {\r\n var position;\r\n var axis = this.axis;\r\n var axisFullLength = axis.axisFullLength;\r\n if (axis.renderer.inversed) {\r\n position = (1 - axis.start) - coordinate / axisFullLength;\r\n }\r\n else {\r\n position = coordinate / axisFullLength + (1 - axis.end);\r\n }\r\n return $math.round(position, 5);\r\n };\r\n /**\r\n * [getPositionRangePath description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param startPosition Starting position\r\n * @param endPosition End position\r\n * @return SVG path\r\n */\r\n AxisRendererY.prototype.getPositionRangePath = function (startPosition, endPosition) {\r\n var y1 = $math.fitToRange(this.positionToCoordinate(startPosition), 0, this.axisLength);\r\n var y2 = $math.fitToRange(this.positionToCoordinate(endPosition), 0, this.axisLength);\r\n var h = Math.abs(y2 - y1);\r\n var w = this.getWidth();\r\n var y = Math.min(y1, y2);\r\n var x = 0;\r\n return $path.rectToPath({\r\n x: x,\r\n y: y,\r\n width: w,\r\n height: h\r\n }, true);\r\n };\r\n /**\r\n * Updates and positions a grid element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param grid Grid element\r\n * @param position Starting position\r\n * @param endPosition End position\r\n */\r\n AxisRendererY.prototype.updateGridElement = function (grid, position, endPosition) {\r\n position = position + (endPosition - position) * grid.location;\r\n var point = this.positionToPoint(position);\r\n //\tpoint.y = $utils.spritePointToSprite({ x: 0, y: point.y }, this, this.gridContainer).y;\r\n grid.path = $path.moveTo({ x: 0, y: 0 }) + $path.lineTo({ x: this.getWidth(), y: 0 });\r\n this.positionItem(grid, point);\r\n this.toggleVisibility(grid, position, 0, 1);\r\n };\r\n /**\r\n * Updates and positions a tick element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param tick Tick element\r\n * @param position Starting position\r\n * @param endPosition End position\r\n */\r\n AxisRendererY.prototype.updateTickElement = function (tick, position, endPosition) {\r\n position = position + (endPosition - position) * tick.location;\r\n var point = this.positionToPoint(position);\r\n var tickLength = tick.length;\r\n try {\r\n $utils.used(this.axis.title.measuredWidth);\r\n }\r\n catch (_a) {\r\n // void\r\n }\r\n point.x = $utils.spritePointToSprite({ x: this.line.pixelX, y: 0 }, this.line.parent, this.gridContainer).x;\r\n if (!this.opposite) {\r\n tickLength *= (tick.inside ? 1 : -1);\r\n }\r\n else {\r\n tickLength *= (tick.inside ? -1 : 1);\r\n }\r\n tick.path = $path.moveTo({ x: 0, y: 0 }) + $path.lineTo({ x: tickLength, y: 0 });\r\n this.positionItem(tick, point);\r\n this.toggleVisibility(tick, position, 0, 1);\r\n };\r\n /**\r\n * Updates and positions the axis line element.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n AxisRendererY.prototype.updateAxisLine = function () {\r\n this.line.path = $path.moveTo({ x: 0, y: 0 }) + $path.lineTo({ x: 0, y: this.axisLength });\r\n };\r\n /**\r\n * Updates and positions the base grid element.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n AxisRendererY.prototype.updateBaseGridElement = function () {\r\n _super.prototype.updateBaseGridElement.call(this);\r\n var axis = this.axis;\r\n var w = this.getWidth();\r\n var h = this.axisLength;\r\n var y = axis.basePoint.y;\r\n var baseGrid = this.baseGrid;\r\n if (y < -0.2 || y > h + 0.2) {\r\n baseGrid.hide(0);\r\n }\r\n else {\r\n var x = $utils.spritePointToSprite({ x: 0, y: 0 }, this.gridContainer, baseGrid.parent).x;\r\n baseGrid.path = $path.moveTo({ x: 0, y: 0 }) + $path.lineTo({ x: w, y: 0 });\r\n baseGrid.moveTo({ x: x, y: y });\r\n baseGrid.show(0);\r\n }\r\n };\r\n /**\r\n * Updates and positions a label element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param label Label element\r\n * @param position Starting position\r\n * @param endPosition Ending position\r\n */\r\n AxisRendererY.prototype.updateLabelElement = function (label, position, endPosition, location) {\r\n if (!$type.hasValue(location)) {\r\n location = label.location;\r\n }\r\n position = position + (endPosition - position) * location;\r\n label.isMeasured = !label.inside;\r\n var point = this.positionToPoint(position);\r\n var horizontalCenter;\r\n var deltaX = 0;\r\n var maxWidth = this.gridContainer.maxWidth;\r\n if (this.opposite) {\r\n if (label.inside) {\r\n horizontalCenter = \"right\";\r\n if (label.align == \"left\") {\r\n deltaX = -maxWidth;\r\n horizontalCenter = \"left\";\r\n }\r\n if (label.align == \"center\") {\r\n deltaX = -maxWidth / 2;\r\n horizontalCenter = \"middle\";\r\n }\r\n }\r\n else {\r\n horizontalCenter = \"left\";\r\n }\r\n point.x = 0 + deltaX;\r\n }\r\n else {\r\n if (label.inside) {\r\n horizontalCenter = \"left\";\r\n if (label.align == \"right\") {\r\n deltaX = maxWidth;\r\n horizontalCenter = \"right\";\r\n }\r\n if (label.align == \"center\") {\r\n deltaX = maxWidth / 2;\r\n horizontalCenter = \"middle\";\r\n }\r\n }\r\n else {\r\n horizontalCenter = \"right\";\r\n }\r\n point.x = this.measuredWidth + deltaX;\r\n }\r\n if (label.rotation == 0) {\r\n // Apply fuzzy logic to verticalCenter only if labels are not rotated\r\n label.horizontalCenter = horizontalCenter;\r\n }\r\n this.positionItem(label, point);\r\n this.toggleVisibility(label, position, this.minLabelPosition, this.maxLabelPosition);\r\n };\r\n /**\r\n * Updates and positions an axis break element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param axisBreak Break element\r\n */\r\n AxisRendererY.prototype.updateBreakElement = function (axisBreak) {\r\n _super.prototype.updateBreakElement.call(this, axisBreak);\r\n var startLine = axisBreak.startLine;\r\n var endLine = axisBreak.endLine;\r\n var fillShape = axisBreak.fillShape;\r\n var startPoint = axisBreak.startPoint;\r\n var endPoint = axisBreak.endPoint;\r\n var x1 = axisBreak.pixelMarginLeft;\r\n var x2 = this.getWidth() - axisBreak.pixelMarginLeft - axisBreak.pixelMarginRight;\r\n startPoint.y = $math.fitToRange(startPoint.y, -1, this.axisLength + 1);\r\n endPoint.y = $math.fitToRange(endPoint.y, -1, this.axisLength + 1);\r\n if (startPoint.y == endPoint.y && (startPoint.y < 0 || startPoint.y > this.axisLength)) {\r\n axisBreak.fillShape.__disabled = true;\r\n }\r\n else {\r\n axisBreak.fillShape.__disabled = false;\r\n }\r\n var w = Math.abs(x2 - x1);\r\n startLine.x = x1;\r\n startLine.height = 0;\r\n startLine.width = w;\r\n endLine.x = x1;\r\n endLine.height = 0;\r\n endLine.width = w;\r\n fillShape.width = w;\r\n fillShape.height = Math.abs(endPoint.y - startPoint.y);\r\n fillShape.x = x1;\r\n fillShape.y = endPoint.y;\r\n };\r\n /**\r\n * Creates visual elements for and axis break.\r\n *\r\n * @ignore Exclude from docs\r\n * @param axisBreak Axis break\r\n */\r\n AxisRendererY.prototype.createBreakSprites = function (axisBreak) {\r\n axisBreak.startLine = new WavedLine();\r\n axisBreak.endLine = new WavedLine();\r\n var wavedRectangle = new WavedRectangle();\r\n wavedRectangle.setWavedSides(true, false, true, false);\r\n axisBreak.fillShape = wavedRectangle;\r\n };\r\n /**\r\n * Converts a position on the axis to a coordinate in pixels.\r\n *\r\n * @ignore Exclude from docs\r\n * @param position Position (0-1)\r\n * @return Coordinate (px)\r\n */\r\n AxisRendererY.prototype.positionToCoordinate = function (position) {\r\n var coordinate;\r\n var axis = this.axis;\r\n var axisFullLength = axis.axisFullLength;\r\n if (!axis.renderer.inversed) {\r\n coordinate = (axis.end - position) * axisFullLength;\r\n }\r\n else {\r\n coordinate = (position - axis.start) * axisFullLength;\r\n }\r\n return coordinate;\r\n };\r\n /**\r\n * Updates and positions axis bullets.\r\n *\r\n * @ignore Exclude from docs\r\n * @param bullet AxisBullet element\r\n * @param position Starting position\r\n * @param endPosition End position\r\n */\r\n AxisRendererY.prototype.updateBullet = function (bullet, position, endPosition) {\r\n var location = 0.5;\r\n if (bullet instanceof AxisBullet) {\r\n location = bullet.location;\r\n }\r\n position = position + (endPosition - position) * location;\r\n var point = this.positionToPoint(position);\r\n point.x = $utils.spritePointToSprite({ x: this.line.pixelX, y: 0 }, this.line.parent, this.gridContainer).x;\r\n this.positionItem(bullet, point);\r\n this.toggleVisibility(bullet, position, 0, 1);\r\n };\r\n return AxisRendererY;\r\n}(AxisRenderer));\r\nexport { AxisRendererY };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"AxisRendererY\"] = AxisRendererY;\r\n/**\r\n * Add default responsive rules\r\n */\r\n/**\r\n * Put labels inside plot area.\r\n * Disable first and last labels.\r\n */\r\ndefaultRules.push({\r\n relevant: ResponsiveBreakpoints.widthS,\r\n state: function (target, stateId) {\r\n if (target instanceof AxisRendererY) {\r\n var state = target.states.create(stateId);\r\n state.properties.inside = true;\r\n state.properties.maxLabelPosition = 0.9;\r\n state.properties.minLabelPosition = 0.1;\r\n return state;\r\n }\r\n return null;\r\n }\r\n});\r\n/**\r\n * Disable labels altogather on very small charts\r\n */\r\ndefaultRules.push({\r\n relevant: ResponsiveBreakpoints.widthXS,\r\n state: function (target, stateId) {\r\n if (target instanceof AxisRendererY) {\r\n var state = target.states.create(stateId);\r\n state.properties.disabled = true;\r\n return state;\r\n }\r\n return null;\r\n }\r\n});\r\n","/**\r\n * A module which defines functionality related to Value Axis Break.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { AxisBreak } from \"./AxisBreak\";\r\nimport { registry } from \"../../core/Registry\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Base class to define \"breaks\" on value axis.\r\n *\r\n * A \"break\" can be used to \"cut out\" specific ranges of the axis scale, e.g.\r\n * when comparing columns with relatively similar values, it would make sense\r\n * to cut out their mid section, so that their tip differences are more\r\n * prominent.\r\n *\r\n * @see {@link IValueAxisBreakEvents} for a list of available events\r\n * @see {@link IValueAxisBreakAdapters} for a list of available Adapters\r\n * @important\r\n */\r\nvar ValueAxisBreak = /** @class */ (function (_super) {\r\n __extends(ValueAxisBreak, _super);\r\n /**\r\n * Constructor\r\n */\r\n function ValueAxisBreak() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"ValueAxisBreak\";\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n Object.defineProperty(ValueAxisBreak.prototype, \"startPosition\", {\r\n /**\r\n * Pixel position of the break's start.\r\n *\r\n * @return Position (px)\r\n * @readonly\r\n */\r\n get: function () {\r\n if (this.axis) {\r\n return this.axis.valueToPosition(this.adjustedStartValue);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ValueAxisBreak.prototype, \"endPosition\", {\r\n /**\r\n * Pixel position of the break's end.\r\n *\r\n * @return Position (px)\r\n * @readonly\r\n */\r\n get: function () {\r\n if (this.axis) {\r\n return this.axis.valueToPosition(this.adjustedEndValue);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return ValueAxisBreak;\r\n}(AxisBreak));\r\nexport { ValueAxisBreak };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"ValueAxisBreak\"] = ValueAxisBreak;\r\n","/**\r\n * Value Axis module\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Axis, AxisDataItem } from \"./Axis\";\r\nimport { AxisRendererY } from \"./AxisRendererY\";\r\nimport { MultiDisposer } from \"../../core/utils/Disposer\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport { ValueAxisBreak } from \"./ValueAxisBreak\";\r\nimport * as $math from \"../../core/utils/Math\";\r\nimport * as $iter from \"../../core/utils/Iterator\";\r\nimport * as $object from \"../../core/utils/Object\";\r\nimport * as $type from \"../../core/utils/Type\";\r\nimport * as $utils from \"../../core/utils/Utils\";\r\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Defines a [[DataItem]] for [[ValueAxis]].\r\n *\r\n * @see {@link DataItem}\r\n */\r\nvar ValueAxisDataItem = /** @class */ (function (_super) {\r\n __extends(ValueAxisDataItem, _super);\r\n /**\r\n * Constructor\r\n */\r\n function ValueAxisDataItem() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"ValueAxisDataItem\";\r\n _this.values.value = {};\r\n _this.values.endValue = {};\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n Object.defineProperty(ValueAxisDataItem.prototype, \"value\", {\r\n /**\r\n * @return Value\r\n */\r\n get: function () {\r\n return this.values[\"value\"].value;\r\n },\r\n /**\r\n * A data point's numeric value.\r\n *\r\n * @param value Value\r\n */\r\n set: function (value) {\r\n this.setValue(\"value\", value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ValueAxisDataItem.prototype, \"endValue\", {\r\n /**\r\n * @return Value\r\n */\r\n get: function () {\r\n return this.values[\"endValue\"].value;\r\n },\r\n /**\r\n * Data point's numeric end value.\r\n *\r\n * @param value End value\r\n */\r\n set: function (value) {\r\n this.setValue(\"endValue\", value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return ValueAxisDataItem;\r\n}(AxisDataItem));\r\nexport { ValueAxisDataItem };\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Used to create a value axis for the chart.\r\n *\r\n * ```TypeScript\r\n * // Create the axis\r\n * let valueAxis = chart.yAxes.push(new am4charts.ValueAxis());\r\n *\r\n * // Set settings\r\n * valueAxis.title.text = \"Monthly Sales\";\r\n * ```\r\n * ```JavaScript\r\n * // Create the axis\r\n * var valueAxis = chart.yAxes.push(new am4charts.ValueAxis());\r\n *\r\n * // Set settings\r\n * valueAxis.title.text = \"Monthly Sales\";\r\n * ```\r\n * ```JSON\r\n * \"yAxes\": [{\r\n * \"type\": \"ValueAxis\",\r\n * \"title\": {\r\n * \"text\": \"Monthly Sales\"\r\n * }\r\n * }]\r\n * ```\r\n *\r\n * @see {@link IValueAxisEvents} for a list of available Events\r\n * @see {@link IValueAxisAdapters} for a list of available Adapters\r\n * @important\r\n */\r\nvar ValueAxis = /** @class */ (function (_super) {\r\n __extends(ValueAxis, _super);\r\n /**\r\n * Constructor\r\n */\r\n function ValueAxis() {\r\n var _this = \r\n // Init\r\n _super.call(this) || this;\r\n /**\r\n * [_stepDecimalPlaces description]\r\n *\r\n * @todo Description\r\n */\r\n _this._stepDecimalPlaces = 0;\r\n _this._prevStepDecimalPlaces = 0;\r\n _this._adjustLabelPrecision = true;\r\n /**\r\n * Base value for the axis.\r\n */\r\n _this._baseValue = 0;\r\n /**\r\n * Adjusted start in case we have breaks.\r\n *\r\n * @todo Description\r\n */\r\n _this._adjustedStart = 0;\r\n /**\r\n * Adjusted end in case we have breaks.\r\n *\r\n * @todo Description\r\n */\r\n _this._adjustedEnd = 1;\r\n _this._extremesChanged = false;\r\n _this._deltaMinMax = 1;\r\n _this._dsc = false;\r\n /**\r\n * As calculating totals is expensive operation and not often needed, we\r\n * don't do it by default.\r\n *\r\n * In case you use `totalPercent` or `total` in your charts, this must be set\r\n * to `true`.\r\n *\r\n * @default false\r\n * @see {@link https://www.amcharts.com/docs/v4/chart-types/xy-chart/#100_stacks} For using `calculateTotals` for 100% stacked series.\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/formatters/formatting-strings/#Placeholders_for_numeric_values} For using `calculateTotals` in labels.\r\n */\r\n _this.calculateTotals = false;\r\n _this.className = \"ValueAxis\";\r\n // Set field name\r\n _this.axisFieldName = \"value\";\r\n // Set defaults\r\n _this.setPropertyValue(\"maxZoomFactor\", 1000);\r\n _this.setPropertyValue(\"extraMin\", 0);\r\n _this.setPropertyValue(\"extraMax\", 0);\r\n _this.setPropertyValue(\"strictMinMax\", false);\r\n _this.setPropertyValue(\"maxPrecision\", Number.MAX_VALUE);\r\n _this.setPropertyValue(\"adjustLabelPrecision\", true);\r\n _this.setPropertyValue(\"extraTooltipPrecision\", 0);\r\n _this.keepSelection = false;\r\n _this.includeRangesInMinMax = false;\r\n // Apply theme\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * Holds reference to a function that accepts a DataItem as parameter.\r\n *\r\n * It can either return a fill opacity for a fill, or manipulate data item\r\n * directly, to create various highlighting scenarios.\r\n */\r\n ValueAxis.prototype.fillRule = function (dataItem) {\r\n var value = dataItem.value;\r\n var axis = dataItem.component;\r\n if (!dataItem.axisFill.disabled) {\r\n // rounding in left to solve floating point number\r\n if ($math.round(value / axis.step / 2, 5) == Math.round(value / axis.step / 2)) {\r\n dataItem.axisFill.__disabled = true;\r\n }\r\n else {\r\n dataItem.axisFill.__disabled = false;\r\n }\r\n }\r\n };\r\n /**\r\n * Returns a new/empty [[DataItem]] of the type appropriate for this object.\r\n *\r\n * @see {@link DataItem}\r\n * @return Data Item\r\n */\r\n ValueAxis.prototype.createDataItem = function () {\r\n return new ValueAxisDataItem();\r\n };\r\n /**\r\n * Returns a new/empty [[AxisBreak]] of the appropriate type.\r\n *\r\n * @return Axis break\r\n */\r\n ValueAxis.prototype.createAxisBreak = function () {\r\n return new ValueAxisBreak();\r\n };\r\n /**\r\n * [dataChangeUpdate description]\r\n *\r\n * This is a placeholder to override for extending classes.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\r\n ValueAxis.prototype.dataChangeUpdate = function () {\r\n this.clearCache();\r\n if (!this.keepSelection) {\r\n if (this._start != 0 || this._end != 1) {\r\n this._start = 0;\r\n this._end = 1;\r\n this.dispatchImmediately(\"startendchanged\");\r\n }\r\n }\r\n else {\r\n if (this._start != 0) {\r\n this.dispatchImmediately(\"startchanged\");\r\n }\r\n if (this._end != 1) {\r\n this.dispatchImmediately(\"endchanged\");\r\n }\r\n if (this._start != 0 || this._end != 1) {\r\n this.dispatchImmediately(\"startendchanged\");\r\n }\r\n }\r\n this._maxZoomed = this._maxDefined;\r\n this._minZoomed = this._minDefined;\r\n this._maxAdjusted = this._maxDefined;\r\n this._minAdjusted = this._minDefined;\r\n };\r\n /**\r\n * Processes data items of the related Series.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n ValueAxis.prototype.processSeriesDataItems = function () {\r\n // @todo: add some boolean (maybe autodedect) if we need these calculations or not. this place uses a lot of cpu\r\n if (this.calculateTotals) {\r\n var series = this.series.getIndex(0);\r\n var startIndex = series.startIndex;\r\n if (series.dataItems.length > 0) {\r\n if (startIndex > 0) {\r\n startIndex--;\r\n }\r\n var endIndex = series.endIndex;\r\n if (endIndex < series.dataItems.length) {\r\n endIndex++;\r\n }\r\n var _loop_1 = function (i) {\r\n // This has to be `var` in order to avoid garbage collection\r\n var total = {};\r\n var sum = {};\r\n this_1.series.each(function (series) {\r\n if (!series.excludeFromTotal) {\r\n var dataItem_1 = series.dataItems.getIndex(i);\r\n if (dataItem_1) {\r\n $object.each(dataItem_1.values, function (key) {\r\n var value = dataItem_1.values[key].workingValue; // can not use getWorkingValue here!\r\n if ($type.isNumber(value)) {\r\n if (!$type.isNumber(total[key])) {\r\n total[key] = Math.abs(value);\r\n }\r\n else {\r\n total[key] += Math.abs(value);\r\n }\r\n if (!$type.isNumber(sum[key])) {\r\n sum[key] = value;\r\n }\r\n else {\r\n sum[key] += value;\r\n }\r\n }\r\n });\r\n }\r\n }\r\n });\r\n this_1.series.each(function (series) {\r\n if (!series.excludeFromTotal) {\r\n var dataItem_2 = series.dataItems.getIndex(i);\r\n if (dataItem_2) {\r\n $object.each(dataItem_2.values, function (key) {\r\n var value = dataItem_2.values[key].workingValue; // can not use getWorkingValue here!\r\n if ($type.isNumber(value)) {\r\n dataItem_2.setCalculatedValue(key, total[key], \"total\");\r\n dataItem_2.setCalculatedValue(key, 100 * value / total[key], \"totalPercent\");\r\n dataItem_2.setCalculatedValue(key, sum[key], \"sum\");\r\n }\r\n });\r\n }\r\n }\r\n });\r\n };\r\n var this_1 = this;\r\n // This has to be `var` in order to avoid garbage collection\r\n for (var i = startIndex; i < endIndex; ++i) {\r\n _loop_1(i);\r\n }\r\n }\r\n }\r\n };\r\n /**\r\n * Validates the whole axis. Causes it to redraw.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description (review)\r\n */\r\n ValueAxis.prototype.validate = function () {\r\n if (this.axisLength <= 0) {\r\n return;\r\n }\r\n _super.prototype.validate.call(this);\r\n this.getMinMax();\r\n if (!$type.isNumber(this._minAdjusted)) {\r\n this.dataItems.each(function (dataItem) {\r\n dataItem.value = null;\r\n });\r\n }\r\n this.fixAxisBreaks();\r\n this.calculateZoom();\r\n this.validateAxisElements();\r\n this.validateAxisRanges();\r\n this.validateBreaks();\r\n this.hideUnusedDataItems();\r\n this.renderer.invalidateLayout();\r\n // hide too close\r\n //this.hideTooCloseDataItems();\r\n };\r\n /**\r\n * Calculates all positions, related to axis as per current zoom.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n ValueAxis.prototype.calculateZoom = function () {\r\n if ($type.isNumber(this.min) && $type.isNumber(this.max)) {\r\n var min = this.positionToValue(this.start);\r\n var max = this.positionToValue(this.end);\r\n var differece = this.adjustDifference(min, max);\r\n var minMaxStep = this.adjustMinMax(min, max, differece, this._gridCount, true);\r\n var stepDecimalPlaces = $utils.decimalPlaces(minMaxStep.step);\r\n this._stepDecimalPlaces = stepDecimalPlaces;\r\n min = $math.round(min, stepDecimalPlaces);\r\n max = $math.round(max, stepDecimalPlaces);\r\n minMaxStep = this.adjustMinMax(min, max, differece, this._gridCount, true);\r\n var step = minMaxStep.step;\r\n if (this.syncWithAxis) {\r\n var calculated = this.getCache(min + \"-\" + max);\r\n if ($type.isNumber(calculated)) {\r\n step = calculated;\r\n }\r\n }\r\n else {\r\n min = minMaxStep.min;\r\n max = minMaxStep.max;\r\n }\r\n if (this._minZoomed != min || this._maxZoomed != max || this._step != step || this._dsc) {\r\n this._dsc = false;\r\n this._minZoomed = min;\r\n this._maxZoomed = max;\r\n this._step = step;\r\n this.dispatchImmediately(\"selectionextremeschanged\");\r\n }\r\n }\r\n };\r\n ValueAxis.prototype.fixSmallStep = function (step) {\r\n if (1 + step == 1) {\r\n step *= 2;\r\n return this.fixSmallStep(step);\r\n }\r\n return step;\r\n };\r\n /**\r\n * Validates Axis elements.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\r\n ValueAxis.prototype.validateAxisElements = function () {\r\n var _this = this;\r\n if ($type.isNumber(this.max) && $type.isNumber(this.min)) {\r\n // first regular items\r\n var value_1 = this.minZoomed - this._step * 2;\r\n if (!this.logarithmic) {\r\n value_1 = Math.floor(value_1 / this._step) * this._step;\r\n }\r\n else {\r\n var differencePower = Math.log(this.max) * Math.LOG10E - Math.log(this.min) * Math.LOG10E;\r\n if (differencePower > 1) {\r\n value_1 = Math.pow(10, Math.log(this.min) * Math.LOG10E);\r\n }\r\n else {\r\n value_1 = Math.floor(this.minZoomed / this._step) * this._step;\r\n if (value_1 == 0) {\r\n value_1 = this.minZoomed;\r\n }\r\n }\r\n }\r\n var maxZoomed = this._maxZoomed + this._step;\r\n this.resetIterators();\r\n var dataItemsIterator_1 = this._dataItemsIterator;\r\n if (this._step == 0) {\r\n return;\r\n }\r\n this._step = this.fixSmallStep(this._step);\r\n var i = 0;\r\n var precisionChanged = this._prevStepDecimalPlaces != this._stepDecimalPlaces;\r\n this._prevStepDecimalPlaces = this._stepDecimalPlaces;\r\n while (value_1 <= maxZoomed) {\r\n var axisBreak = this.isInBreak(value_1);\r\n if (!axisBreak) {\r\n var dataItem = dataItemsIterator_1.find(function (x) { return x.value === value_1; });\r\n if (dataItem.__disabled) {\r\n dataItem.__disabled = false;\r\n }\r\n //this.processDataItem(dataItem);\r\n this.appendDataItem(dataItem);\r\n dataItem.axisBreak = undefined;\r\n if (dataItem.value != value_1 || precisionChanged) {\r\n dataItem.value = value_1;\r\n dataItem.text = this.formatLabel(value_1);\r\n if (dataItem.label && dataItem.label.invalid) {\r\n dataItem.label.validate();\r\n }\r\n if (dataItem.value >= this.min && dataItem.value <= this.max) {\r\n if (dataItem.label) {\r\n if ((this.axisLetter == \"Y\" && dataItem.label.measuredWidth > this.ghostLabel.measuredWidth) || (this.axisLetter == \"X\" && dataItem.label.measuredHeight > this.ghostLabel.measuredHeight)) {\r\n this.ghostLabel.text = dataItem.label.currentText;\r\n this.ghostLabel.validate();\r\n }\r\n }\r\n }\r\n }\r\n this.validateDataElement(dataItem);\r\n }\r\n i++;\r\n var oldValue = value_1;\r\n if (!this.logarithmic) {\r\n value_1 += this._step;\r\n }\r\n else {\r\n var differencePower = Math.log(this.max) * Math.LOG10E - Math.log(this.min) * Math.LOG10E;\r\n if (differencePower > 1) {\r\n value_1 = Math.pow(10, Math.log(this.min) * Math.LOG10E + i);\r\n }\r\n else {\r\n value_1 += this._step;\r\n }\r\n }\r\n var stepPower = Math.pow(10, Math.floor(Math.log(Math.abs(this._step)) * Math.LOG10E));\r\n if (stepPower < 1) {\r\n // exponent is less then 1 too. Count decimals of exponent\r\n var decCount = Math.round(Math.abs(Math.log(Math.abs(stepPower)) * Math.LOG10E)) + 2;\r\n decCount = Math.min(13, decCount);\r\n // round value to avoid floating point issues\r\n value_1 = $math.round(value_1, decCount);\r\n // ceil causes problems: https://codepen.io/team/amcharts/pen/XWMjZwy?editors=1010\r\n if (oldValue == value_1) {\r\n value_1 = maxZoomed;\r\n break;\r\n }\r\n }\r\n }\r\n var axisBreaks = this._axisBreaks;\r\n if (axisBreaks) {\r\n // breaks later\r\n var renderer_1 = this.renderer;\r\n $iter.each(axisBreaks.iterator(), function (axisBreak) {\r\n if (axisBreak.breakSize > 0) {\r\n // only add grid if gap is bigger then minGridDistance\r\n if ($math.getDistance(axisBreak.startPoint, axisBreak.endPoint) > renderer_1.minGridDistance) {\r\n var breakValue_1 = axisBreak.adjustedMin;\r\n while (breakValue_1 <= axisBreak.adjustedMax) {\r\n if (breakValue_1 >= axisBreak.adjustedStartValue && breakValue_1 <= axisBreak.adjustedEndValue) {\r\n var dataItem = dataItemsIterator_1.find(function (x) { return x.value === breakValue_1; });\r\n if (dataItem.__disabled) {\r\n dataItem.__disabled = false;\r\n }\r\n //this.processDataItem(dataItem);\r\n _this.appendDataItem(dataItem);\r\n dataItem.axisBreak = axisBreak;\r\n if (dataItem.value != breakValue_1) {\r\n dataItem.value = breakValue_1;\r\n dataItem.text = _this.formatLabel(breakValue_1);\r\n if (dataItem.label && dataItem.label.invalid) {\r\n dataItem.label.validate();\r\n }\r\n }\r\n _this.validateDataElement(dataItem);\r\n }\r\n breakValue_1 += axisBreak.adjustedStep;\r\n }\r\n }\r\n }\r\n });\r\n }\r\n }\r\n };\r\n /**\r\n * Validates axis data item.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param dataItem Data item\r\n */\r\n ValueAxis.prototype.validateDataElement = function (dataItem) {\r\n _super.prototype.validateDataElement.call(this, dataItem);\r\n //dataItem.__disabled = false;\r\n dataItem.itemIndex = this._axisItemCount;\r\n this._axisItemCount++;\r\n var renderer = this.renderer;\r\n var value = dataItem.value;\r\n var endValue = dataItem.endValue;\r\n var position = this.valueToPosition(value);\r\n dataItem.position = position;\r\n var endPosition = position;\r\n var fillEndPosition = this.valueToPosition(value + this._step);\r\n if ($type.isNumber(endValue)) {\r\n endPosition = this.valueToPosition(endValue);\r\n fillEndPosition = endPosition;\r\n }\r\n // this point is needed to calculate distance to satisfy minGridDistance\r\n dataItem.point = renderer.positionToPoint(position);\r\n var tick = dataItem.tick;\r\n if (tick && !tick.disabled) {\r\n renderer.updateTickElement(tick, position, endPosition);\r\n }\r\n var grid = dataItem.grid;\r\n if (grid && !grid.disabled) {\r\n renderer.updateGridElement(grid, position, endPosition);\r\n }\r\n var label = dataItem.label;\r\n if (label && !label.disabled) {\r\n renderer.updateLabelElement(label, position, endPosition);\r\n }\r\n var fill = dataItem.axisFill;\r\n if (fill && !fill.disabled) {\r\n renderer.updateFillElement(fill, position, fillEndPosition);\r\n if (!dataItem.isRange) {\r\n this.fillRule(dataItem);\r\n }\r\n }\r\n if (dataItem.bullet) {\r\n renderer.updateBullet(dataItem.bullet, position, endPosition);\r\n }\r\n var mask = dataItem.mask;\r\n if (mask) {\r\n renderer.updateFillElement(mask, position, fillEndPosition);\r\n }\r\n };\r\n /**\r\n * Formats the value according to axis' own [[NumberFormatter]].\r\n *\r\n * @param value Source value\r\n * @return Formatted value\r\n */\r\n ValueAxis.prototype.formatLabel = function (value) {\r\n if (this.adjustLabelPrecision && value != 0) {\r\n return this.numberFormatter.format(value, undefined, this._stepDecimalPlaces);\r\n }\r\n else {\r\n return this.numberFormatter.format(value);\r\n }\r\n };\r\n Object.defineProperty(ValueAxis.prototype, \"basePoint\", {\r\n /**\r\n * Coordinates of the actual axis start.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Base point\r\n */\r\n get: function () {\r\n var baseValue = this.baseValue;\r\n var position = this.valueToPosition(baseValue);\r\n var basePoint = this.renderer.positionToPoint(position);\r\n return basePoint;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ValueAxis.prototype, \"baseValue\", {\r\n /**\r\n * @return base value\r\n */\r\n get: function () {\r\n var baseValue = this._baseValue;\r\n if (this.logarithmic) {\r\n baseValue = this.min;\r\n }\r\n if (!this._adapterO) {\r\n return baseValue;\r\n }\r\n else {\r\n return this._adapterO.apply(\"baseValue\", baseValue);\r\n }\r\n },\r\n /**\r\n * A base value.\r\n *\r\n * This is a threshold value that will divide \"positive\" and \"negative\"\r\n * value ranges.\r\n *\r\n * Other scale-related functionality also depend on base value. E.g. stacks,\r\n * value-dependent coloring, etc.\r\n *\r\n * @param value Base value\r\n */\r\n set: function (value) {\r\n this._baseValue = value;\r\n this.invalidateLayout();\r\n this.invalidateSeries();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Converts a numeric value to relative position on axis\r\n *\r\n * An alias to `valueToPosition()`.\r\n *\r\n * @param value Value\r\n * @return Position\r\n */\r\n ValueAxis.prototype.anyToPosition = function (value) {\r\n return this.valueToPosition(value);\r\n };\r\n /**\r\n * Converts a numeric value to orientation point (x, y, angle) on axis\r\n *\r\n * @param value Value\r\n * @return Orientation point\r\n */\r\n ValueAxis.prototype.valueToPoint = function (value) {\r\n var position = this.valueToPosition(value);\r\n var point = this.renderer.positionToPoint(position);\r\n var angle = this.renderer.positionToAngle(position);\r\n return { x: point.x, y: point.y, angle: angle };\r\n };\r\n /**\r\n * Converts a numeric value to orientation (x, y, angle) point on axis\r\n *\r\n * @param value Value\r\n * @return Orientation point\r\n */\r\n ValueAxis.prototype.anyToPoint = function (value) {\r\n return this.valueToPoint(value);\r\n };\r\n /**\r\n * Converts a numeric value to relative position on axis.\r\n *\r\n * @param value Value\r\n * @return relative position\r\n */\r\n ValueAxis.prototype.valueToPosition = function (value) {\r\n if ($type.isNumber(value)) {\r\n // todo: think if possible to take previous value and do not go through all previous breaks\r\n var min_1 = this.min;\r\n var max_1 = this.max;\r\n if ($type.isNumber(min_1) && $type.isNumber(max_1)) {\r\n var difference = this._difference;\r\n var axisBreaks = this._axisBreaks;\r\n if (axisBreaks && axisBreaks.length > 0) {\r\n $iter.eachContinue(axisBreaks.iterator(), function (axisBreak) {\r\n var startValue = axisBreak.adjustedStartValue;\r\n var endValue = axisBreak.adjustedEndValue;\r\n if ($type.isNumber(startValue) && $type.isNumber(endValue)) {\r\n if (value < startValue) {\r\n return false;\r\n }\r\n if ($math.intersect({ start: startValue, end: endValue }, { start: min_1, end: max_1 })) { // todo: check this once and set some flag in axisBreak\r\n startValue = Math.max(startValue, min_1);\r\n endValue = Math.min(endValue, max_1);\r\n var breakSize = axisBreak.breakSize;\r\n // value to the right of break end\r\n if (value > endValue) {\r\n min_1 += (endValue - startValue) * (1 - breakSize); // todo: maybe this can be done differently?\r\n }\r\n // value to the left of break start\r\n else if (value < startValue) {\r\n }\r\n // value within break\r\n else {\r\n value = startValue + (value - startValue) * breakSize;\r\n }\r\n }\r\n }\r\n return true;\r\n });\r\n }\r\n var position = void 0;\r\n if (!this.logarithmic) {\r\n position = (value - min_1) / difference;\r\n }\r\n else {\r\n var treatZeroAs = this.treatZeroAs;\r\n if ($type.isNumber(treatZeroAs)) {\r\n if (value <= treatZeroAs) {\r\n value = treatZeroAs;\r\n }\r\n }\r\n position = (Math.log(value) * Math.LOG10E - Math.log(this.min) * Math.LOG10E) / ((Math.log(this.max) * Math.LOG10E - Math.log(this.min) * Math.LOG10E));\r\n }\r\n //position = $math.round(position, 10);\r\n return position;\r\n }\r\n }\r\n return 0;\r\n };\r\n /**\r\n * When fontSize of fontFamily changes we need to hard-invalidate all Labels of this container to position them properly.\r\n */\r\n ValueAxis.prototype.invalidateLabels = function () {\r\n _super.prototype.invalidateLabels.call(this);\r\n if (this.dataItems) {\r\n this.dataItems.each(function (dataItem) {\r\n dataItem.value = undefined;\r\n });\r\n this.invalidate();\r\n }\r\n };\r\n /**\r\n * Converts an relative position to a corresponding value within\r\n * axis' scale.\r\n *\r\n * @param position Position (px)\r\n * @return Value\r\n */\r\n ValueAxis.prototype.positionToValue = function (position) {\r\n var min = this.min;\r\n var max = this.max;\r\n if ($type.isNumber(min) && $type.isNumber(max)) {\r\n var difference_1 = max - min; //no need to adjust!\r\n var value_2 = null;\r\n var axisBreaks = this._axisBreaks;\r\n if (axisBreaks) {\r\n // in case we have some axis breaks\r\n if (axisBreaks.length > 0) {\r\n $iter.eachContinue(axisBreaks.iterator(), function (axisBreak) {\r\n var breakStartPosition = axisBreak.startPosition;\r\n var breakEndPosition = axisBreak.endPosition;\r\n var breakStartValue = axisBreak.adjustedStartValue;\r\n var breakEndValue = axisBreak.adjustedEndValue;\r\n if ($type.isNumber(breakStartValue) && $type.isNumber(breakEndValue)) {\r\n if (breakStartValue > max) {\r\n return false;\r\n }\r\n if ($math.intersect({ start: breakStartValue, end: breakEndValue }, { start: min, end: max })) {\r\n breakStartValue = $math.max(breakStartValue, min);\r\n breakEndValue = $math.min(breakEndValue, max);\r\n var breakSize = axisBreak.breakSize;\r\n difference_1 -= (breakEndValue - breakStartValue) * (1 - breakSize);\r\n // position to the right of break end\r\n if (position > breakEndPosition) {\r\n min += (breakEndValue - breakStartValue) * (1 - breakSize);\r\n }\r\n // position to the left of break start\r\n else if (position < breakStartPosition) {\r\n }\r\n // value within break\r\n else {\r\n var breakPosition = (position - breakStartPosition) / (breakEndPosition - breakStartPosition);\r\n value_2 = breakStartValue + breakPosition * (breakEndValue - breakStartValue);\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n });\r\n }\r\n }\r\n if (!$type.isNumber(value_2)) {\r\n if (this.logarithmic) {\r\n value_2 = Math.pow(Math.E, (position * ((Math.log(this.max) * Math.LOG10E - Math.log(this.min) * Math.LOG10E)) + Math.log(this.min) * Math.LOG10E) / Math.LOG10E);\r\n }\r\n else {\r\n value_2 = position * difference_1 + min;\r\n }\r\n }\r\n return value_2;\r\n }\r\n //}\r\n };\r\n /**\r\n * Converts an X coordinate to a relative value in axis' scale.\r\n *\r\n * @param x X (px)\r\n * @return Value\r\n */\r\n ValueAxis.prototype.xToValue = function (x) {\r\n return this.positionToValue(this.pointToPosition({ x: x, y: 0 }));\r\n };\r\n /**\r\n * Converts an Y coordinate to a relative value in axis' scale.\r\n *\r\n * @param y Y (px)\r\n * @return Value\r\n */\r\n ValueAxis.prototype.yToValue = function (y) {\r\n return this.positionToValue(this.pointToPosition({ x: 0, y: y }));\r\n };\r\n /**\r\n * Converts pixel coordinates to a relative position. (0-1)\r\n *\r\n * @param point Coorinates (px)\r\n * @return Position (0-1)\r\n */\r\n ValueAxis.prototype.pointToPosition = function (point) {\r\n if (this.renderer instanceof AxisRendererY) {\r\n return 1 - this.renderer.pointToPosition(point);\r\n }\r\n else {\r\n return this.renderer.pointToPosition(point);\r\n }\r\n };\r\n /**\r\n * @ignore\r\n */\r\n ValueAxis.prototype.animateMinMax = function (min, max) {\r\n return this.animate([{ property: \"_minAdjusted\", from: this._minAdjusted, to: min }, { property: \"_maxAdjusted\", from: this._maxAdjusted, to: max }], this.rangeChangeDuration, this.rangeChangeEasing);\r\n };\r\n /**\r\n * Calculates smallest and biggest value for the axis scale.\r\n * @ignore\r\n * @todo Description (review)\r\n */\r\n ValueAxis.prototype.getMinMax = function () {\r\n var _this = this;\r\n this.updateGridCount();\r\n var min = Number.POSITIVE_INFINITY;\r\n var max = Number.NEGATIVE_INFINITY;\r\n // only if min and max are not set from outside, we go through min and max influencers\r\n if (!$type.isNumber(this._minDefined) || !$type.isNumber(this._maxDefined)) {\r\n this.series.each(function (series) {\r\n if (!series.ignoreMinMax) {\r\n // check min\r\n var seriesMin = series.min(_this);\r\n if ($type.isNumber(seriesMin) && (seriesMin < min)) {\r\n min = seriesMin;\r\n }\r\n // check max\r\n var seriesMax = series.max(_this);\r\n if ($type.isNumber(seriesMax) && (seriesMax > max)) {\r\n max = seriesMax;\r\n }\r\n }\r\n });\r\n if (this.includeRangesInMinMax) {\r\n this.axisRanges.each(function (range) {\r\n if (!range.ignoreMinMax) {\r\n var minValue = $math.min(range.value, range.endValue);\r\n var maxValue = $math.max(range.value, range.endValue);\r\n if (minValue < min || !$type.isNumber(min)) {\r\n min = minValue;\r\n }\r\n if (maxValue > max || !$type.isNumber(max)) {\r\n max = maxValue;\r\n }\r\n }\r\n });\r\n }\r\n }\r\n if (this.logarithmic) {\r\n var treatZeroAs = this.treatZeroAs;\r\n if ($type.isNumber(treatZeroAs)) {\r\n if (min <= 0) {\r\n min = treatZeroAs;\r\n }\r\n }\r\n if (min <= 0) {\r\n this.raiseCriticalError(new Error(\"Logarithmic value axis can not have values <= 0.\"), true);\r\n }\r\n }\r\n if (min == 0 && max == 0) {\r\n max = 0.9;\r\n min = -0.9;\r\n }\r\n // if defined from outside\r\n if ($type.isNumber(this._minDefined)) {\r\n min = this._minDefined;\r\n }\r\n if ($type.isNumber(this._maxDefined)) {\r\n max = this._maxDefined;\r\n }\r\n if (this._adapterO) {\r\n min = this._adapterO.apply(\"min\", min);\r\n }\r\n if (this._adapterO) {\r\n max = this._adapterO.apply(\"max\", max);\r\n }\r\n if (!$type.isNumber(min) || !$type.isNumber(max)) {\r\n return;\r\n }\r\n this._minReal = min;\r\n this._maxReal = max;\r\n if (min == Number.POSITIVE_INFINITY) {\r\n min = undefined;\r\n }\r\n if (max == Number.NEGATIVE_INFINITY) {\r\n max = undefined;\r\n }\r\n var dif = this.adjustDifference(min, max); // previously it was max-min, but not worked well\r\n min = this.fixMin(min);\r\n max = this.fixMax(max);\r\n // this happens if starLocation and endLocation are 0.5 and DateAxis has only one date\r\n if (max - min <= 1 / Math.pow(10, 15)) {\r\n if (max - min != 0) {\r\n this._deltaMinMax = (max - min) / 2;\r\n }\r\n else {\r\n // the number by which we need to raise 10 to get difference\r\n var exponent = Math.log(Math.abs(max)) * Math.LOG10E;\r\n // here we find a number which is power of 10 and has the same count of numbers as difference has\r\n var power = Math.pow(10, Math.floor(exponent));\r\n // reduce this number by 10 times\r\n power = power / 10;\r\n this._deltaMinMax = power;\r\n }\r\n min -= this._deltaMinMax;\r\n max += this._deltaMinMax;\r\n }\r\n min -= (max - min) * this.extraMin;\r\n max += (max - min) * this.extraMax;\r\n var strict = this.strictMinMax;\r\n if ($type.isNumber(this._maxDefined)) {\r\n strict = true;\r\n }\r\n var minMaxStep = this.adjustMinMax(min, max, dif, this._gridCount, strict);\r\n min = minMaxStep.min;\r\n max = minMaxStep.max;\r\n dif = max - min; //new\r\n // do it for the second time (importat!)\r\n minMaxStep = this.adjustMinMax(min, max, max - min, this._gridCount, true);\r\n min = minMaxStep.min;\r\n max = minMaxStep.max;\r\n // return min max if strict\r\n if (this.strictMinMax) {\r\n if ($type.isNumber(this._minDefined)) {\r\n min = this._minDefined;\r\n }\r\n else {\r\n min = this._minReal;\r\n }\r\n if ($type.isNumber(this._maxDefined)) {\r\n max = this._maxDefined;\r\n }\r\n else {\r\n max = this._maxReal;\r\n }\r\n if (max - min <= 0.00000001) {\r\n min -= this._deltaMinMax;\r\n max += this._deltaMinMax;\r\n }\r\n min -= (max - min) * this.extraMin;\r\n max += (max - min) * this.extraMax;\r\n }\r\n if (this._adapterO) {\r\n min = this._adapterO.apply(\"min\", min);\r\n }\r\n if (this._adapterO) {\r\n max = this._adapterO.apply(\"max\", max);\r\n }\r\n this._step = minMaxStep.step;\r\n if (!$type.isNumber(min) && !$type.isNumber(max)) {\r\n this.start = 0;\r\n this.end = 1;\r\n this.renderer.labels.each(function (label) {\r\n label.dataItem.text = \"\";\r\n });\r\n }\r\n // checking isNumber is good when all series are hidden\r\n if ((this._minAdjusted != min || this._maxAdjusted != max) && $type.isNumber(min) && $type.isNumber(max)) {\r\n var animation = this._minMaxAnimation;\r\n if (this._extremesChanged && $type.isNumber(this._minAdjusted) && $type.isNumber(this._maxAdjusted) && this.inited) {\r\n if ((animation && !animation.isFinished()) && this._finalMax == max && this._finalMin == min) {\r\n return;\r\n }\r\n else {\r\n this._finalMin = min;\r\n this._finalMax = max;\r\n animation = this.animateMinMax(min, max);\r\n if (animation && !animation.isFinished()) {\r\n animation.events.on(\"animationprogress\", this.validateDataItems, this);\r\n animation.events.on(\"animationended\", function () {\r\n //this.validateDataItems();\r\n _this.series.each(function (series) {\r\n series.validate();\r\n });\r\n _this.validateDataItems();\r\n _this.handleSelectionExtremesChange();\r\n });\r\n this._minMaxAnimation = animation;\r\n }\r\n else {\r\n this.series.each(function (series) {\r\n series.invalidate();\r\n });\r\n }\r\n this.validateDataItems();\r\n this.dispatchImmediately(\"extremeschanged\");\r\n this.handleSelectionExtremesChange();\r\n }\r\n }\r\n else {\r\n if ((animation && !animation.isFinished()) && this._finalMax == max && this._finalMin == min) {\r\n return;\r\n }\r\n else {\r\n this._minAdjusted = min;\r\n this._maxAdjusted = max;\r\n this._finalMin = min;\r\n this._finalMax = max;\r\n this.invalidateDataItems();\r\n this.dispatchImmediately(\"extremeschanged\");\r\n this._saveMinMax(min, max);\r\n }\r\n }\r\n }\r\n this._extremesChanged = false;\r\n this._difference = this.adjustDifference(min, max);\r\n };\r\n /**\r\n * Adjusts the minimum value.\r\n *\r\n * This is a placeholder method for extending classes to override.\r\n *\r\n * For numeric values this does nothing, however for more complex types, like\r\n * dates, it may be necessary to adjust.\r\n *\r\n * @param value Value\r\n * @return Adjusted value\r\n */\r\n ValueAxis.prototype.fixMin = function (value) {\r\n return value;\r\n };\r\n /**\r\n * Adjusts the maximum value.\r\n *\r\n * This is a placeholder method for extending classes to override.\r\n *\r\n * For numeric values this does nothing, however for more complex types, like\r\n * dates, it may be necessary to adjust.\r\n *\r\n * @param value Value\r\n * @return Adjusted value\r\n */\r\n ValueAxis.prototype.fixMax = function (value) {\r\n return value;\r\n };\r\n /**\r\n * Adjusts actual min and max scale values so that the axis starts and ends\r\n * at \"nice\" values, unless `strictMinMax` is set.\r\n *\r\n * The `difference` can be something else than `max - min`, because of the\r\n * axis breaks.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param min [description]\r\n * @param max [description]\r\n * @param difference [description]\r\n * @param gridCount [description]\r\n * @param strictMode [description]\r\n * @return [description]\r\n */\r\n ValueAxis.prototype.adjustMinMax = function (min, max, difference, gridCount, strictMode) {\r\n // will fail if 0\r\n if (gridCount <= 1) {\r\n gridCount = 1;\r\n }\r\n gridCount = Math.round(gridCount);\r\n var initialMin = min;\r\n var initialMax = max;\r\n // in case min and max is the same, use max\r\n if (difference === 0) {\r\n difference = Math.abs(max);\r\n }\r\n // the number by which we need to raise 10 to get difference\r\n var exponent = Math.log(Math.abs(difference)) * Math.LOG10E;\r\n // here we find a number which is power of 10 and has the same count of numbers as difference has\r\n var power = Math.pow(10, Math.floor(exponent));\r\n // reduce this number by 10 times\r\n power = power / 10;\r\n var extra = power;\r\n if (strictMode) {\r\n extra = 0;\r\n }\r\n if (!this.logarithmic) {\r\n // round down min\r\n if (strictMode) {\r\n min = Math.floor(min / power) * power;\r\n // round up max\r\n max = Math.ceil(max / power) * power;\r\n }\r\n else {\r\n min = Math.ceil(min / power) * power - extra;\r\n // round up max\r\n max = Math.floor(max / power) * power + extra;\r\n }\r\n // don't let min go below 0 if real min is >= 0\r\n if (min < 0 && initialMin >= 0) {\r\n min = 0;\r\n }\r\n // don't let max go above 0 if real max is <= 0\r\n if (max > 0 && initialMax <= 0) {\r\n max = 0;\r\n }\r\n }\r\n else {\r\n if (min <= 0) {\r\n //throw Error(\"Logarithmic value axis can not have values <= 0.\");\r\n min = this.baseValue;\r\n }\r\n // @todo: think of a better way or to restrict zooming when no series are selected\r\n if (min == Infinity) {\r\n min = 1;\r\n }\r\n if (max == -Infinity) {\r\n max = 10;\r\n }\r\n if (this.strictMinMax) {\r\n if (this._minDefined > 0) {\r\n min = this._minDefined;\r\n }\r\n else {\r\n min = min;\r\n }\r\n if (this._maxDefined > 0) {\r\n max = max;\r\n }\r\n }\r\n else {\r\n min = Math.pow(10, Math.floor(Math.log(Math.abs(min)) * Math.LOG10E));\r\n max = Math.pow(10, Math.ceil(Math.log(Math.abs(max)) * Math.LOG10E));\r\n }\r\n }\r\n // repeat diff, exponent and power again with rounded values\r\n //difference = this.adjustDifference(min, max);\r\n /*\r\n\r\n if(min > initialMin){\r\n min = initialMin;\r\n }\r\n\r\n if(max < initialMax){\r\n max = initialMax;\r\n }\r\n */\r\n exponent = Math.log(Math.abs(difference)) * Math.LOG10E;\r\n power = Math.pow(10, Math.floor(exponent));\r\n power = power / 10;\r\n // approximate difference between two grid lines\r\n var step = Math.ceil((difference / gridCount) / power) * power;\r\n var stepPower = Math.pow(10, Math.floor(Math.log(Math.abs(step)) * Math.LOG10E));\r\n // TODO: in v3 I had fixStepE here, ommiting it for a while, need to think about other solution\r\n // the step should divide by 2, 5, and 10.\r\n var stepDivisor = Math.ceil(step / stepPower); // number 0 - 10\r\n if (stepDivisor > 5) {\r\n stepDivisor = 10;\r\n }\r\n else if (stepDivisor <= 5 && stepDivisor > 2) {\r\n stepDivisor = 5;\r\n }\r\n // now get real step\r\n step = Math.ceil(step / (stepPower * stepDivisor)) * stepPower * stepDivisor;\r\n if (this.maxPrecision < Number.MAX_VALUE && step != $math.ceil(step, this.maxPrecision)) {\r\n step = $math.ceil(step, this.maxPrecision);\r\n }\r\n var decCount = 0;\r\n // in case numbers are smaller than 1\r\n if (stepPower < 1) {\r\n // exponent is less then 1 too. Count decimals of exponent\r\n decCount = Math.round(Math.abs(Math.log(Math.abs(stepPower)) * Math.LOG10E)) + 1;\r\n // round step\r\n step = $math.round(step, decCount);\r\n }\r\n if (!this.logarithmic) {\r\n // final min and max\r\n var minCount = Math.floor(min / step);\r\n min = $math.round(step * minCount, decCount);\r\n var maxCount = void 0;\r\n if (!strictMode) {\r\n maxCount = Math.ceil(max / step);\r\n }\r\n else {\r\n maxCount = Math.floor(max / step);\r\n }\r\n if (maxCount == minCount) {\r\n maxCount++;\r\n }\r\n max = $math.round(step * maxCount, decCount);\r\n if (max < initialMax) {\r\n max = max + step;\r\n }\r\n if (min > initialMin) {\r\n min = min - step;\r\n }\r\n }\r\n return { min: min, max: max, step: step };\r\n };\r\n Object.defineProperty(ValueAxis.prototype, \"min\", {\r\n /**\r\n * @return Min value\r\n */\r\n get: function () {\r\n var min = this._minAdjusted;\r\n if (!$type.isNumber(min)) {\r\n min = this._minDefined;\r\n }\r\n return min;\r\n },\r\n /**\r\n * A minimum value for the axis scale.\r\n *\r\n * This value might be auto-adjusted by the Axis in order to accomodate the\r\n * grid nicely, i.e. plot area is divided by grid in nice equal cells.\r\n *\r\n * The above might be overridden by `strictMinMax` which will force exact\r\n * user-defined min and max values to be used for scale.\r\n *\r\n * @param value Min value\r\n */\r\n set: function (value) {\r\n if (this._minDefined != value) {\r\n this._minDefined = value;\r\n this.invalidate();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ValueAxis.prototype, \"minDefined\", {\r\n /**\r\n * Min value as defined by user's code, not auto-calculated.\r\n *\r\n * @readonly\r\n * @return Min value\r\n */\r\n get: function () {\r\n return this._minDefined;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ValueAxis.prototype, \"maxDefined\", {\r\n /**\r\n * Max value as defined by user's code, not auto-calculated.\r\n *\r\n * @readonly\r\n * @return Man value\r\n */\r\n get: function () {\r\n return this._maxDefined;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ValueAxis.prototype, \"extraMin\", {\r\n /**\r\n * @return {number}\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"extraMin\");\r\n },\r\n /**\r\n * Allows relatively adjusting minimum value of the axis' scale.\r\n *\r\n * The value is relative to the actual range of values currently displayed\r\n * on the axis.\r\n *\r\n * E.g.: 0.5 will mean half of the current range. If we have axis displaying\r\n * from 100 to 200, we will now have axis displaying from 50 to 200 because\r\n * we asked to expand minimum value by 50% (0.5).\r\n *\r\n * NOTE: this setting is not compatible with `strictMinMax`.\r\n *\r\n * @param {number}\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"extraMin\", value)) {\r\n this.invalidateDataItems();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ValueAxis.prototype, \"extraMax\", {\r\n /**\r\n * @return Min multiplier\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"extraMax\");\r\n },\r\n /**\r\n * Allows relatively adjusting maximum value of the axis' scale.\r\n *\r\n * The value is relative to the actual range of values currently displayed\r\n * on the axis.\r\n *\r\n * E.g.: 0.5 will mean half of the current range. If we have axis displaying\r\n * from 100 to 200, we will now have axis displaying from 100 to 250 because\r\n * we asked to expand maximum value by 50% (0.5).\r\n *\r\n * NOTE: this setting is not compatible with `strictMinMax`.\r\n *\r\n * @param {number}\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"extraMax\", value)) {\r\n this.invalidateDataItems();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ValueAxis.prototype, \"step\", {\r\n /**\r\n * Current calculated delta in values between two adjacent grid lines (step).\r\n *\r\n * This is a read-only value and cannot be used to set actual step.\r\n *\r\n * @readonly\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/axes/positioning-axis-elements/#Setting_the_density_of_the_the_grid_labels} For more information about modifying density of labels\r\n * @return [description]\r\n */\r\n get: function () {\r\n return this._step;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ValueAxis.prototype, \"max\", {\r\n /**\r\n * @return Max value\r\n */\r\n get: function () {\r\n var max = this._maxAdjusted;\r\n if (!$type.isNumber(max)) {\r\n max = this._maxDefined;\r\n }\r\n return max;\r\n },\r\n /**\r\n * A maximum value for the axis scale.\r\n *\r\n * This value might be auto-adjusted by the Axis in order to accomodate the\r\n * grid nicely, i.e. plot area is divided by grid in nice equal cells.\r\n *\r\n * The above might be overridden by `strictMinMax` which will force exact\r\n * user-defined min and max values to be used for scale.\r\n *\r\n * @param value Max value\r\n */\r\n set: function (value) {\r\n if (this._maxDefined != value) {\r\n this._maxDefined = value;\r\n this.invalidate();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ValueAxis.prototype, \"adjustLabelPrecision\", {\r\n /**\r\n * @return Adjust precision\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"adjustLabelPrecision\");\r\n },\r\n /**\r\n * By default the axis will adjust precision of all numbers to match number\r\n * of decimals in all its labels, e.g.: `1.0`, `1.5`, `2.0`.\r\n *\r\n * To disable set `adjustLabelPrecision` to `false`, to use whatever other\r\n * precision or number format settings are set.\r\n *\r\n * IMPORTANT: This setting will be ignored if your number format uses\r\n * modifiers, e.g. `\"#a\"`.\r\n *\r\n * @default true\r\n * @since 4.9.14\r\n * @param value Adjust precision\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"adjustLabelPrecision\", value)) {\r\n this.invalidate();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Used for the Series to register itself as the user of this Axis.\r\n *\r\n * This will also decorate both the Series and Axis with event handlers, used\r\n * to redraw on Axis position/zoom change.\r\n *\r\n * A disposer for those events is returned, so that they can be disposed\r\n * together with Series.\r\n *\r\n * @ignore Exclude from docs\r\n * @param series Series\r\n * @return Disposer for events\r\n */\r\n ValueAxis.prototype.registerSeries = function (series) {\r\n return new MultiDisposer([\r\n _super.prototype.registerSeries.call(this, series),\r\n series.events.on(\"extremeschanged\", this.handleExtremesChange, this, false),\r\n series.events.on(\"selectionextremeschanged\", this.handleSelectionExtremesChange, this, false),\r\n this.events.on(\"extremeschanged\", series.invalidate, series, false)\r\n ]);\r\n };\r\n /**\r\n * Perform tasks after Axis zoom.\r\n */\r\n ValueAxis.prototype.handleSelectionExtremesChange = function () {\r\n var _this = this;\r\n var selectionMin;\r\n var selectionMax;\r\n var allHidden = true;\r\n $iter.each(this.series.iterator(), function (series) {\r\n if (!series.ignoreMinMax && !series.isHidden && !series.outOfRange) {\r\n if (series.visible && !series.isHiding) {\r\n allHidden = false;\r\n }\r\n var seriesSelectionMin = series.selectionMin(_this);\r\n var seriesSelectionMax = series.selectionMax(_this);\r\n if ($type.isNumber(seriesSelectionMin)) {\r\n if (!$type.isNumber(selectionMin) || (seriesSelectionMin < selectionMin)) {\r\n selectionMin = seriesSelectionMin;\r\n }\r\n }\r\n // check max\r\n if ($type.isNumber(seriesSelectionMax)) {\r\n if (!$type.isNumber(selectionMax) || (seriesSelectionMax > selectionMax)) {\r\n selectionMax = seriesSelectionMax;\r\n }\r\n }\r\n }\r\n });\r\n if (this.includeRangesInMinMax) {\r\n this.axisRanges.each(function (range) {\r\n if (!range.ignoreMinMax) {\r\n var minValue = $math.min(range.value, range.endValue);\r\n var maxValue = $math.max(range.value, range.endValue);\r\n if (minValue < selectionMin) {\r\n selectionMin = minValue;\r\n }\r\n if (maxValue > selectionMax) {\r\n selectionMax = maxValue;\r\n }\r\n }\r\n });\r\n }\r\n // this is not good, as if date axis is initially zoomed, selection of y axis is reset to 0, 1 at the end of this method\r\n //$iter.each(this.series.iterator(), (series) => {\r\n //\tif (!series.appeared) {\r\n //\t\tallHidden = true;\r\n //\t}\r\n //})\r\n if ($type.isNumber(this._minDefined)) {\r\n if (this.strictMinMax) {\r\n selectionMin = this._minDefined;\r\n }\r\n else {\r\n selectionMin = this.min;\r\n }\r\n }\r\n else if (this.strictMinMax) {\r\n selectionMin = this._minReal;\r\n }\r\n if ($type.isNumber(this._maxDefined)) {\r\n if (this.strictMinMax) {\r\n selectionMax = this._maxDefined;\r\n }\r\n else {\r\n selectionMax = this.max;\r\n }\r\n }\r\n else if (this.strictMinMax) {\r\n selectionMax = this._maxReal;\r\n }\r\n if (selectionMin == selectionMax) {\r\n selectionMin -= this._deltaMinMax;\r\n selectionMax += this._deltaMinMax;\r\n var minMaxStep2 = this.adjustMinMax(selectionMin, selectionMax, 0, this._gridCount, this.strictMinMax);\r\n selectionMin = minMaxStep2.min;\r\n selectionMax = minMaxStep2.max;\r\n }\r\n var dif = this.adjustDifference(selectionMin, selectionMax);\r\n var minMaxStep = this.adjustMinMax(selectionMin, selectionMax, dif, this._gridCount);\r\n selectionMin = minMaxStep.min;\r\n selectionMax = minMaxStep.max;\r\n selectionMin -= (selectionMax - selectionMin) * this.extraMin;\r\n selectionMax += (selectionMax - selectionMin) * this.extraMax;\r\n selectionMin = $math.fitToRange(selectionMin, this.min, this.max);\r\n selectionMax = $math.fitToRange(selectionMax, this.min, this.max);\r\n // do it for the second time !important\r\n dif = this.adjustDifference(selectionMin, selectionMax);\r\n minMaxStep = this.adjustMinMax(selectionMin, selectionMax, dif, this._gridCount, true);\r\n selectionMin = minMaxStep.min;\r\n selectionMax = minMaxStep.max;\r\n if (this.strictMinMax) {\r\n selectionMin = $math.max(selectionMin, this._minDefined);\r\n selectionMax = $math.min(selectionMax, this._maxDefined);\r\n }\r\n var step = minMaxStep.step;\r\n if (this.syncWithAxis) {\r\n minMaxStep = this.syncAxes(selectionMin, selectionMax, step);\r\n selectionMin = minMaxStep.min;\r\n selectionMax = minMaxStep.max;\r\n this.invalidate();\r\n }\r\n step = minMaxStep.step;\r\n // needed because of grouping\r\n this._difference = this.adjustDifference(this.min, this.max);\r\n var start = this.valueToPosition(selectionMin);\r\n var end = this.valueToPosition(selectionMax);\r\n // in case all series are hidden or hiding, full zoomout\r\n if (allHidden && !this.syncWithAxis) {\r\n start = 0;\r\n end = 1;\r\n }\r\n var declination = 0;\r\n if (this.syncWithAxis) {\r\n declination = 5;\r\n this.setCache(selectionMin + \"-\" + selectionMax, step);\r\n }\r\n else {\r\n if (this._step != step || this._minZoomed != selectionMin || this._maxZoomed != selectionMax) {\r\n this._dsc = true;\r\n }\r\n this._step = step;\r\n this._minZoomed = selectionMin;\r\n this._maxZoomed = selectionMax;\r\n }\r\n if (!this.keepSelection) {\r\n this.zoom({ start: start, end: end }, false, false, declination);\r\n }\r\n };\r\n Object.defineProperty(ValueAxis.prototype, \"strictMinMax\", {\r\n /**\r\n * @return Use exact values?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"strictMinMax\");\r\n },\r\n /**\r\n * Indicates whether to blindly use exact `min` and `max` values set by user\r\n * when generating Axis scale.\r\n *\r\n * If not set, the Axis might slightly adjust those values to accomodate a\r\n * better looking grid.\r\n *\r\n * NOTE: if `min` and `max` are not set, setting `strictMinMax` to `true`\r\n * will result in fixing the scale of the axis to actual lowest and highest\r\n * values in the series within currently selected scope.\r\n *\r\n * @default false\r\n * @param value Use exact values?\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"strictMinMax\", value)) {\r\n this.invalidate();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ValueAxis.prototype, \"logarithmic\", {\r\n /**\r\n * @return Logarithmic scale?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"logarithmic\");\r\n },\r\n /**\r\n * Indicates if this axis should use a logarithmic scale.\r\n *\r\n * Please note that logarithmic axis can **only** accommodate values bigger\r\n * than zero.\r\n *\r\n * Having zero or negative values will result in error and failure of the\r\n * whole chart.\r\n *\r\n * @param value Logarithmic scale?\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"logarithmic\", value)) {\r\n this.invalidate();\r\n this.series.each(function (series) {\r\n series.invalidateDataItems();\r\n });\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ValueAxis.prototype, \"keepSelection\", {\r\n /**\r\n * @return Preseve zoom after data update?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"keepSelection\");\r\n },\r\n /**\r\n * Indicates if a current selection (zoom) should be kept across data updates.\r\n *\r\n * If your axis is zoomed while chart's data is updated, the axis will try\r\n * to retain the same start and end values.\r\n *\r\n * You can also use this to initially pre-zoom axis:\r\n *\r\n * ```TypeScript\r\n * axis.keepSelection = true;\r\n * axis.start = 0.5;\r\n * axis.end = 0.7;\r\n * ```\r\n * ```JavaScript\r\n * axis.keepSelection = true;\r\n * axis.start = 0.5;\r\n * axis.end = 0.7;\r\n * ```\r\n * ```JSON\r\n * {\r\n * \"xAxes\": [{\r\n * // ...\r\n * \"keepSelection\": true,\r\n * \"start\": 0.5,\r\n * \"end\": 0.7\r\n * }]\r\n * }\r\n * ```\r\n *\r\n * The above will start the chart zoomed from the middle of the actual scope\r\n * to 70%.\r\n *\r\n * @since 4.1.1\r\n * @default false\r\n * @param value Preseve zoom after data update?\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"keepSelection\", value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ValueAxis.prototype, \"includeRangesInMinMax\", {\r\n /**\r\n * @return Include ranges?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"includeRangesInMinMax\");\r\n },\r\n /**\r\n * If set to `true`, values of axis ranges will be included when calculating\r\n * range of values / scale of the [[ValueAxis]].\r\n *\r\n * @default false\r\n * @since 4.4.9\r\n * @param value Include ranges?\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"includeRangesInMinMax\", value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ValueAxis.prototype, \"maxPrecision\", {\r\n /**\r\n * @return max precision\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"maxPrecision\");\r\n },\r\n /**\r\n * Maximum number of decimals to allow when placing grid lines and labels\r\n * on axis.\r\n *\r\n * Set it to `0` (zero) to force integer-only axis labels.\r\n *\r\n * @param {number}\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"maxPrecision\", value)) {\r\n this.invalidate();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ValueAxis.prototype, \"extraTooltipPrecision\", {\r\n /**\r\n * @return Extra decimals\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"extraTooltipPrecision\");\r\n },\r\n /**\r\n * This setting allows using bigger precision for numbers displayed in axis\r\n * tooltip.\r\n *\r\n * Please note that this setting indicates additional decimal places to\r\n * automatically-calculated axis number precision.\r\n *\r\n * So if your axis displays numbers like 0.1, 0.2, etc. (one decimal place),\r\n * and you set `extraTooltipPrecision = 1`, tooltips will display numbers\r\n * like 0.12, 0.25, etc. (two decimal places).\r\n *\r\n * @default 0\r\n * @since 4.8.3\r\n * @param value Extra decimals\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"extraTooltipPrecision\", value)) {\r\n this.invalidate();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Invalidates axis data items when series extremes change\r\n */\r\n ValueAxis.prototype.handleExtremesChange = function () {\r\n var _this = this;\r\n this._extremesChanged = true;\r\n this.getMinMax();\r\n if (this.ghostLabel) {\r\n var mw_1 = 0;\r\n this.dataItems.each(function (dataItem) {\r\n if (dataItem.label && dataItem.label.pixelWidth > mw_1) {\r\n _this.ghostLabel.text = dataItem.label.currentText;\r\n }\r\n });\r\n }\r\n };\r\n /**\r\n * Returns relative position on axis for series' data item's value.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description (review)\r\n * @param dataItem Data item\r\n * @param key Data field to get value from\r\n * @param location Location (0-1)\r\n * @param stackKey ?\r\n * @return X coordinate (px)\r\n */\r\n ValueAxis.prototype.getX = function (dataItem, key, location, stackKey, range) {\r\n return this.renderer.positionToPoint(this.getPositionX(dataItem, key, location, stackKey, range)).x;\r\n };\r\n /**\r\n * Returns the X coordinate for series' data item's value.\r\n *\r\n * @since 4.5.14\r\n * @param dataItem Data item\r\n * @param key Data field to get value from\r\n * @param location Location (0-1)\r\n * @param stackKey ?\r\n * @return Relative position\r\n */\r\n ValueAxis.prototype.getPositionX = function (dataItem, key, location, stackKey, range) {\r\n var value = dataItem.getWorkingValue(key);\r\n if (!$type.hasValue(stackKey)) {\r\n stackKey = \"valueX\";\r\n }\r\n var stack = dataItem.getValue(stackKey, \"stack\");\r\n if (!$type.isNumber(value)) {\r\n value = this.baseValue;\r\n if (this.logarithmic) {\r\n if (stack > 0) {\r\n value = 0;\r\n }\r\n }\r\n }\r\n var position = this.valueToPosition(value + stack);\r\n if (range) {\r\n position = $math.fitToRange(position, range.start, range.end);\r\n }\r\n return position;\r\n };\r\n /**\r\n * Returns the Y coordinate for series' data item's value.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description (review)\r\n * @param dataItem Data item\r\n * @param key Data field to get value from\r\n * @param location Location (0-1)\r\n * @param stackKey Stack ID\r\n * @return Y coordinate (px)\r\n */\r\n ValueAxis.prototype.getY = function (dataItem, key, location, stackKey, range) {\r\n return this.renderer.positionToPoint(this.getPositionY(dataItem, key, location, stackKey, range)).y;\r\n };\r\n /**\r\n * Returns relative position on axis for series' data item's value.\r\n *\r\n * @since 4.5.14\r\n * @param dataItem Data item\r\n * @param key Data field to get value from\r\n * @param location Location (0-1)\r\n * @param stackKey Stack ID\r\n * @return Relative position\r\n */\r\n ValueAxis.prototype.getPositionY = function (dataItem, key, location, stackKey, range) {\r\n var value = dataItem.getWorkingValue(key);\r\n if (!$type.hasValue(stackKey)) {\r\n stackKey = \"valueY\";\r\n }\r\n var stack = dataItem.getValue(stackKey, \"stack\");\r\n if (!$type.isNumber(value)) {\r\n value = this.baseValue;\r\n if (this.logarithmic) {\r\n if (stack > 0) {\r\n value = 0;\r\n }\r\n }\r\n }\r\n var position = this.valueToPosition(value + stack);\r\n if (range) {\r\n position = $math.fitToRange(position, range.start, range.end);\r\n }\r\n return position;\r\n };\r\n /**\r\n * Returns an angle for series data item.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description (review)\r\n * @param dataItem Data item\r\n * @param key Data field to get value from\r\n * @param location Location (0-1)\r\n * @param stackKey Stack ID\r\n * @param range Range to fit in\r\n * @return Angle\r\n */\r\n ValueAxis.prototype.getAngle = function (dataItem, key, location, stackKey, range) {\r\n var value = dataItem.getWorkingValue(key);\r\n var stack = dataItem.getValue(stackKey, \"stack\");\r\n if (!$type.isNumber(value)) {\r\n value = this.baseValue;\r\n }\r\n var position = this.valueToPosition(value + stack);\r\n if (range) {\r\n position = $math.fitToRange(position, range.start, range.end);\r\n }\r\n return this.positionToAngle(position);\r\n };\r\n /**\r\n * [getAnyRangePath description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param start [description]\r\n * @param end [description]\r\n * @param location [description]\r\n * @return [description]\r\n */\r\n ValueAxis.prototype.getAnyRangePath = function (start, end, location) {\r\n var startPosition = this.valueToPosition(start);\r\n var endPosition = this.valueToPosition(end);\r\n return this.getPositionRangePath(startPosition, endPosition); // Base class (Axis) gets range shape from AxisRenderer\r\n };\r\n /**\r\n * Returns text to show in a axis tooltip, based on specific position within\r\n * axis.\r\n *\r\n * The label will be formatted as per [[NumberFormatter]] set for the whole\r\n * chart, or explicitly for this Axis.\r\n *\r\n * @ignore Exclude from docs\r\n * @param position Position (px)\r\n * @return Label (numeric value)\r\n */\r\n ValueAxis.prototype.getTooltipText = function (position) {\r\n var value = $math.round(this.positionToValue(position), this._stepDecimalPlaces + this.extraTooltipPrecision);\r\n var valueStr = this.tooltip.numberFormatter.format(value);\r\n if (!this._adapterO) {\r\n return valueStr;\r\n }\r\n else {\r\n return this._adapterO.apply(\"getTooltipText\", valueStr);\r\n }\r\n };\r\n /**\r\n * Zooms axis to specific values.\r\n *\r\n * @param startValue Start value\r\n * @param endValue End value\r\n * @param skipRangeEvent Do not invoke events\r\n * @param instantly Do not play zoom animations\r\n */\r\n ValueAxis.prototype.zoomToValues = function (startValue, endValue, skipRangeEvent, instantly) {\r\n var start = (startValue - this.min) / (this.max - this.min);\r\n var end = (endValue - this.min) / (this.max - this.min);\r\n this.zoom({ start: start, end: end }, skipRangeEvent, instantly);\r\n };\r\n Object.defineProperty(ValueAxis.prototype, \"minZoomed\", {\r\n /**\r\n * A smallest value in axis scale within current zoom.\r\n *\r\n * @return Min zoom value\r\n */\r\n get: function () {\r\n if (!this.syncWithAxis) {\r\n return $math.max(this.min, this._minZoomed);\r\n }\r\n else {\r\n return this._minZoomed;\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ValueAxis.prototype, \"maxZoomed\", {\r\n /**\r\n * A biggest value in axis scale within current zoom.\r\n * @return [description]\r\n */\r\n get: function () {\r\n if (!this.syncWithAxis) {\r\n return $math.min(this.max, this._maxZoomed);\r\n }\r\n else {\r\n return this._maxZoomed;\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Updates positioning of Axis breaks after something changes.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n ValueAxis.prototype.fixAxisBreaks = function () {\r\n var _this = this;\r\n _super.prototype.fixAxisBreaks.call(this);\r\n var axisBreaks = this._axisBreaks;\r\n if (axisBreaks && axisBreaks.length > 0) {\r\n // process breaks\r\n axisBreaks.each(function (axisBreak) {\r\n var startValue = axisBreak.adjustedStartValue;\r\n var endValue = axisBreak.adjustedEndValue;\r\n // break difference\r\n var axisBreakDif = endValue - startValue;\r\n var axisBreakGridCount = Math.ceil(axisBreakDif * axisBreak.breakSize) * _this._gridCount / (_this.max - _this.min);\r\n // calculate min, max and step for axis break\r\n var breakMinMaxStep = _this.adjustMinMax(startValue, endValue, axisBreakDif, axisBreakGridCount, true);\r\n axisBreak.adjustedStep = breakMinMaxStep.step;\r\n axisBreak.adjustedMin = breakMinMaxStep.min;\r\n axisBreak.adjustedMax = breakMinMaxStep.max;\r\n });\r\n }\r\n this._difference = this.adjustDifference(this.min, this.max);\r\n };\r\n /**\r\n * Returns value based on position.\r\n *\r\n * Please note that `position` represents position within axis which may be\r\n * zoomed and not correspond to Cursor's `position`.\r\n *\r\n * To convert Cursor's `position` to Axis' `position` use `toAxisPosition()` method.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/tutorials/tracking-cursors-position-via-api/#Tracking_Cursor_s_position} For more information about cursor tracking.\r\n * @param position Relative position on axis (0-1)\r\n * @return Position label\r\n */\r\n ValueAxis.prototype.getPositionLabel = function (position) {\r\n var value = this.positionToValue(position);\r\n return this.numberFormatter.format(value);\r\n };\r\n /**\r\n * Shows Axis tooltip at specific value\r\n *\r\n * @param value Value\r\n */\r\n ValueAxis.prototype.showTooltipAt = function (value) {\r\n this.showTooltipAtPosition(this.valueToPosition(value));\r\n };\r\n /**\r\n * Copies all properties and related data from a different instance of Axis.\r\n *\r\n * @param source Source Axis\r\n */\r\n ValueAxis.prototype.copyFrom = function (source) {\r\n _super.prototype.copyFrom.call(this, source);\r\n this.min = source.min;\r\n this.max = source.max;\r\n this.calculateTotals = source.calculateTotals;\r\n this._baseValue = source.baseValue;\r\n };\r\n Object.defineProperty(ValueAxis.prototype, \"syncWithAxis\", {\r\n /**\r\n * @return Target axis\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"syncWithAxis\");\r\n },\r\n /**\r\n * Enables syncing of grid with another axis.\r\n *\r\n * To enable, set to a reference of the other `ValueAxis`. This axis will try\r\n * to maintain its scale in such way that its grid matches target axis grid.\r\n *\r\n * IMPORTANT #1: At this stage it's an experimental feature. Use it at your\r\n * own risk, as it may not work in 100% of the scenarios.\r\n *\r\n * IMPORTANT #2: `syncWithAxis` is not compatible with `strictMinMax` and\r\n * `sequencedInterpolation` settings.\r\n *\r\n * IMPORTANT #3: `syncWithAxis` is not compatible with scrollbars. Make sure\r\n * you do not add a scrollbar in the same direction as synced axes. For\r\n * example, if you have vertical synced axes, do not add `scrollbarY` on\r\n * your chart. It will create anomalies when used.\r\n *\r\n * IMPORTANT #4: `syncWithAxis` is not compatible with `XYCursor` if it has\r\n * its `behavior` set to either `zoomY` or `zoomXY`.\r\n *\r\n * @since 4.8.1\r\n * @param axis Target axis\r\n */\r\n set: function (axis) {\r\n var _this = this;\r\n if (this.setPropertyValue(\"syncWithAxis\", axis, true)) {\r\n if (axis) {\r\n this._disposers.push(axis.events.on(\"extremeschanged\", this.handleSelectionExtremesChange, this, false));\r\n this._disposers.push(axis.events.on(\"selectionextremeschanged\", this.handleSelectionExtremesChange, this, false));\r\n this._disposers.push(axis.events.on(\"startendchanged\", this.handleSelectionExtremesChange, this, false));\r\n this.events.on(\"shown\", this.handleSelectionExtremesChange, this, false);\r\n this.events.on(\"maxsizechanged\", function () {\r\n _this.clearCache();\r\n _this._disposers.push(registry.events.once(\"exitframe\", function () {\r\n _this.handleSelectionExtremesChange();\r\n }));\r\n }, this, false);\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ValueAxis.prototype, \"treatZeroAs\", {\r\n /**\r\n * @return Zero replacement value\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"treatZeroAs\");\r\n },\r\n /**\r\n * If set, zero values will be treated as this value.\r\n *\r\n * It is useful if you need to use data with zero-values on a logarithmic\r\n * axis scale.\r\n *\r\n * @since 4.9.34\r\n * @param value Zero replacement value\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"treatZeroAs\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Syncs with a target axis.\r\n *\r\n * @param min Min\r\n * @param max Max\r\n * @param step Step\r\n */\r\n ValueAxis.prototype.syncAxes = function (min, max, step) {\r\n var axis = this.syncWithAxis;\r\n if (axis) {\r\n if (!$type.isNumber(min)) {\r\n min = this.min;\r\n }\r\n if (!$type.isNumber(max)) {\r\n max = this.max;\r\n }\r\n if (!$type.isNumber(step)) {\r\n step = this._step;\r\n }\r\n var count = Math.round((axis.maxZoomed - axis.minZoomed) / axis.step);\r\n var currentCount = Math.round((max - min) / step);\r\n if ($type.isNumber(count) && $type.isNumber(currentCount)) {\r\n var synced = false;\r\n var c = 0;\r\n var diff = (max - min) * 0.01;\r\n var omin = min;\r\n var omax = max;\r\n var ostep = step;\r\n while (synced != true) {\r\n synced = this.checkSync(omin, omax, ostep, count);\r\n c++;\r\n if (c > 1000) {\r\n synced = true;\r\n }\r\n if (!synced) {\r\n //omin = min - diff * c;\r\n if (c / 3 == Math.round(c / 3)) {\r\n omin = min - diff * c;\r\n if (min >= 0 && omin < 0) {\r\n omin = 0;\r\n }\r\n }\r\n else {\r\n omax = max + diff * c;\r\n if (omax <= 0 && omax > 0) {\r\n omax = 0;\r\n }\r\n }\r\n var minMaxStep = this.adjustMinMax(omin, omax, omax - omin, this._gridCount, true);\r\n omin = minMaxStep.min;\r\n omax = minMaxStep.max;\r\n ostep = minMaxStep.step;\r\n }\r\n else {\r\n min = omin;\r\n max = omax;\r\n step = ostep;\r\n }\r\n }\r\n }\r\n }\r\n return { min: min, max: max, step: step };\r\n };\r\n /**\r\n * Returns `true` if axis needs to be resunced with some other axis.\r\n */\r\n ValueAxis.prototype.checkSync = function (min, max, step, count) {\r\n var currentCount = (max - min) / step;\r\n for (var i = 1; i < count; i++) {\r\n if ($math.round(currentCount / i, 1) == count || currentCount * i == count) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n };\r\n /**\r\n * Processes JSON-based config before it is applied to the object.\r\n *\r\n * @ignore Exclude from docs\r\n * @param config Config\r\n */\r\n ValueAxis.prototype.processConfig = function (config) {\r\n if (config) {\r\n // Set up axes\r\n if ($type.hasValue(config.syncWithAxis) && $type.isString(config.syncWithAxis)) {\r\n if (this.map.hasKey(config.syncWithAxis)) {\r\n config.syncWithAxis = this.map.getKey(config.syncWithAxis);\r\n }\r\n else {\r\n this.processingErrors.push(\"[ValueAxis] No axis with id \\\"\" + config.syncWithAxis + \"\\\" found for `syncWithAxis`\");\r\n delete config.xAxis;\r\n }\r\n }\r\n }\r\n _super.prototype.processConfig.call(this, config);\r\n };\r\n ValueAxis.prototype._saveMinMax = function (_min, _max) {\r\n };\r\n return ValueAxis;\r\n}(Axis));\r\nexport { ValueAxis };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"ValueAxis\"] = ValueAxis;\r\nregistry.registeredClasses[\"ValueAxisDataItem\"] = ValueAxisDataItem;\r\n","/**\r\n * Module, defining Axis Renderer for vertical axes.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { AxisRenderer } from \"./AxisRenderer\";\r\nimport { AxisBullet } from \"./AxisBullet\";\r\nimport { WavedLine } from \"../../core/elements/WavedLine\";\r\nimport { WavedRectangle } from \"../../core/elements/WavedRectangle\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport { percent, Percent } from \"../../core/utils/Percent\";\r\nimport * as $math from \"../../core/utils/Math\";\r\nimport * as $path from \"../../core/rendering/Path\";\r\nimport * as $utils from \"../../core/utils/Utils\";\r\nimport * as $type from \"../../core/utils/Type\";\r\nimport { defaultRules, ResponsiveBreakpoints } from \"../../core/utils/Responsive\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * A renderer for horizontal axis.\r\n *\r\n * @see {@link IAxisRendererEvents} for a list of available events\r\n * @see {@link IAxisRendererAdapters} for a list of available Adapters\r\n */\r\nvar AxisRendererX = /** @class */ (function (_super) {\r\n __extends(AxisRendererX, _super);\r\n /**\r\n * Constructor.\r\n *\r\n * @param axis Related axis\r\n */\r\n function AxisRendererX() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"AxisRendererX\";\r\n _this.minGridDistance = 120;\r\n _this.opposite = false;\r\n _this.rotation = 0;\r\n _this.width = percent(100);\r\n _this.labels.template.horizontalCenter = \"middle\";\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * @ignore\r\n */\r\n AxisRendererX.prototype.setAxis = function (axis) {\r\n _super.prototype.setAxis.call(this, axis);\r\n axis.layout = \"vertical\";\r\n };\r\n /**\r\n * @ignore\r\n */\r\n AxisRendererX.prototype.updateGridContainer = function () {\r\n var axis = this.axis;\r\n if (axis) {\r\n var gridContainer = this.gridContainer;\r\n gridContainer.x = axis.pixelX;\r\n gridContainer.width = axis.axisLength;\r\n }\r\n };\r\n /**\r\n * Called when rendered is attached to an Axis, as well as a property of\r\n * Axis that might affect the appearance is updated.\r\n *\r\n * E.g. `axis.opposite`, `axis.inside`, etc.\r\n *\r\n * This method is called **before** draw, so that any related setting\r\n * changed in this method can be changed.\r\n *\r\n * @todo Description (review)\r\n * @ignore Exclude from docs\r\n */\r\n AxisRendererX.prototype.processRenderer = function () {\r\n _super.prototype.processRenderer.call(this);\r\n // can not do this in init, as axis is set later\r\n var axis = this.axis;\r\n if (axis) {\r\n if (!(axis.width instanceof Percent)) {\r\n axis.width = percent(100);\r\n }\r\n // @todo Is thi sneeded?\r\n $utils.used(this.line);\r\n var title = axis.title;\r\n title.rotation = 0;\r\n title.align = \"center\";\r\n if (this.opposite) {\r\n this.line.toFront();\r\n title.toBack();\r\n }\r\n else {\r\n title.toFront();\r\n this.toBack();\r\n this.line.toBack();\r\n }\r\n }\r\n };\r\n /**\r\n * Updates some of the Axis tooltip's visual properties, related to\r\n * rendering of the Axis.\r\n *\r\n * @todo Description (review)\r\n * @ignore Exclude from docs\r\n */\r\n AxisRendererX.prototype.updateTooltip = function () {\r\n var axis = this.axis;\r\n if (axis) {\r\n var bigNum = 1000;\r\n var bbx = this.line.pixelX;\r\n var bby = this.line.pixelY;\r\n var bbw = this.axisLength;\r\n var bbh = bigNum;\r\n // top\r\n if (this.opposite) {\r\n if (!this.inside) {\r\n bby = -bigNum;\r\n bbh = bigNum;\r\n }\r\n }\r\n // bottom\r\n else {\r\n if (this.inside) {\r\n bby = -bigNum;\r\n bbh = bigNum;\r\n }\r\n }\r\n this.axis.updateTooltip(\"vertical\", { x: bbx, y: bby, width: bbw, height: bbh });\r\n }\r\n };\r\n /**\r\n * Updates and positions a label element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param label Label element\r\n * @param position Starting position\r\n * @param endPosition Ending position\r\n */\r\n AxisRendererX.prototype.updateLabelElement = function (label, position, endPosition, location) {\r\n if (!$type.hasValue(location)) {\r\n location = label.location;\r\n }\r\n position = position + (endPosition - position) * location;\r\n var point = this.positionToPoint(position);\r\n label.isMeasured = !label.inside;\r\n var deltaY = 0;\r\n var verticalCenter;\r\n var maxHeight = this.gridContainer.maxHeight;\r\n if (this.opposite) {\r\n if (label.inside) {\r\n verticalCenter = \"top\";\r\n if (label.valign == \"bottom\") {\r\n deltaY = maxHeight;\r\n verticalCenter = \"bottom\";\r\n }\r\n if (label.valign == \"middle\") {\r\n deltaY = maxHeight / 2;\r\n verticalCenter = \"middle\";\r\n }\r\n }\r\n else {\r\n verticalCenter = \"bottom\";\r\n }\r\n point.y = deltaY;\r\n }\r\n else {\r\n if (label.inside) {\r\n verticalCenter = \"bottom\";\r\n if (label.valign == \"top\") {\r\n deltaY = -maxHeight;\r\n verticalCenter = \"top\";\r\n }\r\n if (label.valign == \"middle\") {\r\n deltaY = -maxHeight / 2;\r\n verticalCenter = \"middle\";\r\n }\r\n }\r\n else {\r\n verticalCenter = \"top\";\r\n }\r\n point.y += deltaY;\r\n }\r\n if (label.rotation == 0) {\r\n // Apply fuzzy logic to verticalCenter only if labels are not rotated\r\n label.verticalCenter = verticalCenter;\r\n }\r\n this.positionItem(label, point);\r\n this.toggleVisibility(label, position, this.minLabelPosition, this.maxLabelPosition);\r\n };\r\n Object.defineProperty(AxisRendererX.prototype, \"axisLength\", {\r\n /**\r\n * Returns actual length of the Axis, in pixels.\r\n *\r\n * @return Length (px)\r\n */\r\n get: function () {\r\n var axis = this.axis;\r\n return (axis.measuredWidth - axis.pixelPaddingRight - axis.pixelPaddingLeft) || 0;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Converts relative position on axis to point coordinates.\r\n *\r\n * @param position Position (0-1)\r\n * @param position2 Position (0-1) Position on the second axis\r\n * @return Point\r\n */\r\n AxisRendererX.prototype.positionToPoint = function (position, position2) {\r\n return { x: this.positionToCoordinate(position), y: 0 };\r\n };\r\n /**\r\n * Converts a point at specific coordinates to a relative position (0-1)\r\n * on the axis.\r\n *\r\n * @param point Point\r\n * @return Position (0-1)\r\n */\r\n AxisRendererX.prototype.pointToPosition = function (point) {\r\n return this.coordinateToPosition(point.x, point.y);\r\n };\r\n /**\r\n * [getPositionRangePath description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param startPosition Starting position\r\n * @param endPosition End position\r\n * @return SVG path\r\n */\r\n AxisRendererX.prototype.getPositionRangePath = function (startPosition, endPosition) {\r\n var x1 = $math.fitToRange(this.positionToCoordinate(startPosition), 0, this.axisLength);\r\n var x2 = $math.fitToRange(this.positionToCoordinate(endPosition), 0, this.axisLength);\r\n var w = Math.abs(x2 - x1);\r\n var h = this.getHeight();\r\n var x = Math.min(x1, x2);\r\n var y = 0;\r\n return $path.rectToPath({\r\n x: x,\r\n y: y,\r\n width: w,\r\n height: h\r\n }, true);\r\n };\r\n /**\r\n * Updates and positions an axis break element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param axisBreak Break element\r\n */\r\n AxisRendererX.prototype.updateBreakElement = function (axisBreak) {\r\n _super.prototype.updateBreakElement.call(this, axisBreak);\r\n var startLine = axisBreak.startLine;\r\n var endLine = axisBreak.endLine;\r\n var fillShape = axisBreak.fillShape;\r\n var startPoint = axisBreak.startPoint;\r\n var endPoint = axisBreak.endPoint;\r\n var y1 = axisBreak.pixelMarginLeft;\r\n var y2 = this.getHeight() - axisBreak.pixelMarginTop - axisBreak.pixelMarginBottom;\r\n startPoint.x = $math.fitToRange(startPoint.x, -1, this.axisLength + 1);\r\n endPoint.x = $math.fitToRange(endPoint.x, -1, this.axisLength + 1);\r\n if (startPoint.x == endPoint.x && (startPoint.x < 0 || startPoint.x > this.axisLength)) {\r\n axisBreak.fillShape.__disabled = true;\r\n }\r\n else {\r\n axisBreak.fillShape.__disabled = false;\r\n }\r\n startLine.y = y1;\r\n startLine.width = 0;\r\n startLine.height = y2;\r\n endLine.y = y1;\r\n endLine.width = 0;\r\n endLine.height = y2;\r\n fillShape.height = y2;\r\n fillShape.width = Math.abs(endPoint.x - startPoint.x);\r\n fillShape.y = y1;\r\n fillShape.x = startPoint.x;\r\n };\r\n /**\r\n * Updates and positions a grid element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param grid Grid element\r\n * @param position Starting position\r\n * @param endPosition End position\r\n */\r\n AxisRendererX.prototype.updateGridElement = function (grid, position, endPosition) {\r\n position = position + (endPosition - position) * grid.location;\r\n var point = this.positionToPoint(position);\r\n //point.x = $utils.spritePointToSprite({x:point.x, y:0}, this, this.gridContainer).x;\r\n grid.path = $path.moveTo({ x: 0, y: 0 }) + $path.lineTo({ x: 0, y: this.getHeight() });\r\n this.positionItem(grid, point);\r\n this.toggleVisibility(grid, position, 0, 1);\r\n };\r\n /**\r\n * Updates and positions a tick element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param tick Tick element\r\n * @param position Starting position\r\n * @param endPosition End position\r\n */\r\n AxisRendererX.prototype.updateTickElement = function (tick, position, endPosition) {\r\n position = position + (endPosition - position) * tick.location;\r\n var point = this.positionToPoint(position);\r\n var tickLength = tick.length;\r\n point.y = $utils.spritePointToSprite({ x: 0, y: this.line.pixelY }, this.line.parent, this.gridContainer).y;\r\n if (this.opposite) {\r\n tickLength *= (tick.inside ? 1 : -1);\r\n }\r\n else {\r\n tickLength *= (tick.inside ? -1 : 1);\r\n }\r\n tick.path = $path.moveTo({ x: 0, y: 0 }) + $path.lineTo({ x: 0, y: tickLength });\r\n this.positionItem(tick, point);\r\n this.toggleVisibility(tick, position, 0, 1);\r\n };\r\n /**\r\n * Updates and positions the axis line element.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n AxisRendererX.prototype.updateAxisLine = function () {\r\n this.line.path = $path.moveTo({ x: 0, y: 0 }) + $path.lineTo({ x: this.axisLength, y: 0 });\r\n };\r\n /**\r\n * Updates and positions the base grid element.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n AxisRendererX.prototype.updateBaseGridElement = function () {\r\n _super.prototype.updateBaseGridElement.call(this);\r\n var axis = this.axis;\r\n var h = this.getHeight();\r\n var w = this.axisLength;\r\n var baseGrid = this.baseGrid;\r\n var x = axis.basePoint.x;\r\n if (x < -0.2 || x > w + 0.2) {\r\n baseGrid.hide(0);\r\n }\r\n else {\r\n var y = $utils.spritePointToSprite({ x: 0, y: 0 }, this.gridContainer, baseGrid.parent).y;\r\n baseGrid.path = $path.moveTo({ x: 0, y: 0 }) + $path.lineTo({ x: 0, y: h });\r\n baseGrid.moveTo({ x: x, y: y });\r\n baseGrid.show(0);\r\n }\r\n };\r\n /**\r\n * Creates visual elements for and axis break.\r\n *\r\n * @ignore Exclude from docs\r\n * @param axisBreak Axis break\r\n */\r\n AxisRendererX.prototype.createBreakSprites = function (axisBreak) {\r\n axisBreak.startLine = new WavedLine();\r\n axisBreak.endLine = new WavedLine();\r\n var wavedRectangle = new WavedRectangle();\r\n wavedRectangle.setWavedSides(false, true, false, true);\r\n axisBreak.fillShape = wavedRectangle;\r\n };\r\n /**\r\n * @ignore\r\n */\r\n AxisRendererX.prototype.toAxisPosition = function (value) {\r\n var inversedPosition = value;\r\n var axis = this.axis;\r\n if (axis) {\r\n var relativePositionSprite = axis.relativePositionSprite;\r\n var x = axis.pixelX;\r\n if (relativePositionSprite) {\r\n x = $utils.spritePointToSprite({ x: this.pixelX, y: 0 }, this.parent, relativePositionSprite).x;\r\n }\r\n else {\r\n relativePositionSprite = axis.parent;\r\n }\r\n if (relativePositionSprite) {\r\n var relativeX = x / relativePositionSprite.innerWidth;\r\n var relativeWidth = axis.axisLength / relativePositionSprite.innerWidth;\r\n return (inversedPosition - relativeX) / relativeWidth;\r\n }\r\n }\r\n return value;\r\n };\r\n /**\r\n * Updates and positions axis bullets.\r\n *\r\n * @ignore Exclude from docs\r\n * @param bullet AxisBullet element\r\n * @param position Starting position\r\n * @param endPosition End position\r\n */\r\n AxisRendererX.prototype.updateBullet = function (bullet, position, endPosition) {\r\n var location = 0.5;\r\n if (bullet instanceof AxisBullet) {\r\n location = bullet.location;\r\n }\r\n position = position + (endPosition - position) * location;\r\n var point = this.positionToPoint(position);\r\n point.y = $utils.spritePointToSprite({ x: 0, y: this.line.pixelY }, this.line.parent, this.gridContainer).y;\r\n this.positionItem(bullet, point);\r\n this.toggleVisibility(bullet, position, 0, 1);\r\n };\r\n return AxisRendererX;\r\n}(AxisRenderer));\r\nexport { AxisRendererX };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"AxisRendererX\"] = AxisRendererX;\r\n/**\r\n * Add default responsive rules\r\n */\r\n/**\r\n * Put labels inside plot area.\r\n * Disable first and last labels.\r\n */\r\ndefaultRules.push({\r\n relevant: ResponsiveBreakpoints.heightXS,\r\n state: function (target, stateId) {\r\n if (target instanceof AxisRendererX) {\r\n var state = target.states.create(stateId);\r\n state.properties.inside = true;\r\n state.properties.maxLabelPosition = 0.9;\r\n state.properties.minLabelPosition = 0.1;\r\n return state;\r\n }\r\n return null;\r\n }\r\n});\r\n/**\r\n * Disable labels altogather on very small charts\r\n */\r\ndefaultRules.push({\r\n relevant: ResponsiveBreakpoints.heightXXS,\r\n state: function (target, stateId) {\r\n if (target instanceof AxisRendererX) {\r\n var state = target.states.create(stateId);\r\n state.properties.disabled = true;\r\n return state;\r\n }\r\n return null;\r\n }\r\n});\r\n","/**\r\n * HeatLegend module\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Container } from \"../../core/Container\";\r\nimport { LinearGradient } from \"../../core/rendering/fills/LinearGradient\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport { toColor, Color } from \"../../core/utils/Color\";\r\nimport { ListTemplate, ListDisposer } from \"../../core/utils/List\";\r\nimport { percent } from \"../../core/utils/Percent\";\r\nimport { ValueAxis } from \"../../charts/axes/ValueAxis\";\r\nimport { AxisRendererX } from \"../../charts/axes/AxisRendererX\";\r\nimport { AxisRendererY } from \"../../charts/axes/AxisRendererY\";\r\nimport * as $iter from \"../../core/utils/Iterator\";\r\nimport * as $type from \"../../core/utils/Type\";\r\nimport * as $colors from \"../../core/utils/Colors\";\r\nimport { RoundedRectangle } from \"../../core/elements/RoundedRectangle\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * This class creates a link (waved color-filled line) between two nodes in a\r\n * Sankey Diagram.\r\n *\r\n * @see {@link IHeatLegendEvents} for a list of available events\r\n * @see {@link IHeatLegendAdapters} for a list of available Adapters\r\n * @important\r\n */\r\nvar HeatLegend = /** @class */ (function (_super) {\r\n __extends(HeatLegend, _super);\r\n /**\r\n * Constructor\r\n */\r\n function HeatLegend() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"HeatLegend\";\r\n _this.markerContainer = _this.createChild(Container);\r\n _this.markerContainer.shouldClone = false;\r\n _this.markerCount = 1;\r\n // Create a template container and list for the a marker\r\n var marker = new RoundedRectangle();\r\n marker.minHeight = 20;\r\n marker.minWidth = 20;\r\n marker.interactionsEnabled = false;\r\n marker.fillOpacity = 1;\r\n marker.cornerRadius(0, 0, 0, 0);\r\n _this.markerContainer.minHeight = 20;\r\n _this.markerContainer.minWidth = 20;\r\n _this.orientation = \"horizontal\";\r\n _this.markers = new ListTemplate(marker);\r\n _this._disposers.push(new ListDisposer(_this.markers));\r\n _this._disposers.push(_this.markers.template);\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n HeatLegend.prototype.getMinFromRules = function (property) {\r\n var series = this.series;\r\n if (series) {\r\n var minValue_1;\r\n $iter.eachContinue(series.heatRules.iterator(), function (heatRule) {\r\n if (heatRule.property == property) {\r\n minValue_1 = heatRule.min;\r\n return false;\r\n }\r\n return true;\r\n });\r\n return minValue_1;\r\n }\r\n };\r\n HeatLegend.prototype.getMaxFromRules = function (property) {\r\n var series = this.series;\r\n if (series) {\r\n var maxValue_1;\r\n $iter.each(series.heatRules.iterator(), function (heatRule) {\r\n if (heatRule.property == property) {\r\n maxValue_1 = heatRule.max;\r\n return false;\r\n }\r\n return true;\r\n });\r\n return maxValue_1;\r\n }\r\n };\r\n /**\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n HeatLegend.prototype.validate = function () {\r\n _super.prototype.validate.call(this);\r\n this.valueAxis.renderer.inversed = this.reverseOrder;\r\n var series = this.series;\r\n var minColor = this.minColor;\r\n var maxColor = this.maxColor;\r\n if (!$type.hasValue(minColor)) {\r\n minColor = toColor(this.getMinFromRules(\"fill\"));\r\n }\r\n if (!$type.hasValue(maxColor)) {\r\n maxColor = toColor(this.getMaxFromRules(\"fill\"));\r\n }\r\n if (series) {\r\n var seriesFill = series.fill;\r\n if (!$type.hasValue(minColor) && seriesFill instanceof Color) {\r\n minColor = seriesFill;\r\n }\r\n if (!$type.hasValue(maxColor) && seriesFill instanceof Color) {\r\n maxColor = seriesFill;\r\n }\r\n }\r\n if (!$type.hasValue(maxColor)) {\r\n maxColor = toColor(this.getMaxFromRules(\"fill\"));\r\n }\r\n var minOpacity = $type.toNumber(this.getMinFromRules(\"fillOpacity\"));\r\n if (!$type.isNumber(minOpacity)) {\r\n minOpacity = 1;\r\n }\r\n var maxOpacity = $type.toNumber(this.getMaxFromRules(\"fillOpacity\"));\r\n if (!$type.isNumber(maxOpacity)) {\r\n maxOpacity = 1;\r\n }\r\n var minStrokeOpacity = $type.toNumber(this.getMinFromRules(\"strokeOpacity\"));\r\n if (!$type.isNumber(minStrokeOpacity)) {\r\n minStrokeOpacity = 1;\r\n }\r\n var maxStrokeOpacity = $type.toNumber(this.getMaxFromRules(\"strokeOpacity\"));\r\n if (!$type.isNumber(maxStrokeOpacity)) {\r\n maxStrokeOpacity = 1;\r\n }\r\n var minStroke = toColor(this.getMinFromRules(\"stroke\"));\r\n var maxStroke = toColor(this.getMaxFromRules(\"stroke\"));\r\n //if (series) {\r\n for (var i = 0; i < this.markerCount; i++) {\r\n var marker = this.markers.getIndex(i);\r\n if (!marker) {\r\n marker = this.markers.create();\r\n marker.parent = this.markerContainer;\r\n marker.height = percent(100);\r\n marker.width = percent(100);\r\n }\r\n if (this.markerCount == 1) {\r\n var gradient = new LinearGradient();\r\n if (this.reverseOrder) {\r\n gradient.addColor(maxColor, maxOpacity);\r\n gradient.addColor(minColor, minOpacity);\r\n }\r\n else {\r\n gradient.addColor(minColor, minOpacity);\r\n gradient.addColor(maxColor, maxOpacity);\r\n }\r\n if (this.orientation == \"vertical\") {\r\n gradient.rotation = -90;\r\n }\r\n marker.fill = gradient;\r\n if ($type.hasValue(minStroke) && $type.hasValue(maxStroke)) {\r\n var strokeGradient = new LinearGradient();\r\n if (this.reverseOrder) {\r\n strokeGradient.addColor(maxStroke, maxStrokeOpacity);\r\n strokeGradient.addColor(minStroke, minStrokeOpacity);\r\n }\r\n else {\r\n strokeGradient.addColor(minStroke, minStrokeOpacity);\r\n strokeGradient.addColor(maxStroke, maxStrokeOpacity);\r\n }\r\n if (this.orientation == \"vertical\") {\r\n strokeGradient.rotation = -90;\r\n }\r\n marker.stroke = strokeGradient;\r\n }\r\n }\r\n else {\r\n var c = i;\r\n if (this.reverseOrder) {\r\n c = this.markerCount - i - 1;\r\n }\r\n var color = new Color($colors.interpolate(minColor.rgb, maxColor.rgb, c / this.markerCount));\r\n marker.fill = color;\r\n var opacity = minOpacity + (maxOpacity - minOpacity) * c / this.markerCount;\r\n marker.fillOpacity = opacity;\r\n if ($type.hasValue(minStroke) && $type.hasValue(maxStroke)) {\r\n var color_1 = new Color($colors.interpolate(minStroke.rgb, maxStroke.rgb, c / this.markerCount));\r\n marker.stroke = color_1;\r\n var opacity_1 = minStrokeOpacity + (maxStrokeOpacity - minStrokeOpacity) * c / this.markerCount;\r\n marker.strokeOpacity = opacity_1;\r\n }\r\n }\r\n }\r\n var renderer = this.valueAxis.renderer;\r\n if (this.markerCount > 1) {\r\n if (this.orientation == \"horizontal\") {\r\n renderer.minGridDistance = this.measuredWidth / this.markerCount;\r\n }\r\n else {\r\n renderer.minGridDistance = this.measuredHeight / this.markerCount;\r\n }\r\n }\r\n this.valueAxis.invalidate();\r\n for (var i = this.markerCount, len = this.markers.length; i < len; i++) {\r\n this.markers.getIndex(i).parent = undefined;\r\n }\r\n };\r\n Object.defineProperty(HeatLegend.prototype, \"minColor\", {\r\n /**\r\n * Returns minColor value\r\n * @return {Color}\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"minColor\");\r\n },\r\n /**\r\n * Min color of a heat legend. If a series is set for the legend, minColor is taken from series.\r\n *\r\n * @param {Color}\r\n */\r\n set: function (value) {\r\n if (!(value instanceof Color)) {\r\n value = toColor(value);\r\n }\r\n this.setColorProperty(\"minColor\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(HeatLegend.prototype, \"maxColor\", {\r\n /**\r\n * Returns maxColor value\r\n * @return {Color}\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"maxColor\");\r\n },\r\n /**\r\n * Max color of a heat legend. If a series is set for the legend, maxColor is taken from series.\r\n *\r\n * @param {Color}\r\n */\r\n set: function (value) {\r\n if (!(value instanceof Color)) {\r\n value = toColor(value);\r\n }\r\n this.setColorProperty(\"maxColor\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(HeatLegend.prototype, \"markerCount\", {\r\n /**\r\n * Returns number of color squares (markers).\r\n * @return {number}\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"markerCount\");\r\n },\r\n /**\r\n * Number of color squares (markers) in the heat legend. If only 1 marker is used, it will be filled with gradient.\r\n *\r\n * @param {number}\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"markerCount\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(HeatLegend.prototype, \"minValue\", {\r\n /**\r\n * Returns minimum value of heat legend.\r\n * @return {number}\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"minValue\");\r\n },\r\n /**\r\n * Minimum value of heat legend's value axis. If a series is set for the legend, min is taken from series.\r\n *\r\n * @param {number}\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"minValue\", value);\r\n this.valueAxis.min = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(HeatLegend.prototype, \"maxValue\", {\r\n /**\r\n * Returns maximum value of heat legend.\r\n * @return {number}\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"maxValue\");\r\n },\r\n /**\r\n * Maximum value of heat legend's value axis. If a series is set for the legend, max is taken from series.\r\n *\r\n * @param {number}\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"maxValue\", value);\r\n this.valueAxis.max = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(HeatLegend.prototype, \"orientation\", {\r\n /**\r\n * Returns orientation value.\r\n *\r\n * @return {\"horizontal\" | \"vertical\"}\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"orientation\");\r\n },\r\n /**\r\n * Heat legend orientation. Note, if you change orientation of a heat legend, you must set value axis renderer properties after that, as with orientation renderer changes.\r\n *\r\n * @param {\"horizontal\" | \"vertical\"}\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"orientation\", value, true);\r\n var markerContainer = this.markerContainer;\r\n var valueAxis = this.valueAxis;\r\n // HORIZONTAL\r\n if (value == \"horizontal\") {\r\n if (!$type.hasValue(this.width)) {\r\n this.width = 200;\r\n }\r\n this.height = undefined;\r\n valueAxis.width = percent(100);\r\n valueAxis.height = undefined;\r\n valueAxis.tooltip.pointerOrientation = \"vertical\";\r\n this.layout = \"vertical\";\r\n markerContainer.width = percent(100);\r\n markerContainer.height = undefined;\r\n if (!(valueAxis.renderer instanceof AxisRendererX)) {\r\n valueAxis.renderer = new AxisRendererX();\r\n }\r\n }\r\n // VERTICAL\r\n else {\r\n if (!$type.hasValue(this.height)) {\r\n this.height = 200;\r\n }\r\n this.width = undefined;\r\n this.layout = \"horizontal\";\r\n markerContainer.width = undefined;\r\n markerContainer.height = percent(100);\r\n valueAxis.height = percent(100);\r\n valueAxis.width = undefined;\r\n valueAxis.tooltip.pointerOrientation = \"horizontal\";\r\n if (!(valueAxis.renderer instanceof AxisRendererY)) {\r\n valueAxis.renderer = new AxisRendererY();\r\n }\r\n valueAxis.renderer.inside = true;\r\n valueAxis.renderer.labels.template.inside = true;\r\n this.markerContainer.reverseOrder = true;\r\n }\r\n var renderer = valueAxis.renderer;\r\n renderer.grid.template.disabled = true;\r\n renderer.axisFills.template.disabled = true;\r\n renderer.baseGrid.disabled = true;\r\n renderer.labels.template.padding(2, 3, 2, 3);\r\n renderer.minHeight = undefined;\r\n renderer.minWidth = undefined;\r\n this.markerContainer.layout = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(HeatLegend.prototype, \"valueAxis\", {\r\n /**\r\n * Returns valueAxis value.\r\n * @return {ValueAxis}\r\n */\r\n get: function () {\r\n if (!this._valueAxis) {\r\n this.valueAxis = this.createChild(ValueAxis);\r\n this.valueAxis.shouldClone = false;\r\n }\r\n return this._valueAxis;\r\n },\r\n /**\r\n * Sets a value axis of heat legend. Value axis for heat legend is created automatically.\r\n * @param {ValueAxis}\r\n */\r\n set: function (valueAxis) {\r\n this._valueAxis = valueAxis;\r\n valueAxis.parent = this;\r\n valueAxis.strictMinMax = true;\r\n this.orientation = this.orientation;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(HeatLegend.prototype, \"series\", {\r\n /**\r\n * Returns series value.\r\n * @return {Series}\r\n */\r\n get: function () {\r\n return this._series;\r\n },\r\n /**\r\n * You can set series for heat legend. It will take min, max, minColor and maxColor values from this series.\r\n * @param series\r\n */\r\n set: function (series) {\r\n var _this = this;\r\n this._series = series;\r\n var dataField = \"value\";\r\n try {\r\n var dataFieldDefined = series.heatRules.getIndex(0).dataField;\r\n if (dataFieldDefined) {\r\n dataField = dataFieldDefined;\r\n }\r\n }\r\n catch (err) {\r\n }\r\n this.updateMinMax(series.dataItem.values[dataField].low, series.dataItem.values[dataField].high);\r\n series.dataItem.events.on(\"calculatedvaluechanged\", function (event) {\r\n _this.updateMinMax(series.dataItem.values[dataField].low, series.dataItem.values[dataField].high);\r\n }, undefined, false);\r\n series.heatRules.events.on(\"inserted\", this.invalidate, this, false);\r\n series.heatRules.events.on(\"removed\", this.invalidate, this, false);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Updates min/max of value axis.\r\n * @ignore\r\n */\r\n HeatLegend.prototype.updateMinMax = function (min, max) {\r\n var valueAxis = this.valueAxis;\r\n if (!$type.isNumber(this.minValue)) {\r\n valueAxis.min = min;\r\n valueAxis.invalidate();\r\n }\r\n if (!$type.isNumber(this.maxValue)) {\r\n valueAxis.max = max;\r\n valueAxis.invalidate();\r\n }\r\n };\r\n /**\r\n * Processes JSON-based config before it is applied to the object.\r\n *\r\n * @ignore Exclude from docs\r\n * @param config Config\r\n */\r\n HeatLegend.prototype.processConfig = function (config) {\r\n if (config) {\r\n // Set up series\r\n if ($type.hasValue(config.series) && $type.isString(config.series)) {\r\n if ($type.isString(config.series)) {\r\n if (this.map.hasKey(config.series)) {\r\n config.series = this.map.getKey(config.series);\r\n }\r\n else {\r\n var seriesId_1 = config.series;\r\n var disposer_1 = this.map.events.on(\"insertKey\", function (ev) {\r\n if (ev.key == seriesId_1) {\r\n this.series = ev.newValue;\r\n disposer_1.dispose();\r\n }\r\n }, this);\r\n this._disposers.push(disposer_1);\r\n delete config.series;\r\n }\r\n }\r\n }\r\n }\r\n _super.prototype.processConfig.call(this, config);\r\n };\r\n return HeatLegend;\r\n}(Container));\r\nexport { HeatLegend };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"HeatLegend\"] = HeatLegend;\r\n","/**\r\n * Grip module.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Button } from \"./Button\";\r\nimport { Sprite } from \"../Sprite\";\r\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\r\nimport { registry } from \"../Registry\";\r\nimport { percent } from \"../utils/Percent\";\r\nimport * as $path from \"../rendering/Path\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Creates a grip element that can be used for scrolling or other things.\r\n *\r\n * @see {@link IGripEvents} for a list of available events\r\n * @see {@link IGripAdapters} for a list of available Adapters\r\n * @since 4.4.0\r\n */\r\nvar Grip = /** @class */ (function (_super) {\r\n __extends(Grip, _super);\r\n /**\r\n * Constructor\r\n */\r\n function Grip() {\r\n var _this = \r\n // Init\r\n _super.call(this) || this;\r\n _this.className = \"Grip\";\r\n var cs = new InterfaceColorSet();\r\n // Set defaults\r\n _this.layout = \"absolute\";\r\n _this.padding(10, 10, 10, 10);\r\n _this.margin(3, 3, 3, 3);\r\n _this.background.fillOpacity = 0.3;\r\n _this.background.cornerRadius(10, 10, 10, 10);\r\n // Create an icon\r\n var icon = new Sprite();\r\n icon.element = _this.paper.add(\"path\");\r\n var path = $path.moveTo({ x: -6, y: 0 });\r\n path += $path.lineTo({ x: 6, y: 0 });\r\n path += $path.moveTo({ x: -8, y: -6 });\r\n path += $path.lineTo({ x: 0, y: -12 });\r\n path += $path.lineTo({ x: 8, y: -6 });\r\n path += $path.moveTo({ x: -8, y: 6 });\r\n path += $path.lineTo({ x: 0, y: 12 });\r\n path += $path.lineTo({ x: 8, y: 6 });\r\n icon.path = path;\r\n icon.strokeWidth = 2;\r\n icon.fillOpacity = 0;\r\n icon.pixelPerfect = true;\r\n icon.padding(0, 4, 0, 4);\r\n icon.stroke = cs.getFor(\"text\");\r\n icon.strokeOpacity = 0.7;\r\n icon.align = \"center\";\r\n icon.valign = \"middle\";\r\n _this.icon = icon;\r\n _this.label.dispose();\r\n _this.label = undefined;\r\n // Set default position\r\n _this.position = \"right\";\r\n // Set up autohide\r\n _this.autoHideDelay = 3000;\r\n _this.events.on(\"shown\", function (ev) {\r\n if (_this._autoHideTimeout) {\r\n _this._autoHideTimeout.dispose();\r\n }\r\n if (_this.autoHideDelay) {\r\n _this._autoHideTimeout = _this.setTimeout(function () {\r\n _this.hide();\r\n }, _this.autoHideDelay);\r\n }\r\n });\r\n _this.events.on(\"down\", function (ev) {\r\n if (_this._autoHideTimeout) {\r\n _this._autoHideTimeout.dispose();\r\n }\r\n });\r\n _this.events.on(\"out\", function (ev) {\r\n if (_this.autoHideDelay) {\r\n _this._autoHideTimeout = _this.setTimeout(function () {\r\n _this.hide();\r\n }, _this.autoHideDelay);\r\n }\r\n });\r\n // Apply theme\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n Object.defineProperty(Grip.prototype, \"position\", {\r\n /**\r\n * @return Position\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"position\");\r\n },\r\n /**\r\n * Sets position of the grip.\r\n *\r\n * Available options: \"left\", \"right\" (default), \"top\", \"bottom\".\r\n *\r\n * @param value Position\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"position\", value)) {\r\n switch (value) {\r\n case \"left\":\r\n this.align = \"left\";\r\n this.valign = \"middle\";\r\n this.horizontalCenter = \"left\";\r\n this.verticalCenter = \"middle\";\r\n this.icon.rotation = 0;\r\n this.width = undefined;\r\n this.height = percent(30);\r\n break;\r\n case \"right\":\r\n this.align = \"right\";\r\n this.valign = \"middle\";\r\n this.horizontalCenter = \"right\";\r\n this.verticalCenter = \"middle\";\r\n this.icon.rotation = 0;\r\n this.width = undefined;\r\n this.height = percent(30);\r\n break;\r\n case \"top\":\r\n this.align = \"center\";\r\n this.valign = \"top\";\r\n this.horizontalCenter = \"middle\";\r\n this.verticalCenter = \"top\";\r\n this.icon.rotation = 90;\r\n this.width = percent(30);\r\n this.height = undefined;\r\n break;\r\n case \"bottom\":\r\n this.align = \"center\";\r\n this.valign = \"bottom\";\r\n this.horizontalCenter = \"middle\";\r\n this.verticalCenter = \"bottom\";\r\n this.icon.rotation = 90;\r\n this.width = percent(30);\r\n this.height = undefined;\r\n break;\r\n default:\r\n this.align = \"center\";\r\n this.valign = \"middle\";\r\n this.horizontalCenter = \"middle\";\r\n this.verticalCenter = \"middle\";\r\n this.icon.rotation = 90;\r\n this.width = percent(30);\r\n this.height = undefined;\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Grip.prototype, \"autoHideDelay\", {\r\n /**\r\n * @return Delay\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"autoHideDelay\");\r\n },\r\n /**\r\n * Number of milliseconds to show grip until it is hidden automatically.\r\n *\r\n * @default 3000\r\n * @param value Delay\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"autoHideDelay\", value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return Grip;\r\n}(Button));\r\nexport { Grip };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"Grip\"] = Grip;\r\n","/**\r\n * [[Chart]] class provides base functionality for all chart types to inherit.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { registry } from \"../core/Registry\";\r\nimport { Component } from \"../core/Component\";\r\nimport { MutableValueDisposer, Disposer } from \"../core/utils/Disposer\";\r\nimport { ListTemplate, ListDisposer } from \"../core/utils/List\";\r\nimport { Container } from \"../core/Container\";\r\nimport { Label } from \"../core/elements/Label\";\r\nimport { Grip } from \"../core/elements/Grip\";\r\nimport { DataItem } from \"../core/DataItem\";\r\nimport { percent } from \"../core/utils/Percent\";\r\nimport * as $iter from \"../core/utils/Iterator\";\r\nimport * as $type from \"../core/utils/Type\";\r\nimport { defaultRules, ResponsiveBreakpoints } from \"../core/utils/Responsive\";\r\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Defines a [[DataItem]] for [[Chart]].\r\n *\r\n * @see {@link DataItem}\r\n */\r\nvar ChartDataItem = /** @class */ (function (_super) {\r\n __extends(ChartDataItem, _super);\r\n /**\r\n * Constructor\r\n */\r\n function ChartDataItem() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"ChartDataItem\";\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n return ChartDataItem;\r\n}(DataItem));\r\nexport { ChartDataItem };\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * A base class for all Charts.\r\n *\r\n * @see {@link IChartEvents} for a list of available Events\r\n * @see {@link IChartAdapters} for a list of available Adapters\r\n */\r\nvar Chart = /** @class */ (function (_super) {\r\n __extends(Chart, _super);\r\n /**\r\n * Constructor\r\n */\r\n function Chart() {\r\n var _this = \r\n // Init\r\n _super.call(this) || this;\r\n /**\r\n * A reference to chart's [[Legend]].\r\n * @ignore\r\n */\r\n _this._legend = new MutableValueDisposer();\r\n if (_this.constructor === Chart) {\r\n throw new Error(\"'Chart' cannot be instantiated directly. Please use a specific chart type.\");\r\n }\r\n _this.className = \"Chart\";\r\n // Create a list of titles\r\n var template = new Label();\r\n _this.titles = new ListTemplate(template);\r\n _this._disposers.push(new ListDisposer(_this.titles));\r\n _this._disposers.push(template);\r\n // Chart component is also a container. it holds _chartAndLegendCont and titles\r\n _this.width = percent(100);\r\n _this.height = percent(100);\r\n _this.layout = \"vertical\";\r\n // Chart and legend\r\n var chartAndLegendContainer = _this.createChild(Container);\r\n chartAndLegendContainer.shouldClone = false;\r\n chartAndLegendContainer.layout = \"vertical\";\r\n chartAndLegendContainer.width = percent(100);\r\n chartAndLegendContainer.height = percent(100);\r\n _this.chartAndLegendContainer = chartAndLegendContainer;\r\n // Chart container holds all the elements of a chart, extept titles and legend\r\n var chartContainer = chartAndLegendContainer.createChild(Container);\r\n chartContainer.shouldClone = false;\r\n chartContainer.width = percent(100);\r\n chartContainer.height = percent(100);\r\n _this.chartContainer = chartContainer;\r\n _this.showOnInit = true;\r\n _this._disposers.push(_this._legend);\r\n // Add title list events to apply certain formatting options and to make\r\n // the chart reference them as accessible screen reader labels\r\n _this.titles.events.on(\"inserted\", function (label) {\r\n _this.processTitle(label);\r\n _this.updateReaderTitleReferences();\r\n }, _this, false);\r\n _this.titles.events.on(\"removed\", function (label) {\r\n _this.updateReaderTitleReferences();\r\n }, _this, false);\r\n // Accessibility\r\n // It seems we can't set focusable on the whole chart because it seems to\r\n // mess up the whole focus event system - getting a focus on an inside\r\n // object also trigger focus on parent\r\n //this.focusable = true;\r\n _this.role = \"region\";\r\n _this.defaultState.transitionDuration = 1;\r\n // Apply theme\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * Sets defaults that instantiate some objects that rely on parent, so they\r\n * cannot be set in constructor.\r\n */\r\n Chart.prototype.applyInternalDefaults = function () {\r\n _super.prototype.applyInternalDefaults.call(this);\r\n if (!$type.hasValue(this.readerTitle)) {\r\n this.readerTitle = this.language.translate(\"Chart\");\r\n }\r\n };\r\n /**\r\n * Initiates drawing of the chart.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Chart.prototype.draw = function () {\r\n this.fixLayout();\r\n _super.prototype.draw.call(this);\r\n };\r\n /**\r\n * Updates legend's hierarchy based on the position.\r\n */\r\n Chart.prototype.fixLayout = function () {\r\n var legend = this.legend;\r\n if (legend) {\r\n var chartAndLegendContainer = this.chartAndLegendContainer;\r\n var chartContainer = this.chartContainer;\r\n chartContainer.x = undefined;\r\n chartContainer.y = undefined;\r\n if (legend.position != \"absolute\") {\r\n legend.x = undefined;\r\n legend.y = undefined;\r\n }\r\n switch (legend.position) {\r\n case \"left\":\r\n chartAndLegendContainer.layout = \"horizontal\";\r\n legend.toBack();\r\n break;\r\n case \"right\":\r\n chartAndLegendContainer.layout = \"horizontal\";\r\n legend.toFront();\r\n break;\r\n case \"top\":\r\n chartAndLegendContainer.layout = \"vertical\";\r\n legend.toBack();\r\n break;\r\n case \"bottom\":\r\n chartAndLegendContainer.layout = \"vertical\";\r\n legend.toFront();\r\n break;\r\n case \"absolute\":\r\n legend.isMeasured = false;\r\n break;\r\n }\r\n }\r\n };\r\n /**\r\n * Setups the legend to use the chart's data.\r\n */\r\n Chart.prototype.feedLegend = function () {\r\n // Nothing here. This method is provided only as a \"placeholder\" for\r\n // extending classes to override\r\n };\r\n /**\r\n * Adds a new title to the chart when it is inserted into chart's titles\r\n * list.\r\n * @param event An event object which is triggered when inserting into titles list\r\n * @return Label object\r\n */\r\n Chart.prototype.processTitle = function (event) {\r\n var title = event.newValue;\r\n title.parent = this;\r\n title.toBack();\r\n title.shouldClone = false;\r\n title.align = \"center\";\r\n // Need to explicitly apply the `id` attribute so it can be referenced by\r\n // `aria-labelledby`\r\n title.uidAttr();\r\n return title;\r\n };\r\n /**\r\n * Checks if chart has any title elements. If it does, we will use them in an\r\n * `aria-labelledby` attribute so that screen readers can use them to properly\r\n * describe the chart when it is focused or hovered.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Chart.prototype.updateReaderTitleReferences = function () {\r\n if (this.titles.length) {\r\n var titleIds_1 = [];\r\n $iter.each(this.titles.iterator(), function (title) {\r\n titleIds_1.push(title.uid);\r\n });\r\n this.setSVGAttribute({ \"aria-labelledby\": titleIds_1.join(\" \") });\r\n }\r\n else {\r\n this.removeSVGAttribute(\"aria-labelledby\");\r\n }\r\n };\r\n Object.defineProperty(Chart.prototype, \"legend\", {\r\n /**\r\n * @return Legend\r\n */\r\n get: function () {\r\n return this._legend.get();\r\n },\r\n /**\r\n * Holds the instance of chart's [[Leged]].\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/legend/} for more information about legends\r\n * @param Legend\r\n */\r\n set: function (legend) {\r\n this.setLegend(legend);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Prepares the legend instance for use in this chart.\r\n *\r\n * @param legend Legend\r\n */\r\n Chart.prototype.setLegend = function (legend) {\r\n var _this = this;\r\n if (this._legend.get() !== legend) {\r\n if (legend) {\r\n // Set legend options\r\n legend.parent = this.chartAndLegendContainer;\r\n this._legend.set(legend, legend.events.on(\"propertychanged\", function (event) {\r\n if (event.property == \"position\") {\r\n _this.fixLayout();\r\n }\r\n }, undefined, false));\r\n legend.addDisposer(new Disposer(function () {\r\n _this.legend = undefined;\r\n }));\r\n }\r\n else {\r\n this._legend.reset();\r\n }\r\n this.feedLegend();\r\n }\r\n };\r\n /**\r\n * Destroys this object and all related data.\r\n */\r\n Chart.prototype.dispose = function () {\r\n // otherwise there might be some errors when disposing chart which was just inited\r\n if (this.legend) {\r\n this.legend.dispose();\r\n }\r\n _super.prototype.dispose.call(this);\r\n };\r\n /**\r\n * Processes JSON-based config before it is applied to the object.\r\n *\r\n * @ignore Exclude from docs\r\n * @param config Config\r\n */\r\n Chart.prototype.processConfig = function (config) {\r\n if (config) {\r\n // Set up legend\r\n if ($type.hasValue(config.legend) && !$type.hasValue(config.legend.type)) {\r\n config.legend.type = \"Legend\";\r\n }\r\n }\r\n _super.prototype.processConfig.call(this, config);\r\n };\r\n /**\r\n * Copies all properties from another instance of [[Series]].\r\n *\r\n * @param source Source series\r\n */\r\n Chart.prototype.copyFrom = function (source) {\r\n this.titles.copyFrom(source.titles);\r\n this.chartContainer.copyFrom(source.chartContainer);\r\n if (source.legend) {\r\n this.legend = source.legend.clone();\r\n this.legend.removeChildren();\r\n }\r\n _super.prototype.copyFrom.call(this, source);\r\n };\r\n Object.defineProperty(Chart.prototype, \"dragGrip\", {\r\n /**\r\n * @return Grip\r\n */\r\n get: function () {\r\n var _this = this;\r\n if (!this._dragGrip) {\r\n var grip_1 = this.tooltipContainer.createChild(Grip);\r\n grip_1.align = \"right\";\r\n grip_1.valign = \"middle\";\r\n grip_1.hide(0);\r\n grip_1.events.on(\"down\", function (ev) {\r\n if (ev.touch) {\r\n _this.interactionsEnabled = false;\r\n }\r\n });\r\n grip_1.events.on(\"up\", function (ev) {\r\n _this.interactionsEnabled = true;\r\n });\r\n this.events.on(\"down\", function (ev) {\r\n if (ev.touch) {\r\n grip_1.show();\r\n }\r\n });\r\n this._dragGrip = grip_1;\r\n }\r\n return this._dragGrip;\r\n },\r\n /**\r\n * An instance of [[Grip]] which serves as a grip point which appears on\r\n * touch and allows scrolling whole page even if chart is occupying the\r\n * whole of the screen and would otherwise prevent scrolling.\r\n *\r\n * @since 4.4.0\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/touch/} For more information.\r\n * @param value Grip\r\n */\r\n set: function (value) {\r\n this._dragGrip = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Chart.prototype, \"focusable\", {\r\n get: function () {\r\n return this.parent.focusable;\r\n },\r\n set: function (value) {\r\n this.parent.focusable = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return Chart;\r\n}(Component));\r\nexport { Chart };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"Chart\"] = Chart;\r\n/**\r\n * Add default responsive rules\r\n */\r\n/**\r\n * Reduce horizontal margins\r\n */\r\ndefaultRules.push({\r\n relevant: ResponsiveBreakpoints.widthXS,\r\n state: function (target, stateId) {\r\n if (target instanceof Chart) {\r\n var state = target.states.create(stateId);\r\n if (target.pixelPaddingLeft > 10) {\r\n state.properties.paddingLeft = 10;\r\n }\r\n if (target.pixelPaddingRight > 10) {\r\n state.properties.paddingRight = 10;\r\n }\r\n return state;\r\n }\r\n return null;\r\n }\r\n});\r\n/**\r\n * Reduce vertical margins\r\n */\r\ndefaultRules.push({\r\n relevant: ResponsiveBreakpoints.heightXS,\r\n state: function (target, stateId) {\r\n if (target instanceof Chart) {\r\n var state = target.states.create(stateId);\r\n if (target.pixelPaddingTop > 10) {\r\n state.properties.paddingTop = 10;\r\n }\r\n if (target.pixelPaddingBottom > 10) {\r\n state.properties.paddingBottom = 10;\r\n }\r\n return state;\r\n }\r\n return null;\r\n }\r\n});\r\n/**\r\n * Remove horizontal padding\r\n */\r\ndefaultRules.push({\r\n relevant: ResponsiveBreakpoints.widthXXS,\r\n state: function (target, stateId) {\r\n if (target instanceof Chart) {\r\n var state = target.states.create(stateId);\r\n state.properties.paddingLeft = 0;\r\n state.properties.paddingRight = 0;\r\n return state;\r\n }\r\n return null;\r\n }\r\n});\r\n/**\r\n * Remove vertical padding\r\n */\r\ndefaultRules.push({\r\n relevant: ResponsiveBreakpoints.heightXXS,\r\n state: function (target, stateId) {\r\n if (target instanceof Chart) {\r\n var state = target.states.create(stateId);\r\n state.properties.paddingTop = 0;\r\n state.properties.paddingBottom = 0;\r\n return state;\r\n }\r\n return null;\r\n }\r\n});\r\n","/**\r\n * Module that defines everything related to building bullets.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Container } from \"../../core/Container\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport { defaultRules, ResponsiveBreakpoints } from \"../../core/utils/Responsive\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Class used to creates bullets.\r\n *\r\n * @see {@link IBulletEvents} for a list of available events\r\n * @see {@link IBulletAdapters} for a list of available Adapters\r\n * @todo Usage example\r\n * @important\r\n */\r\nvar Bullet = /** @class */ (function (_super) {\r\n __extends(Bullet, _super);\r\n /**\r\n * Constructor\r\n */\r\n function Bullet() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"Bullet\";\r\n _this.isMeasured = false;\r\n _this.tooltipX = 0;\r\n _this.tooltipY = 0;\r\n _this.layout = \"none\";\r\n _this.applyOnClones = true;\r\n _this.copyToLegendMarker = true;\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n Object.defineProperty(Bullet.prototype, \"locationX\", {\r\n /**\r\n * @return Location (0-1)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"locationX\");\r\n },\r\n /**\r\n * Relative horizontal location within cell. (0-1)\r\n *\r\n * @param value Location (0-1)\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"locationX\", value)) {\r\n var dataItem = this.dataItem;\r\n if (dataItem && dataItem.component) {\r\n dataItem.component.invalidate();\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Bullet.prototype, \"locationY\", {\r\n /**\r\n * @return Location (0-1)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"locationY\");\r\n },\r\n /**\r\n * Relative vertical location within cell. (0-1)\r\n *\r\n * @param value Location (0-1)\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"locationY\", value)) {\r\n var dataItem = this.dataItem;\r\n if (dataItem && dataItem.component) {\r\n dataItem.component.invalidate();\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Bullet.prototype, \"xField\", {\r\n /**\r\n * @return [description]\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"xField\");\r\n },\r\n /**\r\n * [xField description]\r\n *\r\n * @todo Description\r\n * @param value [description]\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"xField\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Bullet.prototype, \"yField\", {\r\n /**\r\n * @return [description]\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"yField\");\r\n },\r\n /**\r\n * [yField description]\r\n *\r\n * Description\r\n * @param value [description]\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"yField\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Bullet.prototype, \"isDynamic\", {\r\n /**\r\n * @return Redraw on data change?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"isDynamic\");\r\n },\r\n /**\r\n * Indicates if the bullet is \"dynamic\".\r\n *\r\n * In most cases the bullets remain the same, even if the underlying data\r\n * changes.\r\n *\r\n * However, in cases where bullet also displays a label, or its size depends\r\n * on data, it also needs to be redrawn when the underlying data changes.\r\n *\r\n * Only those bullets that have set `isDynamic = true` will be redrawn each\r\n * time data changes. Regular bullets will be reused as they are.\r\n *\r\n * @default false\r\n * @param value Redraw on data change?\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"isDynamic\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Bullet.prototype, \"copyToLegendMarker\", {\r\n /**\r\n * @return Redraw on data change?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"copyToLegendMarker\");\r\n },\r\n /**\r\n * Indicates if the bullet should be copied to legend marker\r\n *\r\n * @default false\r\n * @param value Redraw on data change?\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"copyToLegendMarker\", value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return Bullet;\r\n}(Container));\r\nexport { Bullet };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"Bullet\"] = Bullet;\r\n/**\r\n * Add default responsive rules\r\n */\r\n/**\r\n * Hide bullets\r\n */\r\ndefaultRules.push({\r\n relevant: ResponsiveBreakpoints.isXS,\r\n state: function (target, stateId) {\r\n if (target instanceof Bullet) {\r\n var state = target.states.create(stateId);\r\n state.properties.disabled = true;\r\n return state;\r\n }\r\n return null;\r\n }\r\n});\r\n","/**\r\n * Functionality for any series-based elements, like Line Series (graphs),\r\n * Pie slice lists, etc.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Component } from \"../../core/Component\";\r\nimport { Sprite } from \"../../core/Sprite\";\r\nimport { List, ListTemplate, ListDisposer } from \"../../core/utils/List\";\r\nimport { Dictionary, DictionaryDisposer } from \"../../core/utils/Dictionary\";\r\nimport { DataItem } from \"../../core/DataItem\";\r\nimport { Container } from \"../../core/Container\";\r\nimport { Tooltip } from \"../../core/elements/Tooltip\";\r\nimport { Bullet } from \"../elements/Bullet\";\r\nimport { LegendSettings } from \"../Legend\";\r\nimport { options } from \"../../core/Options\";\r\nimport { Color } from \"../../core/utils/Color\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport * as $iter from \"../../core/utils/Iterator\";\r\nimport * as $math from \"../../core/utils/Math\";\r\nimport * as $ease from \"../../core/utils/Ease\";\r\nimport * as $utils from \"../../core/utils/Utils\";\r\nimport * as $object from \"../../core/utils/Object\";\r\nimport * as $type from \"../../core/utils/Type\";\r\nimport * as $array from \"../../core/utils/Array\";\r\nimport * as $colors from \"../../core/utils/Colors\";\r\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Defines a [[DataItem]] for [[Series]].\r\n *\r\n * @see {@link DataItem}\r\n */\r\nvar SeriesDataItem = /** @class */ (function (_super) {\r\n __extends(SeriesDataItem, _super);\r\n /**\r\n * Constructor\r\n */\r\n function SeriesDataItem() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"SeriesDataItem\";\r\n //@todo Should we make `bullets` list disposable?\r\n //this._disposers.push(new DictionaryDisposer(this.bullets));\r\n _this.values.value = {};\r\n _this.values.value = {};\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n Object.defineProperty(SeriesDataItem.prototype, \"bullets\", {\r\n /**\r\n * A dictionary of data items bullets, where key is uid of a bullet template.\r\n */\r\n get: function () {\r\n if (!this._bullets) {\r\n this._bullets = new Dictionary();\r\n this._disposers.push(new DictionaryDisposer(this._bullets));\r\n }\r\n return this._bullets;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Destroys this object and all related data.\r\n */\r\n SeriesDataItem.prototype.dispose = function () {\r\n this.bullets.clear();\r\n _super.prototype.dispose.call(this);\r\n };\r\n Object.defineProperty(SeriesDataItem.prototype, \"value\", {\r\n /**\r\n * @return Value\r\n */\r\n get: function () {\r\n return this.values.value.value;\r\n },\r\n /**\r\n * data items's numeric value.\r\n *\r\n * @param value Value\r\n */\r\n set: function (value) {\r\n this.setValue(\"value\", value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return SeriesDataItem;\r\n}(DataItem));\r\nexport { SeriesDataItem };\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Defines base class for any kind of serial data.\r\n *\r\n * @see {@link ISeriesEvents} for a list of available Events\r\n * @see {@link ISeriesAdapters} for a list of available Adapters\r\n * @todo Separate axis-related stuff to some other class so that MapSeries would not have unrelated stuff\r\n */\r\nvar Series = /** @class */ (function (_super) {\r\n __extends(Series, _super);\r\n /**\r\n * Constructor\r\n */\r\n function Series() {\r\n var _this = _super.call(this) || this;\r\n /**\r\n * Should this series excluded from the axis scale calculations?\r\n *\r\n * @default false\r\n */\r\n _this._ignoreMinMax = false;\r\n /**\r\n * Should series' bullets?\r\n *\r\n * @default true\r\n */\r\n _this._showBullets = true;\r\n /**\r\n * Settings for the appearance of the related legend items.\r\n */\r\n _this.legendSettings = new LegendSettings();\r\n /**\r\n * Lowest overal values by type.\r\n */\r\n _this._tmin = new Dictionary();\r\n /**\r\n * Highest overal values by type.\r\n */\r\n _this._tmax = new Dictionary();\r\n /**\r\n * Lowest values in current selection by type.\r\n */\r\n _this._smin = new Dictionary();\r\n /**\r\n * Highest values in current selection by type.\r\n */\r\n _this._smax = new Dictionary();\r\n /**\r\n * [dataItemsByAxis description]\r\n *\r\n * Both by category and date.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\r\n _this.dataItemsByAxis = new Dictionary();\r\n /**\r\n * Normally series items are focusable using keyboard, so that people can\r\n * select them with a TAB key. However, if there are a lot of data points on\r\n * screen it might be long and useless to tab through all o fthem.\r\n *\r\n * This is where `skipFocusThreshold` comes in. If there are more items than\r\n * the value set here, we will not make those focusable and rather let screen\r\n * reader software rely on the series summary, or authors provide alternative\r\n * detailed information display, such as HTML table.\r\n *\r\n * Different series might have different threshold defaults.\r\n */\r\n _this.skipFocusThreshold = 20;\r\n /**\r\n * Used to indicate if `itemReaderText` was changed \"from the outside\".\r\n */\r\n _this._itemReaderTextChanged = false;\r\n /**\r\n * Most of the series use absolute values. However sometimes various\r\n * calculated percent values are need, e.g. item's percent representation\r\n * across all values in series, etc.\r\n *\r\n * It's a resource-intensive operation, so it is disabled by default.\r\n *\r\n * If you need percents to be calculated, e.g. for showing them in tooltips,\r\n * or creating 100% stacks, this setting needs to be set to `true`.\r\n *\r\n * NOTE: `PieChart`, which relies on slice percentages, has this\r\n * automatically set to `true`.\r\n *\r\n * @default false\r\n */\r\n _this.calculatePercent = false;\r\n /**\r\n * When `calculatePercent` is enabled and data item's percent value is\r\n * calculated, last item's real value is used instead of its working value.\r\n *\r\n * This is done for the animations when last item in series (e.g. slice in\r\n * a `PieSeries`) is hidden or shown. (if we would use real value, the\r\n * calculated percent would always be 100%).\r\n *\r\n * Sometimes there is a need (e.g. for drill-down Sunburst) to disable this\r\n * hack by setting `usePercentHack` to `false`.\r\n *\r\n * @since 4.9.13\r\n * @default true\r\n */\r\n _this.usePercentHack = true;\r\n /**\r\n * Specifies if series should be automatically disposed when removing from\r\n * chart's `series` list.\r\n *\r\n * @default true\r\n */\r\n _this.autoDispose = true;\r\n /**\r\n * When chart/series' data is processed, all kinds of derivative values are\r\n * calculated. E.g. sum, min, max, change, etc. This is a potentially\r\n * time-consuming operation, especially prominent in data-heavy charts.\r\n *\r\n * If your chart does not need those values, and you have a lot of data,\r\n * setting this to `true` might give a dramatic increase in initial chart\r\n * load speed.\r\n *\r\n * Please note, regular column and line series usage scenarios do not\r\n * require derivative values. Those come into play only when you do advanced\r\n * functionality like coloring segments of charts in different colors\r\n * depending on change between open and close values, have stacked series, or\r\n * display any of the derived values, like percent, in tooltips or bullets.\r\n *\r\n * @default false\r\n */\r\n _this.simplifiedProcessing = false;\r\n if (_this.constructor === Series) {\r\n throw new Error(\"'Series' cannot be instantiated directly. Please use a specific series type.\");\r\n }\r\n _this.className = \"Series\";\r\n _this.isMeasured = false;\r\n _this.layout = \"none\";\r\n _this.shouldClone = false;\r\n _this.setPropertyValue(\"hidden\", false);\r\n _this.axisRanges = new List();\r\n _this.axisRanges.events.on(\"inserted\", _this.processAxisRange, _this, false);\r\n _this.minBulletDistance = 0; // otherwise we'll have a lot of cases when people won't see bullets and think it's a bug\r\n _this.mainContainer = _this.createChild(Container);\r\n _this.mainContainer.shouldClone = false;\r\n _this.mainContainer.mask = _this.createChild(Sprite);\r\n _this._disposers.push(_this.mainContainer);\r\n // all bullets should go on top of lines/fills. So we add a separate container for bullets and later set it's parent to chart.bulletsContainer\r\n var bulletsContainer = _this.mainContainer.createChild(Container);\r\n _this._shouldBeReady.push(bulletsContainer);\r\n bulletsContainer.shouldClone = false;\r\n bulletsContainer.layout = \"none\";\r\n bulletsContainer.virtualParent = _this;\r\n _this._disposers.push(bulletsContainer);\r\n _this.bulletsContainer = bulletsContainer;\r\n _this.tooltip = new Tooltip();\r\n _this.tooltip.virtualParent = _this;\r\n _this._disposers.push(_this.tooltip);\r\n _this.hiddenState.transitionEasing = $ease.cubicIn;\r\n // this data item holds sums, averages, etc\r\n _this.dataItem = _this.createDataItem();\r\n _this._disposers.push(_this.dataItem);\r\n _this.dataItem.component = _this;\r\n // Apply accessibility\r\n _this.role = \"group\";\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * We need this here so that class names can be applied to bullets container.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Series.prototype.applyTheme = function () {\r\n _super.prototype.applyTheme.call(this);\r\n if (options.autoSetClassName && this.bulletsContainer) {\r\n this.bulletsContainer.className = this.className + \"-bullets\";\r\n this.bulletsContainer.setClassName();\r\n }\r\n };\r\n /**\r\n * Sets defaults that instantiate some objects that rely on parent, so they\r\n * cannot be set in constructor.\r\n */\r\n Series.prototype.applyInternalDefaults = function () {\r\n _super.prototype.applyInternalDefaults.call(this);\r\n if (!$type.hasValue(this.readerTitle)) {\r\n this.readerTitle = this.language.translate(\"Series\");\r\n }\r\n };\r\n /**\r\n * Returns a new/empty DataItem of the type appropriate for this object.\r\n *\r\n * @see {@link DataItem}\r\n * @return Data Item\r\n */\r\n Series.prototype.createDataItem = function () {\r\n return new SeriesDataItem();\r\n };\r\n Object.defineProperty(Series.prototype, \"chart\", {\r\n /**\r\n * @return Chart\r\n */\r\n get: function () {\r\n return this._chart;\r\n },\r\n /**\r\n * Chart series is used on.\r\n *\r\n * @param value Chart\r\n */\r\n set: function (value) {\r\n this._chart = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Positions bullet.\r\n *\r\n * @param bullet Sprite\r\n */\r\n Series.prototype.positionBullet = function (bullet) {\r\n // Placeholder method for extending classes to override.\r\n };\r\n /**\r\n * Decorates newly created bullet after it has been instert into the list.\r\n *\r\n * @param event List event\r\n * @todo investigate why itemReaderText is undefined\r\n */\r\n Series.prototype.processBullet = function (event) {\r\n var _this = this;\r\n var bullet = event.newValue;\r\n bullet.isTemplate = true;\r\n // Add accessibility options to bullet\r\n // If there are relatively few bullets, make them focusable\r\n this.events.once(\"datavalidated\", function (ev) {\r\n if (_this.itemsFocusable()) {\r\n bullet.focusable = true;\r\n }\r\n });\r\n this.invalidate();\r\n };\r\n /**\r\n * removes bullets\r\n *\r\n * @param event List event\r\n */\r\n Series.prototype.removeBullet = function (event) {\r\n var bullet = event.oldValue;\r\n this.dataItems.each(function (dataItem) {\r\n var eachBullet = dataItem.bullets.getKey(bullet.uid);\r\n if (eachBullet) {\r\n eachBullet.dispose();\r\n }\r\n });\r\n this.invalidate();\r\n };\r\n /**\r\n * Validates data items.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Series.prototype.validateDataItems = function () {\r\n _super.prototype.validateDataItems.call(this);\r\n this.processValues(false);\r\n };\r\n /**\r\n * Returns first value for the specific key in the series.\r\n *\r\n * @param key Key\r\n * @return Value\r\n * @todo Description\r\n * @todo Convert to propert object property iterator\r\n */\r\n Series.prototype.getFirstValue = function (key, startIndex) {\r\n // find first\r\n /*\r\n return $iter.findMap(this.dataItems.iterator(), (dataItem) => {\r\n for (let key in dataItem.values) {\r\n if ($object.hasKey(dataItem.values, key)) {\r\n let value: number = dataItem.values[key].workingValue;\r\n if ($type.isNumber(value)) {\r\n return value;\r\n }\r\n }\r\n }\r\n\r\n return null;\r\n });*/\r\n //if (startIndex > 0 && startIndex < this.dataItems.length - 1) {\r\n //startIndex++;\r\n //}\r\n for (var i = startIndex; i >= 0; i--) {\r\n var dataItem = this.dataItems.getIndex(i);\r\n var value = dataItem.getActualWorkingValue(key);\r\n if ($type.isNumber(value)) {\r\n return value;\r\n }\r\n }\r\n return null;\r\n };\r\n /**\r\n * Returns first value for the specific key in the series.\r\n *\r\n * @param key Key\r\n * @return Value\r\n * @todo Description\r\n * @todo Convert to propert object property iterator\r\n */\r\n Series.prototype.getAbsoluteFirstValue = function (key) {\r\n for (var i = 0; i < this.dataItems.length; i++) {\r\n var dataItem = this.dataItems.getIndex(i);\r\n var value = dataItem.values[key].value;\r\n if ($type.isNumber(value)) {\r\n return value;\r\n }\r\n }\r\n return null;\r\n };\r\n /**\r\n * [rangeChangeUpdate description]\r\n *\r\n * @todo Description\r\n */\r\n Series.prototype.rangeChangeUpdate = function () {\r\n _super.prototype.rangeChangeUpdate.call(this);\r\n this.processValues(true);\r\n };\r\n /**\r\n * [processValues description]\r\n *\r\n * @todo Description\r\n * @todo Convert to propert object property iterator\r\n * @param dataItems [description]\r\n */\r\n Series.prototype.processValues = function (working) {\r\n var _this = this;\r\n if (!this.simplifiedProcessing) {\r\n var dataItems = this.dataItems;\r\n var count_1 = {};\r\n var sum_1 = {};\r\n var absoluteSum_1 = {};\r\n var low_1 = {};\r\n var high_1 = {};\r\n var open_1 = {};\r\n var close_1 = {};\r\n var previous_1 = {};\r\n var first_1 = {};\r\n var absoluteFirst_1 = {};\r\n //let duration: number = 0; // todo: check if series uses selection.change or selection.change.percent and set duration to interpolationduration\r\n var startIndex_1 = $math.max(0, this.startIndex);\r\n startIndex_1 = $math.min(startIndex_1, this.dataItems.length);\r\n var endIndex = $math.min(this.endIndex, this.dataItems.length);\r\n if (!$type.isNumber(startIndex_1)) {\r\n startIndex_1 = 0;\r\n }\r\n if (!$type.isNumber(endIndex)) {\r\n endIndex = this.dataItems.length;\r\n }\r\n if (startIndex_1 > 0) {\r\n var dataItem_1 = dataItems.getIndex(startIndex_1 - 1);\r\n $object.each(dataItem_1.values, function (key, values) {\r\n var value = dataItem_1.getActualWorkingValue(key);\r\n if ($type.isNumber(value)) {\r\n // save previous\r\n previous_1[key] = value;\r\n }\r\n });\r\n }\r\n var _loop_1 = function (i) {\r\n var dataItem_2 = dataItems.getIndex(i);\r\n $object.each(dataItem_2.values, function (key, values) {\r\n var value = dataItem_2.getActualWorkingValue(key);\r\n //if (i >= startIndex && i <= endIndex) { // do not add to count, sum etc if it is not within start/end index\r\n if ($type.isNumber(value)) {\r\n // count values\r\n if (!$type.isNumber(count_1[key])) {\r\n count_1[key] = 0;\r\n }\r\n count_1[key]++;\r\n // sum values\r\n if (!$type.isNumber(sum_1[key])) {\r\n sum_1[key] = 0;\r\n }\r\n sum_1[key] += value;\r\n // absolute sum values\r\n if (!$type.isNumber(absoluteSum_1[key])) {\r\n absoluteSum_1[key] = 0;\r\n }\r\n absoluteSum_1[key] += Math.abs(value);\r\n // open\r\n if (!$type.isNumber(open_1[key])) {\r\n open_1[key] = value;\r\n }\r\n // close\r\n close_1[key] = value;\r\n // low\r\n if (!$type.isNumber(low_1[key])) {\r\n low_1[key] = value;\r\n }\r\n else {\r\n if (low_1[key] > value) {\r\n low_1[key] = value;\r\n }\r\n }\r\n // high\r\n if (!$type.isNumber(high_1[key])) {\r\n high_1[key] = value;\r\n }\r\n else {\r\n if (high_1[key] < value) {\r\n high_1[key] = value;\r\n }\r\n }\r\n if (!$type.isNumber(first_1[key])) {\r\n first_1[key] = _this.getFirstValue(key, startIndex_1);\r\n }\r\n if (!$type.isNumber(absoluteFirst_1[key])) {\r\n absoluteFirst_1[key] = _this.getAbsoluteFirstValue(key);\r\n }\r\n // change\r\n dataItem_2.setCalculatedValue(key, value - first_1[key], \"change\");\r\n // change from start percent\r\n // will fail if first value is 0\r\n dataItem_2.setCalculatedValue(key, (value - first_1[key]) / first_1[key] * 100, \"changePercent\");\r\n dataItem_2.setCalculatedValue(key, (value - absoluteFirst_1[key]), \"startChange\");\r\n dataItem_2.setCalculatedValue(key, (value - absoluteFirst_1[key]) / absoluteFirst_1[key] * 100, \"startChangePercent\");\r\n // previous change\r\n var prevValue = previous_1[key];\r\n if (!$type.isNumber(prevValue)) {\r\n prevValue = value;\r\n }\r\n dataItem_2.setCalculatedValue(key, value - prevValue, \"previousChange\");\r\n // previous change percent\r\n dataItem_2.setCalculatedValue(key, (value - prevValue) / prevValue * 100, \"previousChangePercent\");\r\n // save previous\r\n previous_1[key] = value;\r\n }\r\n });\r\n };\r\n for (var i = startIndex_1; i < endIndex; i++) {\r\n _loop_1(i);\r\n }\r\n if (this.calculatePercent) {\r\n var _loop_2 = function (i) {\r\n var dataItem_3 = dataItems.getIndex(i);\r\n $object.each(dataItem_3.values, function (key) {\r\n var ksum = absoluteSum_1[key];\r\n var value = dataItem_3.getActualWorkingValue(key);\r\n if ($type.isNumber(value)) {\r\n if (ksum > 0) {\r\n if (_this.usePercentHack) {\r\n // this hack is made in order to make it possible to animate single slice to 0\r\n // if there is only one slice left, percent value is always 100%, so it won't animate\r\n // so we use real value of a slice instead of current value\r\n if (value == ksum) {\r\n ksum = dataItem_3.values[key].value;\r\n }\r\n }\r\n var percent = value / ksum * 100;\r\n dataItem_3.setCalculatedValue(key, percent, \"percent\");\r\n }\r\n else {\r\n dataItem_3.setCalculatedValue(key, 0, \"percent\");\r\n }\r\n }\r\n });\r\n };\r\n for (var i = startIndex_1; i < endIndex; i++) {\r\n _loop_2(i);\r\n }\r\n }\r\n // calculate one before first (cant do that in cycle, as we don't know open yet\r\n // when drawing line chart we should draw line to the invisible data point to the left, otherwise the line will always look like it starts from the selected point\r\n // so we do startIndex - 1\r\n if (startIndex_1 > 0) {\r\n var zeroItem_1 = dataItems.getIndex(startIndex_1 - 1);\r\n $object.each(zeroItem_1.values, function (key) {\r\n var value = zeroItem_1.values[key].value;\r\n // change\r\n zeroItem_1.setCalculatedValue(key, value - open_1[key], \"change\");\r\n // change percent\r\n zeroItem_1.setCalculatedValue(key, (value - open_1[key]) / open_1[key] * 100, \"changePercent\");\r\n });\r\n }\r\n // we save various data like sum, average to dataPoint of the series\r\n var dataItem_4 = this.dataItem;\r\n $object.each(dataItem_4.values, function (key) {\r\n dataItem_4.setCalculatedValue(key, sum_1[key], \"sum\");\r\n dataItem_4.setCalculatedValue(key, absoluteSum_1[key], \"absoluteSum\");\r\n dataItem_4.setCalculatedValue(key, sum_1[key] / count_1[key], \"average\");\r\n dataItem_4.setCalculatedValue(key, open_1[key], \"open\");\r\n dataItem_4.setCalculatedValue(key, close_1[key], \"close\");\r\n dataItem_4.setCalculatedValue(key, low_1[key], \"low\");\r\n dataItem_4.setCalculatedValue(key, high_1[key], \"high\");\r\n dataItem_4.setCalculatedValue(key, count_1[key], \"count\");\r\n });\r\n }\r\n };\r\n /**\r\n * (Re)validates the whole series, effectively causing it to redraw.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Series.prototype.validate = function () {\r\n if ($utils.isIE()) {\r\n this.filters.clear();\r\n }\r\n $iter.each(this.axisRanges.iterator(), function (axisRange) {\r\n //axisRange.contents.disposeChildren(); // not good for columns, as they are reused\r\n //\t\t\taxisRange.appendChildren();\r\n axisRange.validate();\r\n });\r\n _super.prototype.validate.call(this);\r\n var bulletsContainer = this.bulletsContainer;\r\n bulletsContainer.fill = this.fill;\r\n bulletsContainer.stroke = this.stroke;\r\n bulletsContainer.x = this.pixelX;\r\n bulletsContainer.y = this.pixelY;\r\n if (this.bulletsContainer.children.length > 0) {\r\n if (this._showBullets) {\r\n for (var i = 0; i < this.startIndex; i++) {\r\n var dataItem = this.dataItems.getIndex(i);\r\n if (dataItem) {\r\n dataItem.bullets.each(function (key, bullet) {\r\n bullet.__disabled = true;\r\n });\r\n }\r\n }\r\n for (var i = this.dataItems.length - 1; i > this.endIndex; i--) {\r\n var dataItem = this.dataItems.getIndex(i);\r\n if (dataItem) {\r\n dataItem.bullets.each(function (key, bullet) {\r\n bullet.__disabled = true;\r\n });\r\n }\r\n }\r\n }\r\n else {\r\n this.bulletsContainer.children.each(function (bullet) {\r\n bullet.__disabled = true;\r\n });\r\n }\r\n }\r\n this.updateTooltipBounds();\r\n };\r\n /**\r\n * @ignore\r\n */\r\n Series.prototype.updateTooltipBounds = function () {\r\n if (this.topParent) {\r\n var x = 0;\r\n var y = 0;\r\n var w = this.topParent.maxWidth;\r\n var h = this.topParent.maxHeight;\r\n var rect = { x: x, y: y, width: w, height: h };\r\n this.tooltip.setBounds(rect);\r\n }\r\n };\r\n Series.prototype.shouldCreateBullet = function (dataItem, bulletTemplate) {\r\n return true;\r\n };\r\n /**\r\n * Validates data item's element, effectively redrawing it.\r\n *\r\n * @ignore Exclude from docs\r\n * @param dataItem Data item\r\n */\r\n Series.prototype.validateDataElement = function (dataItem) {\r\n var _this = this;\r\n _super.prototype.validateDataElement.call(this, dataItem);\r\n if (this._showBullets) {\r\n if (!this.isHidden) {\r\n this.bulletsContainer.visible = true;\r\n }\r\n this.bullets.each(function (bulletTemplate) {\r\n // always better to use the same, this helps to avoid redrawing\r\n var bullet = dataItem.bullets.getKey(bulletTemplate.uid);\r\n if (_this.shouldCreateBullet(dataItem, bulletTemplate)) {\r\n if (!bullet) {\r\n var disabledField = bulletTemplate.propertyFields.disabled;\r\n var dataContext = dataItem.dataContext;\r\n if (disabledField && dataContext && dataContext[disabledField] === false) {\r\n bulletTemplate.applyOnClones = false;\r\n bulletTemplate.disabled = false;\r\n bullet = bulletTemplate.clone();\r\n bulletTemplate.disabled = true;\r\n bulletTemplate.applyOnClones = true;\r\n }\r\n else {\r\n bullet = bulletTemplate.clone();\r\n }\r\n bullet.shouldClone = false;\r\n dataItem.addSprite(bullet);\r\n if (!_this.visible || _this.isHiding) {\r\n bullet.hide(0);\r\n }\r\n }\r\n var currentDataItem = bullet.dataItem;\r\n if (currentDataItem != dataItem) {\r\n // set to undefined in order not to reuse\r\n if (currentDataItem) {\r\n currentDataItem.bullets.setKey(bulletTemplate.uid, undefined);\r\n }\r\n var readerText_1 = _this.itemReaderText;\r\n if (bullet instanceof Bullet) {\r\n if (!readerText_1) {\r\n readerText_1 = (\"{\" + bullet.xField + \"}: {\" + bullet.yField + \"}\");\r\n }\r\n if (bullet.isDynamic) {\r\n dataItem.events.on(\"workingvaluechanged\", bullet.deepInvalidate, bullet, false);\r\n //dataItem.events.on(\"calculatedvaluechanged\", bullet.deepInvalidate, bullet, false);\r\n _this.dataItem.events.on(\"workingvaluechanged\", bullet.deepInvalidate, bullet, false);\r\n }\r\n bullet.deepInvalidate();\r\n }\r\n // Add accessibility to bullet\r\n if (bullet.focusable) {\r\n bullet.events.on(\"focus\", function (ev) {\r\n bullet.readerTitle = _this.populateString(readerText_1, bullet.dataItem);\r\n }, undefined, false);\r\n bullet.events.on(\"blur\", function (ev) {\r\n bullet.readerTitle = \"\";\r\n }, undefined, false);\r\n }\r\n if (bullet.hoverable) {\r\n bullet.events.on(\"over\", function (ev) {\r\n bullet.readerTitle = _this.populateString(readerText_1, bullet.dataItem);\r\n }, undefined, false);\r\n bullet.events.on(\"out\", function (ev) {\r\n bullet.readerTitle = \"\";\r\n }, undefined, false);\r\n }\r\n }\r\n bullet.parent = _this.bulletsContainer;\r\n dataItem.bullets.setKey(bulletTemplate.uid, bullet);\r\n // pass max w/h so we'd know if we should show/hide somethings\r\n bullet.maxWidth = dataItem.itemWidth;\r\n bullet.maxHeight = dataItem.itemHeight;\r\n bullet.__disabled = false;\r\n _this.positionBullet(bullet);\r\n }\r\n else {\r\n if (bullet) {\r\n bullet.__disabled = true;\r\n }\r\n }\r\n });\r\n }\r\n else {\r\n this.bulletsContainer.visible = false;\r\n }\r\n };\r\n /**\r\n * [handleDataItemWorkingValueChange description]\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Series.prototype.handleDataItemWorkingValueChange = function (dataItem, name) {\r\n if (!this.dataRangeInvalid) {\r\n this.invalidateProcessedData();\r\n }\r\n };\r\n Object.defineProperty(Series.prototype, \"ignoreMinMax\", {\r\n /**\r\n * @return Exclude from calculations?\r\n */\r\n get: function () {\r\n return this._ignoreMinMax;\r\n },\r\n /**\r\n * Should this series excluded from the axis scale calculations?\r\n *\r\n * @default false\r\n * @param value Exclude from calculations?\r\n */\r\n set: function (value) {\r\n this._ignoreMinMax = value;\r\n this.invalidateDataItems();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Create a mask for the series.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Series.prototype.createMask = function () {\r\n // A placeholder method for extending classes to override.\r\n };\r\n /**\r\n * Process axis range after it has been added to the list.\r\n *\r\n * @param event Event\r\n */\r\n Series.prototype.processAxisRange = function (event) {\r\n // create container if not existing\r\n if (!this.rangesContainer) {\r\n this.rangesContainer = this.createChild(Container);\r\n this.rangesContainer.shouldClone = false;\r\n this.rangesContainer.isMeasured = false;\r\n }\r\n var axisRange = event.newValue;\r\n if (axisRange) {\r\n axisRange.contents.parent = this.rangesContainer;\r\n axisRange.isRange = true;\r\n axisRange.events.on(\"valuechanged\", this.invalidateDataItems, this, false);\r\n }\r\n };\r\n /**\r\n * [getAxisField description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param axis [description]\r\n * @return [description]\r\n */\r\n Series.prototype.getAxisField = function (axis) {\r\n return;\r\n };\r\n /**\r\n * Shows the tooltip at specific position.\r\n *\r\n * @ignore Exclude from docs\r\n * @param xPosition X\r\n * @param yPosition Y\r\n */\r\n Series.prototype.showTooltipAtPosition = function (xPosition, yPosition) {\r\n // Placeholder method for extending classes to override.\r\n };\r\n Object.defineProperty(Series.prototype, \"minBulletDistance\", {\r\n /**\r\n * @return Distance (px)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"minBulletDistance\");\r\n },\r\n /**\r\n * Minimal distance between data points in pixels.\r\n *\r\n * If distance gets smaller than this, bullets are turned off to avoid\r\n * overlapping.\r\n *\r\n * `0` (zero) disables this behavior.\r\n *\r\n * IMPORTANT: This setting will work only when Series' base axis\r\n * is [[CategoryAxis]] or [[DateAxis]]. If base axis is [[ValueAxis]] the\r\n * setting will be ignored, because it would be a huge overhead to measure\r\n * distance between each and every bullet.\r\n *\r\n * @default 0\r\n * @param value Distance (px)\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"minBulletDistance\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Series.prototype, \"bullets\", {\r\n /**\r\n * A list of bullets that will be added to each and every items in the\r\n * series.\r\n *\r\n * You can push any object that is a descendant of a [[Sprite]] here. All\r\n * items added to this list will be copied and used as a bullet on all data\r\n * items, including their properties, events, etc.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/bullets/} for more info about the concept of Bullets\r\n * @return List of bullets.\r\n */\r\n get: function () {\r\n if (!this._bullets) {\r\n this._bullets = new ListTemplate(new Bullet());\r\n this._bullets.template.virtualParent = this;\r\n this._bullets.events.on(\"inserted\", this.processBullet, this, false);\r\n this._bullets.events.on(\"removed\", this.removeBullet, this, false);\r\n this._disposers.push(new ListDisposer(this._bullets));\r\n this._disposers.push(this._bullets.template);\r\n }\r\n return this._bullets;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Binds related legend data item's visual settings to this series' visual\r\n * settings.\r\n *\r\n * @ignore Exclude from docs\r\n * @param marker Legend item container\r\n */\r\n Series.prototype.createLegendMarker = function (marker) {\r\n // This is a placeholder method for extending classes to override.\r\n };\r\n Object.defineProperty(Series.prototype, \"hiddenInLegend\", {\r\n /**\r\n * @return Hidden in legend?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"hiddenInLegend\");\r\n },\r\n /**\r\n * Should the series be hidden in legend?\r\n *\r\n * @param value Hidden in legend?\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"hiddenInLegend\", value)) {\r\n if (this.chart) {\r\n this.chart.feedLegend();\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Series.prototype, \"name\", {\r\n /**\r\n * @return Name\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"name\");\r\n },\r\n /**\r\n * Series' name.\r\n *\r\n * @param value Name\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"name\", value);\r\n var legendDataItem = this.legendDataItem;\r\n if (legendDataItem) {\r\n legendDataItem.component.invalidate();\r\n legendDataItem.component.invalidateRawData();\r\n }\r\n this.readerTitle = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Series.prototype, \"itemReaderText\", {\r\n /**\r\n * @return Screen reader text template\r\n */\r\n get: function () {\r\n // Get explicitly set reader text\r\n var readerText = this._itemReaderText;\r\n // Not set? Let's try something else\r\n if (!readerText) {\r\n // Tooltip text?\r\n if (this.tooltipText) {\r\n readerText = $utils.plainText(this.tooltipText);\r\n }\r\n else if (this.tooltipHTML) {\r\n readerText = $utils.plainText(this.tooltipHTML);\r\n }\r\n }\r\n if (!this._adapterO) {\r\n return readerText;\r\n }\r\n else {\r\n return this._adapterO.apply(\"itemReaderText\", readerText);\r\n }\r\n },\r\n /**\r\n * Screen reader text to be applied to each individual data item, such\r\n * as bullets, columns or slices.\r\n *\r\n * The template can contain field reference meta codes, i.e. `{dateX}`,\r\n * `{valueY}`, etc.\r\n *\r\n * Any text formatting options, e.g. `[bold]` will be ignored.\r\n *\r\n * @param value Screen reader text template\r\n */\r\n set: function (value) {\r\n this._itemReaderText = value;\r\n this._itemReaderTextChanged = true;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Returns if number of data items in the series are beyond non-focusable\r\n * count and should not be available for TAB-through.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Items focusable?\r\n */\r\n Series.prototype.itemsFocusable = function () {\r\n return this.dataItems.length >= this.skipFocusThreshold ? false : true;\r\n };\r\n Object.defineProperty(Series.prototype, \"legendDataItem\", {\r\n /**\r\n * @return Data item\r\n */\r\n get: function () {\r\n return this._legendDataItem;\r\n },\r\n /**\r\n * Legend data item that corresponds to this series.\r\n *\r\n * @param value Data item\r\n */\r\n set: function (value) {\r\n this._legendDataItem = value;\r\n this._legendDataItem.itemContainer.deepInvalidate();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Updates corresponding legend data item with current values.\r\n *\r\n * @ignore Exclude from docs\r\n * @param dataItem Data item\r\n */\r\n Series.prototype.updateLegendValue = function (dataItem, notRange) {\r\n // if this series has legend item\r\n if (this.legendDataItem) {\r\n var legendSettings = this.legendSettings;\r\n var legendDataItem = this.legendDataItem;\r\n var label = legendDataItem.label;\r\n var valueLabel = legendDataItem.valueLabel;\r\n // update legend\r\n if ((dataItem && !dataItem.isDisposed()) || notRange) {\r\n if (valueLabel) {\r\n if (legendSettings.itemValueText) {\r\n valueLabel.text = legendSettings.itemValueText;\r\n }\r\n valueLabel.dataItem = dataItem;\r\n }\r\n if (label) {\r\n if (legendSettings.itemLabelText) {\r\n label.text = legendSettings.itemLabelText;\r\n }\r\n label.dataItem = dataItem;\r\n }\r\n }\r\n else {\r\n if (label) {\r\n // if itemLabelText is set, means we have to reset label even if labelText is not set\r\n if (legendSettings.labelText || legendSettings.itemLabelText != undefined) {\r\n label.text = legendSettings.labelText;\r\n }\r\n label.dataItem = this.dataItem;\r\n }\r\n if (valueLabel) {\r\n if (legendSettings.valueText || legendSettings.itemValueText != undefined) {\r\n valueLabel.text = legendSettings.valueText;\r\n }\r\n valueLabel.dataItem = this.dataItem;\r\n }\r\n }\r\n }\r\n };\r\n /**\r\n * Copies all properties from another instance of [[Series]].\r\n *\r\n * @param source Source series\r\n */\r\n Series.prototype.copyFrom = function (source) {\r\n this.bullets.copyFrom(source.bullets);\r\n this.bulletsContainer.copyFrom(source.bulletsContainer);\r\n this.calculatePercent = source.calculatePercent;\r\n this.usePercentHack = source.usePercentHack;\r\n this.simplifiedProcessing = source.simplifiedProcessing;\r\n _super.prototype.copyFrom.call(this, source);\r\n };\r\n /**\r\n * Displays a modal or console message with error, and halts any further\r\n * processing of this element.\r\n *\r\n * @param e Error\r\n */\r\n Series.prototype.raiseCriticalError = function (e) {\r\n if (this._chart && this._chart.modal) {\r\n this._chart.modal.content = this._chart.adapter.apply(\"criticalError\", e).message;\r\n this._chart.modal.closable = false;\r\n if (!options.suppressErrors) {\r\n this._chart.modal.open();\r\n }\r\n this._chart.disabled = true;\r\n }\r\n if (options.verbose) {\r\n console.log(e);\r\n }\r\n };\r\n /**\r\n * Applies filters to the element.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Series.prototype.applyFilters = function () {\r\n var _this = this;\r\n _super.prototype.applyFilters.call(this);\r\n this.bulletsContainer.filters.clear();\r\n // copyFrom of a list copies, does not clone\r\n $iter.each(this.filters.iterator(), function (filter) {\r\n _this.bulletsContainer.filters.push(filter.clone());\r\n });\r\n };\r\n Object.defineProperty(Series.prototype, \"heatRules\", {\r\n /**\r\n * A list of heat rules to apply to series' elements based on the value\r\n * of the data item.\r\n *\r\n * Heat rules can be any \"numeric\" (including `Color`) property, and can also\r\n * be applied to child objects of series, like columns, bullets, etc.\r\n *\r\n * E.g.:\r\n *\r\n * ```TypeScript\r\n * series.heatRules.push({\r\n * \"target\": series.columns.template,\r\n * \"property\": \"fill\",\r\n * \"min\": am4core.color(\"#F5DBCB\"),\r\n * \"max\": am4core.color(\"#ED7B84\"),\r\n * \"dataField\": \"valueY\"\r\n *});\r\n *```\r\n * ```Javacript\r\n * series.heatRules.push({\r\n * \"target\": series.columns.template,\r\n * \"property\": \"fill\",\r\n * \"min\": am4core.color(\"#F5DBCB\"),\r\n * \"max\": am4core.color(\"#ED7B84\"),\r\n * \"dataField\": \"valueY\"\r\n *});\r\n *```\r\n *```JSON\r\n *{\r\n * // ...\r\n * \"series\": [{\r\n * \"type\": \"ColumnSeries\",\r\n * \"heatRules\": [{\r\n * \"target\": \"columns.template\",\r\n * \"property\": \"fill\",\r\n * \"min\": \"#F5DBCB\",\r\n * \"max\": \"#ED7B84\",\r\n * \"dataField\": \"valueY\"\r\n * }]\r\n * }]\r\n *}\r\n *```\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/series/#Heat_maps} for more about heat rules\r\n * @return Heat rules\r\n */\r\n get: function () {\r\n var _this = this;\r\n if (!this._heatRules) {\r\n this._heatRules = new List();\r\n this._heatRules.events.on(\"inserted\", function (event) {\r\n var heatRule = event.newValue;\r\n var target = heatRule.target;\r\n if (target) {\r\n var dataField_1 = heatRule.dataField;\r\n if (!$type.hasValue(dataField_1)) {\r\n dataField_1 = \"value\";\r\n }\r\n var seriesDataItem_1 = _this.dataItem;\r\n var property_1 = heatRule.property;\r\n var minValue = $type.toNumber(heatRule.minValue);\r\n var maxValue = $type.toNumber(heatRule.maxValue);\r\n if (!$type.isNumber(minValue) && !$type.isNumber(maxValue)) {\r\n _this.dataItem.events.on(\"calculatedvaluechanged\", function (event) {\r\n if (event.property == dataField_1) {\r\n $iter.each(_this.dataItems.iterator(), function (dataItem) {\r\n var foundSprite = false;\r\n $array.each(dataItem.sprites, function (sprite) {\r\n if (sprite.clonedFrom == target) {\r\n var anySprite = sprite;\r\n anySprite[property_1] = anySprite[property_1];\r\n foundSprite = true;\r\n }\r\n });\r\n if (!foundSprite) {\r\n $array.each(dataItem.sprites, function (sprite) {\r\n if (sprite instanceof Container) {\r\n $iter.each(sprite.children.iterator(), function (child) {\r\n if (child.className == target.className) {\r\n var anyChild = child;\r\n anyChild[property_1] = anyChild[property_1];\r\n }\r\n // giveup here\r\n else if (child instanceof Container) {\r\n child.deepInvalidate();\r\n }\r\n });\r\n }\r\n });\r\n }\r\n });\r\n }\r\n });\r\n }\r\n _this.dataItems.template.events.on(\"workingvaluechanged\", function (event) {\r\n if (event.property == dataField_1) {\r\n var dataItem = event.target;\r\n var foundSprite_1 = false;\r\n $array.each(dataItem.sprites, function (sprite) {\r\n if (sprite.clonedFrom == target) {\r\n var anySprite = sprite;\r\n anySprite[property_1] = anySprite[property_1];\r\n foundSprite_1 = true;\r\n }\r\n });\r\n if (!foundSprite_1) {\r\n $array.each(dataItem.sprites, function (sprite) {\r\n if (sprite instanceof Container) {\r\n $iter.each(sprite.children.iterator(), function (child) {\r\n if (child.className == target.className) {\r\n var anyChild = child;\r\n anyChild[property_1] = anyChild[property_1];\r\n }\r\n // givup here\r\n else if (child instanceof Container) {\r\n child.deepInvalidate();\r\n }\r\n });\r\n }\r\n });\r\n }\r\n }\r\n });\r\n target.adapter.add(property_1, function (value, ruleTarget, property) {\r\n var minValue = $type.toNumber(heatRule.minValue);\r\n var maxValue = $type.toNumber(heatRule.maxValue);\r\n var min = heatRule.min;\r\n var max = heatRule.max;\r\n if (ruleTarget instanceof Sprite) {\r\n var anySprite = ruleTarget;\r\n var propertyField = anySprite.propertyFields[property];\r\n if (propertyField && ruleTarget.dataItem) {\r\n var dataContext = ruleTarget.dataItem.dataContext;\r\n if (dataContext && $type.hasValue(dataContext[propertyField])) {\r\n return value;\r\n }\r\n }\r\n }\r\n var dataItem = ruleTarget.dataItem;\r\n if (!$type.isNumber(minValue)) {\r\n minValue = seriesDataItem_1.values[dataField_1].low;\r\n }\r\n if (!$type.isNumber(maxValue)) {\r\n maxValue = seriesDataItem_1.values[dataField_1].high;\r\n }\r\n if (dataItem) {\r\n var fieldValues = dataItem.values[dataField_1];\r\n if (fieldValues) {\r\n var workingValue = dataItem.getActualWorkingValue(dataField_1);\r\n if ($type.hasValue(min) && $type.hasValue(max) && $type.isNumber(minValue) && $type.isNumber(maxValue) && $type.isNumber(workingValue)) {\r\n var percent = void 0;\r\n if (heatRule.logarithmic) {\r\n percent = (Math.log(workingValue) * Math.LOG10E - Math.log(minValue) * Math.LOG10E) / ((Math.log(maxValue) * Math.LOG10E - Math.log(minValue) * Math.LOG10E));\r\n }\r\n else {\r\n percent = (workingValue - minValue) / (maxValue - minValue);\r\n }\r\n if ($type.isNumber(workingValue) && (!$type.isNumber(percent) || Math.abs(percent) == Infinity)) {\r\n percent = 0.5;\r\n }\r\n // fixes problems if all values are the same\r\n if ($type.isNumber(min)) {\r\n return min + (max - min) * percent;\r\n }\r\n else if (min instanceof Color) {\r\n return new Color($colors.interpolate(min.rgb, max.rgb, percent));\r\n }\r\n }\r\n }\r\n }\r\n return value;\r\n });\r\n }\r\n });\r\n }\r\n return this._heatRules;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Processes JSON-based config before it is applied to the object.\r\n *\r\n * @ignore Exclude from docs\r\n * @param config Config\r\n */\r\n Series.prototype.processConfig = function (config) {\r\n var heatRules;\r\n if (config) {\r\n // Set up bullets\r\n if ($type.hasValue(config.bullets) && $type.isArray(config.bullets)) {\r\n for (var i = 0, len = config.bullets.length; i < len; i++) {\r\n var bullets = config.bullets[i];\r\n if (!$type.hasValue(bullets.type)) {\r\n bullets.type = \"Bullet\";\r\n }\r\n }\r\n }\r\n // Let's take heatRules out of the config, so that we can process\r\n // them later, when bullets are already there\r\n if ($type.hasValue(config.heatRules) && $type.isArray(config.heatRules)) {\r\n heatRules = config.heatRules;\r\n delete config.heatRules;\r\n }\r\n }\r\n _super.prototype.processConfig.call(this, config);\r\n // Process heat rules again, when all other elements are ready\r\n if (heatRules) {\r\n for (var i = 0, len = heatRules.length; i < len; i++) {\r\n var rule = heatRules[i];\r\n // Resolve target\r\n var target = this;\r\n if ($type.hasValue(rule.target) && $type.isString(rule.target)) {\r\n // Check if we can find this element by id\r\n if (this.map.hasKey(rule.target)) {\r\n target = this.map.getKey(rule.target);\r\n }\r\n else {\r\n var parts = rule.target.split(\".\");\r\n for (var x = 0; x < parts.length; x++) {\r\n if (target instanceof List) {\r\n var listitem = target.getIndex($type.toNumber(parts[x]));\r\n if (!listitem) {\r\n target = target[parts[x]];\r\n }\r\n else {\r\n target = listitem;\r\n }\r\n }\r\n else {\r\n var maybeIndex = parts[x].match(/^(.*)\\[([0-9]+)\\]/);\r\n if (maybeIndex) {\r\n if (target[maybeIndex[1]] instanceof List) {\r\n target = target[maybeIndex[1]].getIndex($type.toNumber(maybeIndex[2]));\r\n }\r\n else {\r\n target = target[maybeIndex[1]][$type.toNumber(maybeIndex[2])];\r\n }\r\n }\r\n else {\r\n target = target[parts[x]];\r\n }\r\n }\r\n }\r\n }\r\n }\r\n rule.target = target;\r\n // Resolve colors and percents\r\n if ($type.hasValue(rule.min)) {\r\n rule.min = this.maybeColorOrPercent(rule.min);\r\n }\r\n if ($type.hasValue(rule.max)) {\r\n rule.max = this.maybeColorOrPercent(rule.max);\r\n }\r\n }\r\n _super.prototype.processConfig.call(this, {\r\n heatRules: heatRules\r\n });\r\n }\r\n };\r\n /**\r\n * Returns visibility value\r\n * @ignore\r\n */\r\n /*\r\n protected getVisibility(): boolean {\r\n let hidden = this.getPropertyValue(\"hidden\");\r\n if (hidden) {\r\n return false;\r\n }\r\n else {\r\n return super.getVisibility();\r\n }\r\n }*/\r\n /**\r\n * This function is used to sort element's JSON config properties, so that\r\n * some properties that absolutely need to be processed last, can be put at\r\n * the end.\r\n *\r\n * @ignore Exclude from docs\r\n * @param a Element 1\r\n * @param b Element 2\r\n * @return Sorting number\r\n */\r\n Series.prototype.configOrder = function (a, b) {\r\n if (a == b) {\r\n return 0;\r\n }\r\n // Must come last\r\n else if (a == \"heatRules\") {\r\n return 1;\r\n }\r\n else if (b == \"heatRules\") {\r\n return -1;\r\n }\r\n else {\r\n return _super.prototype.configOrder.call(this, a, b);\r\n }\r\n };\r\n /**\r\n * Sets `visibility` property:\r\n *\r\n * * `true` - visible\r\n * * `false` - hidden\r\n *\r\n * @param value true - visible, false - hidden\r\n * @return Current visibility\r\n */\r\n Series.prototype.setVisibility = function (value) {\r\n _super.prototype.setVisibility.call(this, value);\r\n this.bulletsContainer.visible = value;\r\n };\r\n return Series;\r\n}(Component));\r\nexport { Series };\r\n/**\r\n * Register class, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"Series\"] = Series;\r\nregistry.registeredClasses[\"SeriesDataItem\"] = SeriesDataItem;\r\n","/**\r\n * Serial chart module.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Chart, ChartDataItem } from \"../Chart\";\r\nimport { ListTemplate, ListDisposer } from \"../../core/utils/List\";\r\nimport { Container } from \"../../core/Container\";\r\nimport { Series } from \"../series/Series\";\r\nimport { percent } from \"../../core/utils/Percent\";\r\nimport { ColorSet } from \"../../core/utils/ColorSet\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport * as $iter from \"../../core/utils/Iterator\";\r\nimport * as $type from \"../../core/utils/Type\";\r\nimport * as $array from \"../../core/utils/Array\";\r\nimport { Disposer } from \"../../core/utils/Disposer\";\r\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Defines a [[DataItem]] for [[SerialChart]].\r\n *\r\n * @see {@link DataItem}\r\n */\r\nvar SerialChartDataItem = /** @class */ (function (_super) {\r\n __extends(SerialChartDataItem, _super);\r\n /**\r\n * Constructor\r\n */\r\n function SerialChartDataItem() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"SerialChartDataItem\";\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n return SerialChartDataItem;\r\n}(ChartDataItem));\r\nexport { SerialChartDataItem };\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * A base class for all series-based charts, like XY, Pie, etc.\r\n *\r\n * Is not useful on its own.\r\n *\r\n * @see {@link ISerialChartEvents} for a list of available Events\r\n * @see {@link ISerialChartAdapters} for a list of available Adapters\r\n */\r\nvar SerialChart = /** @class */ (function (_super) {\r\n __extends(SerialChart, _super);\r\n /**\r\n * Constructor\r\n */\r\n function SerialChart() {\r\n var _this = \r\n // Init\r\n _super.call(this) || this;\r\n _this.className = \"SerialChart\";\r\n _this.colors = new ColorSet();\r\n _this._usesData = false;\r\n // Create a container for series\r\n var seriesContainer = _this.chartContainer.createChild(Container);\r\n seriesContainer.shouldClone = false;\r\n seriesContainer.width = percent(100);\r\n seriesContainer.height = percent(100);\r\n seriesContainer.isMeasured = false;\r\n seriesContainer.layout = \"none\";\r\n seriesContainer.zIndex = 2;\r\n _this.seriesContainer = seriesContainer;\r\n // Create a container for bullets\r\n var bulletsContainer = _this.chartContainer.createChild(Container);\r\n bulletsContainer.shouldClone = false;\r\n bulletsContainer.width = percent(100);\r\n bulletsContainer.height = percent(100);\r\n bulletsContainer.isMeasured = false;\r\n bulletsContainer.zIndex = 3;\r\n bulletsContainer.layout = \"none\";\r\n _this.bulletsContainer = bulletsContainer;\r\n // Apply theme\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n SerialChart.prototype.dispose = function () {\r\n _super.prototype.dispose.call(this);\r\n if (this.colors) {\r\n this.colors.dispose();\r\n }\r\n if (this.patterns) {\r\n this.patterns.dispose();\r\n }\r\n };\r\n /**\r\n * Sets defaults that instantiate some objects that rely on parent, so they\r\n * cannot be set in constructor\r\n */\r\n SerialChart.prototype.applyInternalDefaults = function () {\r\n _super.prototype.applyInternalDefaults.call(this);\r\n // Add a default screen reader title for accessibility\r\n // This will be overridden in screen reader if there are any `titles` set\r\n if (!$type.hasValue(this.readerTitle)) {\r\n this.readerTitle = this.language.translate(\"Serial chart\");\r\n }\r\n };\r\n Object.defineProperty(SerialChart.prototype, \"series\", {\r\n /**\r\n * A list of chart's series.\r\n *\r\n * @return Chart's series\r\n */\r\n get: function () {\r\n if (!this._series) {\r\n this._series = new ListTemplate(this.createSeries());\r\n this._series.events.on(\"inserted\", this.handleSeriesAdded, this, false);\r\n this._series.events.on(\"removed\", this.handleSeriesRemoved, this, false);\r\n this._disposers.push(new ListDisposer(this._series, false));\r\n this._disposers.push(this._series.template);\r\n }\r\n return this._series;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n SerialChart.prototype.handleSeriesRemoved = function (event) {\r\n var series = event.oldValue;\r\n this.dataUsers.removeValue(series);\r\n this.dataUsers.each(function (dataUser) {\r\n dataUser.invalidateDataItems();\r\n });\r\n if (series.autoDispose) {\r\n series.dispose();\r\n }\r\n else {\r\n series.parent = undefined;\r\n series.bulletsContainer.parent = undefined;\r\n }\r\n //this.feedLegend();\r\n var legend = this.legend;\r\n if (legend) {\r\n var dataItems = this.legend.dataItems;\r\n for (var i = dataItems.length - 1; i >= 0; i--) {\r\n var dataItem = dataItems.getIndex(i);\r\n if (dataItem && dataItem.dataContext == series) {\r\n legend.dataItems.remove(dataItem);\r\n }\r\n }\r\n for (var i = legend.data.length - 1; i >= 0; i--) {\r\n var di = legend.data[i];\r\n if (di && di == series) {\r\n $array.remove(legend.data, di);\r\n }\r\n }\r\n }\r\n };\r\n /**\r\n * Decorates a new [[Series]] object with required parameters when it is\r\n * added to the chart.\r\n *\r\n * @ignore Exclude from docs\r\n * @param event Event\r\n */\r\n SerialChart.prototype.handleSeriesAdded = function (event) {\r\n var _this = this;\r\n var series = event.newValue;\r\n if (series.isDisposed()) {\r\n return;\r\n }\r\n series.chart = this;\r\n series.parent = this.seriesContainer;\r\n series.bulletsContainer.parent = this.bulletsContainer;\r\n this._dataUsers.moveValue(series);\r\n series.addDisposer(new Disposer(function () {\r\n _this.dataUsers.removeValue(series);\r\n }));\r\n this.handleSeriesAdded2(series);\r\n this.handleLegendSeriesAdded(series);\r\n };\r\n SerialChart.prototype.handleLegendSeriesAdded = function (series) {\r\n if (!series.hiddenInLegend) {\r\n if (this.legend) {\r\n this.legend.addData(series);\r\n }\r\n }\r\n };\r\n SerialChart.prototype.handleSeriesAdded2 = function (series) {\r\n var _this = this;\r\n if (!this.dataInvalid) {\r\n this._disposers.push(\r\n // on exit only as data is usually passed after push\r\n registry.events.once(\"exitframe\", function () {\r\n if (!series.data || series.data.length == 0) {\r\n series.data = _this.data;\r\n if (series.showOnInit) {\r\n series.reinit();\r\n series.setPropertyValue(\"showOnInit\", false);\r\n series.showOnInit = true;\r\n }\r\n if (!series.isDisposed()) {\r\n series.events.once(\"datavalidated\", function () {\r\n if (series.data == _this.data) {\r\n series._data = [];\r\n }\r\n });\r\n }\r\n }\r\n }));\r\n }\r\n };\r\n /**\r\n * Setups the legend to use the chart's data.\r\n * @ignore\r\n */\r\n SerialChart.prototype.feedLegend = function () {\r\n var legend = this.legend;\r\n if (legend) {\r\n var legendData_1 = [];\r\n $iter.each(this.series.iterator(), function (series) {\r\n if (!series.hiddenInLegend) {\r\n legendData_1.push(series);\r\n }\r\n });\r\n legend.dataFields.name = \"name\";\r\n legend.data = legendData_1;\r\n }\r\n };\r\n /**\r\n * Creates and returns a new Series, suitable for this chart type.\r\n *\r\n * @return New series\r\n */\r\n SerialChart.prototype.createSeries = function () {\r\n return new Series();\r\n };\r\n Object.defineProperty(SerialChart.prototype, \"colors\", {\r\n /**\r\n * @return Color list\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"colors\");\r\n },\r\n /**\r\n * Chart's color list.\r\n *\r\n * This list can be used by a number of serial items, like applying a new\r\n * color for each Series added. Or, applying a new color for each slice\r\n * of a Pie chart.\r\n *\r\n * Please see [[ColorSet]] for information on how you can set up to generate\r\n * unique colors.\r\n *\r\n * A theme you are using may override default pre-defined colors.\r\n *\r\n * @param value Color list\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"colors\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(SerialChart.prototype, \"patterns\", {\r\n /**\r\n * @return Pattern set\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"patterns\");\r\n },\r\n /**\r\n * A [[PatternSet]] to use when creating patterned fills for slices.\r\n *\r\n * @since 4.7.5\r\n * @param value Pattern set\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"patterns\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Copies all parameters from another [[SerialChart]].\r\n *\r\n * @param source Source SerialChart\r\n */\r\n SerialChart.prototype.copyFrom = function (source) {\r\n _super.prototype.copyFrom.call(this, source);\r\n this.series.copyFrom(source.series);\r\n };\r\n /**\r\n * Hides the chart instantly and then shows it. If defaultState.transitionDuration > 0, this will result an animation in which properties of hidden state will animate to properties of visible state.\r\n */\r\n SerialChart.prototype.appear = function () {\r\n _super.prototype.appear.call(this);\r\n this.series.each(function (series) {\r\n if (series.showOnInit && series.inited) {\r\n series.appear();\r\n }\r\n });\r\n };\r\n return SerialChart;\r\n}(Chart));\r\nexport { SerialChart };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"SerialChart\"] = SerialChart;\r\n","// https://github.com/python/cpython/blob/a74eea238f5baba15797e2e8b570d153bc8690a7/Modules/mathmodule.c#L1423\nexport class Adder {\n constructor() {\n this._partials = new Float64Array(32);\n this._n = 0;\n }\n add(x) {\n const p = this._partials;\n let i = 0;\n for (let j = 0; j < this._n && j < 32; j++) {\n const y = p[j],\n hi = x + y,\n lo = Math.abs(x) < Math.abs(y) ? x - (hi - y) : y - (hi - x);\n if (lo) p[i++] = lo;\n x = hi;\n }\n p[i] = x;\n this._n = i + 1;\n return this;\n }\n valueOf() {\n const p = this._partials;\n let n = this._n, x, y, lo, hi = 0;\n if (n > 0) {\n hi = p[--n];\n while (n > 0) {\n x = hi;\n y = p[--n];\n hi = x + y;\n lo = y - (hi - x);\n if (lo) break;\n }\n if (n > 0 && ((lo < 0 && p[n - 1] < 0) || (lo > 0 && p[n - 1] > 0))) {\n y = lo * 2;\n x = hi + y;\n if (y == x - hi) hi = x;\n }\n }\n return hi;\n }\n}\n\nexport function fsum(values, valueof) {\n const adder = new Adder();\n if (valueof === undefined) {\n for (let value of values) {\n if (value = +value) {\n adder.add(value);\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if (value = +valueof(value, ++index, values)) {\n adder.add(value);\n }\n }\n }\n return +adder;\n}\n\nexport function fcumsum(values, valueof) {\n const adder = new Adder();\n let index = -1;\n return Float64Array.from(values, valueof === undefined\n ? v => adder.add(+v || 0)\n : v => adder.add(+valueof(v, ++index, values) || 0)\n );\n}\n","export var epsilon = 1e-6;\nexport var epsilon2 = 1e-12;\nexport var pi = Math.PI;\nexport var halfPi = pi / 2;\nexport var quarterPi = pi / 4;\nexport var tau = pi * 2;\n\nexport var degrees = 180 / pi;\nexport var radians = pi / 180;\n\nexport var abs = Math.abs;\nexport var atan = Math.atan;\nexport var atan2 = Math.atan2;\nexport var cos = Math.cos;\nexport var ceil = Math.ceil;\nexport var exp = Math.exp;\nexport var floor = Math.floor;\nexport var hypot = Math.hypot;\nexport var log = Math.log;\nexport var pow = Math.pow;\nexport var sin = Math.sin;\nexport var sign = Math.sign || function(x) { return x > 0 ? 1 : x < 0 ? -1 : 0; };\nexport var sqrt = Math.sqrt;\nexport var tan = Math.tan;\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\nexport function haversin(x) {\n return (x = sin(x / 2)) * x;\n}\n","export default function noop() {}\n","function streamGeometry(geometry, stream) {\n if (geometry && streamGeometryType.hasOwnProperty(geometry.type)) {\n streamGeometryType[geometry.type](geometry, stream);\n }\n}\n\nvar streamObjectType = {\n Feature: function(object, stream) {\n streamGeometry(object.geometry, stream);\n },\n FeatureCollection: function(object, stream) {\n var features = object.features, i = -1, n = features.length;\n while (++i < n) streamGeometry(features[i].geometry, stream);\n }\n};\n\nvar streamGeometryType = {\n Sphere: function(object, stream) {\n stream.sphere();\n },\n Point: function(object, stream) {\n object = object.coordinates;\n stream.point(object[0], object[1], object[2]);\n },\n MultiPoint: function(object, stream) {\n var coordinates = object.coordinates, i = -1, n = coordinates.length;\n while (++i < n) object = coordinates[i], stream.point(object[0], object[1], object[2]);\n },\n LineString: function(object, stream) {\n streamLine(object.coordinates, stream, 0);\n },\n MultiLineString: function(object, stream) {\n var coordinates = object.coordinates, i = -1, n = coordinates.length;\n while (++i < n) streamLine(coordinates[i], stream, 0);\n },\n Polygon: function(object, stream) {\n streamPolygon(object.coordinates, stream);\n },\n MultiPolygon: function(object, stream) {\n var coordinates = object.coordinates, i = -1, n = coordinates.length;\n while (++i < n) streamPolygon(coordinates[i], stream);\n },\n GeometryCollection: function(object, stream) {\n var geometries = object.geometries, i = -1, n = geometries.length;\n while (++i < n) streamGeometry(geometries[i], stream);\n }\n};\n\nfunction streamLine(coordinates, stream, closed) {\n var i = -1, n = coordinates.length - closed, coordinate;\n stream.lineStart();\n while (++i < n) coordinate = coordinates[i], stream.point(coordinate[0], coordinate[1], coordinate[2]);\n stream.lineEnd();\n}\n\nfunction streamPolygon(coordinates, stream) {\n var i = -1, n = coordinates.length;\n stream.polygonStart();\n while (++i < n) streamLine(coordinates[i], stream, 1);\n stream.polygonEnd();\n}\n\nexport default function(object, stream) {\n if (object && streamObjectType.hasOwnProperty(object.type)) {\n streamObjectType[object.type](object, stream);\n } else {\n streamGeometry(object, stream);\n }\n}\n","import {Adder} from \"d3-array\";\nimport {atan2, cos, quarterPi, radians, sin, tau} from \"./math.js\";\nimport noop from \"./noop.js\";\nimport stream from \"./stream.js\";\n\nexport var areaRingSum = new Adder();\n\n// hello?\n\nvar areaSum = new Adder(),\n lambda00,\n phi00,\n lambda0,\n cosPhi0,\n sinPhi0;\n\nexport var areaStream = {\n point: noop,\n lineStart: noop,\n lineEnd: noop,\n polygonStart: function() {\n areaRingSum = new Adder();\n areaStream.lineStart = areaRingStart;\n areaStream.lineEnd = areaRingEnd;\n },\n polygonEnd: function() {\n var areaRing = +areaRingSum;\n areaSum.add(areaRing < 0 ? tau + areaRing : areaRing);\n this.lineStart = this.lineEnd = this.point = noop;\n },\n sphere: function() {\n areaSum.add(tau);\n }\n};\n\nfunction areaRingStart() {\n areaStream.point = areaPointFirst;\n}\n\nfunction areaRingEnd() {\n areaPoint(lambda00, phi00);\n}\n\nfunction areaPointFirst(lambda, phi) {\n areaStream.point = areaPoint;\n lambda00 = lambda, phi00 = phi;\n lambda *= radians, phi *= radians;\n lambda0 = lambda, cosPhi0 = cos(phi = phi / 2 + quarterPi), sinPhi0 = sin(phi);\n}\n\nfunction areaPoint(lambda, phi) {\n lambda *= radians, phi *= radians;\n phi = phi / 2 + quarterPi; // half the angular distance from south pole\n\n // Spherical excess E for a spherical triangle with vertices: south pole,\n // previous point, current point. Uses a formula derived from Cagnoli’s\n // theorem. See Todhunter, Spherical Trig. (1871), Sec. 103, Eq. (2).\n var dLambda = lambda - lambda0,\n sdLambda = dLambda >= 0 ? 1 : -1,\n adLambda = sdLambda * dLambda,\n cosPhi = cos(phi),\n sinPhi = sin(phi),\n k = sinPhi0 * sinPhi,\n u = cosPhi0 * cosPhi + k * cos(adLambda),\n v = k * sdLambda * sin(adLambda);\n areaRingSum.add(atan2(v, u));\n\n // Advance the previous points.\n lambda0 = lambda, cosPhi0 = cosPhi, sinPhi0 = sinPhi;\n}\n\nexport default function(object) {\n areaSum = new Adder();\n stream(object, areaStream);\n return areaSum * 2;\n}\n","import {asin, atan2, cos, sin, sqrt} from \"./math.js\";\n\nexport function spherical(cartesian) {\n return [atan2(cartesian[1], cartesian[0]), asin(cartesian[2])];\n}\n\nexport function cartesian(spherical) {\n var lambda = spherical[0], phi = spherical[1], cosPhi = cos(phi);\n return [cosPhi * cos(lambda), cosPhi * sin(lambda), sin(phi)];\n}\n\nexport function cartesianDot(a, b) {\n return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];\n}\n\nexport function cartesianCross(a, b) {\n return [a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0]];\n}\n\n// TODO return a\nexport function cartesianAddInPlace(a, b) {\n a[0] += b[0], a[1] += b[1], a[2] += b[2];\n}\n\nexport function cartesianScale(vector, k) {\n return [vector[0] * k, vector[1] * k, vector[2] * k];\n}\n\n// TODO return d\nexport function cartesianNormalizeInPlace(d) {\n var l = sqrt(d[0] * d[0] + d[1] * d[1] + d[2] * d[2]);\n d[0] /= l, d[1] /= l, d[2] /= l;\n}\n","import {Adder} from \"d3-array\";\nimport {areaStream, areaRingSum} from \"./area.js\";\nimport {cartesian, cartesianCross, cartesianNormalizeInPlace, spherical} from \"./cartesian.js\";\nimport {abs, degrees, epsilon, radians} from \"./math.js\";\nimport stream from \"./stream.js\";\n\nvar lambda0, phi0, lambda1, phi1, // bounds\n lambda2, // previous lambda-coordinate\n lambda00, phi00, // first point\n p0, // previous 3D point\n deltaSum,\n ranges,\n range;\n\nvar boundsStream = {\n point: boundsPoint,\n lineStart: boundsLineStart,\n lineEnd: boundsLineEnd,\n polygonStart: function() {\n boundsStream.point = boundsRingPoint;\n boundsStream.lineStart = boundsRingStart;\n boundsStream.lineEnd = boundsRingEnd;\n deltaSum = new Adder();\n areaStream.polygonStart();\n },\n polygonEnd: function() {\n areaStream.polygonEnd();\n boundsStream.point = boundsPoint;\n boundsStream.lineStart = boundsLineStart;\n boundsStream.lineEnd = boundsLineEnd;\n if (areaRingSum < 0) lambda0 = -(lambda1 = 180), phi0 = -(phi1 = 90);\n else if (deltaSum > epsilon) phi1 = 90;\n else if (deltaSum < -epsilon) phi0 = -90;\n range[0] = lambda0, range[1] = lambda1;\n },\n sphere: function() {\n lambda0 = -(lambda1 = 180), phi0 = -(phi1 = 90);\n }\n};\n\nfunction boundsPoint(lambda, phi) {\n ranges.push(range = [lambda0 = lambda, lambda1 = lambda]);\n if (phi < phi0) phi0 = phi;\n if (phi > phi1) phi1 = phi;\n}\n\nfunction linePoint(lambda, phi) {\n var p = cartesian([lambda * radians, phi * radians]);\n if (p0) {\n var normal = cartesianCross(p0, p),\n equatorial = [normal[1], -normal[0], 0],\n inflection = cartesianCross(equatorial, normal);\n cartesianNormalizeInPlace(inflection);\n inflection = spherical(inflection);\n var delta = lambda - lambda2,\n sign = delta > 0 ? 1 : -1,\n lambdai = inflection[0] * degrees * sign,\n phii,\n antimeridian = abs(delta) > 180;\n if (antimeridian ^ (sign * lambda2 < lambdai && lambdai < sign * lambda)) {\n phii = inflection[1] * degrees;\n if (phii > phi1) phi1 = phii;\n } else if (lambdai = (lambdai + 360) % 360 - 180, antimeridian ^ (sign * lambda2 < lambdai && lambdai < sign * lambda)) {\n phii = -inflection[1] * degrees;\n if (phii < phi0) phi0 = phii;\n } else {\n if (phi < phi0) phi0 = phi;\n if (phi > phi1) phi1 = phi;\n }\n if (antimeridian) {\n if (lambda < lambda2) {\n if (angle(lambda0, lambda) > angle(lambda0, lambda1)) lambda1 = lambda;\n } else {\n if (angle(lambda, lambda1) > angle(lambda0, lambda1)) lambda0 = lambda;\n }\n } else {\n if (lambda1 >= lambda0) {\n if (lambda < lambda0) lambda0 = lambda;\n if (lambda > lambda1) lambda1 = lambda;\n } else {\n if (lambda > lambda2) {\n if (angle(lambda0, lambda) > angle(lambda0, lambda1)) lambda1 = lambda;\n } else {\n if (angle(lambda, lambda1) > angle(lambda0, lambda1)) lambda0 = lambda;\n }\n }\n }\n } else {\n ranges.push(range = [lambda0 = lambda, lambda1 = lambda]);\n }\n if (phi < phi0) phi0 = phi;\n if (phi > phi1) phi1 = phi;\n p0 = p, lambda2 = lambda;\n}\n\nfunction boundsLineStart() {\n boundsStream.point = linePoint;\n}\n\nfunction boundsLineEnd() {\n range[0] = lambda0, range[1] = lambda1;\n boundsStream.point = boundsPoint;\n p0 = null;\n}\n\nfunction boundsRingPoint(lambda, phi) {\n if (p0) {\n var delta = lambda - lambda2;\n deltaSum.add(abs(delta) > 180 ? delta + (delta > 0 ? 360 : -360) : delta);\n } else {\n lambda00 = lambda, phi00 = phi;\n }\n areaStream.point(lambda, phi);\n linePoint(lambda, phi);\n}\n\nfunction boundsRingStart() {\n areaStream.lineStart();\n}\n\nfunction boundsRingEnd() {\n boundsRingPoint(lambda00, phi00);\n areaStream.lineEnd();\n if (abs(deltaSum) > epsilon) lambda0 = -(lambda1 = 180);\n range[0] = lambda0, range[1] = lambda1;\n p0 = null;\n}\n\n// Finds the left-right distance between two longitudes.\n// This is almost the same as (lambda1 - lambda0 + 360°) % 360°, except that we want\n// the distance between ±180° to be 360°.\nfunction angle(lambda0, lambda1) {\n return (lambda1 -= lambda0) < 0 ? lambda1 + 360 : lambda1;\n}\n\nfunction rangeCompare(a, b) {\n return a[0] - b[0];\n}\n\nfunction rangeContains(range, x) {\n return range[0] <= range[1] ? range[0] <= x && x <= range[1] : x < range[0] || range[1] < x;\n}\n\nexport default function(feature) {\n var i, n, a, b, merged, deltaMax, delta;\n\n phi1 = lambda1 = -(lambda0 = phi0 = Infinity);\n ranges = [];\n stream(feature, boundsStream);\n\n // First, sort ranges by their minimum longitudes.\n if (n = ranges.length) {\n ranges.sort(rangeCompare);\n\n // Then, merge any ranges that overlap.\n for (i = 1, a = ranges[0], merged = [a]; i < n; ++i) {\n b = ranges[i];\n if (rangeContains(a, b[0]) || rangeContains(a, b[1])) {\n if (angle(a[0], b[1]) > angle(a[0], a[1])) a[1] = b[1];\n if (angle(b[0], a[1]) > angle(a[0], a[1])) a[0] = b[0];\n } else {\n merged.push(a = b);\n }\n }\n\n // Finally, find the largest gap between the merged ranges.\n // The final bounding box will be the inverse of this gap.\n for (deltaMax = -Infinity, n = merged.length - 1, i = 0, a = merged[n]; i <= n; a = b, ++i) {\n b = merged[i];\n if ((delta = angle(a[1], b[0])) > deltaMax) deltaMax = delta, lambda0 = b[0], lambda1 = a[1];\n }\n }\n\n ranges = range = null;\n\n return lambda0 === Infinity || phi0 === Infinity\n ? [[NaN, NaN], [NaN, NaN]]\n : [[lambda0, phi0], [lambda1, phi1]];\n}\n","/**\r\n * Map series module\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Series, SeriesDataItem } from \"../series/Series\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport * as $type from \"../../core/utils/Type\";\r\nimport * as $math from \"../../core/utils/Math\";\r\nimport * as d3geo from \"d3-geo\";\r\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Defines a [[DataItem]] for [[MapSeries]].\r\n *\r\n * @see {@link DataItem}\r\n */\r\nvar MapSeriesDataItem = /** @class */ (function (_super) {\r\n __extends(MapSeriesDataItem, _super);\r\n /**\r\n * Constructor\r\n */\r\n function MapSeriesDataItem() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"MapSeriesDataItem\";\r\n _this.values.value = {};\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n Object.defineProperty(MapSeriesDataItem.prototype, \"value\", {\r\n /**\r\n * @return Value\r\n */\r\n get: function () {\r\n return this.values.value.value;\r\n },\r\n /**\r\n * Numeric value of the data item.\r\n *\r\n * Value may be used in heat-map calculations.\r\n *\r\n * @param value Value\r\n */\r\n set: function (value) {\r\n this.setValue(\"value\", value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapSeriesDataItem.prototype, \"zoomLevel\", {\r\n /**\r\n * @return Zoom level\r\n */\r\n get: function () {\r\n return this.properties[\"zoomLevel\"];\r\n },\r\n /**\r\n * When `zoomToMapObject()` is called the map will either calculate suitable\r\n * zoom level itself or use object's `zoomLevel` if set.\r\n *\r\n * @param value Zoom level\r\n */\r\n set: function (value) {\r\n this.setProperty(\"zoomLevel\", value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapSeriesDataItem.prototype, \"zoomGeoPoint\", {\r\n /**\r\n * @return Zoom geo point\r\n */\r\n get: function () {\r\n return this.properties[\"zoomGeoPoint\"];\r\n },\r\n /**\r\n * When `zoomToMapObject()` is called the map will either calculate suitable\r\n * center position itself or use object's `zoomGeoPoint` if set.\r\n *\r\n * @param value Zoom geo point\r\n */\r\n set: function (value) {\r\n this.setProperty(\"zoomGeoPoint\", value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapSeriesDataItem.prototype, \"east\", {\r\n /**\r\n * Longitude of the East-most point of the element.\r\n */\r\n get: function () {\r\n return this._east;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapSeriesDataItem.prototype, \"west\", {\r\n /**\r\n * Longitude of the West-most point of the element.\r\n */\r\n get: function () {\r\n return this._west;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapSeriesDataItem.prototype, \"south\", {\r\n /**\r\n * Latitude of the South-most point of the element.\r\n */\r\n get: function () {\r\n return this._south;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapSeriesDataItem.prototype, \"north\", {\r\n /**\r\n * Latitude of the North-most point of the element.\r\n */\r\n get: function () {\r\n return this._north;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Updates the item's bounding coordinates: coordinates of the East, West,\r\n * North, and South-most points.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n MapSeriesDataItem.prototype.updateExtremes = function () {\r\n var geometry = this.getFeature().geometry;\r\n if (geometry) {\r\n var bounds = d3geo.geoBounds(geometry);\r\n var west = bounds[0][0];\r\n var south = bounds[0][1];\r\n var north = bounds[1][1];\r\n var east = bounds[1][0];\r\n var changed = false;\r\n if (north != this.north) {\r\n this._north = $math.round(north, 6);\r\n changed = true;\r\n }\r\n if (south != this.south) {\r\n this._south = $math.round(south, 6);\r\n changed = true;\r\n }\r\n if (east != this.east) {\r\n this._east = $math.round(east, 6);\r\n changed = true;\r\n }\r\n if (west != this.west) {\r\n this._west = $math.round(west, 6);\r\n changed = true;\r\n }\r\n // solves single russia prob\r\n if (this._east < this._west) {\r\n this._east = 180;\r\n this._west = -180;\r\n }\r\n if (changed) {\r\n this.component.invalidateDataItems();\r\n }\r\n }\r\n };\r\n MapSeriesDataItem.prototype.getFeature = function () {\r\n return {};\r\n };\r\n return MapSeriesDataItem;\r\n}(SeriesDataItem));\r\nexport { MapSeriesDataItem };\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * A base class for series of map objects.\r\n *\r\n * @see {@link IMapSeriesEvents} for a list of available Events\r\n * @see {@link IMapSeriesAdapters} for a list of available Adapters\r\n * @important\r\n */\r\nvar MapSeries = /** @class */ (function (_super) {\r\n __extends(MapSeries, _super);\r\n /**\r\n * Constructor\r\n */\r\n function MapSeries() {\r\n var _this = \r\n // Init\r\n _super.call(this) || this;\r\n _this.className = \"MapSeries\";\r\n // Set defaults\r\n _this.isMeasured = false;\r\n _this.nonScalingStroke = true;\r\n // Set data fields\r\n _this.dataFields.value = \"value\";\r\n _this.ignoreBounds = false;\r\n if (_this.tooltip) {\r\n _this.tooltip.showInViewport = true;\r\n }\r\n // Apply theme\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * Returns a new/empty DataItem of the type appropriate for this object.\r\n *\r\n * @see {@link DataItem}\r\n * @return Data Item\r\n */\r\n MapSeries.prototype.createDataItem = function () {\r\n return new MapSeriesDataItem();\r\n };\r\n /**\r\n * Checks whether object should be included in series.\r\n *\r\n * @param includes A list of explicitly included ids\r\n * @param excludes A list of explicitly excluded ids\r\n * @param id Id of the object\r\n * @return Include?\r\n */\r\n MapSeries.prototype.checkInclude = function (includes, excludes, id) {\r\n if (includes) {\r\n if (includes.length == 0) {\r\n return false;\r\n }\r\n else {\r\n if (includes.indexOf(id) == -1) {\r\n return false;\r\n }\r\n }\r\n }\r\n if (excludes && excludes.length > 0) {\r\n if (excludes.indexOf(id) != -1) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n };\r\n Object.defineProperty(MapSeries.prototype, \"useGeodata\", {\r\n /**\r\n * @return Use GeoJSON data?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"useGeodata\");\r\n },\r\n /**\r\n * Should the map extract all the data about element from the GeoJSON?\r\n *\r\n * This is especially relevant for [[MapPolygonSeries]]. If not set to `true`\r\n * polygon series will need to contain geographical data in itself in order\r\n * to be drawn.\r\n *\r\n * If this is set to `true`, series will try to extract data for its objects\r\n * from either chart-level `geodata` or from series' `geodata` which holds\r\n * map infor in GeoJSON format.\r\n *\r\n * @default false\r\n * @param value Use GeoJSON data?\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"useGeodata\", value)) {\r\n this.invalidateData();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapSeries.prototype, \"include\", {\r\n /**\r\n * @return Included objects\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"include\");\r\n },\r\n /**\r\n * A list of object ids that should be explictly included in the series.\r\n *\r\n * If this is not set, the series will automatically include all of the\r\n * objects, available in the GeoJSON map. (minus the ones listed in\r\n * `exclude`)\r\n *\r\n * If you need to display only specific objects, use `include`. E.g.:\r\n *\r\n * `include = [\"FR\", \"ES\", \"DE\"];`\r\n *\r\n * The above will show only France, Spain, and Germany out of the whole map.\r\n *\r\n * @param value Included objects\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"include\", value)) {\r\n this.processIncExc();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * @ignore\r\n */\r\n MapSeries.prototype.processIncExc = function () {\r\n //this.data = [];\r\n this.invalidateData();\r\n };\r\n Object.defineProperty(MapSeries.prototype, \"ignoreBounds\", {\r\n /**\r\n * @return Ignore bounds?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"ignoreBounds\");\r\n },\r\n /**\r\n * Should this series be included when calculating bounds of the map?\r\n *\r\n * This affects initial zoom as well as limits for zoom/pan.\r\n *\r\n * By default, `MapPolygonSeries` included (true), while `MapImageSeries` and\r\n * `MapLineSeries` are not (`false`).\r\n *\r\n * @since 4.3.0\r\n * @param value Ignore bounds?\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"ignoreBounds\", value)) {\r\n if (this.chart) {\r\n this.chart.updateExtremes();\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapSeries.prototype, \"exclude\", {\r\n /**\r\n * @return Excluded ids\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"exclude\");\r\n },\r\n /**\r\n * A list of object ids that should be excluded from the series.\r\n *\r\n * E.g. you want to include all of the areas from a GeoJSON map, except\r\n * Antarctica.\r\n *\r\n * You'd leave `include` empty, and set `exclude = [\"AQ\"]`.\r\n *\r\n * @param value Excluded ids\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"exclude\", value)) {\r\n this.processIncExc();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Decorates a newly added object.\r\n *\r\n * @param event [description]\r\n */\r\n MapSeries.prototype.handleObjectAdded = function (event) {\r\n var mapObject = event.newValue;\r\n mapObject.parent = this;\r\n mapObject.series = this;\r\n mapObject.strokeWidth = mapObject.strokeWidth;\r\n };\r\n Object.defineProperty(MapSeries.prototype, \"geodata\", {\r\n /**\r\n * @return GeoJSON data\r\n */\r\n get: function () {\r\n return this._geodata;\r\n },\r\n /**\r\n * Map data in GeoJSON format.\r\n *\r\n * The series supports the following GeoJSON objects: `Point`, `LineString`,\r\n * `Polygon`, `MultiPoint`, `MultiLineString`, and `MultiPolygon`.\r\n *\r\n * @see {@link http://geojson.org/} Official GeoJSON format specification\r\n * @param geoJSON GeoJSON data\r\n */\r\n set: function (geodata) {\r\n if (geodata != this._geodata) {\r\n this._geodata = geodata;\r\n if (this.reverseGeodata) {\r\n this.chart.processReverseGeodata(this._geodata);\r\n }\r\n for (var i = this.data.length - 1; i >= 0; i--) {\r\n if (this.data[i].madeFromGeoData == true) {\r\n this.data.splice(i, 1);\r\n }\r\n }\r\n this.disposeData();\r\n this.invalidateData();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapSeries.prototype, \"reverseGeodata\", {\r\n /**\r\n * @returns Reverse the order of geodata coordinates?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"reverseGeodata\");\r\n },\r\n /**\r\n * Indicates whether GeoJSON geodata supplied to the chart uses\r\n * ESRI (clockwise) or non-ESRI (counter-clockwise) order of the polygon\r\n * coordinates.\r\n *\r\n * `MapChart` supports only ESRI standard, so if your custom maps appears\r\n * garbled, try setting `reverseGeodata = true`.\r\n *\r\n * @default false\r\n * @since 4.10.11\r\n * @param value Reverse the order of geodata coordinates?\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"reverseGeodata\", value) && this._geodata) {\r\n this.chart.processReverseGeodata(this._geodata);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapSeries.prototype, \"geodataSource\", {\r\n /**\r\n * Returns a [[DataSource]] specifically for loading Component's data.\r\n *\r\n * @return Data source\r\n */\r\n get: function () {\r\n if (!this._dataSources[\"geodata\"]) {\r\n this.getDataSource(\"geodata\");\r\n }\r\n return this._dataSources[\"geodata\"];\r\n },\r\n /**\r\n * Sets a [[DataSource]] to be used for loading Component's data.\r\n *\r\n * @param value Data source\r\n */\r\n set: function (value) {\r\n var _this = this;\r\n if (this._dataSources[\"geodata\"]) {\r\n this.removeDispose(this._dataSources[\"geodata\"]);\r\n }\r\n this._dataSources[\"geodata\"] = value;\r\n this._dataSources[\"geodata\"].component = this;\r\n this.events.on(\"inited\", function () {\r\n _this.loadData(\"geodata\");\r\n }, undefined, false);\r\n this.setDataSourceEvents(value, \"geodata\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * @ignore\r\n */\r\n MapSeries.prototype.getFeatures = function () {\r\n return;\r\n };\r\n /**\r\n * @ignore\r\n */\r\n MapSeries.prototype.validateDataItems = function () {\r\n _super.prototype.validateDataItems.call(this);\r\n this.updateExtremes();\r\n };\r\n /**\r\n * @ignore\r\n */\r\n MapSeries.prototype.updateExtremes = function () {\r\n var north;\r\n var south;\r\n var east;\r\n var west;\r\n this.dataItems.each(function (dataItem) {\r\n if (dataItem.north > north || !$type.isNumber(north)) {\r\n north = dataItem.north;\r\n }\r\n if (dataItem.south < south || !$type.isNumber(south)) {\r\n south = dataItem.south;\r\n }\r\n if (dataItem.west < west || !$type.isNumber(west)) {\r\n west = dataItem.west;\r\n }\r\n if (dataItem.east > east || !$type.isNumber(east)) {\r\n east = dataItem.east;\r\n }\r\n });\r\n if (this._mapObjects) {\r\n this._mapObjects.each(function (mapObject) {\r\n if (mapObject.north > north || !$type.isNumber(north)) {\r\n north = mapObject.north;\r\n }\r\n if (mapObject.south < south || !$type.isNumber(south)) {\r\n south = mapObject.south;\r\n }\r\n if (mapObject.west < west || !$type.isNumber(west)) {\r\n west = mapObject.west;\r\n }\r\n if (mapObject.east > east || !$type.isNumber(east)) {\r\n east = mapObject.east;\r\n }\r\n });\r\n }\r\n if (this.north != north || this.east != east || this.south != south || this.west != west) {\r\n this._north = north;\r\n this._east = east;\r\n this._west = west;\r\n this._south = south;\r\n this.dispatch(\"geoBoundsChanged\");\r\n if (!this.ignoreBounds) {\r\n this.chart.updateExtremes();\r\n }\r\n }\r\n };\r\n Object.defineProperty(MapSeries.prototype, \"north\", {\r\n /**\r\n * @return Latitude\r\n */\r\n get: function () {\r\n if ($type.isNumber(this._northDefined)) {\r\n return this._northDefined;\r\n }\r\n return this._north;\r\n },\r\n /**\r\n * North-most latitude of the series.\r\n *\r\n * By default, this holds auto-calculated latitude of the extremity.\r\n *\r\n * It can be overridden manually.\r\n *\r\n * @param value Latitude\r\n */\r\n set: function (value) {\r\n this._northDefined = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapSeries.prototype, \"south\", {\r\n /**\r\n * @return Latitude\r\n */\r\n get: function () {\r\n if ($type.isNumber(this._southDefined)) {\r\n return this._southDefined;\r\n }\r\n return this._south;\r\n },\r\n /**\r\n * South-most latitude of the series.\r\n *\r\n * By default, this holds auto-calculated latitude of the extremity.\r\n *\r\n * It can be overridden manually.\r\n *\r\n * @param value Latitude\r\n */\r\n set: function (value) {\r\n this._southDefined = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapSeries.prototype, \"west\", {\r\n /**\r\n * @return Longitude\r\n */\r\n get: function () {\r\n if ($type.isNumber(this._westDefined)) {\r\n return this._westDefined;\r\n }\r\n return this._west;\r\n },\r\n /**\r\n * West-most longitude of the series.\r\n *\r\n * By default, this holds auto-calculated longitude of the extremity.\r\n *\r\n * It can be overridden manually.\r\n *\r\n * @param value Longitude\r\n */\r\n set: function (value) {\r\n this._westDefined = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapSeries.prototype, \"east\", {\r\n /**\r\n * @return Longitude\r\n */\r\n get: function () {\r\n if ($type.isNumber(this._eastDefined)) {\r\n return this._eastDefined;\r\n }\r\n return this._east;\r\n },\r\n /**\r\n * East-most longitude of the series.\r\n *\r\n * By default, this holds auto-calculated longitude of the extremity.\r\n *\r\n * It can be overridden manually.\r\n *\r\n * @param value Longitude\r\n */\r\n set: function (value) {\r\n this._eastDefined = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Processes JSON-based config before it is applied to the object.\r\n *\r\n * @ignore Exclude from docs\r\n * @param config Config\r\n */\r\n MapSeries.prototype.processConfig = function (config) {\r\n if ($type.hasValue(config[\"geodata\"]) && $type.isString(config[\"geodata\"])) {\r\n var name_1 = config[\"geodata\"];\r\n // Check if there's a map loaded by such name\r\n if ($type.hasValue(window[\"am4geodata_\" + config[\"geodata\"]])) {\r\n config[\"geodata\"] = window[\"am4geodata_\" + config[\"geodata\"]];\r\n }\r\n // Nope. Let's try maybe we got JSON as string?\r\n else {\r\n try {\r\n config[\"geodata\"] = JSON.parse(config[\"geodata\"]);\r\n }\r\n catch (e) {\r\n // No go again. Error out.\r\n throw Error(\"MapChart error: Geodata `\" + name_1 + \"` is not loaded or is incorrect.\");\r\n }\r\n }\r\n }\r\n _super.prototype.processConfig.call(this, config);\r\n };\r\n /**\r\n * Adds `projection` to \"as is\" fields.\r\n *\r\n * @param field Field name\r\n * @return Assign as is?\r\n */\r\n MapSeries.prototype.asIs = function (field) {\r\n return field == \"geodata\" || _super.prototype.asIs.call(this, field);\r\n };\r\n /**\r\n * @ignore\r\n */\r\n MapSeries.prototype.updateTooltipBounds = function () {\r\n if (this.tooltip && this.topParent) {\r\n this.tooltip.setBounds({ x: 10, y: 10, width: this.topParent.maxWidth - 20, height: this.topParent.maxHeight - 20 });\r\n }\r\n };\r\n return MapSeries;\r\n}(Series));\r\nexport { MapSeries };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"MapSeries\"] = MapSeries;\r\nregistry.registeredClasses[\"MapSeriesDataItem\"] = MapSeriesDataItem;\r\n","/**\r\n * Map object module\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Container } from \"../../core/Container\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport * as $math from \"../../core/utils/Math\";\r\nimport * as d3geo from \"d3-geo\";\r\nimport * as $type from \"../../core/utils/Type\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * A base class for all map objects: lines, images, etc.\r\n *\r\n * @see {@link IMapObjectEvents} for a list of available events\r\n * @see {@link IMapObjectAdapters} for a list of available Adapters\r\n */\r\nvar MapObject = /** @class */ (function (_super) {\r\n __extends(MapObject, _super);\r\n /**\r\n * Constructor\r\n */\r\n function MapObject() {\r\n var _this = \r\n // Init\r\n _super.call(this) || this;\r\n _this.className = \"MapObject\";\r\n // Set defaults\r\n _this.isMeasured = false;\r\n _this.layout = \"none\";\r\n _this.clickable = true;\r\n // Apply theme\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * (Re)validates this object, forcing it to redraw.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n MapObject.prototype.validate = function () {\r\n if (this.series && this.series.itemReaderText) {\r\n this.readerTitle = this.series.itemReaderText;\r\n }\r\n _super.prototype.validate.call(this);\r\n };\r\n /**\r\n * Updates the item's bounding coordinates: coordinates of the East, West,\r\n * North, and South-most points.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n MapObject.prototype.updateExtremes = function () {\r\n var feature = this.getFeature();\r\n if (feature) {\r\n var geometry = feature.geometry;\r\n if (geometry) {\r\n var bounds = d3geo.geoBounds(geometry);\r\n var west = bounds[0][0];\r\n var south = bounds[0][1];\r\n var north = bounds[1][1];\r\n var east = bounds[1][0];\r\n var changed = false;\r\n if (north != this.north) {\r\n this._north = $math.round(north, 8);\r\n changed = true;\r\n }\r\n if (south != this.south) {\r\n this._south = $math.round(south);\r\n changed = true;\r\n }\r\n if (east != this.east) {\r\n this._east = $math.round(east);\r\n changed = true;\r\n }\r\n if (west != this.west) {\r\n this._west = $math.round(west);\r\n changed = true;\r\n }\r\n if (changed) {\r\n this.dispatch(\"geoBoundsChanged\");\r\n if (this.series) {\r\n this.series.invalidateDataItems();\r\n }\r\n }\r\n }\r\n }\r\n };\r\n /**\r\n * @ignore\r\n */\r\n MapObject.prototype.getFeature = function () {\r\n return {};\r\n };\r\n Object.defineProperty(MapObject.prototype, \"east\", {\r\n /**\r\n * Longitude of the East-most point of the element.\r\n */\r\n get: function () {\r\n if ($type.isNumber(this._east)) {\r\n return this._east;\r\n }\r\n else if (this.dataItem) {\r\n return this.dataItem.east;\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapObject.prototype, \"west\", {\r\n /**\r\n * Longitude of the West-most point of the element.\r\n */\r\n get: function () {\r\n if ($type.isNumber(this._west)) {\r\n return this._west;\r\n }\r\n else if (this.dataItem) {\r\n return this.dataItem.west;\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapObject.prototype, \"south\", {\r\n /**\r\n * Latitude of the South-most point of the element.\r\n */\r\n get: function () {\r\n if ($type.isNumber(this._south)) {\r\n return this._south;\r\n }\r\n else if (this.dataItem) {\r\n return this.dataItem.south;\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapObject.prototype, \"north\", {\r\n /**\r\n * Latitude of the North-most point of the element.\r\n */\r\n get: function () {\r\n if ($type.isNumber(this._north)) {\r\n return this._north;\r\n }\r\n else if (this.dataItem) {\r\n return this.dataItem.north;\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Shows the element's [[Tooltip]].\r\n *\r\n * A tooltip will be populated using text templates in either `tooltipHTML` or\r\n * `tooltipText` as well as data in `tooltipDataItem`.\r\n *\r\n * @see {@link Tooltip}\r\n * @param optional point (sprite-related) to which tooltip must point.\r\n * @return returns true if the tooltip was shown and false if it wasn't (no text was found)\r\n */\r\n MapObject.prototype.showTooltip = function (point) {\r\n var res = _super.prototype.showTooltip.call(this, point);\r\n if (res && this.showTooltipOn == \"always\" && !this.series.chart.events.has(\"mappositionchanged\", this.handleTooltipMove, this)) {\r\n this.addDisposer(this.series.chart.events.on(\"mappositionchanged\", this.handleTooltipMove, this));\r\n }\r\n return res;\r\n };\r\n MapObject.prototype.handleTooltipMove = function (ev) {\r\n if (!this.tooltip.isHidden) {\r\n this.showTooltip();\r\n }\r\n };\r\n /**\r\n * Sets a [[DataItem]].\r\n * @param dataItem DataItem\r\n */\r\n MapObject.prototype.setDataItem = function (dataItem) {\r\n _super.prototype.setDataItem.call(this, dataItem);\r\n this.applyAccessibility();\r\n };\r\n return MapObject;\r\n}(Container));\r\nexport { MapObject };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"MapObject\"] = MapObject;\r\n","/**\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { MapObject } from \"./MapObject\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport * as $type from \"../../core/utils/Type\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Used to place an image on the map.\r\n *\r\n * @see {@link IMapImageEvents} for a list of available events\r\n * @see {@link IMapImageAdapters} for a list of available Adapters\r\n */\r\nvar MapImage = /** @class */ (function (_super) {\r\n __extends(MapImage, _super);\r\n /**\r\n * Constructor\r\n */\r\n function MapImage() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"MapImage\";\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n Object.defineProperty(MapImage.prototype, \"latitude\", {\r\n /**\r\n * @return Latitude\r\n */\r\n get: function () {\r\n var latitude = this.getPropertyValue(\"latitude\");\r\n if (!$type.isNumber(latitude) && this.dataItem && this.dataItem.geoPoint) {\r\n latitude = this.dataItem.geoPoint.latitude;\r\n }\r\n return latitude;\r\n },\r\n /**\r\n * Latitude image is placed at.\r\n *\r\n * @param value Latitude\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"latitude\", value, false, true);\r\n this.updateExtremes();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapImage.prototype, \"longitude\", {\r\n /**\r\n * @return Longitude\r\n */\r\n get: function () {\r\n var longitude = this.getPropertyValue(\"longitude\");\r\n if (!$type.isNumber(longitude) && this.dataItem && this.dataItem.geoPoint) {\r\n longitude = this.dataItem.geoPoint.longitude;\r\n }\r\n return longitude;\r\n },\r\n /**\r\n * Longitude image is placed on.\r\n *\r\n * @param value Longitude\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"longitude\", value, false, true);\r\n this.updateExtremes();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Repositions the image to it's current position.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n MapImage.prototype.validatePosition = function () {\r\n if ($type.isNumber(this.latitude) && $type.isNumber(this.longitude)) {\r\n //this.moveTo(this.series.chart.projection.convert({ latitude: this.latitude, longitude: this.longitude }));\r\n var p = this.series.chart.projection.d3Projection([this.longitude, this.latitude]);\r\n var visible = this.series.chart.projection.d3Path({ type: 'Point', coordinates: [this.longitude, this.latitude] });\r\n if (!visible) {\r\n this.__disabled = true;\r\n }\r\n else {\r\n this.__disabled = false;\r\n }\r\n this.moveTo({ x: p[0], y: p[1] });\r\n }\r\n _super.prototype.validatePosition.call(this);\r\n };\r\n /**\r\n * @ignore\r\n */\r\n MapImage.prototype.getFeature = function () {\r\n return { \"type\": \"Feature\", geometry: { type: \"Point\", coordinates: [this.longitude, this.latitude] } };\r\n };\r\n return MapImage;\r\n}(MapObject));\r\nexport { MapImage };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"MapImage\"] = MapImage;\r\n","/**\r\n * A collection of Map-related utility functions.\r\n */\r\nimport * as $array from \"../../core/utils/Array\";\r\nimport * as d3geo from \"d3-geo\";\r\n/**\r\n * Converts a multi-part polygon in X/Y coordinates to a geo-multipolygon in\r\n * geo-points (lat/long).\r\n *\r\n * @param multiPolygon Source multi-polygon\r\n * @return Geo-multipolygon\r\n */\r\nexport function multiPolygonToGeo(multiPolygon) {\r\n return $array.map(multiPolygon, function (polygon) {\r\n var surface = polygon[0];\r\n var hole = polygon[1];\r\n //let holePoints: Array<IGeoPoint> = [];\r\n var geoArea = [];\r\n if (surface) {\r\n geoArea.push(multiPointToGeo(surface));\r\n }\r\n if (hole) {\r\n geoArea.push(multiPointToGeo(hole));\r\n }\r\n return geoArea;\r\n });\r\n}\r\n/**\r\n * Converts a multiline in X/Y coordinates to a geo-multiline in geo-points\r\n * (lat/long).\r\n *\r\n * @param multiLine Source multiline\r\n * @return Geo-multiline\r\n */\r\nexport function multiLineToGeo(multiLine) {\r\n return $array.map(multiLine, function (multiLine) {\r\n return multiPointToGeo(multiLine);\r\n });\r\n}\r\n/**\r\n * Converts multiple X/Y points into a lat/long geo-points.\r\n *\r\n * @param points Source points\r\n * @return Geo-points\r\n */\r\nexport function multiPointToGeo(points) {\r\n return $array.map(points, function (point) {\r\n return pointToGeo(point);\r\n });\r\n}\r\n/**\r\n * Converts multiple X/Y points into a lat/long geo-points.\r\n *\r\n * @param points Source points\r\n * @return Geo-points\r\n */\r\nexport function multiGeoToPoint(geoPoints) {\r\n return $array.map(geoPoints, geoToPoint);\r\n}\r\n/**\r\n * Converts X/Y point into a lat/long geo-point.\r\n *\r\n * @param point Source point\r\n * @return Geo-point\r\n */\r\nexport function pointToGeo(point) {\r\n return { longitude: point[0], latitude: point[1] };\r\n}\r\n/**\r\n * Converts lat/long geo-point into a X/Y point.\r\n *\r\n * @param point Source geo-point\r\n * @return X/Y point\r\n */\r\nexport function geoToPoint(geoPoint) {\r\n return [geoPoint.longitude, geoPoint.latitude];\r\n}\r\n/**\r\n * Converts geo line (collection of lat/long coordinates) to screen line (x/y).\r\n *\r\n * @param multiGeoLine Source geo line\r\n * @return Screen line\r\n */\r\nexport function multiGeoLineToMultiLine(multiGeoLine) {\r\n return $array.map(multiGeoLine, function (segment) {\r\n return $array.map(segment, geoToPoint);\r\n });\r\n}\r\n/**\r\n * Converts a geo polygon (collection of lat/long coordinates) to screen\r\n * polygon (x/y).\r\n *\r\n * @param multiGeoPolygon Source polygon\r\n * @return Screen polygon\r\n */\r\nexport function multiGeoPolygonToMultipolygon(multiGeoPolygon) {\r\n return $array.map(multiGeoPolygon, function (geoPolygon) {\r\n var surface = geoPolygon[0];\r\n var hole = geoPolygon[1];\r\n var multiPolygon = [];\r\n if (surface) {\r\n multiPolygon.push(multiGeoToPoint(surface));\r\n }\r\n if (hole) {\r\n multiPolygon.push(multiGeoToPoint(hole));\r\n }\r\n return multiPolygon;\r\n });\r\n}\r\n/**\r\n * Returns a set of geographical coordinates for the circle with a center\r\n * at specific lat/long coordinates and radius (in degrees).\r\n *\r\n * @since 4.3.0\r\n * @param longitude Center longitude\r\n * @param latitude Center latitude\r\n * @param radius Radius (degrees)\r\n * @return Circle coordinates\r\n */\r\nexport function getCircle(longitude, latitude, radius) {\r\n return [d3geo.geoCircle().center([longitude, latitude]).radius(radius)().coordinates];\r\n}\r\n/**\r\n * Returns a set of screen coordinates that represents a \"background\" area\r\n * between provided extremities.\r\n *\r\n * @since 4.3.0\r\n * @param north North latitude\r\n * @param east East longitude\r\n * @param south South latitude\r\n * @param west West longitude\r\n * @return Polygon\r\n */\r\nexport function getBackground(north, east, south, west) {\r\n var multiPolygon = [];\r\n if (west == -180) {\r\n west = -179.9999;\r\n }\r\n if (south == -90) {\r\n south = -89.9999;\r\n }\r\n if (north == 90) {\r\n north = 89.9999;\r\n }\r\n if (east == 180) {\r\n east = 179.9999;\r\n }\r\n var stepLong = Math.min(90, (east - west) / Math.ceil((east - west) / 90));\r\n var stepLat = (north - south) / Math.ceil((north - south) / 90);\r\n for (var ln = west; ln < east; ln = ln + stepLong) {\r\n var surface = [];\r\n multiPolygon.push([surface]);\r\n if (ln + stepLong > east) {\r\n stepLong = east - ln;\r\n }\r\n for (var ll = ln; ll <= ln + stepLong; ll = ll + 5) {\r\n surface.push([ll, north]);\r\n }\r\n for (var lt = north; lt >= south; lt = lt - stepLat) {\r\n surface.push([ln + stepLong, lt]);\r\n }\r\n for (var ll = ln + stepLong; ll >= ln; ll = ll - 5) {\r\n surface.push([ll, south]);\r\n }\r\n for (var lt = south; lt <= north; lt = lt + stepLat) {\r\n surface.push([ln, lt]);\r\n }\r\n }\r\n return multiPolygon;\r\n}\r\n","/**\r\n * Map polygon module\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { MapObject } from \"./MapObject\";\r\nimport { Polygon } from \"../../core/elements/Polygon\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport * as $type from \"../../core/utils/Type\";\r\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\r\nimport $polylabel from \"polylabel\";\r\nimport * as $mapUtils from \"./MapUtils\";\r\nimport * as d3geo from \"d3-geo\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Used to draw a polygon on the map.\r\n *\r\n * @see {@link IMapPolygonEvents} for a list of available events\r\n * @see {@link IMapPolygonAdapters} for a list of available Adapters\r\n */\r\nvar MapPolygon = /** @class */ (function (_super) {\r\n __extends(MapPolygon, _super);\r\n /**\r\n * Constructor\r\n */\r\n function MapPolygon() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"MapPolygon\";\r\n _this.polygon = _this.createChild(Polygon);\r\n _this.polygon.shouldClone = false;\r\n _this.polygon.applyOnClones = true;\r\n _this.setPropertyValue(\"precision\", 0.5);\r\n var interfaceColors = new InterfaceColorSet();\r\n _this.fill = interfaceColors.getFor(\"secondaryButton\");\r\n _this.stroke = interfaceColors.getFor(\"secondaryButtonStroke\");\r\n _this.strokeOpacity = 1;\r\n _this.tooltipPosition = \"pointer\";\r\n _this.nonScalingStroke = true;\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * @ignore\r\n */\r\n MapPolygon.prototype.getFeature = function () {\r\n if (this.multiPolygon && this.multiPolygon.length > 0) {\r\n return { \"type\": \"Feature\", geometry: { type: \"MultiPolygon\", coordinates: this.multiPolygon } };\r\n }\r\n };\r\n Object.defineProperty(MapPolygon.prototype, \"multiGeoPolygon\", {\r\n /**\r\n * @return Polygon coordinates\r\n */\r\n get: function () {\r\n var multiGeoPolygon = this.getPropertyValue(\"multiGeoPolygon\");\r\n if (!multiGeoPolygon && this.dataItem) {\r\n multiGeoPolygon = this.dataItem.multiGeoPolygon;\r\n }\r\n return multiGeoPolygon;\r\n },\r\n /**\r\n * Set of coordinates for the polygon.\r\n *\r\n * @param multiGeoPolygon Polygon coordinates\r\n */\r\n set: function (multiGeoPolygon) {\r\n this.setPropertyValue(\"multiGeoPolygon\", multiGeoPolygon, true);\r\n this.multiPolygon = $mapUtils.multiGeoPolygonToMultipolygon(multiGeoPolygon);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapPolygon.prototype, \"multiPolygon\", {\r\n /**\r\n * @return Coordinates\r\n */\r\n get: function () {\r\n var multiPolygon = this.getPropertyValue(\"multiPolygon\");\r\n if (!multiPolygon && this.dataItem) {\r\n multiPolygon = this.dataItem.multiPolygon;\r\n }\r\n return multiPolygon;\r\n },\r\n /**\r\n * A collection of X/Y coordinates for a multi-part polygon. E.g.:\r\n *\r\n * ```JSON\r\n * [\r\n * // Part 1\r\n * [\r\n * [\r\n * [ 100, 150 ],\r\n * [ 120, 200 ],\r\n * [ 150, 220 ],\r\n * [ 170, 240 ],\r\n * [ 100, 150 ]\r\n * ]\r\n * ],\r\n *\r\n * // Part 2\r\n * [\r\n * [\r\n * [ 300, 350 ],\r\n * [ 320, 400 ],\r\n * [ 350, 420 ],\r\n * [ 370, 440 ],\r\n * [ 300, 350 ]\r\n * ]\r\n * ]\r\n * ]\r\n * ```\r\n *\r\n * @param multiPolygon Coordinates\r\n */\r\n set: function (multiPolygon) {\r\n if (this.setPropertyValue(\"multiPolygon\", multiPolygon)) {\r\n this.updateExtremes();\r\n this.invalidate();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * (Re)validates the polygon, effectively redrawing it.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n MapPolygon.prototype.validate = function () {\r\n if (this.series) {\r\n var projection = this.series.chart.projection;\r\n var pathGenerator = projection.d3Path;\r\n if (this.multiPolygon) {\r\n if (this.series) {\r\n var feature = { type: \"MultiPolygon\", coordinates: this.multiPolygon };\r\n projection.d3Projection.precision(this.precision);\r\n this.polygon.path = pathGenerator(feature);\r\n }\r\n if (this.series.calculateVisualCenter) {\r\n var biggestArea = 0;\r\n var biggestPolygon = this.multiPolygon[0];\r\n if (this.multiPolygon.length > 1) {\r\n for (var i = 0; i < this.multiPolygon.length; i++) {\r\n var polygon = this.multiPolygon[i];\r\n var area = d3geo.geoArea({ type: \"Polygon\", coordinates: polygon });\r\n if (area > biggestArea) {\r\n biggestPolygon = polygon;\r\n biggestArea = area;\r\n }\r\n }\r\n }\r\n var center = $polylabel(biggestPolygon);\r\n this._visualLongitude = center[0];\r\n this._visualLatitude = center[1];\r\n }\r\n else {\r\n this._visualLongitude = this.longitude;\r\n this._visualLatitude = this.latitude;\r\n }\r\n }\r\n }\r\n _super.prototype.validate.call(this);\r\n };\r\n /**\r\n * @ignore Exclude from docs\r\n */\r\n MapPolygon.prototype.measureElement = function () {\r\n // Overriding, just to avoid extra measure\r\n };\r\n Object.defineProperty(MapPolygon.prototype, \"latitude\", {\r\n /**\r\n * Latitude of the geometrical center of the polygon.\r\n *\r\n * @readonly\r\n * @return Center latitude\r\n */\r\n get: function () {\r\n return this.north + (this.south - this.north) / 2;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapPolygon.prototype, \"longitude\", {\r\n /**\r\n * Longitude of the geometrical center of the polygon.\r\n *\r\n * @readonly\r\n * @return Center longitude\r\n */\r\n get: function () {\r\n return this.east + (this.west - this.east) / 2;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapPolygon.prototype, \"visualLatitude\", {\r\n /**\r\n * @return Latitude\r\n */\r\n get: function () {\r\n var latitude = this.getPropertyValue(\"visualLatitude\");\r\n if ($type.isNumber(latitude)) {\r\n return (latitude);\r\n }\r\n if (!this._adapterO) {\r\n return this._visualLatitude;\r\n }\r\n else {\r\n return this._adapterO.apply(\"visualLatitude\", this._visualLatitude);\r\n }\r\n },\r\n /**\r\n * Latitude of the visual center of the polygon.\r\n *\r\n * It may (and probably won't) coincide with geometrical center.\r\n *\r\n * @since 4.3.0\r\n * @param value Latitude\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"visualLatitude\", value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapPolygon.prototype, \"visualLongitude\", {\r\n /**\r\n * @return Longitude\r\n */\r\n get: function () {\r\n var longitude = this.getPropertyValue(\"visualLongitude\");\r\n if ($type.isNumber(longitude)) {\r\n return (longitude);\r\n }\r\n if (!this._adapterO) {\r\n return this._visualLongitude;\r\n }\r\n else {\r\n return this._adapterO.apply(\"visualLongitude\", this._visualLongitude);\r\n }\r\n },\r\n /**\r\n * Longitude of the visual center of the polygon.\r\n *\r\n * It may (and probably won't) coincide with geometrical center.\r\n *\r\n * @since 4.3.0\r\n * @param value Longitude\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"visualLongitude\", value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapPolygon.prototype, \"pixelWidth\", {\r\n /**\r\n * Not 100% sure about this, as if we add something to MapPolygon this\r\n * won't be true, but otherwise we will get all 0 and the tooltip won't\r\n * be positioned properly\r\n * @hidden\r\n */\r\n /**\r\n * Element's width in pixels.\r\n *\r\n * @readonly\r\n * @return Width (px)\r\n */\r\n get: function () {\r\n return this.polygon.pixelWidth;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapPolygon.prototype, \"pixelHeight\", {\r\n /**\r\n * Element's height in pixels.\r\n *\r\n * @readonly\r\n * @return Width (px)\r\n */\r\n get: function () {\r\n return this.polygon.pixelHeight;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Copies all properties from another instance of [[MapPolygon]].\r\n *\r\n * @param source Source series\r\n */\r\n MapPolygon.prototype.copyFrom = function (source) {\r\n _super.prototype.copyFrom.call(this, source);\r\n this.polygon.copyFrom(source.polygon);\r\n };\r\n /**\r\n * @ignore\r\n */\r\n MapPolygon.prototype.updateExtremes = function () {\r\n _super.prototype.updateExtremes.call(this);\r\n };\r\n Object.defineProperty(MapPolygon.prototype, \"boxArea\", {\r\n /**\r\n * @ignore\r\n * used to sorth polygons from big to small\r\n */\r\n get: function () {\r\n return (this.north - this.south) * (this.east - this.west);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * X coordinate for the slice tooltip.\r\n *\r\n * @ignore\r\n * @return X\r\n */\r\n MapPolygon.prototype.getTooltipX = function () {\r\n return this.series.chart.projection.convert({ longitude: this.visualLongitude, latitude: this.visualLatitude }).x;\r\n };\r\n /**\r\n * Y coordinate for the slice tooltip.\r\n *\r\n * @ignore\r\n * @return Y\r\n */\r\n MapPolygon.prototype.getTooltipY = function () {\r\n return this.series.chart.projection.convert({ longitude: this.visualLongitude, latitude: this.visualLatitude }).y;\r\n };\r\n Object.defineProperty(MapPolygon.prototype, \"precision\", {\r\n get: function () {\r\n return this.getPropertyValue(\"precision\");\r\n },\r\n /**\r\n * When polygon's sides are plotted, they are bent according to the used\r\n * projection.\r\n *\r\n * `precision` introduces a setting which can control when such bending\r\n * occurs.\r\n *\r\n * If the distance (in degrees) between two points of polygon's side is less\r\n * than `precision`, no bending will take place and the line will be straight.\r\n *\r\n * Set to large number (e.g. 10000) for perfectly straight lines on all\r\n * polygon's sides.\r\n *\r\n * @since 4.9.1\r\n * @default 0.5\r\n * @param value Precision\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"precision\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return MapPolygon;\r\n}(MapObject));\r\nexport { MapPolygon };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"MapPolygon\"] = MapPolygon;\r\n","/**\r\n * Map polygon series module\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { MapSeries, MapSeriesDataItem } from \"./MapSeries\";\r\nimport { MapPolygon } from \"./MapPolygon\";\r\nimport { ListTemplate, ListDisposer } from \"../../core/utils/List\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport * as $mapUtils from \"./MapUtils\";\r\nimport * as $array from \"../../core/utils/Array\";\r\nimport * as $utils from \"../../core/utils/Utils\";\r\nimport * as $iter from \"../../core/utils/Iterator\";\r\nimport { Disposer } from \"../../core/utils/Disposer\";\r\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Defines a [[DataItem]] for [[MapPolygonSeries]]\r\n * @see {@link DataItem}\r\n */\r\nvar MapPolygonSeriesDataItem = /** @class */ (function (_super) {\r\n __extends(MapPolygonSeriesDataItem, _super);\r\n /**\r\n * Constructor\r\n */\r\n function MapPolygonSeriesDataItem() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"MapPolygonSeriesDataItem\";\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * @ignore\r\n */\r\n MapPolygonSeriesDataItem.prototype.getFeature = function () {\r\n if (this.multiPolygon && this.multiPolygon.length > 0) {\r\n return { \"type\": \"Feature\", geometry: { type: \"MultiPolygon\", coordinates: this.multiPolygon } };\r\n }\r\n };\r\n Object.defineProperty(MapPolygonSeriesDataItem.prototype, \"mapPolygon\", {\r\n /**\r\n * A [[MapPolygon]] element related to this data item.\r\n *\r\n * @readonly\r\n * @return Element\r\n */\r\n get: function () {\r\n var _this = this;\r\n if (!this._mapPolygon) {\r\n var mapPolygon_1 = this.component.mapPolygons.create();\r\n this._mapPolygon = mapPolygon_1;\r\n this.addSprite(mapPolygon_1);\r\n this._disposers.push(new Disposer(function () {\r\n if (_this.component) {\r\n _this.component.mapPolygons.removeValue(mapPolygon_1);\r\n }\r\n }));\r\n this.mapObject = mapPolygon_1;\r\n }\r\n return this._mapPolygon;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapPolygonSeriesDataItem.prototype, \"polygon\", {\r\n /**\r\n * @return Coordinates\r\n */\r\n get: function () {\r\n return this._polygon;\r\n },\r\n /**\r\n * A collection of X/Y coordinates for a single polygon. E.g.:\r\n *\r\n * ```JSON\r\n * [\r\n * [\r\n * [ 100, 150 ],\r\n * [ 120, 200 ],\r\n * [ 150, 200 ],\r\n * [ 170, 240 ],\r\n * [ 100, 150 ]\r\n * ]\r\n * ]\r\n * ```\r\n *\r\n * @param polygon Coordinates\r\n */\r\n set: function (polygon) {\r\n this._polygon = polygon;\r\n this.multiPolygon = [polygon];\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapPolygonSeriesDataItem.prototype, \"multiPolygon\", {\r\n /**\r\n * @return Coordinates\r\n */\r\n get: function () {\r\n return this._multiPolygon;\r\n },\r\n /**\r\n * A collection of X/Y coordinates for a multi-part polygon. E.g.:\r\n *\r\n * ```JSON\r\n * [\r\n * // Part 1\r\n * [\r\n * [\r\n * [ 100, 150 ],\r\n * [ 120, 200 ],\r\n * [ 150, 220 ],\r\n * [ 170, 240 ],\r\n * [ 100, 150 ]\r\n * ]\r\n * ],\r\n *\r\n * // Part 2\r\n * [\r\n * [\r\n * [ 300, 350 ],\r\n * [ 320, 400 ],\r\n * [ 350, 420 ],\r\n * [ 370, 440 ],\r\n * [ 300, 350 ]\r\n * ]\r\n * ]\r\n * ]\r\n * ```\r\n *\r\n * @param multiPolygon Coordinates\r\n */\r\n set: function (multiPolygon) {\r\n this._multiPolygon = multiPolygon;\r\n this.updateExtremes();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapPolygonSeriesDataItem.prototype, \"geoPolygon\", {\r\n /**\r\n * @return Coordinates\r\n */\r\n get: function () {\r\n return this._geoPolygon;\r\n },\r\n /**\r\n * A collection of lat/long coordinates for a single polygon. E.g.:\r\n *\r\n * ```JSON\r\n * [\r\n * [\r\n * { latitude: -10.0, longitude: -10.0 },\r\n * { latitude: 10.0, longitude: -10.0 },\r\n * { latitude: 10.0, longitude: 10.0 },\r\n * { latitude: -10.0, longitude: -10.0 }\r\n * ]\r\n * ]\r\n * ```\r\n *\r\n * @see {@link https://tools.ietf.org/html/rfc7946#section-3.1.6} GeoJSON Polygon reference\r\n * @param geoPolygon Coordinates\r\n */\r\n set: function (geoPolygon) {\r\n this._geoPolygon = geoPolygon;\r\n this.multiGeoPolygon = [geoPolygon];\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapPolygonSeriesDataItem.prototype, \"multiGeoPolygon\", {\r\n /**\r\n * @return Coordinates\r\n */\r\n get: function () {\r\n return this._multiGeoPolygon;\r\n },\r\n /**\r\n * A collection of lat/long coordinates for a multi-part polygon. E.g.:\r\n *\r\n * ```JSON\r\n * [\r\n * [\r\n * [\r\n * { longitude: 180.0, latitude: 40.0 },\r\n * { longitude: 180.0, latitude: 50.0 },\r\n * { longitude: 170.0, latitude: 50.0 },\r\n * { longitude: 170.0, latitude: 40.0 },\r\n * { longitude: 180.0, latitude: 40.0 }\r\n * ]\r\n * ],\r\n * [\r\n * [\r\n * { longitude: -170.0, latitude: 40.0 },\r\n * { longitude: -170.0, latitude: 50.0 },\r\n * { longitude: -180.0, latitude: 50.0 },\r\n * { longitude: -180.0, latitude: 40.0 },\r\n * { longitude: -170.0, latitude: 40.0 }\r\n * ]\r\n * ]\r\n * ]\r\n * ```\r\n *\r\n * @see {@link https://tools.ietf.org/html/rfc7946#section-3.1.7} GeoJSON MultiPolygon reference\r\n * @param multiGeoPolygon Coordinates\r\n */\r\n set: function (multiGeoPolygon) {\r\n this._multiGeoPolygon = multiGeoPolygon;\r\n this.multiPolygon = $mapUtils.multiGeoPolygonToMultipolygon(multiGeoPolygon);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return MapPolygonSeriesDataItem;\r\n}(MapSeriesDataItem));\r\nexport { MapPolygonSeriesDataItem };\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * A series of map polygon elements.\r\n *\r\n * @see {@link IMapPolygonSeriesEvents} for a list of available Events\r\n * @see {@link IMapPolygonSeriesAdapters} for a list of available Adapters\r\n * @important\r\n */\r\nvar MapPolygonSeries = /** @class */ (function (_super) {\r\n __extends(MapPolygonSeries, _super);\r\n /**\r\n * Constructor\r\n */\r\n function MapPolygonSeries() {\r\n var _this = \r\n // Init\r\n _super.call(this) || this;\r\n /**\r\n * Indicates if series should automatically calculate visual center of the\r\n * polygons (accessible via `visualLongitude` and `visualLatitude` properties\r\n * of the [[MapPolygon]]).\r\n *\r\n * @default false\r\n * @since 4.3.0\r\n */\r\n _this.calculateVisualCenter = false;\r\n _this.className = \"MapPolygonSeries\";\r\n // Set data fields\r\n _this.dataFields.multiPolygon = \"multiPolygon\";\r\n _this.dataFields.polygon = \"polygon\";\r\n _this.dataFields.geoPolygon = \"geoPolygon\";\r\n _this.dataFields.multiGeoPolygon = \"multiGeoPolygon\";\r\n _this.setPropertyValue(\"sortPolygonsBy\", \"area\");\r\n _this.setPropertyValue(\"sortPolygonsReversed\", false);\r\n // Apply theme\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * Returns a new/empty DataItem of the type appropriate for this object.\r\n *\r\n * @see {@link DataItem}\r\n * @return Data Item\r\n */\r\n MapPolygonSeries.prototype.createDataItem = function () {\r\n return new MapPolygonSeriesDataItem();\r\n };\r\n /**\r\n * @ignore\r\n */\r\n MapPolygonSeries.prototype.processIncExc = function () {\r\n this.mapPolygons.clear();\r\n _super.prototype.processIncExc.call(this);\r\n };\r\n /**\r\n * (Re)validates series data, effectively causing the whole series to be\r\n * redrawn.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n MapPolygonSeries.prototype.validateData = function () {\r\n // process geoJSON and created map objects\r\n if (this.useGeodata || this.geodata) {\r\n var geoJSON = !this._dataSources[\"geodata\"] ? this.chart.geodata : undefined;\r\n if (this.geodata) {\r\n geoJSON = this.geodata;\r\n }\r\n if (geoJSON) {\r\n var features = void 0;\r\n if (geoJSON.type == \"FeatureCollection\") {\r\n features = geoJSON.features;\r\n }\r\n else if (geoJSON.type == \"Feature\") {\r\n features = [geoJSON];\r\n }\r\n else if ([\"Point\", \"LineString\", \"Polygon\", \"MultiPoint\", \"MultiLineString\", \"MultiPolygon\"].indexOf(geoJSON.type) != -1) {\r\n features = [{ geometry: geoJSON }];\r\n }\r\n else {\r\n console.log(\"nothing found in geoJSON\");\r\n }\r\n if (features) {\r\n var _loop_1 = function (i, len) {\r\n var feature = features[i];\r\n var geometry = feature.geometry;\r\n if (geometry) {\r\n var type = geometry.type;\r\n var id_1 = feature.id;\r\n if (this_1.chart.geodataNames && this_1.chart.geodataNames[id_1]) {\r\n feature.properties.name = this_1.chart.geodataNames[id_1];\r\n }\r\n if (type == \"Polygon\" || type == \"MultiPolygon\") {\r\n if (!this_1.checkInclude(this_1.include, this_1.exclude, id_1)) {\r\n return \"continue\";\r\n }\r\n var coordinates = geometry.coordinates;\r\n if (coordinates) {\r\n // make the same as MultiPolygon\r\n if (type == \"Polygon\") {\r\n coordinates = [coordinates];\r\n }\r\n }\r\n // find data object in user-provided data\r\n var dataObject = $array.find(this_1.data, function (value, i) {\r\n return value.id == id_1;\r\n });\r\n // create one if not found\r\n if (!dataObject) {\r\n dataObject = { multiPolygon: coordinates, id: id_1, madeFromGeoData: true };\r\n this_1.data.push(dataObject);\r\n }\r\n // in case found\r\n else {\r\n // if user-provided object doesn't have points data provided in any way:\r\n if (!dataObject.multiPolygon) {\r\n dataObject.multiPolygon = coordinates;\r\n }\r\n }\r\n // copy properties data to datacontext\r\n $utils.softCopyProperties(feature.properties, dataObject);\r\n }\r\n }\r\n };\r\n var this_1 = this;\r\n for (var i = 0, len = features.length; i < len; i++) {\r\n _loop_1(i, len);\r\n }\r\n }\r\n }\r\n }\r\n _super.prototype.validateData.call(this);\r\n };\r\n /**\r\n * (Re)validates the series\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n MapPolygonSeries.prototype.validate = function () {\r\n _super.prototype.validate.call(this);\r\n this.dataItems.each(function (dataItem) {\r\n $utils.used(dataItem.mapPolygon);\r\n });\r\n if (this.sortPolygonsBy != \"none\") {\r\n var sortBy_1 = this.sortPolygonsBy;\r\n var reversed_1 = this.sortPolygonsReversed;\r\n this.mapPolygons.sort(function (a, b) {\r\n var valA = \"\";\r\n var valB = \"\";\r\n var dirA = -1;\r\n var dirB = 1;\r\n switch (sortBy_1) {\r\n case \"area\":\r\n valA = a.boxArea;\r\n valB = b.boxArea;\r\n dirA = -1;\r\n dirB = 1;\r\n break;\r\n case \"name\":\r\n valA = a.dataItem.dataContext.name || \"\";\r\n valB = b.dataItem.dataContext.name || \"\";\r\n dirA = 1;\r\n dirB = -1;\r\n break;\r\n case \"id\":\r\n valA = a.dataItem.dataContext.id || \"\";\r\n valB = b.dataItem.dataContext.id || \"\";\r\n dirA = 1;\r\n dirB = -1;\r\n break;\r\n case \"latitude\":\r\n valA = reversed_1 ? a.south : a.north;\r\n valB = reversed_1 ? b.south : b.north;\r\n dirA = -1;\r\n dirB = 1;\r\n break;\r\n case \"longitude\":\r\n valA = reversed_1 ? a.east : a.west;\r\n valB = reversed_1 ? b.east : b.west;\r\n dirA = 1;\r\n dirB = -1;\r\n break;\r\n }\r\n if (valA < valB) {\r\n return reversed_1 ? dirB : dirA;\r\n }\r\n if (valA > valB) {\r\n return reversed_1 ? dirA : dirB;\r\n }\r\n return 0;\r\n });\r\n this.mapPolygons.each(function (mapPolygon, index) {\r\n mapPolygon.validate();\r\n // makes small go first to avoid hover problems with IE\r\n if (!mapPolygon.zIndex && !mapPolygon.propertyFields.zIndex) {\r\n mapPolygon.zIndex = 1000000 - index;\r\n }\r\n });\r\n }\r\n };\r\n Object.defineProperty(MapPolygonSeries.prototype, \"mapPolygons\", {\r\n /**\r\n * List of polygon elements in the series.\r\n *\r\n * @return Polygon list\r\n */\r\n get: function () {\r\n if (!this._mapPolygons) {\r\n var polygonTemplate = new MapPolygon();\r\n var mapPolygons = new ListTemplate(polygonTemplate);\r\n this._disposers.push(new ListDisposer(mapPolygons));\r\n this._disposers.push(mapPolygons.template);\r\n mapPolygons.template.focusable = true;\r\n mapPolygons.events.on(\"inserted\", this.handleObjectAdded, this, false);\r\n this._mapPolygons = mapPolygons;\r\n this._mapObjects = mapPolygons;\r\n }\r\n return this._mapPolygons;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * returns MapPolygon by id in geoJSON file\r\n * @param polygon id\r\n * @return {MapPolygon}\r\n */\r\n MapPolygonSeries.prototype.getPolygonById = function (id) {\r\n return $iter.find(this.mapPolygons.iterator(), function (mapPolygon) {\r\n var dataContext = mapPolygon.dataItem.dataContext;\r\n return dataContext.id == id;\r\n });\r\n };\r\n /**\r\n * Copies all properties from another instance of [[Series]].\r\n *\r\n * @param source Source series\r\n */\r\n MapPolygonSeries.prototype.copyFrom = function (source) {\r\n this.mapPolygons.template.copyFrom(source.mapPolygons.template);\r\n _super.prototype.copyFrom.call(this, source);\r\n };\r\n /**\r\n * @ignore\r\n */\r\n MapPolygonSeries.prototype.getFeatures = function () {\r\n var _this = this;\r\n var features = [];\r\n this.dataItems.each(function (dataItem) {\r\n var feature = dataItem.getFeature();\r\n if (feature) {\r\n features.push(feature);\r\n }\r\n });\r\n this.mapPolygons.each(function (mapPolygon) {\r\n if (_this.dataItems.indexOf(mapPolygon._dataItem) == -1) {\r\n var feature = mapPolygon.getFeature();\r\n if (feature) {\r\n features.push(feature);\r\n }\r\n }\r\n });\r\n return features;\r\n };\r\n Object.defineProperty(MapPolygonSeries.prototype, \"sortPolygonsBy\", {\r\n /**\r\n * @return How to sort map polygons\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"sortPolygonsBy\");\r\n },\r\n /**\r\n * How to order polygons in actual SVG document. Affects selection order\r\n * using TAB key.\r\n *\r\n * Available options: `\"area\"` (default), `\"name\"`, `\"longitude\"`,\r\n * `\"latitude\"`, `\"id\"`, and `\"none\"`.\r\n *\r\n * @default area\r\n * @since 4.9.36\r\n * @param value How to sort map polygons\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"sortPolygonsBy\", value)) {\r\n this.invalidateData();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapPolygonSeries.prototype, \"sortPolygonsReversed\", {\r\n /**\r\n * @return Reverse polygon sort direction\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"sortPolygonsReversed\");\r\n },\r\n /**\r\n * If `sortPolygonsBy` is set to something other than `\"none\"`, polygons\r\n * will be sorted by the given parameter, using natural sort direction.\r\n *\r\n * Setting `sortPolygonsReversed = true` will reverse this direction.\r\n *\r\n * @default false\r\n * @since 4.9.36\r\n * @param value Reverse polygon sort direction\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"sortPolygonsReversed\", value)) {\r\n this.invalidateData();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return MapPolygonSeries;\r\n}(MapSeries));\r\nexport { MapPolygonSeries };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"MapPolygonSeries\"] = MapPolygonSeries;\r\nregistry.registeredClasses[\"MapPolygonSeriesDataItem\"] = MapPolygonSeriesDataItem;\r\n","import noop from \"../noop.js\";\n\nexport default function() {\n var lines = [],\n line;\n return {\n point: function(x, y, m) {\n line.push([x, y, m]);\n },\n lineStart: function() {\n lines.push(line = []);\n },\n lineEnd: noop,\n rejoin: function() {\n if (lines.length > 1) lines.push(lines.pop().concat(lines.shift()));\n },\n result: function() {\n var result = lines;\n lines = [];\n line = null;\n return result;\n }\n };\n}\n","import {abs, epsilon} from \"./math.js\";\n\nexport default function(a, b) {\n return abs(a[0] - b[0]) < epsilon && abs(a[1] - b[1]) < epsilon;\n}\n","import pointEqual from \"../pointEqual.js\";\nimport {epsilon} from \"../math.js\";\n\nfunction Intersection(point, points, other, entry) {\n this.x = point;\n this.z = points;\n this.o = other; // another intersection\n this.e = entry; // is an entry?\n this.v = false; // visited\n this.n = this.p = null; // next & previous\n}\n\n// A generalized polygon clipping algorithm: given a polygon that has been cut\n// into its visible line segments, and rejoins the segments by interpolating\n// along the clip edge.\nexport default function(segments, compareIntersection, startInside, interpolate, stream) {\n var subject = [],\n clip = [],\n i,\n n;\n\n segments.forEach(function(segment) {\n if ((n = segment.length - 1) <= 0) return;\n var n, p0 = segment[0], p1 = segment[n], x;\n\n if (pointEqual(p0, p1)) {\n if (!p0[2] && !p1[2]) {\n stream.lineStart();\n for (i = 0; i < n; ++i) stream.point((p0 = segment[i])[0], p0[1]);\n stream.lineEnd();\n return;\n }\n // handle degenerate cases by moving the point\n p1[0] += 2 * epsilon;\n }\n\n subject.push(x = new Intersection(p0, segment, null, true));\n clip.push(x.o = new Intersection(p0, null, x, false));\n subject.push(x = new Intersection(p1, segment, null, false));\n clip.push(x.o = new Intersection(p1, null, x, true));\n });\n\n if (!subject.length) return;\n\n clip.sort(compareIntersection);\n link(subject);\n link(clip);\n\n for (i = 0, n = clip.length; i < n; ++i) {\n clip[i].e = startInside = !startInside;\n }\n\n var start = subject[0],\n points,\n point;\n\n while (1) {\n // Find first unvisited intersection.\n var current = start,\n isSubject = true;\n while (current.v) if ((current = current.n) === start) return;\n points = current.z;\n stream.lineStart();\n do {\n current.v = current.o.v = true;\n if (current.e) {\n if (isSubject) {\n for (i = 0, n = points.length; i < n; ++i) stream.point((point = points[i])[0], point[1]);\n } else {\n interpolate(current.x, current.n.x, 1, stream);\n }\n current = current.n;\n } else {\n if (isSubject) {\n points = current.p.z;\n for (i = points.length - 1; i >= 0; --i) stream.point((point = points[i])[0], point[1]);\n } else {\n interpolate(current.x, current.p.x, -1, stream);\n }\n current = current.p;\n }\n current = current.o;\n points = current.z;\n isSubject = !isSubject;\n } while (!current.v);\n stream.lineEnd();\n }\n}\n\nfunction link(array) {\n if (!(n = array.length)) return;\n var n,\n i = 0,\n a = array[0],\n b;\n while (++i < n) {\n a.n = b = array[i];\n b.p = a;\n a = b;\n }\n a.n = b = array[0];\n b.p = a;\n}\n","import {Adder} from \"d3-array\";\nimport {cartesian, cartesianCross, cartesianNormalizeInPlace} from \"./cartesian.js\";\nimport {abs, asin, atan2, cos, epsilon, epsilon2, halfPi, pi, quarterPi, sign, sin, tau} from \"./math.js\";\n\nfunction longitude(point) {\n return abs(point[0]) <= pi ? point[0] : sign(point[0]) * ((abs(point[0]) + pi) % tau - pi);\n}\n\nexport default function(polygon, point) {\n var lambda = longitude(point),\n phi = point[1],\n sinPhi = sin(phi),\n normal = [sin(lambda), -cos(lambda), 0],\n angle = 0,\n winding = 0;\n\n var sum = new Adder();\n\n if (sinPhi === 1) phi = halfPi + epsilon;\n else if (sinPhi === -1) phi = -halfPi - epsilon;\n\n for (var i = 0, n = polygon.length; i < n; ++i) {\n if (!(m = (ring = polygon[i]).length)) continue;\n var ring,\n m,\n point0 = ring[m - 1],\n lambda0 = longitude(point0),\n phi0 = point0[1] / 2 + quarterPi,\n sinPhi0 = sin(phi0),\n cosPhi0 = cos(phi0);\n\n for (var j = 0; j < m; ++j, lambda0 = lambda1, sinPhi0 = sinPhi1, cosPhi0 = cosPhi1, point0 = point1) {\n var point1 = ring[j],\n lambda1 = longitude(point1),\n phi1 = point1[1] / 2 + quarterPi,\n sinPhi1 = sin(phi1),\n cosPhi1 = cos(phi1),\n delta = lambda1 - lambda0,\n sign = delta >= 0 ? 1 : -1,\n absDelta = sign * delta,\n antimeridian = absDelta > pi,\n k = sinPhi0 * sinPhi1;\n\n sum.add(atan2(k * sign * sin(absDelta), cosPhi0 * cosPhi1 + k * cos(absDelta)));\n angle += antimeridian ? delta + sign * tau : delta;\n\n // Are the longitudes either side of the point’s meridian (lambda),\n // and are the latitudes smaller than the parallel (phi)?\n if (antimeridian ^ lambda0 >= lambda ^ lambda1 >= lambda) {\n var arc = cartesianCross(cartesian(point0), cartesian(point1));\n cartesianNormalizeInPlace(arc);\n var intersection = cartesianCross(normal, arc);\n cartesianNormalizeInPlace(intersection);\n var phiArc = (antimeridian ^ delta >= 0 ? -1 : 1) * asin(intersection[2]);\n if (phi > phiArc || phi === phiArc && (arc[0] || arc[1])) {\n winding += antimeridian ^ delta >= 0 ? 1 : -1;\n }\n }\n }\n }\n\n // First, determine whether the South pole is inside or outside:\n //\n // It is inside if:\n // * the polygon winds around it in a clockwise direction.\n // * the polygon does not (cumulatively) wind around it, but has a negative\n // (counter-clockwise) area.\n //\n // Second, count the (signed) number of times a segment crosses a lambda\n // from the point to the South pole. If it is zero, then the point is the\n // same side as the South pole.\n\n return (angle < -epsilon || angle < epsilon && sum < -epsilon2) ^ (winding & 1);\n}\n","function* flatten(arrays) {\n for (const array of arrays) {\n yield* array;\n }\n}\n\nexport default function merge(arrays) {\n return Array.from(flatten(arrays));\n}\n","import clipBuffer from \"./buffer.js\";\nimport clipRejoin from \"./rejoin.js\";\nimport {epsilon, halfPi} from \"../math.js\";\nimport polygonContains from \"../polygonContains.js\";\nimport {merge} from \"d3-array\";\n\nexport default function(pointVisible, clipLine, interpolate, start) {\n return function(sink) {\n var line = clipLine(sink),\n ringBuffer = clipBuffer(),\n ringSink = clipLine(ringBuffer),\n polygonStarted = false,\n polygon,\n segments,\n ring;\n\n var clip = {\n point: point,\n lineStart: lineStart,\n lineEnd: lineEnd,\n polygonStart: function() {\n clip.point = pointRing;\n clip.lineStart = ringStart;\n clip.lineEnd = ringEnd;\n segments = [];\n polygon = [];\n },\n polygonEnd: function() {\n clip.point = point;\n clip.lineStart = lineStart;\n clip.lineEnd = lineEnd;\n segments = merge(segments);\n var startInside = polygonContains(polygon, start);\n if (segments.length) {\n if (!polygonStarted) sink.polygonStart(), polygonStarted = true;\n clipRejoin(segments, compareIntersection, startInside, interpolate, sink);\n } else if (startInside) {\n if (!polygonStarted) sink.polygonStart(), polygonStarted = true;\n sink.lineStart();\n interpolate(null, null, 1, sink);\n sink.lineEnd();\n }\n if (polygonStarted) sink.polygonEnd(), polygonStarted = false;\n segments = polygon = null;\n },\n sphere: function() {\n sink.polygonStart();\n sink.lineStart();\n interpolate(null, null, 1, sink);\n sink.lineEnd();\n sink.polygonEnd();\n }\n };\n\n function point(lambda, phi) {\n if (pointVisible(lambda, phi)) sink.point(lambda, phi);\n }\n\n function pointLine(lambda, phi) {\n line.point(lambda, phi);\n }\n\n function lineStart() {\n clip.point = pointLine;\n line.lineStart();\n }\n\n function lineEnd() {\n clip.point = point;\n line.lineEnd();\n }\n\n function pointRing(lambda, phi) {\n ring.push([lambda, phi]);\n ringSink.point(lambda, phi);\n }\n\n function ringStart() {\n ringSink.lineStart();\n ring = [];\n }\n\n function ringEnd() {\n pointRing(ring[0][0], ring[0][1]);\n ringSink.lineEnd();\n\n var clean = ringSink.clean(),\n ringSegments = ringBuffer.result(),\n i, n = ringSegments.length, m,\n segment,\n point;\n\n ring.pop();\n polygon.push(ring);\n ring = null;\n\n if (!n) return;\n\n // No intersections.\n if (clean & 1) {\n segment = ringSegments[0];\n if ((m = segment.length - 1) > 0) {\n if (!polygonStarted) sink.polygonStart(), polygonStarted = true;\n sink.lineStart();\n for (i = 0; i < m; ++i) sink.point((point = segment[i])[0], point[1]);\n sink.lineEnd();\n }\n return;\n }\n\n // Rejoin connected segments.\n // TODO reuse ringBuffer.rejoin()?\n if (n > 1 && clean & 2) ringSegments.push(ringSegments.pop().concat(ringSegments.shift()));\n\n segments.push(ringSegments.filter(validSegment));\n }\n\n return clip;\n };\n}\n\nfunction validSegment(segment) {\n return segment.length > 1;\n}\n\n// Intersections are sorted along the clip edge. For both antimeridian cutting\n// and circle clipping, the same comparison is used.\nfunction compareIntersection(a, b) {\n return ((a = a.x)[0] < 0 ? a[1] - halfPi - epsilon : halfPi - a[1])\n - ((b = b.x)[0] < 0 ? b[1] - halfPi - epsilon : halfPi - b[1]);\n}\n","import clip from \"./index.js\";\nimport {abs, atan, cos, epsilon, halfPi, pi, sin} from \"../math.js\";\n\nexport default clip(\n function() { return true; },\n clipAntimeridianLine,\n clipAntimeridianInterpolate,\n [-pi, -halfPi]\n);\n\n// Takes a line and cuts into visible segments. Return values: 0 - there were\n// intersections or the line was empty; 1 - no intersections; 2 - there were\n// intersections, and the first and last segments should be rejoined.\nfunction clipAntimeridianLine(stream) {\n var lambda0 = NaN,\n phi0 = NaN,\n sign0 = NaN,\n clean; // no intersections\n\n return {\n lineStart: function() {\n stream.lineStart();\n clean = 1;\n },\n point: function(lambda1, phi1) {\n var sign1 = lambda1 > 0 ? pi : -pi,\n delta = abs(lambda1 - lambda0);\n if (abs(delta - pi) < epsilon) { // line crosses a pole\n stream.point(lambda0, phi0 = (phi0 + phi1) / 2 > 0 ? halfPi : -halfPi);\n stream.point(sign0, phi0);\n stream.lineEnd();\n stream.lineStart();\n stream.point(sign1, phi0);\n stream.point(lambda1, phi0);\n clean = 0;\n } else if (sign0 !== sign1 && delta >= pi) { // line crosses antimeridian\n if (abs(lambda0 - sign0) < epsilon) lambda0 -= sign0 * epsilon; // handle degeneracies\n if (abs(lambda1 - sign1) < epsilon) lambda1 -= sign1 * epsilon;\n phi0 = clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1);\n stream.point(sign0, phi0);\n stream.lineEnd();\n stream.lineStart();\n stream.point(sign1, phi0);\n clean = 0;\n }\n stream.point(lambda0 = lambda1, phi0 = phi1);\n sign0 = sign1;\n },\n lineEnd: function() {\n stream.lineEnd();\n lambda0 = phi0 = NaN;\n },\n clean: function() {\n return 2 - clean; // if intersections, rejoin first and last segments\n }\n };\n}\n\nfunction clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1) {\n var cosPhi0,\n cosPhi1,\n sinLambda0Lambda1 = sin(lambda0 - lambda1);\n return abs(sinLambda0Lambda1) > epsilon\n ? atan((sin(phi0) * (cosPhi1 = cos(phi1)) * sin(lambda1)\n - sin(phi1) * (cosPhi0 = cos(phi0)) * sin(lambda0))\n / (cosPhi0 * cosPhi1 * sinLambda0Lambda1))\n : (phi0 + phi1) / 2;\n}\n\nfunction clipAntimeridianInterpolate(from, to, direction, stream) {\n var phi;\n if (from == null) {\n phi = direction * halfPi;\n stream.point(-pi, phi);\n stream.point(0, phi);\n stream.point(pi, phi);\n stream.point(pi, 0);\n stream.point(pi, -phi);\n stream.point(0, -phi);\n stream.point(-pi, -phi);\n stream.point(-pi, 0);\n stream.point(-pi, phi);\n } else if (abs(from[0] - to[0]) > epsilon) {\n var lambda = from[0] < to[0] ? pi : -pi;\n phi = direction * lambda / 2;\n stream.point(-lambda, phi);\n stream.point(0, phi);\n stream.point(lambda, phi);\n } else {\n stream.point(to[0], to[1]);\n }\n}\n","import {cartesian, cartesianNormalizeInPlace, spherical} from \"./cartesian.js\";\nimport constant from \"./constant.js\";\nimport {acos, cos, degrees, epsilon, radians, sin, tau} from \"./math.js\";\nimport {rotateRadians} from \"./rotation.js\";\n\n// Generates a circle centered at [0°, 0°], with a given radius and precision.\nexport function circleStream(stream, radius, delta, direction, t0, t1) {\n if (!delta) return;\n var cosRadius = cos(radius),\n sinRadius = sin(radius),\n step = direction * delta;\n if (t0 == null) {\n t0 = radius + direction * tau;\n t1 = radius - step / 2;\n } else {\n t0 = circleRadius(cosRadius, t0);\n t1 = circleRadius(cosRadius, t1);\n if (direction > 0 ? t0 < t1 : t0 > t1) t0 += direction * tau;\n }\n for (var point, t = t0; direction > 0 ? t > t1 : t < t1; t -= step) {\n point = spherical([cosRadius, -sinRadius * cos(t), -sinRadius * sin(t)]);\n stream.point(point[0], point[1]);\n }\n}\n\n// Returns the signed angle of a cartesian point relative to [cosRadius, 0, 0].\nfunction circleRadius(cosRadius, point) {\n point = cartesian(point), point[0] -= cosRadius;\n cartesianNormalizeInPlace(point);\n var radius = acos(-point[1]);\n return ((-point[2] < 0 ? -radius : radius) + tau - epsilon) % tau;\n}\n\nexport default function() {\n var center = constant([0, 0]),\n radius = constant(90),\n precision = constant(6),\n ring,\n rotate,\n stream = {point: point};\n\n function point(x, y) {\n ring.push(x = rotate(x, y));\n x[0] *= degrees, x[1] *= degrees;\n }\n\n function circle() {\n var c = center.apply(this, arguments),\n r = radius.apply(this, arguments) * radians,\n p = precision.apply(this, arguments) * radians;\n ring = [];\n rotate = rotateRadians(-c[0] * radians, -c[1] * radians, 0).invert;\n circleStream(stream, r, p, 1);\n c = {type: \"Polygon\", coordinates: [ring]};\n ring = rotate = null;\n return c;\n }\n\n circle.center = function(_) {\n return arguments.length ? (center = typeof _ === \"function\" ? _ : constant([+_[0], +_[1]]), circle) : center;\n };\n\n circle.radius = function(_) {\n return arguments.length ? (radius = typeof _ === \"function\" ? _ : constant(+_), circle) : radius;\n };\n\n circle.precision = function(_) {\n return arguments.length ? (precision = typeof _ === \"function\" ? _ : constant(+_), circle) : precision;\n };\n\n return circle;\n}\n","import {cartesian, cartesianAddInPlace, cartesianCross, cartesianDot, cartesianScale, spherical} from \"../cartesian.js\";\nimport {circleStream} from \"../circle.js\";\nimport {abs, cos, epsilon, pi, radians, sqrt} from \"../math.js\";\nimport pointEqual from \"../pointEqual.js\";\nimport clip from \"./index.js\";\n\nexport default function(radius) {\n var cr = cos(radius),\n delta = 6 * radians,\n smallRadius = cr > 0,\n notHemisphere = abs(cr) > epsilon; // TODO optimise for this common case\n\n function interpolate(from, to, direction, stream) {\n circleStream(stream, radius, delta, direction, from, to);\n }\n\n function visible(lambda, phi) {\n return cos(lambda) * cos(phi) > cr;\n }\n\n // Takes a line and cuts into visible segments. Return values used for polygon\n // clipping: 0 - there were intersections or the line was empty; 1 - no\n // intersections 2 - there were intersections, and the first and last segments\n // should be rejoined.\n function clipLine(stream) {\n var point0, // previous point\n c0, // code for previous point\n v0, // visibility of previous point\n v00, // visibility of first point\n clean; // no intersections\n return {\n lineStart: function() {\n v00 = v0 = false;\n clean = 1;\n },\n point: function(lambda, phi) {\n var point1 = [lambda, phi],\n point2,\n v = visible(lambda, phi),\n c = smallRadius\n ? v ? 0 : code(lambda, phi)\n : v ? code(lambda + (lambda < 0 ? pi : -pi), phi) : 0;\n if (!point0 && (v00 = v0 = v)) stream.lineStart();\n if (v !== v0) {\n point2 = intersect(point0, point1);\n if (!point2 || pointEqual(point0, point2) || pointEqual(point1, point2))\n point1[2] = 1;\n }\n if (v !== v0) {\n clean = 0;\n if (v) {\n // outside going in\n stream.lineStart();\n point2 = intersect(point1, point0);\n stream.point(point2[0], point2[1]);\n } else {\n // inside going out\n point2 = intersect(point0, point1);\n stream.point(point2[0], point2[1], 2);\n stream.lineEnd();\n }\n point0 = point2;\n } else if (notHemisphere && point0 && smallRadius ^ v) {\n var t;\n // If the codes for two points are different, or are both zero,\n // and there this segment intersects with the small circle.\n if (!(c & c0) && (t = intersect(point1, point0, true))) {\n clean = 0;\n if (smallRadius) {\n stream.lineStart();\n stream.point(t[0][0], t[0][1]);\n stream.point(t[1][0], t[1][1]);\n stream.lineEnd();\n } else {\n stream.point(t[1][0], t[1][1]);\n stream.lineEnd();\n stream.lineStart();\n stream.point(t[0][0], t[0][1], 3);\n }\n }\n }\n if (v && (!point0 || !pointEqual(point0, point1))) {\n stream.point(point1[0], point1[1]);\n }\n point0 = point1, v0 = v, c0 = c;\n },\n lineEnd: function() {\n if (v0) stream.lineEnd();\n point0 = null;\n },\n // Rejoin first and last segments if there were intersections and the first\n // and last points were visible.\n clean: function() {\n return clean | ((v00 && v0) << 1);\n }\n };\n }\n\n // Intersects the great circle between a and b with the clip circle.\n function intersect(a, b, two) {\n var pa = cartesian(a),\n pb = cartesian(b);\n\n // We have two planes, n1.p = d1 and n2.p = d2.\n // Find intersection line p(t) = c1 n1 + c2 n2 + t (n1 ⨯ n2).\n var n1 = [1, 0, 0], // normal\n n2 = cartesianCross(pa, pb),\n n2n2 = cartesianDot(n2, n2),\n n1n2 = n2[0], // cartesianDot(n1, n2),\n determinant = n2n2 - n1n2 * n1n2;\n\n // Two polar points.\n if (!determinant) return !two && a;\n\n var c1 = cr * n2n2 / determinant,\n c2 = -cr * n1n2 / determinant,\n n1xn2 = cartesianCross(n1, n2),\n A = cartesianScale(n1, c1),\n B = cartesianScale(n2, c2);\n cartesianAddInPlace(A, B);\n\n // Solve |p(t)|^2 = 1.\n var u = n1xn2,\n w = cartesianDot(A, u),\n uu = cartesianDot(u, u),\n t2 = w * w - uu * (cartesianDot(A, A) - 1);\n\n if (t2 < 0) return;\n\n var t = sqrt(t2),\n q = cartesianScale(u, (-w - t) / uu);\n cartesianAddInPlace(q, A);\n q = spherical(q);\n\n if (!two) return q;\n\n // Two intersection points.\n var lambda0 = a[0],\n lambda1 = b[0],\n phi0 = a[1],\n phi1 = b[1],\n z;\n\n if (lambda1 < lambda0) z = lambda0, lambda0 = lambda1, lambda1 = z;\n\n var delta = lambda1 - lambda0,\n polar = abs(delta - pi) < epsilon,\n meridian = polar || delta < epsilon;\n\n if (!polar && phi1 < phi0) z = phi0, phi0 = phi1, phi1 = z;\n\n // Check that the first point is between a and b.\n if (meridian\n ? polar\n ? phi0 + phi1 > 0 ^ q[1] < (abs(q[0] - lambda0) < epsilon ? phi0 : phi1)\n : phi0 <= q[1] && q[1] <= phi1\n : delta > pi ^ (lambda0 <= q[0] && q[0] <= lambda1)) {\n var q1 = cartesianScale(u, (-w + t) / uu);\n cartesianAddInPlace(q1, A);\n return [q, spherical(q1)];\n }\n }\n\n // Generates a 4-bit vector representing the location of a point relative to\n // the small circle's bounding box.\n function code(lambda, phi) {\n var r = smallRadius ? radius : pi - radius,\n code = 0;\n if (lambda < -r) code |= 1; // left\n else if (lambda > r) code |= 2; // right\n if (phi < -r) code |= 4; // below\n else if (phi > r) code |= 8; // above\n return code;\n }\n\n return clip(visible, clipLine, interpolate, smallRadius ? [0, -radius] : [-pi, radius - pi]);\n}\n","import {abs, epsilon} from \"../math.js\";\nimport clipBuffer from \"./buffer.js\";\nimport clipLine from \"./line.js\";\nimport clipRejoin from \"./rejoin.js\";\nimport {merge} from \"d3-array\";\n\nvar clipMax = 1e9, clipMin = -clipMax;\n\n// TODO Use d3-polygon’s polygonContains here for the ring check?\n// TODO Eliminate duplicate buffering in clipBuffer and polygon.push?\n\nexport default function clipRectangle(x0, y0, x1, y1) {\n\n function visible(x, y) {\n return x0 <= x && x <= x1 && y0 <= y && y <= y1;\n }\n\n function interpolate(from, to, direction, stream) {\n var a = 0, a1 = 0;\n if (from == null\n || (a = corner(from, direction)) !== (a1 = corner(to, direction))\n || comparePoint(from, to) < 0 ^ direction > 0) {\n do stream.point(a === 0 || a === 3 ? x0 : x1, a > 1 ? y1 : y0);\n while ((a = (a + direction + 4) % 4) !== a1);\n } else {\n stream.point(to[0], to[1]);\n }\n }\n\n function corner(p, direction) {\n return abs(p[0] - x0) < epsilon ? direction > 0 ? 0 : 3\n : abs(p[0] - x1) < epsilon ? direction > 0 ? 2 : 1\n : abs(p[1] - y0) < epsilon ? direction > 0 ? 1 : 0\n : direction > 0 ? 3 : 2; // abs(p[1] - y1) < epsilon\n }\n\n function compareIntersection(a, b) {\n return comparePoint(a.x, b.x);\n }\n\n function comparePoint(a, b) {\n var ca = corner(a, 1),\n cb = corner(b, 1);\n return ca !== cb ? ca - cb\n : ca === 0 ? b[1] - a[1]\n : ca === 1 ? a[0] - b[0]\n : ca === 2 ? a[1] - b[1]\n : b[0] - a[0];\n }\n\n return function(stream) {\n var activeStream = stream,\n bufferStream = clipBuffer(),\n segments,\n polygon,\n ring,\n x__, y__, v__, // first point\n x_, y_, v_, // previous point\n first,\n clean;\n\n var clipStream = {\n point: point,\n lineStart: lineStart,\n lineEnd: lineEnd,\n polygonStart: polygonStart,\n polygonEnd: polygonEnd\n };\n\n function point(x, y) {\n if (visible(x, y)) activeStream.point(x, y);\n }\n\n function polygonInside() {\n var winding = 0;\n\n for (var i = 0, n = polygon.length; i < n; ++i) {\n for (var ring = polygon[i], j = 1, m = ring.length, point = ring[0], a0, a1, b0 = point[0], b1 = point[1]; j < m; ++j) {\n a0 = b0, a1 = b1, point = ring[j], b0 = point[0], b1 = point[1];\n if (a1 <= y1) { if (b1 > y1 && (b0 - a0) * (y1 - a1) > (b1 - a1) * (x0 - a0)) ++winding; }\n else { if (b1 <= y1 && (b0 - a0) * (y1 - a1) < (b1 - a1) * (x0 - a0)) --winding; }\n }\n }\n\n return winding;\n }\n\n // Buffer geometry within a polygon and then clip it en masse.\n function polygonStart() {\n activeStream = bufferStream, segments = [], polygon = [], clean = true;\n }\n\n function polygonEnd() {\n var startInside = polygonInside(),\n cleanInside = clean && startInside,\n visible = (segments = merge(segments)).length;\n if (cleanInside || visible) {\n stream.polygonStart();\n if (cleanInside) {\n stream.lineStart();\n interpolate(null, null, 1, stream);\n stream.lineEnd();\n }\n if (visible) {\n clipRejoin(segments, compareIntersection, startInside, interpolate, stream);\n }\n stream.polygonEnd();\n }\n activeStream = stream, segments = polygon = ring = null;\n }\n\n function lineStart() {\n clipStream.point = linePoint;\n if (polygon) polygon.push(ring = []);\n first = true;\n v_ = false;\n x_ = y_ = NaN;\n }\n\n // TODO rather than special-case polygons, simply handle them separately.\n // Ideally, coincident intersection points should be jittered to avoid\n // clipping issues.\n function lineEnd() {\n if (segments) {\n linePoint(x__, y__);\n if (v__ && v_) bufferStream.rejoin();\n segments.push(bufferStream.result());\n }\n clipStream.point = point;\n if (v_) activeStream.lineEnd();\n }\n\n function linePoint(x, y) {\n var v = visible(x, y);\n if (polygon) ring.push([x, y]);\n if (first) {\n x__ = x, y__ = y, v__ = v;\n first = false;\n if (v) {\n activeStream.lineStart();\n activeStream.point(x, y);\n }\n } else {\n if (v && v_) activeStream.point(x, y);\n else {\n var a = [x_ = Math.max(clipMin, Math.min(clipMax, x_)), y_ = Math.max(clipMin, Math.min(clipMax, y_))],\n b = [x = Math.max(clipMin, Math.min(clipMax, x)), y = Math.max(clipMin, Math.min(clipMax, y))];\n if (clipLine(a, b, x0, y0, x1, y1)) {\n if (!v_) {\n activeStream.lineStart();\n activeStream.point(a[0], a[1]);\n }\n activeStream.point(b[0], b[1]);\n if (!v) activeStream.lineEnd();\n clean = false;\n } else if (v) {\n activeStream.lineStart();\n activeStream.point(x, y);\n clean = false;\n }\n }\n }\n x_ = x, y_ = y, v_ = v;\n }\n\n return clipStream;\n };\n}\n","export default function(a, b, x0, y0, x1, y1) {\n var ax = a[0],\n ay = a[1],\n bx = b[0],\n by = b[1],\n t0 = 0,\n t1 = 1,\n dx = bx - ax,\n dy = by - ay,\n r;\n\n r = x0 - ax;\n if (!dx && r > 0) return;\n r /= dx;\n if (dx < 0) {\n if (r < t0) return;\n if (r < t1) t1 = r;\n } else if (dx > 0) {\n if (r > t1) return;\n if (r > t0) t0 = r;\n }\n\n r = x1 - ax;\n if (!dx && r < 0) return;\n r /= dx;\n if (dx < 0) {\n if (r > t1) return;\n if (r > t0) t0 = r;\n } else if (dx > 0) {\n if (r < t0) return;\n if (r < t1) t1 = r;\n }\n\n r = y0 - ay;\n if (!dy && r > 0) return;\n r /= dy;\n if (dy < 0) {\n if (r < t0) return;\n if (r < t1) t1 = r;\n } else if (dy > 0) {\n if (r > t1) return;\n if (r > t0) t0 = r;\n }\n\n r = y1 - ay;\n if (!dy && r < 0) return;\n r /= dy;\n if (dy < 0) {\n if (r > t1) return;\n if (r > t0) t0 = r;\n } else if (dy > 0) {\n if (r < t0) return;\n if (r < t1) t1 = r;\n }\n\n if (t0 > 0) a[0] = ax + t0 * dx, a[1] = ay + t0 * dy;\n if (t1 < 1) b[0] = ax + t1 * dx, b[1] = ay + t1 * dy;\n return true;\n}\n","export default function(a, b) {\n\n function compose(x, y) {\n return x = a(x, y), b(x[0], x[1]);\n }\n\n if (a.invert && b.invert) compose.invert = function(x, y) {\n return x = b.invert(x, y), x && a.invert(x[0], x[1]);\n };\n\n return compose;\n}\n","export default x => x;\n","import compose from \"./compose.js\";\nimport {abs, asin, atan2, cos, degrees, pi, radians, sin, tau} from \"./math.js\";\n\nfunction rotationIdentity(lambda, phi) {\n if (abs(lambda) > pi) lambda -= Math.round(lambda / tau) * tau;\n return [lambda, phi];\n}\n\nrotationIdentity.invert = rotationIdentity;\n\nexport function rotateRadians(deltaLambda, deltaPhi, deltaGamma) {\n return (deltaLambda %= tau) ? (deltaPhi || deltaGamma ? compose(rotationLambda(deltaLambda), rotationPhiGamma(deltaPhi, deltaGamma))\n : rotationLambda(deltaLambda))\n : (deltaPhi || deltaGamma ? rotationPhiGamma(deltaPhi, deltaGamma)\n : rotationIdentity);\n}\n\nfunction forwardRotationLambda(deltaLambda) {\n return function(lambda, phi) {\n lambda += deltaLambda;\n if (abs(lambda) > pi) lambda -= Math.round(lambda / tau) * tau;\n return [lambda, phi];\n };\n}\n\nfunction rotationLambda(deltaLambda) {\n var rotation = forwardRotationLambda(deltaLambda);\n rotation.invert = forwardRotationLambda(-deltaLambda);\n return rotation;\n}\n\nfunction rotationPhiGamma(deltaPhi, deltaGamma) {\n var cosDeltaPhi = cos(deltaPhi),\n sinDeltaPhi = sin(deltaPhi),\n cosDeltaGamma = cos(deltaGamma),\n sinDeltaGamma = sin(deltaGamma);\n\n function rotation(lambda, phi) {\n var cosPhi = cos(phi),\n x = cos(lambda) * cosPhi,\n y = sin(lambda) * cosPhi,\n z = sin(phi),\n k = z * cosDeltaPhi + x * sinDeltaPhi;\n return [\n atan2(y * cosDeltaGamma - k * sinDeltaGamma, x * cosDeltaPhi - z * sinDeltaPhi),\n asin(k * cosDeltaGamma + y * sinDeltaGamma)\n ];\n }\n\n rotation.invert = function(lambda, phi) {\n var cosPhi = cos(phi),\n x = cos(lambda) * cosPhi,\n y = sin(lambda) * cosPhi,\n z = sin(phi),\n k = z * cosDeltaGamma - y * sinDeltaGamma;\n return [\n atan2(y * cosDeltaGamma + z * sinDeltaGamma, x * cosDeltaPhi + k * sinDeltaPhi),\n asin(k * cosDeltaPhi - x * sinDeltaPhi)\n ];\n };\n\n return rotation;\n}\n\nexport default function(rotate) {\n rotate = rotateRadians(rotate[0] * radians, rotate[1] * radians, rotate.length > 2 ? rotate[2] * radians : 0);\n\n function forward(coordinates) {\n coordinates = rotate(coordinates[0] * radians, coordinates[1] * radians);\n return coordinates[0] *= degrees, coordinates[1] *= degrees, coordinates;\n }\n\n forward.invert = function(coordinates) {\n coordinates = rotate.invert(coordinates[0] * radians, coordinates[1] * radians);\n return coordinates[0] *= degrees, coordinates[1] *= degrees, coordinates;\n };\n\n return forward;\n}\n","export default function(methods) {\n return {\n stream: transformer(methods)\n };\n}\n\nexport function transformer(methods) {\n return function(stream) {\n var s = new TransformStream;\n for (var key in methods) s[key] = methods[key];\n s.stream = stream;\n return s;\n };\n}\n\nfunction TransformStream() {}\n\nTransformStream.prototype = {\n constructor: TransformStream,\n point: function(x, y) { this.stream.point(x, y); },\n sphere: function() { this.stream.sphere(); },\n lineStart: function() { this.stream.lineStart(); },\n lineEnd: function() { this.stream.lineEnd(); },\n polygonStart: function() { this.stream.polygonStart(); },\n polygonEnd: function() { this.stream.polygonEnd(); }\n};\n","import noop from \"../noop.js\";\n\nvar x0 = Infinity,\n y0 = x0,\n x1 = -x0,\n y1 = x1;\n\nvar boundsStream = {\n point: boundsPoint,\n lineStart: noop,\n lineEnd: noop,\n polygonStart: noop,\n polygonEnd: noop,\n result: function() {\n var bounds = [[x0, y0], [x1, y1]];\n x1 = y1 = -(y0 = x0 = Infinity);\n return bounds;\n }\n};\n\nfunction boundsPoint(x, y) {\n if (x < x0) x0 = x;\n if (x > x1) x1 = x;\n if (y < y0) y0 = y;\n if (y > y1) y1 = y;\n}\n\nexport default boundsStream;\n","import {default as geoStream} from \"../stream.js\";\nimport boundsStream from \"../path/bounds.js\";\n\nfunction fit(projection, fitBounds, object) {\n var clip = projection.clipExtent && projection.clipExtent();\n projection.scale(150).translate([0, 0]);\n if (clip != null) projection.clipExtent(null);\n geoStream(object, projection.stream(boundsStream));\n fitBounds(boundsStream.result());\n if (clip != null) projection.clipExtent(clip);\n return projection;\n}\n\nexport function fitExtent(projection, extent, object) {\n return fit(projection, function(b) {\n var w = extent[1][0] - extent[0][0],\n h = extent[1][1] - extent[0][1],\n k = Math.min(w / (b[1][0] - b[0][0]), h / (b[1][1] - b[0][1])),\n x = +extent[0][0] + (w - k * (b[1][0] + b[0][0])) / 2,\n y = +extent[0][1] + (h - k * (b[1][1] + b[0][1])) / 2;\n projection.scale(150 * k).translate([x, y]);\n }, object);\n}\n\nexport function fitSize(projection, size, object) {\n return fitExtent(projection, [[0, 0], size], object);\n}\n\nexport function fitWidth(projection, width, object) {\n return fit(projection, function(b) {\n var w = +width,\n k = w / (b[1][0] - b[0][0]),\n x = (w - k * (b[1][0] + b[0][0])) / 2,\n y = -k * b[0][1];\n projection.scale(150 * k).translate([x, y]);\n }, object);\n}\n\nexport function fitHeight(projection, height, object) {\n return fit(projection, function(b) {\n var h = +height,\n k = h / (b[1][1] - b[0][1]),\n x = -k * b[0][0],\n y = (h - k * (b[1][1] + b[0][1])) / 2;\n projection.scale(150 * k).translate([x, y]);\n }, object);\n}\n","import {cartesian} from \"../cartesian.js\";\nimport {abs, asin, atan2, cos, epsilon, radians, sqrt} from \"../math.js\";\nimport {transformer} from \"../transform.js\";\n\nvar maxDepth = 16, // maximum depth of subdivision\n cosMinDistance = cos(30 * radians); // cos(minimum angular distance)\n\nexport default function(project, delta2) {\n return +delta2 ? resample(project, delta2) : resampleNone(project);\n}\n\nfunction resampleNone(project) {\n return transformer({\n point: function(x, y) {\n x = project(x, y);\n this.stream.point(x[0], x[1]);\n }\n });\n}\n\nfunction resample(project, delta2) {\n\n function resampleLineTo(x0, y0, lambda0, a0, b0, c0, x1, y1, lambda1, a1, b1, c1, depth, stream) {\n var dx = x1 - x0,\n dy = y1 - y0,\n d2 = dx * dx + dy * dy;\n if (d2 > 4 * delta2 && depth--) {\n var a = a0 + a1,\n b = b0 + b1,\n c = c0 + c1,\n m = sqrt(a * a + b * b + c * c),\n phi2 = asin(c /= m),\n lambda2 = abs(abs(c) - 1) < epsilon || abs(lambda0 - lambda1) < epsilon ? (lambda0 + lambda1) / 2 : atan2(b, a),\n p = project(lambda2, phi2),\n x2 = p[0],\n y2 = p[1],\n dx2 = x2 - x0,\n dy2 = y2 - y0,\n dz = dy * dx2 - dx * dy2;\n if (dz * dz / d2 > delta2 // perpendicular projected distance\n || abs((dx * dx2 + dy * dy2) / d2 - 0.5) > 0.3 // midpoint close to an end\n || a0 * a1 + b0 * b1 + c0 * c1 < cosMinDistance) { // angular distance\n resampleLineTo(x0, y0, lambda0, a0, b0, c0, x2, y2, lambda2, a /= m, b /= m, c, depth, stream);\n stream.point(x2, y2);\n resampleLineTo(x2, y2, lambda2, a, b, c, x1, y1, lambda1, a1, b1, c1, depth, stream);\n }\n }\n }\n return function(stream) {\n var lambda00, x00, y00, a00, b00, c00, // first point\n lambda0, x0, y0, a0, b0, c0; // previous point\n\n var resampleStream = {\n point: point,\n lineStart: lineStart,\n lineEnd: lineEnd,\n polygonStart: function() { stream.polygonStart(); resampleStream.lineStart = ringStart; },\n polygonEnd: function() { stream.polygonEnd(); resampleStream.lineStart = lineStart; }\n };\n\n function point(x, y) {\n x = project(x, y);\n stream.point(x[0], x[1]);\n }\n\n function lineStart() {\n x0 = NaN;\n resampleStream.point = linePoint;\n stream.lineStart();\n }\n\n function linePoint(lambda, phi) {\n var c = cartesian([lambda, phi]), p = project(lambda, phi);\n resampleLineTo(x0, y0, lambda0, a0, b0, c0, x0 = p[0], y0 = p[1], lambda0 = lambda, a0 = c[0], b0 = c[1], c0 = c[2], maxDepth, stream);\n stream.point(x0, y0);\n }\n\n function lineEnd() {\n resampleStream.point = point;\n stream.lineEnd();\n }\n\n function ringStart() {\n lineStart();\n resampleStream.point = ringPoint;\n resampleStream.lineEnd = ringEnd;\n }\n\n function ringPoint(lambda, phi) {\n linePoint(lambda00 = lambda, phi), x00 = x0, y00 = y0, a00 = a0, b00 = b0, c00 = c0;\n resampleStream.point = linePoint;\n }\n\n function ringEnd() {\n resampleLineTo(x0, y0, lambda0, a0, b0, c0, x00, y00, lambda00, a00, b00, c00, maxDepth, stream);\n resampleStream.lineEnd = lineEnd;\n lineEnd();\n }\n\n return resampleStream;\n };\n}\n","import clipAntimeridian from \"../clip/antimeridian.js\";\nimport clipCircle from \"../clip/circle.js\";\nimport clipRectangle from \"../clip/rectangle.js\";\nimport compose from \"../compose.js\";\nimport identity from \"../identity.js\";\nimport {cos, degrees, radians, sin, sqrt} from \"../math.js\";\nimport {rotateRadians} from \"../rotation.js\";\nimport {transformer} from \"../transform.js\";\nimport {fitExtent, fitSize, fitWidth, fitHeight} from \"./fit.js\";\nimport resample from \"./resample.js\";\n\nvar transformRadians = transformer({\n point: function(x, y) {\n this.stream.point(x * radians, y * radians);\n }\n});\n\nfunction transformRotate(rotate) {\n return transformer({\n point: function(x, y) {\n var r = rotate(x, y);\n return this.stream.point(r[0], r[1]);\n }\n });\n}\n\nfunction scaleTranslate(k, dx, dy, sx, sy) {\n function transform(x, y) {\n x *= sx; y *= sy;\n return [dx + k * x, dy - k * y];\n }\n transform.invert = function(x, y) {\n return [(x - dx) / k * sx, (dy - y) / k * sy];\n };\n return transform;\n}\n\nfunction scaleTranslateRotate(k, dx, dy, sx, sy, alpha) {\n if (!alpha) return scaleTranslate(k, dx, dy, sx, sy);\n var cosAlpha = cos(alpha),\n sinAlpha = sin(alpha),\n a = cosAlpha * k,\n b = sinAlpha * k,\n ai = cosAlpha / k,\n bi = sinAlpha / k,\n ci = (sinAlpha * dy - cosAlpha * dx) / k,\n fi = (sinAlpha * dx + cosAlpha * dy) / k;\n function transform(x, y) {\n x *= sx; y *= sy;\n return [a * x - b * y + dx, dy - b * x - a * y];\n }\n transform.invert = function(x, y) {\n return [sx * (ai * x - bi * y + ci), sy * (fi - bi * x - ai * y)];\n };\n return transform;\n}\n\nexport default function projection(project) {\n return projectionMutator(function() { return project; })();\n}\n\nexport function projectionMutator(projectAt) {\n var project,\n k = 150, // scale\n x = 480, y = 250, // translate\n lambda = 0, phi = 0, // center\n deltaLambda = 0, deltaPhi = 0, deltaGamma = 0, rotate, // pre-rotate\n alpha = 0, // post-rotate angle\n sx = 1, // reflectX\n sy = 1, // reflectX\n theta = null, preclip = clipAntimeridian, // pre-clip angle\n x0 = null, y0, x1, y1, postclip = identity, // post-clip extent\n delta2 = 0.5, // precision\n projectResample,\n projectTransform,\n projectRotateTransform,\n cache,\n cacheStream;\n\n function projection(point) {\n return projectRotateTransform(point[0] * radians, point[1] * radians);\n }\n\n function invert(point) {\n point = projectRotateTransform.invert(point[0], point[1]);\n return point && [point[0] * degrees, point[1] * degrees];\n }\n\n projection.stream = function(stream) {\n return cache && cacheStream === stream ? cache : cache = transformRadians(transformRotate(rotate)(preclip(projectResample(postclip(cacheStream = stream)))));\n };\n\n projection.preclip = function(_) {\n return arguments.length ? (preclip = _, theta = undefined, reset()) : preclip;\n };\n\n projection.postclip = function(_) {\n return arguments.length ? (postclip = _, x0 = y0 = x1 = y1 = null, reset()) : postclip;\n };\n\n projection.clipAngle = function(_) {\n return arguments.length ? (preclip = +_ ? clipCircle(theta = _ * radians) : (theta = null, clipAntimeridian), reset()) : theta * degrees;\n };\n\n projection.clipExtent = function(_) {\n return arguments.length ? (postclip = _ == null ? (x0 = y0 = x1 = y1 = null, identity) : clipRectangle(x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1]), reset()) : x0 == null ? null : [[x0, y0], [x1, y1]];\n };\n\n projection.scale = function(_) {\n return arguments.length ? (k = +_, recenter()) : k;\n };\n\n projection.translate = function(_) {\n return arguments.length ? (x = +_[0], y = +_[1], recenter()) : [x, y];\n };\n\n projection.center = function(_) {\n return arguments.length ? (lambda = _[0] % 360 * radians, phi = _[1] % 360 * radians, recenter()) : [lambda * degrees, phi * degrees];\n };\n\n projection.rotate = function(_) {\n return arguments.length ? (deltaLambda = _[0] % 360 * radians, deltaPhi = _[1] % 360 * radians, deltaGamma = _.length > 2 ? _[2] % 360 * radians : 0, recenter()) : [deltaLambda * degrees, deltaPhi * degrees, deltaGamma * degrees];\n };\n\n projection.angle = function(_) {\n return arguments.length ? (alpha = _ % 360 * radians, recenter()) : alpha * degrees;\n };\n\n projection.reflectX = function(_) {\n return arguments.length ? (sx = _ ? -1 : 1, recenter()) : sx < 0;\n };\n\n projection.reflectY = function(_) {\n return arguments.length ? (sy = _ ? -1 : 1, recenter()) : sy < 0;\n };\n\n projection.precision = function(_) {\n return arguments.length ? (projectResample = resample(projectTransform, delta2 = _ * _), reset()) : sqrt(delta2);\n };\n\n projection.fitExtent = function(extent, object) {\n return fitExtent(projection, extent, object);\n };\n\n projection.fitSize = function(size, object) {\n return fitSize(projection, size, object);\n };\n\n projection.fitWidth = function(width, object) {\n return fitWidth(projection, width, object);\n };\n\n projection.fitHeight = function(height, object) {\n return fitHeight(projection, height, object);\n };\n\n function recenter() {\n var center = scaleTranslateRotate(k, 0, 0, sx, sy, alpha).apply(null, project(lambda, phi)),\n transform = scaleTranslateRotate(k, x - center[0], y - center[1], sx, sy, alpha);\n rotate = rotateRadians(deltaLambda, deltaPhi, deltaGamma);\n projectTransform = compose(project, transform);\n projectRotateTransform = compose(rotate, projectTransform);\n projectResample = resample(projectTransform, delta2);\n return reset();\n }\n\n function reset() {\n cache = cacheStream = null;\n return projection;\n }\n\n return function() {\n project = projectAt.apply(this, arguments);\n projection.invert = project.invert && invert;\n return recenter();\n };\n}\n","import projection from \"./index.js\";\n\nexport function equirectangularRaw(lambda, phi) {\n return [lambda, phi];\n}\n\nequirectangularRaw.invert = equirectangularRaw;\n\nexport default function() {\n return projection(equirectangularRaw)\n .scale(152.63);\n}\n","import {Adder} from \"d3-array\";\nimport {abs} from \"../math.js\";\nimport noop from \"../noop.js\";\n\nvar areaSum = new Adder(),\n areaRingSum = new Adder(),\n x00,\n y00,\n x0,\n y0;\n\nvar areaStream = {\n point: noop,\n lineStart: noop,\n lineEnd: noop,\n polygonStart: function() {\n areaStream.lineStart = areaRingStart;\n areaStream.lineEnd = areaRingEnd;\n },\n polygonEnd: function() {\n areaStream.lineStart = areaStream.lineEnd = areaStream.point = noop;\n areaSum.add(abs(areaRingSum));\n areaRingSum = new Adder();\n },\n result: function() {\n var area = areaSum / 2;\n areaSum = new Adder();\n return area;\n }\n};\n\nfunction areaRingStart() {\n areaStream.point = areaPointFirst;\n}\n\nfunction areaPointFirst(x, y) {\n areaStream.point = areaPoint;\n x00 = x0 = x, y00 = y0 = y;\n}\n\nfunction areaPoint(x, y) {\n areaRingSum.add(y0 * x - x0 * y);\n x0 = x, y0 = y;\n}\n\nfunction areaRingEnd() {\n areaPoint(x00, y00);\n}\n\nexport default areaStream;\n","import {sqrt} from \"../math.js\";\n\n// TODO Enforce positive area for exterior, negative area for interior?\n\nvar X0 = 0,\n Y0 = 0,\n Z0 = 0,\n X1 = 0,\n Y1 = 0,\n Z1 = 0,\n X2 = 0,\n Y2 = 0,\n Z2 = 0,\n x00,\n y00,\n x0,\n y0;\n\nvar centroidStream = {\n point: centroidPoint,\n lineStart: centroidLineStart,\n lineEnd: centroidLineEnd,\n polygonStart: function() {\n centroidStream.lineStart = centroidRingStart;\n centroidStream.lineEnd = centroidRingEnd;\n },\n polygonEnd: function() {\n centroidStream.point = centroidPoint;\n centroidStream.lineStart = centroidLineStart;\n centroidStream.lineEnd = centroidLineEnd;\n },\n result: function() {\n var centroid = Z2 ? [X2 / Z2, Y2 / Z2]\n : Z1 ? [X1 / Z1, Y1 / Z1]\n : Z0 ? [X0 / Z0, Y0 / Z0]\n : [NaN, NaN];\n X0 = Y0 = Z0 =\n X1 = Y1 = Z1 =\n X2 = Y2 = Z2 = 0;\n return centroid;\n }\n};\n\nfunction centroidPoint(x, y) {\n X0 += x;\n Y0 += y;\n ++Z0;\n}\n\nfunction centroidLineStart() {\n centroidStream.point = centroidPointFirstLine;\n}\n\nfunction centroidPointFirstLine(x, y) {\n centroidStream.point = centroidPointLine;\n centroidPoint(x0 = x, y0 = y);\n}\n\nfunction centroidPointLine(x, y) {\n var dx = x - x0, dy = y - y0, z = sqrt(dx * dx + dy * dy);\n X1 += z * (x0 + x) / 2;\n Y1 += z * (y0 + y) / 2;\n Z1 += z;\n centroidPoint(x0 = x, y0 = y);\n}\n\nfunction centroidLineEnd() {\n centroidStream.point = centroidPoint;\n}\n\nfunction centroidRingStart() {\n centroidStream.point = centroidPointFirstRing;\n}\n\nfunction centroidRingEnd() {\n centroidPointRing(x00, y00);\n}\n\nfunction centroidPointFirstRing(x, y) {\n centroidStream.point = centroidPointRing;\n centroidPoint(x00 = x0 = x, y00 = y0 = y);\n}\n\nfunction centroidPointRing(x, y) {\n var dx = x - x0,\n dy = y - y0,\n z = sqrt(dx * dx + dy * dy);\n\n X1 += z * (x0 + x) / 2;\n Y1 += z * (y0 + y) / 2;\n Z1 += z;\n\n z = y0 * x - x0 * y;\n X2 += z * (x0 + x);\n Y2 += z * (y0 + y);\n Z2 += z * 3;\n centroidPoint(x0 = x, y0 = y);\n}\n\nexport default centroidStream;\n","import {tau} from \"../math.js\";\nimport noop from \"../noop.js\";\n\nexport default function PathContext(context) {\n this._context = context;\n}\n\nPathContext.prototype = {\n _radius: 4.5,\n pointRadius: function(_) {\n return this._radius = _, this;\n },\n polygonStart: function() {\n this._line = 0;\n },\n polygonEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line === 0) this._context.closePath();\n this._point = NaN;\n },\n point: function(x, y) {\n switch (this._point) {\n case 0: {\n this._context.moveTo(x, y);\n this._point = 1;\n break;\n }\n case 1: {\n this._context.lineTo(x, y);\n break;\n }\n default: {\n this._context.moveTo(x + this._radius, y);\n this._context.arc(x, y, this._radius, 0, tau);\n break;\n }\n }\n },\n result: noop\n};\n","import {Adder} from \"d3-array\";\nimport {sqrt} from \"../math.js\";\nimport noop from \"../noop.js\";\n\nvar lengthSum = new Adder(),\n lengthRing,\n x00,\n y00,\n x0,\n y0;\n\nvar lengthStream = {\n point: noop,\n lineStart: function() {\n lengthStream.point = lengthPointFirst;\n },\n lineEnd: function() {\n if (lengthRing) lengthPoint(x00, y00);\n lengthStream.point = noop;\n },\n polygonStart: function() {\n lengthRing = true;\n },\n polygonEnd: function() {\n lengthRing = null;\n },\n result: function() {\n var length = +lengthSum;\n lengthSum = new Adder();\n return length;\n }\n};\n\nfunction lengthPointFirst(x, y) {\n lengthStream.point = lengthPoint;\n x00 = x0 = x, y00 = y0 = y;\n}\n\nfunction lengthPoint(x, y) {\n x0 -= x, y0 -= y;\n lengthSum.add(sqrt(x0 * x0 + y0 * y0));\n x0 = x, y0 = y;\n}\n\nexport default lengthStream;\n","// Simple caching for constant-radius points.\nlet cacheDigits, cacheAppend, cacheRadius, cacheCircle;\n\nexport default class PathString {\n constructor(digits) {\n this._append = digits == null ? append : appendRound(digits);\n this._radius = 4.5;\n this._ = \"\";\n }\n pointRadius(_) {\n this._radius = +_;\n return this;\n }\n polygonStart() {\n this._line = 0;\n }\n polygonEnd() {\n this._line = NaN;\n }\n lineStart() {\n this._point = 0;\n }\n lineEnd() {\n if (this._line === 0) this._ += \"Z\";\n this._point = NaN;\n }\n point(x, y) {\n switch (this._point) {\n case 0: {\n this._append`M${x},${y}`;\n this._point = 1;\n break;\n }\n case 1: {\n this._append`L${x},${y}`;\n break;\n }\n default: {\n this._append`M${x},${y}`;\n if (this._radius !== cacheRadius || this._append !== cacheAppend) {\n const r = this._radius;\n const s = this._;\n this._ = \"\"; // stash the old string so we can cache the circle path fragment\n this._append`m0,${r}a${r},${r} 0 1,1 0,${-2 * r}a${r},${r} 0 1,1 0,${2 * r}z`;\n cacheRadius = r;\n cacheAppend = this._append;\n cacheCircle = this._;\n this._ = s;\n }\n this._ += cacheCircle;\n break;\n }\n }\n }\n result() {\n const result = this._;\n this._ = \"\";\n return result.length ? result : null;\n }\n}\n\nfunction append(strings) {\n let i = 1;\n this._ += strings[0];\n for (const j = strings.length; i < j; ++i) {\n this._ += arguments[i] + strings[i];\n }\n}\n\nfunction appendRound(digits) {\n const d = Math.floor(digits);\n if (!(d >= 0)) throw new RangeError(`invalid digits: ${digits}`);\n if (d > 15) return append;\n if (d !== cacheDigits) {\n const k = 10 ** d;\n cacheDigits = d;\n cacheAppend = function append(strings) {\n let i = 1;\n this._ += strings[0];\n for (const j = strings.length; i < j; ++i) {\n this._ += Math.round(arguments[i] * k) / k + strings[i];\n }\n };\n }\n return cacheAppend;\n}\n","import {Adder} from \"d3-array\";\nimport {abs, atan2, cos, radians, sin, sqrt} from \"./math.js\";\nimport noop from \"./noop.js\";\nimport stream from \"./stream.js\";\n\nvar lengthSum,\n lambda0,\n sinPhi0,\n cosPhi0;\n\nvar lengthStream = {\n sphere: noop,\n point: noop,\n lineStart: lengthLineStart,\n lineEnd: noop,\n polygonStart: noop,\n polygonEnd: noop\n};\n\nfunction lengthLineStart() {\n lengthStream.point = lengthPointFirst;\n lengthStream.lineEnd = lengthLineEnd;\n}\n\nfunction lengthLineEnd() {\n lengthStream.point = lengthStream.lineEnd = noop;\n}\n\nfunction lengthPointFirst(lambda, phi) {\n lambda *= radians, phi *= radians;\n lambda0 = lambda, sinPhi0 = sin(phi), cosPhi0 = cos(phi);\n lengthStream.point = lengthPoint;\n}\n\nfunction lengthPoint(lambda, phi) {\n lambda *= radians, phi *= radians;\n var sinPhi = sin(phi),\n cosPhi = cos(phi),\n delta = abs(lambda - lambda0),\n cosDelta = cos(delta),\n sinDelta = sin(delta),\n x = cosPhi * sinDelta,\n y = cosPhi0 * sinPhi - sinPhi0 * cosPhi * cosDelta,\n z = sinPhi0 * sinPhi + cosPhi0 * cosPhi * cosDelta;\n lengthSum.add(atan2(sqrt(x * x + y * y), z));\n lambda0 = lambda, sinPhi0 = sinPhi, cosPhi0 = cosPhi;\n}\n\nexport default function(object) {\n lengthSum = new Adder();\n stream(object, lengthStream);\n return +lengthSum;\n}\n","import length from \"./length.js\";\n\nvar coordinates = [null, null],\n object = {type: \"LineString\", coordinates: coordinates};\n\nexport default function(a, b) {\n coordinates[0] = a;\n coordinates[1] = b;\n return length(object);\n}\n","/**\r\n * This module contains funcitonality related to geographical projections\r\n */\r\nimport { registry } from \"../../../core/Registry\";\r\nimport * as $math from \"../../../core/utils/Math\";\r\nimport * as d3geo from \"d3-geo\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * This is a base class for a geographical projection.\r\n */\r\nvar Projection = /** @class */ (function () {\r\n function Projection() {\r\n this.d3Projection = d3geo.geoEquirectangular();\r\n }\r\n Object.defineProperty(Projection.prototype, \"d3Projection\", {\r\n /**\r\n * d3 projection\r\n */\r\n get: function () {\r\n return this._d3Projection;\r\n },\r\n /**\r\n * d3 projection\r\n */\r\n set: function (projection) {\r\n this._d3Projection = projection;\r\n projection.precision(0.1);\r\n this._d3Path = d3geo.geoPath().projection(projection);\r\n if (this.chart) {\r\n this.chart.invalidateProjection();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Projection.prototype, \"d3Path\", {\r\n /**\r\n * d3 path generator method\r\n * @ignore\r\n */\r\n get: function () {\r\n return this._d3Path;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Projection.prototype, \"scale\", {\r\n /**\r\n * @ignore\r\n */\r\n get: function () {\r\n return this.d3Projection.scale() / 100;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Converts a geographical point (lat/long) to a screen point (x/y)\r\n * @param geoPoint Geo point (lat/long)\r\n * @return Screen point (x/y)\r\n */\r\n Projection.prototype.convert = function (geoPoint) {\r\n /*\r\n geoPoint = $geo.normalizePoint(geoPoint);\r\n geoPoint = this.rotate(geoPoint, this.deltaLongitude, this.deltaLatitude, this.deltaGama);\r\n let pointInRadians: IPoint = this.project(geoPoint.longitude * $math.RADIANS, geoPoint.latitude * $math.RADIANS);\r\n return {\r\n x: $math.round(pointInRadians.x * $math.DEGREES - this.centerPoint.x, 4) * this.scale,\r\n y: $math.round(-pointInRadians.y * $math.DEGREES - this.centerPoint.y, 4) * this.scale\r\n };*/\r\n var p = this.d3Projection([geoPoint.longitude, geoPoint.latitude]);\r\n if (p) {\r\n return { x: p[0], y: p[1] };\r\n }\r\n };\r\n /**\r\n * Converts a screen point (x/y) to a geographical point (lat/long)\r\n * @param point Screen point (x/y)\r\n * @return Geo point (lat/long)\r\n */\r\n Projection.prototype.invert = function (point) {\r\n /*\r\n let pointInRadians: IGeoPoint = this.unproject((point.x / this.scale + this.centerPoint.x) * $math.RADIANS, (-point.y / this.scale - this.centerPoint.y) * $math.RADIANS);\r\n\r\n let geoPoint = { longitude: pointInRadians.longitude * $math.DEGREES, latitude: pointInRadians.latitude * $math.DEGREES };\r\n\r\n geoPoint = this.unrotate(geoPoint, this.deltaLongitude, this.deltaLatitude, this.deltaGama);\r\n */\r\n var p = this.d3Projection.invert([point.x, point.y]);\r\n if (p) {\r\n return { longitude: p[0], latitude: p[1] };\r\n }\r\n };\r\n /**\r\n * Returns X/Y coordinates.\r\n * Individual projections will override this method to apply their own\r\n * projection logic.\r\n * @deprecated\r\n * @param lambda [description]\r\n * @param phi [description]\r\n * @return X/Y coordinates\r\n * @todo Needs description\r\n */\r\n Projection.prototype.project = function (lambda, phi) {\r\n return this.convert({ longitude: lambda * $math.DEGREES, latitude: phi * $math.DEGREES });\r\n };\r\n /**\r\n * Returns geographical coordinates (lat/long).\r\n * Individual projections will override this method to apply their own\r\n * projection logic.\r\n * @deprecated\r\n * @param x X coordinate\r\n * @param y Y coordinate\r\n * @return Geographical point\r\n * @todo Needs description\r\n */\r\n Projection.prototype.unproject = function (x, y) {\r\n return this.invert({ x: x, y: y });\r\n };\r\n /**\r\n * @ignore\r\n * @deprecated\r\n */\r\n Projection.prototype.rotate = function (geoPoint, deltaLongitude, deltaLatitude, deltaGamma) {\r\n var deltaLambda = deltaLongitude * $math.RADIANS;\r\n var deltaPhi = deltaLatitude * $math.RADIANS;\r\n deltaGamma = deltaGamma * $math.RADIANS;\r\n var lambda = geoPoint.longitude * $math.RADIANS + deltaLambda;\r\n var phi = geoPoint.latitude * $math.RADIANS;\r\n var cosDeltaPhi = Math.cos(deltaPhi);\r\n var sinDeltaPhi = Math.sin(deltaPhi);\r\n var cosDeltaGamma = Math.cos(deltaGamma);\r\n var sinDeltaGamma = Math.sin(deltaGamma);\r\n var cosPhi = Math.cos(phi);\r\n var x = Math.cos(lambda) * cosPhi;\r\n var y = Math.sin(lambda) * cosPhi;\r\n var z = Math.sin(phi);\r\n var k = z * cosDeltaPhi + x * sinDeltaPhi;\r\n return { longitude: $math.DEGREES * Math.atan2(y * cosDeltaGamma - k * sinDeltaGamma, x * cosDeltaPhi - z * sinDeltaPhi), latitude: $math.DEGREES * Math.asin(k * cosDeltaGamma + y * sinDeltaGamma) };\r\n };\r\n /**\r\n * @ignore\r\n * @deprecated\r\n */\r\n Projection.prototype.unrotate = function (geoPoint, deltaLongitude, deltaLatitude, deltaGamma) {\r\n var deltaLambda = deltaLongitude * $math.RADIANS;\r\n var deltaPhi = deltaLatitude * $math.RADIANS;\r\n deltaGamma = deltaGamma * $math.RADIANS;\r\n var lambda = geoPoint.longitude * $math.RADIANS - deltaLambda;\r\n var phi = geoPoint.latitude * $math.RADIANS;\r\n var cosDeltaPhi = Math.cos(deltaPhi);\r\n var sinDeltaPhi = Math.sin(deltaPhi);\r\n var cosDeltaGamma = Math.cos(deltaGamma);\r\n var sinDeltaGamma = Math.sin(deltaGamma);\r\n var cosPhi = Math.cos(phi);\r\n var x = Math.cos(lambda) * cosPhi;\r\n var y = Math.sin(lambda) * cosPhi;\r\n var z = Math.sin(phi);\r\n var k = z * cosDeltaGamma - y * sinDeltaGamma;\r\n return { longitude: $math.DEGREES * Math.atan2(y * cosDeltaGamma + z * sinDeltaGamma, x * cosDeltaPhi + k * sinDeltaPhi), latitude: $math.DEGREES * Math.asin(k * cosDeltaPhi - x * sinDeltaPhi) };\r\n };\r\n //@todo: move to some utils?\r\n //@todo: add credits to: https://www.movable-type.co.uk/scripts/latlong.html\r\n Projection.prototype.intermediatePoint = function (pointA, pointB, position) {\r\n var p = d3geo.geoInterpolate([pointA.longitude, pointA.latitude], [pointB.longitude, pointB.latitude])(position);\r\n return { longitude: p[0], latitude: p[1] };\r\n };\r\n ;\r\n // returns radians\r\n Projection.prototype.multiDistance = function (multiGeoLine) {\r\n var distance = 0;\r\n for (var s = 0; s < multiGeoLine.length; s++) {\r\n var points = multiGeoLine[s];\r\n if (points.length > 1) {\r\n for (var p = 1; p < points.length; p++) {\r\n var pointA = points[p - 1];\r\n var pointB = points[p];\r\n distance += this.distance(pointA, pointB);\r\n }\r\n }\r\n }\r\n return distance;\r\n };\r\n // returns radians\r\n Projection.prototype.distance = function (pointA, pointB) {\r\n return d3geo.geoDistance([pointA.longitude, pointA.latitude], [pointB.longitude, pointB.latitude]);\r\n };\r\n /**\r\n * Converts relative position along the line (0-1) into pixel coordinates.\r\n *\r\n * @param position Position (0-1)\r\n * @return Coordinates\r\n */\r\n Projection.prototype.positionToPoint = function (multiGeoLine, position) {\r\n if (multiGeoLine) {\r\n var intermediatePoint = this.positionToGeoPoint(multiGeoLine, position);\r\n var intermediatePointA = this.positionToGeoPoint(multiGeoLine, position - 0.01);\r\n var intermediatePointB = this.positionToGeoPoint(multiGeoLine, position + 0.01);\r\n if (intermediatePointA && intermediatePointB) {\r\n var point = this.convert(intermediatePoint);\r\n var pa = this.convert(intermediatePointA);\r\n var pb = this.convert(intermediatePointB);\r\n return { x: point.x, y: point.y, angle: $math.getAngle(pa, pb) };\r\n }\r\n }\r\n return { x: 0, y: 0, angle: 0 };\r\n };\r\n /**\r\n * Converts relative position along the line (0-1) into pixel coordinates.\r\n *\r\n * @param position Position (0-1)\r\n * @return Coordinates\r\n */\r\n Projection.prototype.positionToGeoPoint = function (multiGeoLine, position) {\r\n if (multiGeoLine) {\r\n var totalDistance = this.multiDistance(multiGeoLine);\r\n var currentDistance = 0;\r\n var distanceAB = void 0;\r\n var positionA = 0;\r\n var positionB = 0;\r\n var pointA = void 0;\r\n var pointB = void 0;\r\n for (var s = 0; s < multiGeoLine.length; s++) {\r\n var points = multiGeoLine[s];\r\n if (points.length > 1) {\r\n for (var p = 1; p < points.length; p++) {\r\n pointA = points[p - 1];\r\n pointB = points[p];\r\n positionA = currentDistance / totalDistance;\r\n distanceAB = this.distance(pointA, pointB);\r\n currentDistance += distanceAB;\r\n positionB = currentDistance / totalDistance;\r\n if (positionA <= position && positionB > position) {\r\n s = multiGeoLine.length;\r\n break;\r\n }\r\n }\r\n }\r\n else if (points.length == 1) {\r\n pointA = points[0];\r\n pointB = points[0];\r\n positionA = 0;\r\n positionB = 1;\r\n }\r\n }\r\n if (pointA && pointB) {\r\n var positionAB = (position - positionA) / (positionB - positionA);\r\n return this.intermediatePoint(pointA, pointB, positionAB);\r\n }\r\n }\r\n return { longitude: 0, latitude: 0 };\r\n };\r\n return Projection;\r\n}());\r\nexport { Projection };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"Projection\"] = Projection;\r\n","import identity from \"../identity.js\";\nimport stream from \"../stream.js\";\nimport pathArea from \"./area.js\";\nimport pathBounds from \"./bounds.js\";\nimport pathCentroid from \"./centroid.js\";\nimport PathContext from \"./context.js\";\nimport pathMeasure from \"./measure.js\";\nimport PathString from \"./string.js\";\n\nexport default function(projection, context) {\n let digits = 3,\n pointRadius = 4.5,\n projectionStream,\n contextStream;\n\n function path(object) {\n if (object) {\n if (typeof pointRadius === \"function\") contextStream.pointRadius(+pointRadius.apply(this, arguments));\n stream(object, projectionStream(contextStream));\n }\n return contextStream.result();\n }\n\n path.area = function(object) {\n stream(object, projectionStream(pathArea));\n return pathArea.result();\n };\n\n path.measure = function(object) {\n stream(object, projectionStream(pathMeasure));\n return pathMeasure.result();\n };\n\n path.bounds = function(object) {\n stream(object, projectionStream(pathBounds));\n return pathBounds.result();\n };\n\n path.centroid = function(object) {\n stream(object, projectionStream(pathCentroid));\n return pathCentroid.result();\n };\n\n path.projection = function(_) {\n if (!arguments.length) return projection;\n projectionStream = _ == null ? (projection = null, identity) : (projection = _).stream;\n return path;\n };\n\n path.context = function(_) {\n if (!arguments.length) return context;\n contextStream = _ == null ? (context = null, new PathString(digits)) : new PathContext(context = _);\n if (typeof pointRadius !== \"function\") contextStream.pointRadius(pointRadius);\n return path;\n };\n\n path.pointRadius = function(_) {\n if (!arguments.length) return pointRadius;\n pointRadius = typeof _ === \"function\" ? _ : (contextStream.pointRadius(+_), +_);\n return path;\n };\n\n path.digits = function(_) {\n if (!arguments.length) return digits;\n if (_ == null) digits = null;\n else {\n const d = Math.floor(_);\n if (!(d >= 0)) throw new RangeError(`invalid digits: ${_}`);\n digits = d;\n }\n if (context === null) contextStream = new PathString(digits);\n return path;\n };\n\n return path.projection(projection).digits(digits).context(context);\n}\n","import {asin, atan2, cos, degrees, haversin, radians, sin, sqrt} from \"./math.js\";\n\nexport default function(a, b) {\n var x0 = a[0] * radians,\n y0 = a[1] * radians,\n x1 = b[0] * radians,\n y1 = b[1] * radians,\n cy0 = cos(y0),\n sy0 = sin(y0),\n cy1 = cos(y1),\n sy1 = sin(y1),\n kx0 = cy0 * cos(x0),\n ky0 = cy0 * sin(x0),\n kx1 = cy1 * cos(x1),\n ky1 = cy1 * sin(x1),\n d = 2 * asin(sqrt(haversin(y1 - y0) + cy0 * cy1 * haversin(x1 - x0))),\n k = sin(d);\n\n var interpolate = d ? function(t) {\n var B = sin(t *= d) / k,\n A = sin(d - t) / k,\n x = A * kx0 + B * kx1,\n y = A * ky0 + B * ky1,\n z = A * sy0 + B * sy1;\n return [\n atan2(y, x) * degrees,\n atan2(z, sqrt(x * x + y * y)) * degrees\n ];\n } : function() {\n return [x0 * degrees, y0 * degrees];\n };\n\n interpolate.distance = d;\n\n return interpolate;\n}\n","/**\r\n * A module for the mini-map control.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Container } from \"../../core/Container\";\r\nimport { Rectangle } from \"../../core/elements/Rectangle\";\r\nimport { List } from \"../../core/utils/List\";\r\nimport { MutableValueDisposer, MultiDisposer } from \"../../core/utils/Disposer\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport { color } from \"../../core/utils/Color\";\r\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\r\nimport * as $utils from \"../../core/utils/Utils\";\r\nimport * as $type from \"../../core/utils/Type\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Creates a \"bird's eye\" view of the whole map.\r\n *\r\n * This control creates a mini-map with the whole of the map, highlighting\r\n * the area which is in the current viewport of the map map.\r\n *\r\n * @see {@link ISmallMapEvents} for a list of available events\r\n * @see {@link ISmallMapAdapters} for a list of available Adapters\r\n * @important\r\n */\r\nvar SmallMap = /** @class */ (function (_super) {\r\n __extends(SmallMap, _super);\r\n /**\r\n * Constructor\r\n */\r\n function SmallMap() {\r\n var _this = \r\n // Init\r\n _super.call(this) || this;\r\n /**\r\n * A target map.\r\n */\r\n _this._chart = new MutableValueDisposer();\r\n _this.className = \"SmallMap\";\r\n // Set defaults\r\n _this.align = \"left\";\r\n _this.valign = \"bottom\";\r\n _this.percentHeight = 20;\r\n _this.percentWidth = 20;\r\n _this.margin(5, 5, 5, 5);\r\n var interfaceColors = new InterfaceColorSet();\r\n // Set background defailts\r\n _this.background.fillOpacity = 0.9;\r\n _this.background.fill = interfaceColors.getFor(\"background\");\r\n // Set up events\r\n _this.events.on(\"hit\", _this.moveToPosition, _this, false);\r\n _this.events.on(\"maxsizechanged\", _this.updateMapSize, _this, false);\r\n // Create a container\r\n _this.seriesContainer = _this.createChild(Container);\r\n _this.seriesContainer.shouldClone = false;\r\n // Create an outline rectangle\r\n var rectangle = _this.createChild(Rectangle);\r\n rectangle.shouldClone = false;\r\n rectangle.stroke = interfaceColors.getFor(\"alternativeBackground\");\r\n rectangle.strokeWidth = 1;\r\n rectangle.strokeOpacity = 0.5;\r\n rectangle.fill = color(); //\"none\";\r\n rectangle.verticalCenter = \"middle\";\r\n rectangle.horizontalCenter = \"middle\";\r\n rectangle.isMeasured = false;\r\n rectangle.visible = false;\r\n _this.rectangle = rectangle;\r\n _this._disposers.push(_this._chart);\r\n // Apply theme\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n Object.defineProperty(SmallMap.prototype, \"series\", {\r\n /**\r\n * A list of map series used to draw the mini-map.\r\n *\r\n * @readonly\r\n * @return Series\r\n */\r\n get: function () {\r\n if (!this._series) {\r\n this._series = new List();\r\n this._series.events.on(\"inserted\", this.handleSeriesAdded, this, false);\r\n this._series.events.on(\"removed\", this.handleSeriesRemoved, this, false);\r\n }\r\n return this._series;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Decorates a new series when they are pushed into a `series` list.\r\n *\r\n * @param event Event\r\n */\r\n SmallMap.prototype.handleSeriesAdded = function (event) {\r\n var series = event.newValue;\r\n if (this.chart.series.contains(series)) {\r\n var newSeries = series.clone();\r\n this._series.removeValue(series);\r\n this._series.push(newSeries);\r\n series = newSeries;\r\n this.chart.dataUsers.push(newSeries);\r\n }\r\n series.chart = this.chart;\r\n series.parent = this.seriesContainer;\r\n series.interactionsEnabled = false;\r\n series.events.on(\"inited\", this.updateMapSize, this, false);\r\n series.hidden = false;\r\n };\r\n /**\r\n * Cleans up after series are removed from Scrollbar.\r\n *\r\n * @param event Event\r\n */\r\n SmallMap.prototype.handleSeriesRemoved = function (event) {\r\n //let sourceSeries: MapSeries = event.oldValue;\r\n this.invalidate();\r\n };\r\n /**\r\n * Moves main map pan position after click on the small map.\r\n *\r\n * @ignore Exclude from docs\r\n * @param event Event\r\n */\r\n SmallMap.prototype.moveToPosition = function (event) {\r\n var rectPoint = $utils.spritePointToSprite(event.spritePoint, this, this.seriesContainer);\r\n var geoPoint = this.chart.seriesPointToGeo(rectPoint);\r\n this.chart.zoomToGeoPoint(geoPoint, this.chart.zoomLevel, true);\r\n };\r\n Object.defineProperty(SmallMap.prototype, \"chart\", {\r\n /**\r\n * @return Chart/map\r\n */\r\n get: function () {\r\n return this._chart.get();\r\n },\r\n /**\r\n * A chart/map that this control is meant for.\r\n *\r\n * @param chart Chart/map\r\n */\r\n set: function (chart) {\r\n if (this.chart != chart) {\r\n this._chart.set(chart, new MultiDisposer([\r\n //chart.events.on(\"zoomlevelchanged\", this.updateRectangle, this, false),\r\n chart.events.on(\"mappositionchanged\", this.updateRectangle, this, false),\r\n chart.events.on(\"scaleratiochanged\", this.updateMapSize, this, false)\r\n ]));\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Updates the viewport recangle as per current map zoom/pan position.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n SmallMap.prototype.updateRectangle = function () {\r\n var chart = this.chart;\r\n var zoomLevel = chart.zoomLevel;\r\n var rectangle = this.rectangle;\r\n rectangle.width = this.pixelWidth / zoomLevel;\r\n rectangle.height = this.pixelHeight / zoomLevel;\r\n var scale = Math.min(this.percentWidth, this.percentHeight) / 100;\r\n var seriesContainer = chart.seriesContainer;\r\n rectangle.x = Math.ceil((-seriesContainer.pixelX) * scale / zoomLevel) + this.seriesContainer.pixelX;\r\n rectangle.y = Math.ceil((-seriesContainer.pixelY) * scale / zoomLevel) + this.seriesContainer.pixelY;\r\n rectangle.validate();\r\n };\r\n /**\r\n * Update map size so that internal elements can redraw themselves after\r\n * the size of the small map changes.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n SmallMap.prototype.updateMapSize = function () {\r\n if (this.chart) {\r\n var scale = this.chart.scaleRatio * Math.min(this.percentWidth, this.percentHeight) / 100;\r\n this.seriesContainer.scale = scale;\r\n var bbox = {\r\n width: 0,\r\n height: 0,\r\n x: 0,\r\n y: 0\r\n };\r\n try { // Add exception catching to tame FF\r\n bbox = this.seriesContainer.group.node.getBBox();\r\n }\r\n catch (err) { }\r\n if (bbox.width > 0) {\r\n this.rectangle.visible = true;\r\n }\r\n this.seriesContainer.x = this.pixelWidth / 2 - bbox.x * scale - bbox.width / 2 * scale;\r\n this.seriesContainer.y = this.pixelHeight / 2 - bbox.y * scale - bbox.height / 2 * scale;\r\n this.updateRectangle();\r\n this.afterDraw();\r\n }\r\n };\r\n /**\r\n * Update elements after drawing the small map.\r\n */\r\n SmallMap.prototype.afterDraw = function () {\r\n _super.prototype.afterDraw.call(this);\r\n //this.seriesContainer.moveTo({ x: this.pixelWidth / 2, y: this.pixelHeight / 2 });\r\n this.rectangle.maskRectangle = { x: -1, y: -1, width: Math.ceil(this.pixelWidth + 2), height: Math.ceil(this.pixelHeight + 2) };\r\n };\r\n /**\r\n * Processes JSON-based config before it is applied to the object.\r\n *\r\n * @ignore Exclude from docs\r\n * @param config Config\r\n */\r\n SmallMap.prototype.processConfig = function (config) {\r\n if (config) {\r\n // Set up series\r\n if ($type.hasValue(config.series) && $type.isArray(config.series)) {\r\n for (var i = 0, len = config.series.length; i < len; i++) {\r\n var series = config.series[i];\r\n if ($type.hasValue(series) && $type.isString(series) && this.map.hasKey(series)) {\r\n config.series[i] = this.map.getKey(series);\r\n }\r\n }\r\n }\r\n }\r\n _super.prototype.processConfig.call(this, config);\r\n };\r\n return SmallMap;\r\n}(Container));\r\nexport { SmallMap };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"SmallMap\"] = SmallMap;\r\n","/**\r\n * A collection of GeoJSON format-related utility functions.\r\n */\r\nimport * as $math from \"../../core/utils/Math\";\r\nimport * as $array from \"../../core/utils/Array\";\r\n/**\r\n * Normalizes a geo-point.\r\n *\r\n * @ignore Exclude from docs\r\n * @param geoPoint Source geo-point\r\n * @return Normalized geo-point\r\n */\r\nexport function normalizePoint(geoPoint) {\r\n var longitude = wrapAngleTo180(geoPoint.longitude);\r\n var latitude = Math.asin(Math.sin((geoPoint.latitude * $math.RADIANS))) * $math.DEGREES;\r\n var latitude180 = wrapAngleTo180(geoPoint.latitude);\r\n if (Math.abs(latitude180) > 90) {\r\n longitude = wrapAngleTo180(longitude + 180);\r\n }\r\n geoPoint.longitude = longitude;\r\n geoPoint.latitude = latitude;\r\n return geoPoint;\r\n}\r\n/**\r\n * Normalizes all points of a geo-line.\r\n *\r\n * @ignore Exclude from docs\r\n * @param multiline Source geo-line\r\n * @return Normalized geo-line\r\n */\r\nexport function normalizeMultiline(multiline) {\r\n $array.each(multiline, function (segment) {\r\n $array.each(segment, function (point) {\r\n normalizePoint(point);\r\n });\r\n });\r\n return multiline;\r\n}\r\n/**\r\n * [wrapAngleTo180 description]\r\n *\r\n * @todo Description\r\n * @ignore Exclude from docs\r\n * @param angle Angle\r\n * @return Angle\r\n */\r\nexport function wrapAngleTo180(angle) {\r\n angle = angle % 360;\r\n if (angle > 180) {\r\n angle -= 360;\r\n }\r\n if (angle < -180) {\r\n angle += 360;\r\n }\r\n return angle;\r\n}\r\n/**\r\n * Converts a geo point to a regular point object.\r\n *\r\n * @ignore Exclude from docs\r\n * @param geoPoint Source geo point\r\n * @return Point\r\n */\r\nexport function geoToPoint(geoPoint) {\r\n return { x: geoPoint.longitude, y: geoPoint.latitude };\r\n}\r\n","/**\r\n * Map line module\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Container } from \"../../core/Container\";\r\nimport { registry } from \"../../core/Registry\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Draws a line on the map.\r\n *\r\n * @see {@link IMapLineObjectEvents} for a list of available events\r\n * @see {@link IMapLineObjectAdapters} for a list of available Adapters\r\n */\r\nvar MapLineObject = /** @class */ (function (_super) {\r\n __extends(MapLineObject, _super);\r\n /**\r\n * Constructor\r\n */\r\n function MapLineObject() {\r\n var _this = _super.call(this) || this;\r\n _this.adjustRotation = true;\r\n _this.className = \"MapLineObject\";\r\n _this.isMeasured = false;\r\n _this.layout = \"none\";\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * (Re)validates element's position.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n MapLineObject.prototype.validatePosition = function () {\r\n var mapLine = this.mapLine;\r\n if (mapLine) {\r\n var point = mapLine.positionToPoint(this.position);\r\n this.x = point.x;\r\n this.y = point.y;\r\n if (this.adjustRotation) {\r\n this.rotation = point.angle;\r\n }\r\n var dataItem = this.mapLine.dataItem;\r\n if (dataItem) {\r\n var series = this.mapLine.dataItem.component;\r\n this.scale = 1 / series.scale;\r\n }\r\n // hide out of bounds\r\n if (mapLine.shortestDistance) {\r\n var projection = this.mapLine.series.chart.projection;\r\n var geoPoint = projection.positionToGeoPoint(mapLine.multiGeoLine, this.position);\r\n var visible = projection.d3Path({ type: 'Point', coordinates: [geoPoint.longitude, geoPoint.latitude] });\r\n if (!visible) {\r\n this.__disabled = true;\r\n }\r\n else {\r\n this.__disabled = false;\r\n }\r\n }\r\n }\r\n _super.prototype.validatePosition.call(this);\r\n };\r\n Object.defineProperty(MapLineObject.prototype, \"position\", {\r\n /**\r\n * @return Position within the line\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"position\");\r\n },\r\n /**\r\n * Sets object's relative position (0-1) within the line.\r\n *\r\n * `0` will place the object at the beginning of the line. `1` - at the end.\r\n *\r\n * Any intermediate number will place the object at some point within the\r\n * line.\r\n *\r\n * @param value Position within the line (0-1)\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"position\", value, false, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapLineObject.prototype, \"adjustRotation\", {\r\n /**\r\n * @return Auto-rotate\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"adjustRotation\");\r\n },\r\n /**\r\n * If set to `true`, the object will be automatically rotated to face the\r\n * direction of the line at the specific position.\r\n *\r\n * This allows creating images that has its \"front\" always facing the logical\r\n * direction of the line.\r\n *\r\n * @default false\r\n * @param value Auto-rotate\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"adjustRotation\", value, false, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return MapLineObject;\r\n}(Container));\r\nexport { MapLineObject };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"MapLineObject\"] = MapLineObject;\r\n","/**\r\n * Map image series module\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { MapSeries, MapSeriesDataItem } from \"./MapSeries\";\r\nimport { MapImage } from \"./MapImage\";\r\nimport { ListTemplate, ListDisposer } from \"../../core/utils/List\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport * as $array from \"../../core/utils/Array\";\r\nimport * as $mapUtils from \"./MapUtils\";\r\nimport * as $utils from \"../../core/utils/Utils\";\r\nimport * as $iter from \"../../core/utils/Iterator\";\r\nimport * as $type from \"../../core/utils/Type\";\r\nimport { Disposer } from \"../../core/utils/Disposer\";\r\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Defines a [[DataItem]] for [[MapImageSeries]]\r\n * @see {@link DataItem}\r\n */\r\nvar MapImageSeriesDataItem = /** @class */ (function (_super) {\r\n __extends(MapImageSeriesDataItem, _super);\r\n /**\r\n * Constructor\r\n */\r\n function MapImageSeriesDataItem() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"MapImageSeriesDataItem\";\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * @ignore\r\n */\r\n MapImageSeriesDataItem.prototype.getFeature = function () {\r\n return { \"type\": \"Feature\", geometry: { type: \"Point\", coordinates: this.point } };\r\n };\r\n Object.defineProperty(MapImageSeriesDataItem.prototype, \"mapImage\", {\r\n /**\r\n * A [[MapImage]] element related to this data item.\r\n *\r\n * @return Element\r\n */\r\n get: function () {\r\n var _this = this;\r\n if (!this._mapImage) {\r\n var mapImage_1 = this.component.mapImages.create();\r\n this.addSprite(mapImage_1);\r\n this._mapImage = mapImage_1;\r\n this._disposers.push(mapImage_1);\r\n this._disposers.push(new Disposer(function () {\r\n if (_this.component) {\r\n _this.component.mapImages.removeValue(mapImage_1);\r\n }\r\n }));\r\n this.mapObject = mapImage_1;\r\n }\r\n return this._mapImage;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapImageSeriesDataItem.prototype, \"point\", {\r\n /**\r\n * @return [description]\r\n */\r\n get: function () {\r\n return this._point;\r\n },\r\n /**\r\n * [point description]\r\n *\r\n * @todo Description\r\n * @param point [description]\r\n */\r\n set: function (point) {\r\n this._point = point;\r\n this._geoPoint = $mapUtils.pointToGeo(point);\r\n this.updateExtremes();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapImageSeriesDataItem.prototype, \"multiPoint\", {\r\n /**\r\n * @return [description]\r\n */\r\n get: function () {\r\n return [this._point];\r\n },\r\n /**\r\n * [point description]\r\n *\r\n * @todo Description\r\n * @param point [description]\r\n */\r\n set: function (multiPoint) {\r\n this._point = multiPoint[0];\r\n this._geoPoint = $mapUtils.pointToGeo(this._point);\r\n this.updateExtremes();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapImageSeriesDataItem.prototype, \"geoPoint\", {\r\n /**\r\n * @return Image coordinates\r\n */\r\n get: function () {\r\n return this._geoPoint;\r\n },\r\n /**\r\n * Geographical coordinates (lat/long) image is placed at.\r\n *\r\n * @param geoPoint Image coordinates\r\n */\r\n set: function (geoPoint) {\r\n this._geoPoint = geoPoint;\r\n this.point = [geoPoint.longitude, geoPoint.latitude];\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return MapImageSeriesDataItem;\r\n}(MapSeriesDataItem));\r\nexport { MapImageSeriesDataItem };\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * A series of map image (marker) elements.\r\n *\r\n * @see {@link IMapImageSeriesEvents} for a list of available Events\r\n * @see {@link IMapImageSeriesAdapters} for a list of available Adapters\r\n * @important\r\n */\r\nvar MapImageSeries = /** @class */ (function (_super) {\r\n __extends(MapImageSeries, _super);\r\n /**\r\n * Constructor\r\n */\r\n function MapImageSeries() {\r\n var _this = \r\n // Init\r\n _super.call(this) || this;\r\n _this.className = \"MapImageSeries\";\r\n // Set data fields\r\n _this.dataFields.multiPoint = \"multiPoint\";\r\n _this.dataFields.point = \"point\";\r\n _this.dataFields.geoPoint = \"geoPoint\";\r\n _this.dataFields.multiGeoPoint = \"multiGeoPoint\";\r\n _this.ignoreBounds = true;\r\n // Apply theme\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * Returns a new/empty DataItem of the type appropriate for this object.\r\n *\r\n * @see {@link DataItem}\r\n * @return Data Item\r\n */\r\n MapImageSeries.prototype.createDataItem = function () {\r\n return new MapImageSeriesDataItem();\r\n };\r\n /**\r\n * (Re)validates the data of the sries, effectively forcing it to redraw\r\n * all of its elements.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n MapImageSeries.prototype.validateData = function () {\r\n var _this = this;\r\n if (this.data.length > 0 && this._parseDataFrom == 0) {\r\n this.mapImages.clear();\r\n }\r\n // process geoJSON and created map objects\r\n if (this.useGeodata) {\r\n if (this.useGeodata || this.geodata) {\r\n var geoJSON = this.chart.geodata;\r\n var features = void 0;\r\n if (geoJSON.type == \"FeatureCollection\") {\r\n features = geoJSON.features;\r\n }\r\n else if (geoJSON.type == \"Feature\") {\r\n features = [geoJSON];\r\n }\r\n else if ([\"Point\", \"LineString\", \"Polygon\", \"MultiPoint\", \"MultiLineString\", \"MultiPolygon\"].indexOf(geoJSON.type) != -1) {\r\n features = [{ geometry: geoJSON }];\r\n }\r\n else {\r\n console.log(\"nothing found in geoJSON\");\r\n }\r\n if (features) {\r\n var _loop_1 = function (i, len) {\r\n var feature = features[i];\r\n var geometry = feature.geometry;\r\n if (geometry) {\r\n var type = geometry.type;\r\n var id_1 = feature.id;\r\n if (type == \"Point\" || type == \"MultiPoint\") { // todo: we don't support multipoints at the moment actually\r\n if (!this_1.checkInclude(this_1.include, this_1.exclude, id_1)) {\r\n return \"continue\";\r\n }\r\n var coordinates = geometry.coordinates;\r\n // make the same as MultiPoint\r\n if (type == \"Point\") {\r\n coordinates = [coordinates];\r\n }\r\n var dataObject = $array.find(this_1.data, function (value, i) {\r\n return value.id == id_1;\r\n });\r\n if (!dataObject) {\r\n dataObject = { multiPoint: coordinates, id: id_1, madeFromGeoData: true };\r\n this_1.data.push(dataObject);\r\n }\r\n else {\r\n if (!dataObject.multiPoint) {\r\n dataObject.multiPoint = coordinates;\r\n }\r\n }\r\n // copy properties data to datacontext\r\n $utils.softCopyProperties(feature.properties, dataObject);\r\n }\r\n }\r\n };\r\n var this_1 = this;\r\n for (var i = 0, len = features.length; i < len; i++) {\r\n _loop_1(i, len);\r\n }\r\n }\r\n }\r\n }\r\n _super.prototype.validateData.call(this);\r\n // important! this should go after super.validateData\r\n // if data is parsed in chunks, images list is corrupted, fix it here\r\n $iter.each(this.dataItems.iterator(), function (dataItem) {\r\n var mapImage = dataItem.mapImage;\r\n if (!mapImage.isDisposed()) {\r\n _this.mapImages.moveValue(mapImage);\r\n if ($type.isNumber(mapImage.latitude) && $type.isNumber(mapImage.latitude)) {\r\n dataItem.geoPoint = { latitude: mapImage.latitude, longitude: mapImage.longitude };\r\n }\r\n }\r\n });\r\n };\r\n Object.defineProperty(MapImageSeries.prototype, \"mapImages\", {\r\n /**\r\n * A list of map images in the series.\r\n *\r\n * @return Map images\r\n */\r\n get: function () {\r\n if (!this._mapImages) {\r\n var template = new MapImage();\r\n var mapImages = new ListTemplate(template);\r\n this._disposers.push(new ListDisposer(mapImages));\r\n this._disposers.push(mapImages.template);\r\n mapImages.template.focusable = true;\r\n mapImages.events.on(\"inserted\", this.handleObjectAdded, this, false);\r\n this._mapImages = mapImages;\r\n this._mapObjects = mapImages;\r\n }\r\n return this._mapImages;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * (Re)validates data element, effectively triggering its redrawal.\r\n *\r\n * @ignore Exclude from docs\r\n * @param dataItem Data item\r\n */\r\n MapImageSeries.prototype.validateDataElement = function (dataItem) {\r\n _super.prototype.validateDataElement.call(this, dataItem);\r\n dataItem.mapImage.invalidate();\r\n };\r\n /**\r\n * (Re)validates the series\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n MapImageSeries.prototype.validate = function () {\r\n _super.prototype.validate.call(this);\r\n $iter.each(this.mapImages.iterator(), function (mapImage) {\r\n mapImage.validatePosition();\r\n });\r\n };\r\n /**\r\n * Copies all properties from another instance of [[Series]].\r\n *\r\n * @param source Source series\r\n */\r\n MapImageSeries.prototype.copyFrom = function (source) {\r\n this.mapImages.template.copyFrom(source.mapImages.template);\r\n _super.prototype.copyFrom.call(this, source);\r\n };\r\n /**\r\n * @ignore\r\n */\r\n MapImageSeries.prototype.getFeatures = function () {\r\n var _this = this;\r\n var features = [];\r\n this.dataItems.each(function (dataItem) {\r\n var feature = dataItem.getFeature();\r\n if (feature) {\r\n features.push(feature);\r\n }\r\n });\r\n this.mapImages.each(function (mapImage) {\r\n if (_this.dataItems.indexOf(mapImage._dataItem) == -1) {\r\n var feature = mapImage.getFeature();\r\n if (feature) {\r\n features.push(feature);\r\n }\r\n }\r\n });\r\n return features;\r\n };\r\n /**\r\n * returns MapImage by id\r\n * @param image id\r\n * @return {MapImage}\r\n */\r\n MapImageSeries.prototype.getImageById = function (id) {\r\n return $iter.find(this.mapImages.iterator(), function (mapImage) {\r\n var dataContext = mapImage.dataItem.dataContext;\r\n if (mapImage.id == id || (dataContext && dataContext.id == id)) {\r\n return true;\r\n }\r\n });\r\n };\r\n return MapImageSeries;\r\n}(MapSeries));\r\nexport { MapImageSeries };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"MapImageSeries\"] = MapImageSeries;\r\nregistry.registeredClasses[\"MapImageSeriesDataItem\"] = MapImageSeriesDataItem;\r\n","/**\r\n * Map line module\r\n */\r\nimport { __extends, __values } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { MapObject } from \"./MapObject\";\r\nimport { MapLineObject } from \"./MapLineObject\";\r\nimport { MapImage } from \"./MapImage\";\r\nimport { MapImageSeries } from \"./MapImageSeries\";\r\nimport { Triangle } from \"../../core/elements/Triangle\";\r\nimport { ListTemplate, ListDisposer } from \"../../core/utils/List\";\r\nimport { Polyline } from \"../../core/elements/Polyline\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport { color } from \"../../core/utils/Color\";\r\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\r\nimport { percent, Percent } from \"../../core/utils/Percent\";\r\nimport * as $type from \"../../core/utils/Type\";\r\nimport * as $iter from \"../../core/utils/Iterator\";\r\nimport * as $geo from \"./Geo\";\r\nimport * as $mapUtils from \"./MapUtils\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Used to draw a line on the map.\r\n *\r\n * @see {@link IMapLineEvents} for a list of available events\r\n * @see {@link IMapLineAdapters} for a list of available Adapters\r\n */\r\nvar MapLine = /** @class */ (function (_super) {\r\n __extends(MapLine, _super);\r\n /**\r\n * Constructor\r\n */\r\n function MapLine() {\r\n var _this = \r\n // Init\r\n _super.call(this) || this;\r\n /**\r\n * A list of event disposers for images.\r\n */\r\n _this._imageListeners = {};\r\n _this.className = \"MapLine\";\r\n _this.createLine();\r\n _this.line.stroke = color();\r\n _this.line.parent = _this;\r\n _this.strokeOpacity = 1;\r\n _this.setPropertyValue(\"precision\", 0.1);\r\n var interfaceColors = new InterfaceColorSet();\r\n _this.stroke = interfaceColors.getFor(\"grid\");\r\n _this.shortestDistance = true;\r\n // Apply theme\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * @ignore\r\n */\r\n MapLine.prototype.createLine = function () {\r\n this.line = new Polyline();\r\n };\r\n /**\r\n * Converts a position within the line (0-1) to a physical point\r\n * coordinates.\r\n *\r\n * 0 indicates start of the line, 0.5 - middle, while 1 indicates the end.\r\n *\r\n * @param position Position (0-1)\r\n * @return Coordinates\r\n */\r\n MapLine.prototype.positionToPoint = function (position) {\r\n if (this.shortestDistance) {\r\n return this.series.chart.projection.positionToPoint(this.multiGeoLine, position);\r\n }\r\n else {\r\n if (this.line) {\r\n return this.line.positionToPoint(position);\r\n }\r\n }\r\n return { x: 0, y: 0, angle: 0 };\r\n };\r\n Object.defineProperty(MapLine.prototype, \"multiGeoLine\", {\r\n /**\r\n * @return Coordinates\r\n */\r\n get: function () {\r\n var multiGeoLine = this.getPropertyValue(\"multiGeoLine\");\r\n if (!multiGeoLine && this.dataItem && this.dataItem.multiGeoLine) {\r\n multiGeoLine = this.dataItem.multiGeoLine;\r\n }\r\n return multiGeoLine;\r\n },\r\n /**\r\n * A collection of X/Y coordinates for a multi-segment line. E.g.:\r\n *\r\n * ```JSON\r\n * [\r\n * // Segment 1\r\n * [\r\n * { longitude: 3.121, latitude: 0.58 },\r\n * { longitude: -5.199, latitude: 21.223 }\r\n * ],\r\n *\r\n * // Segment 2\r\n * [\r\n * { longitude: -5.199, latitude: 21.223 },\r\n * { longitude: -12.9, latitude: 25.85 }\r\n * ]\r\n * ]\r\n * ```\r\n *\r\n * @see {@link https://tools.ietf.org/html/rfc7946#section-3.1.5} GeoJSON MultiLineString reference\r\n * @param multiGeoLine Coordinates\r\n */\r\n set: function (multiGeoLine) {\r\n if (multiGeoLine && multiGeoLine.length > 0) {\r\n this.setPropertyValue(\"multiGeoLine\", $geo.normalizeMultiline(multiGeoLine), true);\r\n var multiLine = $mapUtils.multiGeoLineToMultiLine(multiGeoLine);\r\n this.setPropertyValue(\"multiLine\", multiLine);\r\n this.updateExtremes();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapLine.prototype, \"multiLine\", {\r\n /**\r\n * @return Coordinates\r\n */\r\n get: function () {\r\n var multiLine = this.getPropertyValue(\"multiLine\");\r\n if (!multiLine && this.dataItem && this.dataItem.multiLine) {\r\n multiLine = this.dataItem.multiLine;\r\n }\r\n return multiLine;\r\n },\r\n /**\r\n * A collection of X/Y coordinates for a multi-segment line. E.g.:\r\n *\r\n * ```JSON\r\n * [\r\n * // Segment 1\r\n * [\r\n * [ 100, 150 ],\r\n * [ 120, 200 ]\r\n * ],\r\n *\r\n * // Segment 2\r\n * [\r\n * [ 120, 200 ],\r\n * [ 150, 100 ]\r\n * ]\r\n * ]\r\n * ```\r\n *\r\n * @param multiLine Coordinates\r\n */\r\n set: function (multiLine) {\r\n this.setPropertyValue(\"multiLine\", multiLine);\r\n this.multiGeoLine = $mapUtils.multiLineToGeo(multiLine);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapLine.prototype, \"imagesToConnect\", {\r\n /**\r\n * @return {MapImages[]}\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"imagesToConnect\");\r\n },\r\n /**\r\n * Instead of setting longitudes/latitudes you can set an array of images\r\n * which will be connected by the line.\r\n *\r\n * Parameter is an array that can hold string `id`'s to of the images, or\r\n * references to actual [[MapImage]] objects.\r\n *\r\n * @param images Images\r\n */\r\n set: function (images) {\r\n var _this = this;\r\n this.setPropertyValue(\"imagesToConnect\", images, true);\r\n this.handleImagesToConnect();\r\n if (this.series) {\r\n var chart = this.series.chart;\r\n if (chart) {\r\n chart.series.each(function (series) {\r\n if (series instanceof MapImageSeries) {\r\n if (!series.isReady()) {\r\n _this._disposers.push(series.events.on(\"ready\", _this.handleImagesToConnect, _this, false));\r\n }\r\n }\r\n });\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n MapLine.prototype.handleImagesToConnect = function () {\r\n var e_1, _a;\r\n var _this = this;\r\n if (this.imagesToConnect) {\r\n var segment = [];\r\n var multiGeoLine = [segment];\r\n var _loop_1 = function (image) {\r\n if ($type.isString(image)) {\r\n var chart = this_1.series.chart;\r\n if (chart) {\r\n chart.series.each(function (series) {\r\n if (series instanceof MapImageSeries) {\r\n var img = series.getImageById(image);\r\n if (img) {\r\n image = img;\r\n }\r\n }\r\n });\r\n }\r\n }\r\n if (image instanceof MapImage) {\r\n segment.push({ longitude: image.longitude, latitude: image.latitude });\r\n if (!this_1._imageListeners[image.uid]) {\r\n var disposer = image.events.on(\"propertychanged\", function (event) {\r\n if (event.property == \"longitude\" || event.property == \"latitude\") {\r\n _this.handleImagesToConnect();\r\n _this.invalidate();\r\n }\r\n }, this_1, false);\r\n this_1._imageListeners[image.uid] = disposer;\r\n this_1._disposers.push(disposer);\r\n }\r\n }\r\n };\r\n var this_1 = this;\r\n try {\r\n for (var _b = __values(this.imagesToConnect), _c = _b.next(); !_c.done; _c = _b.next()) {\r\n var image = _c.value;\r\n _loop_1(image);\r\n }\r\n }\r\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\r\n finally {\r\n try {\r\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\r\n }\r\n finally { if (e_1) throw e_1.error; }\r\n }\r\n this.multiGeoLine = multiGeoLine;\r\n }\r\n };\r\n /**\r\n * (Re)validates the line, effectively forcing it to redraw.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n MapLine.prototype.validate = function () {\r\n var chart = this.series.chart;\r\n if (this.multiLine) {\r\n if (!this.shortestDistance) {\r\n var convertedPoints = [];\r\n for (var i = 0, len = this.multiLine.length; i < len; i++) {\r\n var segment = this.multiLine[i];\r\n var convertedSegmentPoints = [];\r\n for (var s = 0, slen = segment.length; s < slen; s++) {\r\n var geoPoint = segment[s];\r\n var point = this.series.chart.projection.convert({ longitude: geoPoint[0], latitude: geoPoint[1] });\r\n convertedSegmentPoints.push(point);\r\n }\r\n convertedPoints.push(convertedSegmentPoints);\r\n }\r\n this.line.segments = convertedPoints;\r\n }\r\n else {\r\n chart.projection.d3Projection.precision(this.precision);\r\n this.line.path = chart.projection.d3Path(this.getFeature());\r\n }\r\n if (this._arrow) {\r\n this._arrow.validatePosition();\r\n }\r\n $iter.each(this.lineObjects.iterator(), function (x) {\r\n x.validatePosition();\r\n });\r\n this.handleGlobalScale();\r\n }\r\n else if (this.imagesToConnect) {\r\n this.handleImagesToConnect();\r\n }\r\n _super.prototype.validate.call(this);\r\n };\r\n /**\r\n * @ignore\r\n */\r\n MapLine.prototype.getFeature = function () {\r\n if (this.multiLine && this.multiLine.length > 0 && this.multiLine[0] && this.multiLine[0].length > 0) {\r\n return { \"type\": \"Feature\", geometry: { type: \"MultiLineString\", coordinates: this.multiLine } };\r\n }\r\n };\r\n /**\r\n * @ignore Exclude from docs\r\n */\r\n MapLine.prototype.measureElement = function () {\r\n // Overriding, just to avoid extra measure\r\n };\r\n Object.defineProperty(MapLine.prototype, \"shortestDistance\", {\r\n /**\r\n * @return Real path?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"shortestDistance\");\r\n },\r\n /**\r\n * The line should take the shortest path over the globe.\r\n *\r\n * Enabling this will make the line look differently in different\r\n * projections. Only `MapLine` supports this setting, `MapArc` and\r\n * `MapSplice` don't.\r\n *\r\n * @default true\r\n * @param value Real path?\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"shortestDistance\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapLine.prototype, \"lineObjects\", {\r\n /**\r\n * List of separate line objects the line consists of.\r\n *\r\n * @readonly\r\n * @return List of line objects\r\n */\r\n get: function () {\r\n if (!this._lineObjects) {\r\n this._lineObjects = new ListTemplate(new MapLineObject());\r\n this._lineObjects.events.on(\"inserted\", this.handleLineObjectAdded, this, false);\r\n this._disposers.push(new ListDisposer(this._lineObjects));\r\n this._disposers.push(this._lineObjects.template);\r\n }\r\n return this._lineObjects;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Decorate a [[LineObject]] when it is added to the line.\r\n *\r\n * @param event Event\r\n */\r\n MapLine.prototype.handleLineObjectAdded = function (event) {\r\n var mapLineObject = event.newValue;\r\n mapLineObject.mapLine = this;\r\n mapLineObject.shouldClone = false;\r\n mapLineObject.parent = this;\r\n };\r\n Object.defineProperty(MapLine.prototype, \"arrow\", {\r\n /**\r\n * @return Arrow element\r\n */\r\n get: function () {\r\n if (!this._arrow) {\r\n var arrow = this.createChild(MapLineObject);\r\n arrow.shouldClone = false;\r\n arrow.width = 8;\r\n arrow.height = 10;\r\n arrow.mapLine = this;\r\n arrow.position = 0.5;\r\n var triangle = arrow.createChild(Triangle);\r\n //triangle.shouldClone = false;\r\n triangle.fillOpacity = 1;\r\n triangle.width = percent(100);\r\n triangle.height = percent(100);\r\n triangle.rotation = 90;\r\n triangle.horizontalCenter = \"middle\";\r\n triangle.verticalCenter = \"middle\";\r\n this._arrow = arrow;\r\n }\r\n return this._arrow;\r\n },\r\n /**\r\n * A [[MapLineObject]] to use as an option arrowhead on the line.\r\n *\r\n * Just accessing this property will create a default arrowhead on the line\r\n * automatically.\r\n *\r\n * @param arrow Arrow element\r\n */\r\n set: function (arrow) {\r\n this._arrow = arrow;\r\n arrow.mapLine = this;\r\n arrow.parent = this;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Copies line properties and other attributes, like arrow, from another\r\n * instance of [[MapLine]].\r\n *\r\n * @param source Source map line\r\n */\r\n MapLine.prototype.copyFrom = function (source) {\r\n _super.prototype.copyFrom.call(this, source);\r\n this.line.copyFrom(source.line);\r\n this.lineObjects.copyFrom(source.lineObjects);\r\n if (source._arrow) {\r\n this.arrow = source.arrow.clone();\r\n }\r\n };\r\n Object.defineProperty(MapLine.prototype, \"latitude\", {\r\n /**\r\n * Latitude of the line center.\r\n *\r\n * @readonly\r\n * @return Latitude\r\n */\r\n get: function () {\r\n return this.north + (this.south - this.north) / 2;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapLine.prototype, \"longitude\", {\r\n /**\r\n * Longitude of the line center.\r\n *\r\n * @readonly\r\n * @return Latitude\r\n */\r\n get: function () {\r\n return this.east + (this.west - this.east) / 2;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * X coordinate for the slice tooltip.\r\n *\r\n * @ignore\r\n * @return X\r\n */\r\n MapLine.prototype.getTooltipX = function () {\r\n var x = this.getPropertyValue(\"tooltipX\");\r\n if (!(x instanceof Percent)) {\r\n x = percent(50);\r\n }\r\n if (x instanceof Percent) {\r\n return this.positionToPoint(x.value).x;\r\n }\r\n else {\r\n return 0;\r\n }\r\n };\r\n /**\r\n * Y coordinate for the slice tooltip.\r\n *\r\n * @ignore\r\n * @return Y\r\n */\r\n MapLine.prototype.getTooltipY = function () {\r\n var y = this.getPropertyValue(\"tooltipY\");\r\n if (!(y instanceof Percent)) {\r\n y = percent(50);\r\n }\r\n if (y instanceof Percent) {\r\n return this.positionToPoint(y.value).y;\r\n }\r\n else {\r\n return 0;\r\n }\r\n };\r\n Object.defineProperty(MapLine.prototype, \"precision\", {\r\n /**\r\n * @return Precision\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"precision\");\r\n },\r\n /**\r\n * When line is plotted, if its `shortestDistance` is set to `true` it is\r\n * bent according to the used projection, to depict the shortest distance how\r\n * it would go on the actual land.\r\n *\r\n * `precision` introduces a setting which can control when such bending\r\n * occurs.\r\n *\r\n * If the distance (in degrees) between line start and end points\r\n * is less than `precision`, no bending will take place and the line will be\r\n * straight.\r\n *\r\n * Set to large number (e.g. 10000) for perfectly straight line.\r\n *\r\n * @since 4.9.1\r\n * @default 0.1\r\n * @param value Precision\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"precision\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return MapLine;\r\n}(MapObject));\r\nexport { MapLine };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"MapLine\"] = MapLine;\r\n","/**\r\n * Map line series module\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { MapSeries, MapSeriesDataItem } from \"./MapSeries\";\r\nimport { MapLine } from \"./MapLine\";\r\nimport { ListTemplate, ListDisposer } from \"../../core/utils/List\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport * as $mapUtils from \"./MapUtils\";\r\nimport * as $array from \"../../core/utils/Array\";\r\nimport * as $utils from \"../../core/utils/Utils\";\r\nimport * as $iter from \"../../core/utils/Iterator\";\r\nimport { Disposer } from \"../../core/utils/Disposer\";\r\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Defines a [[DataItem]] for [[MapLineSeries]]\r\n * @see {@link DataItem}\r\n */\r\nvar MapLineSeriesDataItem = /** @class */ (function (_super) {\r\n __extends(MapLineSeriesDataItem, _super);\r\n /**\r\n * Constructor\r\n */\r\n function MapLineSeriesDataItem() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"MapLineSeriesDataItem\";\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n MapLineSeriesDataItem.prototype.getFeature = function () {\r\n if (this.multiLine && this.multiLine.length > 0) {\r\n return { \"type\": \"Feature\", geometry: { type: \"MultiLineString\", coordinates: this.multiLine } };\r\n }\r\n };\r\n Object.defineProperty(MapLineSeriesDataItem.prototype, \"mapLine\", {\r\n /**\r\n * A [[MapLine]] element related to this data item.\r\n *\r\n * @readonly\r\n * @return Element\r\n */\r\n get: function () {\r\n var _this = this;\r\n if (!this._mapLine) {\r\n var mapLine_1 = this.component.mapLines.create();\r\n this._mapLine = mapLine_1;\r\n this.addSprite(mapLine_1);\r\n this._disposers.push(mapLine_1);\r\n this._disposers.push(new Disposer(function () {\r\n if (_this.component) {\r\n _this.component.mapLines.removeValue(mapLine_1);\r\n }\r\n }));\r\n this.mapObject = mapLine_1;\r\n }\r\n return this._mapLine;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapLineSeriesDataItem.prototype, \"line\", {\r\n /**\r\n * @return Coordinates\r\n */\r\n get: function () {\r\n return this._line;\r\n },\r\n /**\r\n * A collection of X/Y coordinates for a single-segment line. E.g.:\r\n *\r\n * ```JSON\r\n * [\r\n * [ 100, 150 ],\r\n * [ 120, 200 ]\r\n * ]\r\n * ```\r\n *\r\n * @param line Coordinates\r\n */\r\n set: function (line) {\r\n this._line = line;\r\n this.multiLine = [line];\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapLineSeriesDataItem.prototype, \"multiLine\", {\r\n /**\r\n * @return Coordinates\r\n */\r\n get: function () {\r\n return this._multiLine;\r\n },\r\n /**\r\n * A collection of X/Y coordinates for a multi-segment line. E.g.:\r\n *\r\n * ```JSON\r\n * [\r\n * // Segment 1\r\n * [\r\n * [ 100, 150 ],\r\n * [ 120, 200 ]\r\n * ],\r\n *\r\n * // Segment 2\r\n * [\r\n * [ 120, 200 ],\r\n * [ 150, 100 ]\r\n * ]\r\n * ]\r\n * ```\r\n *\r\n * @param multiLine Coordinates\r\n */\r\n set: function (multiLine) {\r\n this._multiLine = multiLine;\r\n this._multiGeoLine = $mapUtils.multiLineToGeo(multiLine);\r\n this.updateExtremes();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapLineSeriesDataItem.prototype, \"geoLine\", {\r\n /**\r\n * @return Coordinates\r\n */\r\n get: function () {\r\n return this._geoLine;\r\n },\r\n /**\r\n * A collection of lat/long coordinates for a single-segment line. E.g.:\r\n *\r\n * ```JSON\r\n * [\r\n * { longitude: 3.121, latitude: 0.58 },\r\n * { longitude: -5.199, latitude: 21.223 }\r\n * ]\r\n * ```\r\n *\r\n * @see {@link https://tools.ietf.org/html/rfc7946#section-3.1.4} GeoJSON LineString reference\r\n * @param geoLine Coordinates\r\n */\r\n set: function (geoLine) {\r\n this._geoLine = geoLine;\r\n this.multiLine = $mapUtils.multiGeoLineToMultiLine([geoLine]);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapLineSeriesDataItem.prototype, \"multiGeoLine\", {\r\n /**\r\n * @return Coordinates\r\n */\r\n get: function () {\r\n return this._multiGeoLine;\r\n },\r\n /**\r\n * A collection of X/Y coordinates for a multi-segment line. E.g.:\r\n *\r\n * ```JSON\r\n * [\r\n * // Segment 1\r\n * [\r\n * { longitude: 3.121, latitude: 0.58 },\r\n * { longitude: -5.199, latitude: 21.223 }\r\n * ],\r\n *\r\n * // Segment 2\r\n * [\r\n * { longitude: -5.199, latitude: 21.223 },\r\n * { longitude: -12.9, latitude: 25.85 }\r\n * ]\r\n * ]\r\n * ```\r\n *\r\n * @see {@link https://tools.ietf.org/html/rfc7946#section-3.1.5} GeoJSON MultiLineString reference\r\n * @param multiGeoLine Coordinates\r\n */\r\n set: function (multiGeoLine) {\r\n this._multiGeoLine = multiGeoLine;\r\n this.multiLine = $mapUtils.multiGeoLineToMultiLine(multiGeoLine);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return MapLineSeriesDataItem;\r\n}(MapSeriesDataItem));\r\nexport { MapLineSeriesDataItem };\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * A series of map line series.\r\n *\r\n * @see {@link IMapLineSeriesEvents} for a list of available Events\r\n * @see {@link IMapLineSeriesAdapters} for a list of available Adapters\r\n * @important\r\n */\r\nvar MapLineSeries = /** @class */ (function (_super) {\r\n __extends(MapLineSeries, _super);\r\n /**\r\n * Constructor\r\n */\r\n function MapLineSeries() {\r\n var _this = \r\n // Init\r\n _super.call(this) || this;\r\n _this.className = \"MapLineSeries\";\r\n // Set data fields\r\n _this.dataFields.multiLine = \"multiLine\";\r\n _this.dataFields.line = \"line\";\r\n _this.dataFields.geoLine = \"geoLine\";\r\n _this.dataFields.multiGeoLine = \"multiGeoLine\";\r\n _this.ignoreBounds = true;\r\n // Apply theme\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * Returns a new/empty DataItem of the type appropriate for this object.\r\n *\r\n * @see {@link DataItem}\r\n * @return Data Item\r\n */\r\n MapLineSeries.prototype.createDataItem = function () {\r\n return new MapLineSeriesDataItem();\r\n };\r\n /**\r\n * (Re)validates series data, effectively causing the whole series to be\r\n * redrawn.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n MapLineSeries.prototype.validateData = function () {\r\n // process geoJSON and created map objects\r\n if (this.useGeodata || this.geodata) {\r\n var geoJSON = this.chart.geodata;\r\n if (geoJSON) {\r\n var features = void 0;\r\n if (geoJSON.type == \"FeatureCollection\") {\r\n features = geoJSON.features;\r\n }\r\n else if (geoJSON.type == \"Feature\") {\r\n features = [geoJSON];\r\n }\r\n else if ([\"Point\", \"LineString\", \"Polygon\", \"MultiPoint\", \"MultiLineString\", \"MultiPolygon\"].indexOf(geoJSON.type) != -1) {\r\n features = [{ geometry: geoJSON }];\r\n }\r\n else {\r\n console.log(\"nothing found in geoJSON\");\r\n }\r\n if (features) {\r\n var _loop_1 = function (i, len) {\r\n var feature = features[i];\r\n var geometry = feature.geometry;\r\n if (geometry) {\r\n var type = geometry.type;\r\n var id_1 = feature.id;\r\n if (type == \"LineString\" || type == \"MultiLineString\") {\r\n if (!this_1.checkInclude(this_1.include, this_1.exclude, id_1)) {\r\n return \"continue\";\r\n }\r\n var coordinates = geometry.coordinates;\r\n var dataObject = $array.find(this_1.data, function (value, i) {\r\n return value.id == id_1;\r\n });\r\n if (type == \"LineString\") {\r\n coordinates = [coordinates];\r\n }\r\n if (!dataObject) {\r\n dataObject = { multiLine: coordinates, id: id_1, madeFromGeoData: true };\r\n this_1.data.push(dataObject);\r\n }\r\n else {\r\n if (!dataObject.multiLine) {\r\n dataObject.multiLine = coordinates;\r\n }\r\n }\r\n // copy properties data to datacontext\r\n $utils.softCopyProperties(feature.properties, dataObject);\r\n }\r\n }\r\n };\r\n var this_1 = this;\r\n for (var i = 0, len = features.length; i < len; i++) {\r\n _loop_1(i, len);\r\n }\r\n }\r\n }\r\n }\r\n _super.prototype.validateData.call(this);\r\n };\r\n Object.defineProperty(MapLineSeries.prototype, \"mapLines\", {\r\n /**\r\n * A list of lines in the series.\r\n *\r\n * @return Lines\r\n */\r\n get: function () {\r\n if (!this._mapLines) {\r\n var lineTemplate = this.createLine();\r\n var mapLines = new ListTemplate(lineTemplate);\r\n this._disposers.push(new ListDisposer(mapLines));\r\n this._disposers.push(mapLines.template);\r\n mapLines.events.on(\"inserted\", this.handleObjectAdded, this, false);\r\n this._mapLines = mapLines;\r\n this._mapObjects = mapLines;\r\n }\r\n return this._mapLines;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Returns a new line instance of suitable type.\r\n *\r\n * @return New line\r\n */\r\n MapLineSeries.prototype.createLine = function () {\r\n return new MapLine();\r\n };\r\n /**\r\n * (Re)validates the series\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n MapLineSeries.prototype.validate = function () {\r\n this.dataItems.each(function (dataItem) {\r\n $utils.used(dataItem.mapLine);\r\n });\r\n _super.prototype.validate.call(this);\r\n this.mapLines.each(function (mapLine) {\r\n mapLine.validate();\r\n });\r\n };\r\n /**\r\n * Copies all properties from another instance of [[Series]].\r\n *\r\n * @param source Source series\r\n */\r\n MapLineSeries.prototype.copyFrom = function (source) {\r\n this.mapLines.template.copyFrom(source.mapLines.template);\r\n _super.prototype.copyFrom.call(this, source);\r\n };\r\n /**\r\n * @ignore\r\n */\r\n MapLineSeries.prototype.getFeatures = function () {\r\n var _this = this;\r\n var features = [];\r\n this.dataItems.each(function (dataItem) {\r\n var feature = dataItem.getFeature();\r\n if (feature) {\r\n features.push(feature);\r\n }\r\n });\r\n this.mapLines.each(function (mapLine) {\r\n if (_this.dataItems.indexOf(mapLine._dataItem) == -1) {\r\n var feature = mapLine.getFeature();\r\n if (feature) {\r\n features.push(feature);\r\n }\r\n }\r\n });\r\n return features;\r\n };\r\n /**\r\n * returns MapLine by id\r\n * @param line id\r\n * @return {MapLine}\r\n */\r\n MapLineSeries.prototype.getLineById = function (id) {\r\n return $iter.find(this.mapLines.iterator(), function (mapLine) {\r\n var dataContext = mapLine.dataItem.dataContext;\r\n return dataContext.id == id;\r\n });\r\n };\r\n return MapLineSeries;\r\n}(MapSeries));\r\nexport { MapLineSeries };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"MapLineSeries\"] = MapLineSeries;\r\nregistry.registeredClasses[\"MapLineSeriesDataItem\"] = MapLineSeriesDataItem;\r\n","/**\r\n * Graticule (map grid line).\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { MapLine } from \"./MapLine\";\r\nimport { registry } from \"../../core/Registry\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Graticule is a map line spanning from the poles or around the globe.\r\n *\r\n * @since 4.3.0\r\n * @see {@link IGraticuleEvents} for a list of available events\r\n * @see {@link IGraticuleAdapters} for a list of available Adapters\r\n */\r\nvar Graticule = /** @class */ (function (_super) {\r\n __extends(Graticule, _super);\r\n /**\r\n * Constructor\r\n */\r\n function Graticule() {\r\n var _this = \r\n // Init\r\n _super.call(this) || this;\r\n _this.className = \"Graticule\";\r\n // Apply theme\r\n _this.applyTheme();\r\n _this.shortestDistance = true;\r\n return _this;\r\n }\r\n return Graticule;\r\n}(MapLine));\r\nexport { Graticule };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"Graticule\"] = Graticule;\r\n","export default function range(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","import {range} from \"d3-array\";\nimport {abs, ceil, epsilon} from \"./math.js\";\n\nfunction graticuleX(y0, y1, dy) {\n var y = range(y0, y1 - epsilon, dy).concat(y1);\n return function(x) { return y.map(function(y) { return [x, y]; }); };\n}\n\nfunction graticuleY(x0, x1, dx) {\n var x = range(x0, x1 - epsilon, dx).concat(x1);\n return function(y) { return x.map(function(x) { return [x, y]; }); };\n}\n\nexport default function graticule() {\n var x1, x0, X1, X0,\n y1, y0, Y1, Y0,\n dx = 10, dy = dx, DX = 90, DY = 360,\n x, y, X, Y,\n precision = 2.5;\n\n function graticule() {\n return {type: \"MultiLineString\", coordinates: lines()};\n }\n\n function lines() {\n return range(ceil(X0 / DX) * DX, X1, DX).map(X)\n .concat(range(ceil(Y0 / DY) * DY, Y1, DY).map(Y))\n .concat(range(ceil(x0 / dx) * dx, x1, dx).filter(function(x) { return abs(x % DX) > epsilon; }).map(x))\n .concat(range(ceil(y0 / dy) * dy, y1, dy).filter(function(y) { return abs(y % DY) > epsilon; }).map(y));\n }\n\n graticule.lines = function() {\n return lines().map(function(coordinates) { return {type: \"LineString\", coordinates: coordinates}; });\n };\n\n graticule.outline = function() {\n return {\n type: \"Polygon\",\n coordinates: [\n X(X0).concat(\n Y(Y1).slice(1),\n X(X1).reverse().slice(1),\n Y(Y0).reverse().slice(1))\n ]\n };\n };\n\n graticule.extent = function(_) {\n if (!arguments.length) return graticule.extentMinor();\n return graticule.extentMajor(_).extentMinor(_);\n };\n\n graticule.extentMajor = function(_) {\n if (!arguments.length) return [[X0, Y0], [X1, Y1]];\n X0 = +_[0][0], X1 = +_[1][0];\n Y0 = +_[0][1], Y1 = +_[1][1];\n if (X0 > X1) _ = X0, X0 = X1, X1 = _;\n if (Y0 > Y1) _ = Y0, Y0 = Y1, Y1 = _;\n return graticule.precision(precision);\n };\n\n graticule.extentMinor = function(_) {\n if (!arguments.length) return [[x0, y0], [x1, y1]];\n x0 = +_[0][0], x1 = +_[1][0];\n y0 = +_[0][1], y1 = +_[1][1];\n if (x0 > x1) _ = x0, x0 = x1, x1 = _;\n if (y0 > y1) _ = y0, y0 = y1, y1 = _;\n return graticule.precision(precision);\n };\n\n graticule.step = function(_) {\n if (!arguments.length) return graticule.stepMinor();\n return graticule.stepMajor(_).stepMinor(_);\n };\n\n graticule.stepMajor = function(_) {\n if (!arguments.length) return [DX, DY];\n DX = +_[0], DY = +_[1];\n return graticule;\n };\n\n graticule.stepMinor = function(_) {\n if (!arguments.length) return [dx, dy];\n dx = +_[0], dy = +_[1];\n return graticule;\n };\n\n graticule.precision = function(_) {\n if (!arguments.length) return precision;\n precision = +_;\n x = graticuleX(y0, y1, 90);\n y = graticuleY(x0, x1, precision);\n X = graticuleX(Y0, Y1, 90);\n Y = graticuleY(X0, X1, precision);\n return graticule;\n };\n\n return graticule\n .extentMajor([[-180, -90 + epsilon], [180, 90 - epsilon]])\n .extentMinor([[-180, -80 - epsilon], [180, 80 + epsilon]]);\n}\n\nexport function graticule10() {\n return graticule()();\n}\n","/**\r\n * Graticule (map grid) series functionality.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { MapLineSeries, MapLineSeriesDataItem } from \"./MapLineSeries\";\r\nimport { Graticule } from \"./Graticule\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport * as d3geo from \"d3-geo\";\r\nimport * as $array from \"../../core/utils/Array\";\r\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Defines a [[DataItem]] for [[GraticuleSeries]].\r\n *\r\n * @see {@link DataItem}\r\n */\r\nvar GraticuleSeriesDataItem = /** @class */ (function (_super) {\r\n __extends(GraticuleSeriesDataItem, _super);\r\n /**\r\n * Constructor\r\n */\r\n function GraticuleSeriesDataItem() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"GraticuleSeriesDataItem\";\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n return GraticuleSeriesDataItem;\r\n}(MapLineSeriesDataItem));\r\nexport { GraticuleSeriesDataItem };\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * This class is used to create a set of graticules (map grid).\r\n *\r\n * To enable, create like you would create any regular map series:\r\n *\r\n * ```TypeScript\r\n * let graticule = chart.series.push(new am4maps.GraticuleSeries())\r\n * graticule.mapLines.template.line.stroke = am4core.color(\"#000000\");\r\n * graticule.mapLines.template.line.strokeOpacity = 0.1;\r\n * ```\r\n * ```JavaScript\r\n * var graticule = chart.series.push(new am4maps.GraticuleSeries())\r\n * graticule.mapLines.template.line.stroke = am4core.color(\"#000000\");\r\n * graticule.mapLines.template.line.strokeOpacity = 0.1;\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"series\": [{\r\n * \"type\": \"GraticuleSeries\",\r\n * \"mapLines\": {\r\n * \"line\": {\r\n * \"stroke\": \"#000000\",\r\n * \"strokeOpacity\": 0.1\r\n * }\r\n * }\r\n * }]\r\n * }\r\n * ```\r\n *\r\n * @since 4.3.0\r\n * @see {@link IGraticuleSeriesEvents} for a list of available Events\r\n * @see {@link IGraticuleSeriesAdapters} for a list of available Adapters\r\n * @important\r\n */\r\nvar GraticuleSeries = /** @class */ (function (_super) {\r\n __extends(GraticuleSeries, _super);\r\n /**\r\n * Constructor\r\n */\r\n function GraticuleSeries() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"GraticuleSeries\";\r\n _this.longitudeStep = 10;\r\n _this.latitudeStep = 10;\r\n _this.north = 90;\r\n _this.south = -90;\r\n _this.east = -180;\r\n _this.west = 180;\r\n //this.majorLatitudeStep = 90;\r\n //this.majorLongitudeStep = 360;\r\n _this.fitExtent = true;\r\n _this.singleSprite = true;\r\n _this.events.disableType(\"geoBoundsChanged\");\r\n _this.mapLines.template.line.strokeOpacity = 0.08;\r\n _this.ignoreBounds = false;\r\n _this.hiddenInLegend = true;\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * Returns a new/empty DataItem of the type appropriate for this object.\r\n *\r\n * @see {@link DataItem}\r\n * @return Data Item\r\n */\r\n GraticuleSeries.prototype.createDataItem = function () {\r\n return new GraticuleSeriesDataItem();\r\n };\r\n GraticuleSeries.prototype.validateData = function () {\r\n var _this = this;\r\n _super.prototype.validateData.call(this);\r\n this.mapLines.clear();\r\n var graticule = d3geo.geoGraticule();\r\n if (graticule) {\r\n graticule.stepMinor([this.longitudeStep, this.latitudeStep]);\r\n graticule.stepMajor([360, 360]);\r\n var chart = this.chart;\r\n if (this.fitExtent) {\r\n graticule.extent([[chart.east, chart.north], [chart.west, chart.south]]);\r\n }\r\n else {\r\n graticule.extent([[this.east, this.north], [this.west, this.south]]);\r\n }\r\n if (this.singleSprite) {\r\n var mapLine = this.mapLines.create();\r\n mapLine.multiLine = graticule().coordinates;\r\n }\r\n else {\r\n var lineStrings = graticule.lines();\r\n $array.each(lineStrings, function (lineString) {\r\n var mapLine = _this.mapLines.create();\r\n mapLine.multiLine = [lineString.coordinates];\r\n });\r\n }\r\n }\r\n };\r\n /**\r\n * Returns a new line instance of suitable type.\r\n *\r\n * @return New line\r\n */\r\n GraticuleSeries.prototype.createLine = function () {\r\n return new Graticule();\r\n };\r\n Object.defineProperty(GraticuleSeries.prototype, \"latitudeStep\", {\r\n /**\r\n * @return Step\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"latitudeStep\");\r\n },\r\n /**\r\n * Draw a graticule (grid) every X degrees of latitude.\r\n *\r\n * @default 10\r\n * @param value Step\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"latitudeStep\", value)) {\r\n this.invalidateData();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(GraticuleSeries.prototype, \"longitudeStep\", {\r\n /**\r\n * @return Step\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"longitudeStep\");\r\n },\r\n /**\r\n * Draw a graticule (grid) every X degrees of longitude.\r\n *\r\n * @default 10\r\n * @param value Step\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"longitudeStep\", value)) {\r\n this.invalidateData();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(GraticuleSeries.prototype, \"fitExtent\", {\r\n /**\r\n * @return Fit?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"fitExtent\");\r\n },\r\n /**\r\n * Draw a thicker (major) graticule every X degrees of latitude.\r\n *\r\n * @default 90\r\n * @param value Step\r\n */\r\n // public set majorLatitudeStep(value: number) {\r\n // \tif (this.setPropertyValue(\"majorLatitudeStep\", value)) {\r\n // \t\tthis.invalidateData();\r\n // \t}\r\n // }\r\n /**\r\n * @return Step\r\n */\r\n // public get majorLatitudeStep(): number {\r\n // \treturn this.getPropertyValue(\"majorLatitudeStep\");\r\n // }\r\n /**\r\n * Draw a thicker (major) graticule every X degrees of longitude.\r\n *\r\n * @default 360\r\n * @param value Step\r\n */\r\n // public set majorLongitudeStep(value: number) {\r\n // \tif (this.setPropertyValue(\"majorLongitudeStep\", value)) {\r\n // \t\tthis.invalidateData();\r\n // \t}\r\n // }\r\n /**\r\n * @return Step\r\n */\r\n // public get majorLongitudeStep(): number {\r\n // \treturn this.getPropertyValue(\"majorLongitudeStep\");\r\n // }\r\n /**\r\n * Whether to cap graticules (grid) to actual span of the map (`true`), e.g.\r\n * where there are polygons, or draw full-world grid (`false`).\r\n *\r\n * For world maps, using `false` makes sense. For smaller maps - not so much.\r\n *\r\n * If set to `false`, the grid will be drawn from this series `east` to\r\n * `west`, and from `south` to `north` (default values: `east = -180`;\r\n * `west = 180`; `south =-90`; `north =90`).\r\n *\r\n * These can be overridden by setting `GraticuleSeries`' respective\r\n * properties.\r\n *\r\n * @default true\r\n * @param value Fit?\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"fitExtent\", value)) {\r\n this.invalidateData();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(GraticuleSeries.prototype, \"singleSprite\", {\r\n /**\r\n * @return Use single sprite?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"singleSprite\");\r\n },\r\n /**\r\n * Whether to draw all the grid as a single element or as separate lines.\r\n *\r\n * Setting `true` (default) will result in better performance, whereas\r\n * `false` allows setting visual properties of each line individually.\r\n *\r\n * @default true\r\n * @param value Use single sprite?\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"singleSprite\", value)) {\r\n this.invalidateData();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return GraticuleSeries;\r\n}(MapLineSeries));\r\nexport { GraticuleSeries };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"GraticuleSeries\"] = GraticuleSeries;\r\nregistry.registeredClasses[\"GraticuleSeriesDataItem\"] = GraticuleSeriesDataItem;\r\n","/**\r\n * Map module.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { SerialChart, SerialChartDataItem } from \"./SerialChart\";\r\nimport { Disposer } from \"../../core/utils/Disposer\";\r\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\r\nimport { MapSeries } from \"../map/MapSeries\";\r\nimport { MapImage } from \"../map/MapImage\";\r\nimport { MapPolygon } from \"../map/MapPolygon\";\r\nimport { MapPolygonSeries } from \"../map/MapPolygonSeries\";\r\nimport { Projection } from \"../map/projections/Projection\";\r\nimport { Circle } from \"../../core/elements/Circle\";\r\nimport { SmallMap } from \"../map/SmallMap\";\r\nimport * as $mapUtils from \"../map/MapUtils\";\r\nimport { keyboard } from \"../../core/utils/Keyboard\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport { options } from \"../../core/Options\";\r\nimport * as $math from \"../../core/utils/Math\";\r\nimport * as $utils from \"../../core/utils/Utils\";\r\nimport * as $ease from \"../../core/utils/Ease\";\r\nimport * as $iter from \"../../core/utils/Iterator\";\r\nimport * as $type from \"../../core/utils/Type\";\r\nimport * as $geo from \"../map/Geo\";\r\nimport { GraticuleSeries } from \"../map/GraticuleSeries\";\r\nimport { getInteraction } from \"../../core/interaction/Interaction\";\r\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Defines a [[DataItem]] for [[MapChart]].\r\n *\r\n * @see {@link DataItem}\r\n */\r\nvar MapChartDataItem = /** @class */ (function (_super) {\r\n __extends(MapChartDataItem, _super);\r\n /**\r\n * Constructor\r\n */\r\n function MapChartDataItem() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"MapChartDataItem\";\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n return MapChartDataItem;\r\n}(SerialChartDataItem));\r\nexport { MapChartDataItem };\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Creates a map.\r\n *\r\n * @see {@link IMapChartEvents} for a list of available Events\r\n * @see {@link IMapChartAdapters} for a list of available Adapters\r\n * @see {@link https://www.amcharts.com/docs/v4/chart-types/map/} for documentation\r\n */\r\nvar MapChart = /** @class */ (function (_super) {\r\n __extends(MapChart, _super);\r\n /**\r\n * Constructor\r\n */\r\n function MapChart() {\r\n var _this = \r\n // Init\r\n _super.call(this) || this;\r\n /**\r\n * A ratio to be used when scaling the map shapes.\r\n *\r\n * @readonly\r\n */\r\n _this.scaleRatio = 1;\r\n /**\r\n * Default duration of zoom animations (ms).\r\n */\r\n _this.zoomDuration = 1000;\r\n /**\r\n * Default zooming animation easing function.\r\n */\r\n _this.zoomEasing = $ease.cubicOut;\r\n /**\r\n * Smallest available zoom level. The map will not allow to zoom out past\r\n * this setting.\r\n *\r\n * NOTE: Should be power of 2.\r\n *\r\n * @default 1\r\n */\r\n _this.minZoomLevel = 1;\r\n /**\r\n * Biggest available zoom level. The map will not allow to zoom in past\r\n * this setting.\r\n *\r\n * NOTE: Should be power of 2.\r\n *\r\n * @default 32\r\n */\r\n _this.maxZoomLevel = 32;\r\n /**\r\n * [_prevZoomGeoPoint description]\r\n *\r\n * @todo Description\r\n */\r\n _this._prevZoomGeoPoint = { latitude: 0, longitude: 0 };\r\n _this.className = \"MapChart\";\r\n // Set default projection\r\n _this.projection = new Projection();\r\n _this.setPropertyValue(\"deltaLatitude\", 0);\r\n _this.setPropertyValue(\"deltaLongitude\", 0);\r\n _this.setPropertyValue(\"deltaGamma\", 0);\r\n _this.maxPanOut = 0.7;\r\n _this.homeZoomLevel = 1;\r\n _this.zoomStep = 2;\r\n _this.layout = \"absolute\";\r\n _this.centerMapOnZoomOut = true;\r\n // Set padding\r\n _this.padding(0, 0, 0, 0);\r\n $utils.used(_this.backgroundSeries);\r\n // so that the map would render in a hidden div too\r\n _this.minWidth = 10;\r\n _this.minHeight = 10;\r\n _this.events.once(\"inited\", _this.handleAllInited, _this, false);\r\n // Create a container for map series\r\n var seriesContainer = _this.seriesContainer;\r\n seriesContainer.visible = false;\r\n seriesContainer.inert = true;\r\n seriesContainer.resizable = true;\r\n seriesContainer.events.on(\"transformed\", _this.handleMapTransform, _this, false);\r\n seriesContainer.events.on(\"doublehit\", _this.handleDoubleHit, _this, false);\r\n seriesContainer.events.on(\"dragged\", _this.handleDrag, _this, false);\r\n seriesContainer.zIndex = 0;\r\n seriesContainer.dragWhileResize = true;\r\n //seriesContainer.background.fillOpacity = 0;\r\n seriesContainer.adapter.add(\"scale\", function (scale, target) {\r\n return $math.fitToRange(scale, _this.minZoomLevel, _this.maxZoomLevel);\r\n });\r\n // Set up events\r\n //this.events.on(\"validated\", this.updateExtremes, this);\r\n //this.events.on(\"datavalidated\", this.handleAllValidated, this, false);\r\n //this.events.on(\"datavalidated\", this.updateExtremes, this, false);\r\n _this.events.on(\"maxsizechanged\", function (event) {\r\n if (event.previousWidth == 0 || event.previousHeight == 0) {\r\n _this.updateExtremes();\r\n _this.updateCenterGeoPoint();\r\n }\r\n }, undefined, false);\r\n // Set up main chart container, e.g. set backgrounds and events to monitor\r\n // size changes, etc.\r\n var chartContainer = _this.chartContainer;\r\n chartContainer.parent = _this;\r\n chartContainer.zIndex = -1;\r\n _this._disposers.push(_this.events.on(\"maxsizechanged\", function () {\r\n if (_this.inited) {\r\n if (_this._mapAnimation) {\r\n _this._mapAnimation.stop();\r\n }\r\n var allInited_1 = true;\r\n _this.series.each(function (series) {\r\n series.updateTooltipBounds();\r\n if (!series.inited || series.dataInvalid) {\r\n allInited_1 = false;\r\n }\r\n });\r\n if (allInited_1) {\r\n _this.updateScaleRatio();\r\n }\r\n _this.zoomToGeoPoint(_this._zoomGeoPointReal, _this.zoomLevel, true, 0);\r\n }\r\n }, undefined, false));\r\n var chartContainerBg = chartContainer.background;\r\n chartContainerBg.fillOpacity = 0;\r\n chartContainerBg.events.on(\"down\", function (e) { _this.seriesContainer.dragStart(e.target.interactions.downPointers.getIndex(0)); }, _this);\r\n chartContainerBg.events.on(\"up\", function (e) { _this.seriesContainer.dragStop(); }, _this);\r\n chartContainerBg.events.on(\"doublehit\", _this.handleDoubleHit, _this);\r\n chartContainerBg.focusable = true;\r\n chartContainer.events.on(\"down\", _this.handleMapDown, _this, false);\r\n _this.addDisposer(seriesContainer.events.on(\"down\", function () {\r\n // Cancel any move inertia if there is one\r\n var inertia = _this.seriesContainer.interactions.inertias.getKey(\"move\");\r\n if (inertia) {\r\n inertia.done();\r\n }\r\n }));\r\n // Add description to background\r\n _this.background.fillOpacity = 0;\r\n // Add keyboard events for panning\r\n _this._disposers.push(getInteraction().body.events.on(\"keyup\", function (ev) {\r\n if (_this.topParent.hasFocused) {\r\n var key = keyboard.getEventKey(ev.event);\r\n if (!_this._zoomControl || !_this._zoomControl.thumb.isFocused) {\r\n switch (key) {\r\n case \"up\":\r\n _this.pan({ x: 0, y: 0.1 });\r\n break;\r\n case \"down\":\r\n _this.pan({ x: 0, y: -0.1 });\r\n break;\r\n case \"left\":\r\n _this.pan({ x: 0.1, y: 0 });\r\n break;\r\n case \"right\":\r\n _this.pan({ x: -0.1, y: 0 });\r\n break;\r\n }\r\n }\r\n }\r\n }, _this));\r\n _this.mouseWheelBehavior = \"zoom\";\r\n var interaction = getInteraction();\r\n _this._disposers.push(interaction.body.events.on(\"down\", _this.handlePanDown, _this));\r\n _this._disposers.push(interaction.body.events.on(\"up\", _this.handlePanUp, _this));\r\n //this._disposers.push(interaction.body.events.on(\"track\", this.handlePanMove, this));\r\n var panSprite = _this.seriesContainer.createChild(Circle);\r\n panSprite.radius = 10;\r\n panSprite.inert = true;\r\n panSprite.isMeasured = false;\r\n panSprite.events.on(\"transformed\", _this.handlePanMove, _this, false);\r\n panSprite.interactionsEnabled = false;\r\n panSprite.opacity = 0;\r\n panSprite.x = 0;\r\n panSprite.y = 0;\r\n _this.panSprite = panSprite;\r\n _this.panBehavior = \"move\";\r\n /*\r\n this.panSprite.inertiaOptions.setKey(\"move\", {\r\n \"time\": 100,\r\n \"duration\": 1000,\r\n \"factor\": 3,\r\n \"easing\": $ease.sinOut\r\n });*/\r\n // Apply theme\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * @ignore\r\n */\r\n MapChart.prototype.handlePanDown = function (event) {\r\n var svgPoint = $utils.documentPointToSvg(event.pointer.point, this.htmlContainer);\r\n if (svgPoint.x > 0 && svgPoint.y > 0 && svgPoint.x < this.svgContainer.width && svgPoint.y < this.svgContainer.height) {\r\n // Get local point\r\n this._downPointOrig = $utils.documentPointToSprite(event.pointer.point, this.seriesContainer);\r\n this.panSprite.moveTo(this._downPointOrig);\r\n this.panSprite.dragStart(event.pointer);\r\n this._downDeltaLongitude = this.deltaLongitude;\r\n this._downDeltaLatitude = this.deltaLatitude;\r\n }\r\n };\r\n /**\r\n * @ignore\r\n */\r\n MapChart.prototype.handlePanUp = function (event) {\r\n if (this._downPointOrig) {\r\n this.panSprite.dragStop(event.pointer, true);\r\n }\r\n this._downPointOrig = undefined;\r\n };\r\n /**\r\n * @ignore\r\n */\r\n MapChart.prototype.handlePanMove = function () {\r\n if (!this.seriesContainer.isResized) {\r\n if (getInteraction().areTransformed([this.panSprite.interactions, this.seriesContainer.interactions])) {\r\n return;\r\n }\r\n var d3Projection = this.projection.d3Projection;\r\n var panBehavior = this.panBehavior;\r\n if (panBehavior != \"move\" && panBehavior != \"none\" && this._downPointOrig && d3Projection.rotate) {\r\n var rotation = d3Projection.rotate();\r\n var dln = rotation[0];\r\n var dlt = rotation[1];\r\n var dlg = rotation[2];\r\n d3Projection.rotate([0, 0, 0]);\r\n var downGeoLocal = this.projection.invert(this._downPointOrig);\r\n var local = { x: this.panSprite.pixelX, y: this.panSprite.pixelY };\r\n var geoLocal = void 0;\r\n if (local) {\r\n geoLocal = this.projection.invert(local);\r\n }\r\n d3Projection.rotate([dln, dlt, dlg]);\r\n if (geoLocal) {\r\n if (panBehavior == \"rotateLat\" || panBehavior == \"rotateLongLat\") {\r\n this.deltaLatitude = this._downDeltaLatitude + geoLocal.latitude - downGeoLocal.latitude;\r\n }\r\n if (panBehavior == \"rotateLong\" || panBehavior == \"rotateLongLat\") {\r\n this.deltaLongitude = this._downDeltaLongitude + geoLocal.longitude - downGeoLocal.longitude;\r\n }\r\n }\r\n }\r\n }\r\n };\r\n /**\r\n * @ignore\r\n */\r\n MapChart.prototype.handleAllInited = function () {\r\n var _this = this;\r\n var inited = true;\r\n this.seriesContainer.visible = true;\r\n this.series.each(function (series) {\r\n if (!series.inited || series.dataInvalid) {\r\n inited = false;\r\n }\r\n });\r\n if (inited) {\r\n this.updateCenterGeoPoint();\r\n this.updateScaleRatio();\r\n this.goHome(0);\r\n }\r\n else {\r\n // TODO verify that this is correct\r\n var disposer_1 = registry.events.once(\"exitframe\", function () {\r\n _this.removeDispose(disposer_1);\r\n _this.handleAllInited();\r\n }, this, false);\r\n this.addDisposer(disposer_1);\r\n }\r\n };\r\n /**\r\n * @ignore\r\n */\r\n MapChart.prototype.updateZoomGeoPoint = function () {\r\n var seriesPoint = $utils.svgPointToSprite({ x: this.innerWidth / 2 + this.pixelPaddingLeft, y: this.innerHeight / 2 + this.pixelPaddingTop }, this.series.getIndex(0));\r\n var geoPoint = this.projection.invert(seriesPoint);\r\n this._zoomGeoPointReal = geoPoint;\r\n };\r\n /**\r\n * @ignore\r\n */\r\n MapChart.prototype.updateCenterGeoPoint = function () {\r\n var maxLeft;\r\n var maxRight;\r\n var maxTop;\r\n var maxBottom;\r\n if (this.backgroundSeries) {\r\n var features = this.backgroundSeries.getFeatures();\r\n if (features.length > 0) {\r\n var bounds = this.projection.d3Path.bounds(features[0].geometry);\r\n maxLeft = bounds[0][0];\r\n maxTop = bounds[0][1];\r\n maxRight = bounds[1][0];\r\n maxBottom = bounds[1][1];\r\n }\r\n }\r\n else {\r\n this.series.each(function (series) {\r\n var bbox = series.group.node.getBBox();\r\n if (maxLeft > bbox.x || !$type.isNumber(maxLeft)) {\r\n maxLeft = bbox.x;\r\n }\r\n if (maxRight < bbox.x + bbox.width || !$type.isNumber(maxRight)) {\r\n maxRight = bbox.x + bbox.width;\r\n }\r\n if (maxTop > bbox.y || !$type.isNumber(maxTop)) {\r\n maxTop = bbox.y;\r\n }\r\n if (maxBottom < bbox.y + bbox.height || !$type.isNumber(maxBottom)) {\r\n maxBottom = bbox.y + bbox.height;\r\n }\r\n });\r\n }\r\n this.seriesMaxLeft = maxLeft;\r\n this.seriesMaxRight = maxRight;\r\n this.seriesMaxTop = maxTop;\r\n this.seriesMaxBottom = maxBottom;\r\n this.seriesWidth = maxRight - maxLeft;\r\n this.seriesHeight = maxBottom - maxTop;\r\n if (this.seriesWidth > 0 && this.seriesHeight > 0) {\r\n this.chartContainer.visible = true;\r\n this._centerGeoPoint = this.projection.invert({ x: maxLeft + (maxRight - maxLeft) / 2, y: maxTop + (maxBottom - maxTop) / 2 });\r\n if (!this._zoomGeoPointReal || !$type.isNumber(this._zoomGeoPointReal.latitude)) {\r\n this._zoomGeoPointReal = this._centerGeoPoint;\r\n }\r\n }\r\n else {\r\n this.chartContainer.visible = false;\r\n }\r\n };\r\n /**\r\n * Prevents map to be dragged out of the container area\r\n * @ignore\r\n */\r\n MapChart.prototype.handleDrag = function () {\r\n var d = this.zoomLevel * this.scaleRatio;\r\n var ww = this.seriesWidth * d;\r\n var hh = this.seriesHeight * d;\r\n var seriesContainer = this.seriesContainer;\r\n var maxLeft = this.seriesMaxLeft * d;\r\n var maxRight = this.seriesMaxRight * d;\r\n var maxTop = this.seriesMaxTop * d;\r\n var maxBottom = this.seriesMaxBottom * d;\r\n var x = seriesContainer.pixelX;\r\n var y = seriesContainer.pixelY;\r\n var maxPanOut = this.maxPanOut;\r\n var minX = Math.min(this.maxWidth * (1 - maxPanOut) - ww - maxLeft, -maxLeft);\r\n if (x < minX) {\r\n x = minX;\r\n }\r\n var maxX = Math.max(this.maxWidth * maxPanOut - maxLeft, this.maxWidth - maxRight);\r\n if (x > maxX) {\r\n x = maxX;\r\n }\r\n var minY = Math.min(this.maxHeight * (1 - maxPanOut) - hh - maxTop, -maxTop);\r\n if (y < minY) {\r\n y = minY;\r\n }\r\n var maxY = Math.max(this.maxHeight * maxPanOut - maxTop, this.maxHeight - maxBottom);\r\n if (y > maxY) {\r\n y = maxY;\r\n }\r\n seriesContainer.moveTo({ x: x, y: y }, undefined, undefined, true);\r\n this._zoomGeoPointReal = this.zoomGeoPoint;\r\n };\r\n /**\r\n * Sets defaults that instantiate some objects that rely on parent, so they\r\n * cannot be set in constructor.\r\n */\r\n MapChart.prototype.applyInternalDefaults = function () {\r\n _super.prototype.applyInternalDefaults.call(this);\r\n // Add a default screen reader title for accessibility\r\n // This will be overridden in screen reader if there are any `titles` set\r\n if (!$type.hasValue(this.readerTitle)) {\r\n this.readerTitle = this.language.translate(\"Map\");\r\n }\r\n if (!$type.hasValue(this.background.readerTitle)) {\r\n this.background.readerTitle = this.language.translate(\"Use plus and minus keys on your keyboard to zoom in and out\");\r\n }\r\n };\r\n /**\r\n * Handles event when a pointer presses down on the map, e.g. user presses\r\n * down mouse or touches the map on a screen.\r\n *\r\n * Stops all animations currently going on.\r\n */\r\n MapChart.prototype.handleMapDown = function () {\r\n if (this._mapAnimation) {\r\n this._mapAnimation.stop();\r\n }\r\n };\r\n /**\r\n * Handles the event when user doubleclicks or dooubletaps the map: zooms\r\n * in on the reference point.\r\n *\r\n * @param event Original event\r\n */\r\n MapChart.prototype.handleDoubleHit = function (event) {\r\n var svgPoint = $utils.documentPointToSvg(event.point, this.htmlContainer, this.svgContainer.cssScale);\r\n var geoPoint = this.svgPointToGeo(svgPoint);\r\n this.zoomIn(geoPoint);\r\n };\r\n /**\r\n * Handles mouse wheel event, e.g. user rotates mouse wheel while over the\r\n * map: zooms in or out depending on the direction of the wheel turn.\r\n *\r\n * @param event Original event\r\n */\r\n MapChart.prototype.handleWheel = function (event) {\r\n // Cancel any move inertia if there is one\r\n var inertia = this.seriesContainer.interactions.inertias.getKey(\"move\");\r\n if (inertia) {\r\n inertia.done();\r\n }\r\n var svgPoint = $utils.documentPointToSvg(event.point, this.htmlContainer, this.svgContainer.cssScale);\r\n var geoPoint = this.svgPointToGeo(svgPoint);\r\n if (event.shift.y < 0) {\r\n this.zoomIn(geoPoint, undefined, this.interactions.mouseOptions.sensitivity);\r\n }\r\n else {\r\n this.zoomOut(geoPoint, undefined, this.interactions.mouseOptions.sensitivity);\r\n }\r\n };\r\n Object.defineProperty(MapChart.prototype, \"mouseWheelBehavior\", {\r\n /**\r\n * @return mouse wheel behavior\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"mouseWheelBehavior\");\r\n },\r\n /**\r\n * Specifies what should chart do if when mouse wheel is rotated.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/reference/sprite/#mouseOptions_property} More information about `mouseOptions`\r\n * @param mouse wheel behavior\r\n * @default zoomX\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"mouseWheelBehavior\", value)) {\r\n if (value != \"none\") {\r\n this._mouseWheelDisposer = this.chartContainer.events.on(\"wheel\", this.handleWheel, this, false);\r\n this._disposers.push(this._mouseWheelDisposer);\r\n }\r\n else {\r\n if (this._mouseWheelDisposer) {\r\n this._mouseWheelDisposer.dispose();\r\n }\r\n this.chartContainer.wheelable = false;\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapChart.prototype, \"panBehavior\", {\r\n /**\r\n * @returns Behavior\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"panBehavior\");\r\n },\r\n /**\r\n * What \"dragging\" map does.\r\n *\r\n * Available values:\r\n * * `\"move\"` (default): changes position of the map.\r\n * * `\"rotateLat\"`: changes `deltaLatitude` (rotates the globe vertically).\r\n * * `\"rotateLong\"`: changes `deltaLongitude` (rotates the globe horizontally).\r\n * * `\"rotateLongLat\"`: changes both `deltaLongitude` and `deltaLatitude` (rotates the globe in any direction).\r\n *\r\n * @default \"move\"\r\n * @since 4.3.0\r\n * @param value Behavior\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"panBehavior\", value)) {\r\n var seriesContainer = this.seriesContainer;\r\n this.panSprite.draggable = false;\r\n seriesContainer.draggable = false;\r\n switch (value) {\r\n case \"move\":\r\n seriesContainer.draggable = true;\r\n break;\r\n default:\r\n this.panSprite.draggable = true;\r\n break;\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapChart.prototype, \"centerMapOnZoomOut\", {\r\n /**\r\n * @returns If the map should be centered when zooming out.\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"centerMapOnZoomOut\");\r\n },\r\n /**\r\n * Specifies if the map should be centered when zooming out\r\n * @default true\r\n * @since 4.7.12\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"centerMapOnZoomOut\", value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapChart.prototype, \"projection\", {\r\n /**\r\n * @return Projection\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"projection\");\r\n },\r\n /**\r\n * Projection to use for the map.\r\n *\r\n * Available projections:\r\n * * Albers\r\n * * AlbersUSA\r\n * * AzimuthalEqualArea\r\n * * Eckert6\r\n * * EqualEarth\r\n * * Mercator\r\n * * Miller\r\n * * NaturalEarth\r\n * * Orthographic\r\n * * Stereographic\r\n *\r\n * ```TypeScript\r\n * map.projection = new am4maps.projections.Mercator();\r\n * ```\r\n * ```JavaScript\r\n * map.projection = new am4maps.projections.Mercator();\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"projection\": \"Mercator\"\r\n * // ...\r\n * }\r\n * ```\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/chart-types/map/#Setting_projection} More about projections\r\n * @param projection Projection\r\n */\r\n set: function (projection) {\r\n var _this = this;\r\n if (this.setPropertyValue(\"projection\", projection)) {\r\n this.invalidateProjection();\r\n projection.chart = this;\r\n if (this._backgroundSeries) {\r\n this._backgroundSeries.invalidate();\r\n }\r\n if (this.inited) {\r\n this.updateExtremes();\r\n }\r\n this.series.each(function (series) {\r\n series.events.once(\"validated\", function () {\r\n _this.updateCenterGeoPoint();\r\n _this.updateScaleRatio();\r\n _this.goHome(0);\r\n });\r\n });\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Validates (processes) data items.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n MapChart.prototype.validateDataItems = function () {\r\n _super.prototype.validateDataItems.call(this);\r\n this.updateExtremes();\r\n };\r\n /**\r\n * Calculates the longitudes and latitudes of the most distant points from\r\n * the center in all four directions: West, East, North, and South.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n MapChart.prototype.updateExtremes = function () {\r\n var east;\r\n var north;\r\n var west;\r\n var south;\r\n this.series.each(function (series) {\r\n if (series.ignoreBounds || (series instanceof GraticuleSeries && series.fitExtent)) {\r\n }\r\n else {\r\n if (series.north > north || !$type.isNumber(north)) {\r\n north = series.north;\r\n }\r\n if (series.south < south || !$type.isNumber(south)) {\r\n south = series.south;\r\n }\r\n if (series.west < west || !$type.isNumber(west)) {\r\n west = series.west;\r\n }\r\n if (series.east > east || !$type.isNumber(east)) {\r\n east = series.east;\r\n }\r\n }\r\n });\r\n var features = [];\r\n var foundGraticule = false;\r\n // if we gave graticule, get features of these series only for faster fitSize\r\n this.series.each(function (series) {\r\n if (series instanceof GraticuleSeries && !series.fitExtent) {\r\n features = series.getFeatures();\r\n foundGraticule = true;\r\n }\r\n });\r\n if (!foundGraticule) {\r\n this.series.each(function (series) {\r\n if (series.ignoreBounds || (series instanceof GraticuleSeries && series.fitExtent)) {\r\n }\r\n else {\r\n features = features.concat(series.getFeatures());\r\n }\r\n });\r\n }\r\n var w = $math.max(50, this.innerWidth);\r\n var h = $math.max(50, this.innerHeight);\r\n var d3Projection = this.projection.d3Projection;\r\n if (features.length > 0 && d3Projection && (this.east != east || this.west != west || this.north != north || this.south != south)) {\r\n this.east = east;\r\n this.west = west;\r\n this.north = north;\r\n this.south = south;\r\n if (d3Projection.rotate) {\r\n var rotation = d3Projection.rotate();\r\n var deltaLong = rotation[0];\r\n var deltaLat = rotation[1];\r\n var deltaGamma = rotation[2];\r\n this.deltaLongitude = deltaLong;\r\n this.deltaLatitude = deltaLat;\r\n this.deltaGamma = deltaGamma;\r\n }\r\n var geoJSON = { \"type\": \"FeatureCollection\", features: features };\r\n var initialScale = d3Projection.scale();\r\n d3Projection.fitSize([w, h], geoJSON);\r\n if (d3Projection.scale() != initialScale) {\r\n this.invalidateDataUsers();\r\n }\r\n this.series.each(function (series) {\r\n if (series instanceof GraticuleSeries) {\r\n series.invalidateData();\r\n }\r\n });\r\n if (this._backgroundSeries) {\r\n var polygon = this._backgroundSeries.mapPolygons.getIndex(0);\r\n if (polygon) {\r\n polygon.multiPolygon = $mapUtils.getBackground(this.north, this.east, this.south, this.west);\r\n }\r\n }\r\n this._fitWidth = w;\r\n this._fitHeight = h;\r\n }\r\n if (!this._zoomGeoPointReal || !$type.isNumber(this._zoomGeoPointReal.latitude)) {\r\n this.goHome(0);\r\n }\r\n };\r\n /**\r\n * (Re)calculates a ratio which should be used to scale the actual map so\r\n * that it fits perfectly into available space. Helps to avoid redrawing of all the map if container size changes\r\n * @ignore\r\n */\r\n MapChart.prototype.updateScaleRatio = function () {\r\n var scaleRatio;\r\n this.updateCenterGeoPoint();\r\n var hScale = this.innerWidth / this.seriesWidth;\r\n var vScale = this.innerHeight / this.seriesHeight;\r\n scaleRatio = $math.min(hScale, vScale);\r\n if ($type.isNaN(scaleRatio) || scaleRatio == Infinity) {\r\n scaleRatio = 1;\r\n }\r\n if (scaleRatio != this.scaleRatio) {\r\n this.scaleRatio = scaleRatio;\r\n $iter.each(this.series.iterator(), function (series) {\r\n series.scale = scaleRatio;\r\n series.updateTooltipBounds();\r\n });\r\n this.backgroundSeries.scale = scaleRatio;\r\n this.dispatch(\"scaleratiochanged\");\r\n }\r\n };\r\n /**\r\n * Converts a point within map container to geographical (lat/long)\r\n * coordinates.\r\n *\r\n * @param point Source point\r\n * @return Geo-point\r\n */\r\n MapChart.prototype.svgPointToGeo = function (point) {\r\n var series = this.series.getIndex(0);\r\n if (series) {\r\n var seriesPoint = $utils.svgPointToSprite(point, series);\r\n return this.seriesPointToGeo(seriesPoint);\r\n }\r\n };\r\n /**\r\n * Converts geographical (lat/long) coordinates to an X/Y point within map's\r\n * container.\r\n *\r\n * @param point Source geo-point\r\n * @return Point\r\n */\r\n MapChart.prototype.geoPointToSVG = function (point) {\r\n var series = this.series.getIndex(0);\r\n if (series) {\r\n var seriesPoint = this.geoPointToSeries(point);\r\n return $utils.spritePointToSvg(seriesPoint, series);\r\n }\r\n };\r\n /**\r\n * Converts a point (X/Y) within actual objects of the map to geographical\r\n * (lat/long) coordinates.\r\n *\r\n * @param point Source point\r\n * @return Geo-point\r\n */\r\n MapChart.prototype.seriesPointToGeo = function (point) {\r\n return this.projection.invert(point);\r\n };\r\n /**\r\n * Converts geographical (lat/long) coordinates to an X/Y point within\r\n * actual elements/objects of the maps.\r\n *\r\n * @param point Source geo-point\r\n * @return Point\r\n */\r\n MapChart.prototype.geoPointToSeries = function (point) {\r\n return this.projection.convert(point);\r\n };\r\n Object.defineProperty(MapChart.prototype, \"geodata\", {\r\n /**\r\n * @return GeoJSON data\r\n */\r\n get: function () {\r\n return this._geodata;\r\n },\r\n /**\r\n * Map data in GeoJSON format.\r\n *\r\n * The Map supports the following GeoJSON objects: `Point`, `LineString`,\r\n * `Polygon`, `MultiPoint`, `MultiLineString`, and `MultiPolygon`.\r\n *\r\n * @see {@link http://geojson.org/} Official GeoJSON format specification\r\n * @param geoJSON GeoJSON data\r\n */\r\n set: function (geodata) {\r\n if (geodata != this._geodata) {\r\n this._geodata = geodata;\r\n if (this.reverseGeodata) {\r\n this.processReverseGeodata(this._geodata);\r\n }\r\n this.invalidateData();\r\n this.dataUsers.each(function (dataUser) {\r\n for (var i = dataUser.data.length - 1; i >= 0; i--) {\r\n if (dataUser.data[i].madeFromGeoData == true) {\r\n dataUser.data.splice(i, 1);\r\n }\r\n }\r\n dataUser.disposeData();\r\n dataUser.invalidateData();\r\n });\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapChart.prototype, \"reverseGeodata\", {\r\n /**\r\n * @returns Reverse the order of geodata coordinates?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"reverseGeodata\");\r\n },\r\n /**\r\n * Indicates whether GeoJSON geodata supplied to the chart uses\r\n * ESRI (clockwise) or non-ESRI (counter-clockwise) order of the polygon\r\n * coordinates.\r\n *\r\n * `MapChart` supports only ESRI standard, so if your custom maps appears\r\n * garbled, try setting `reverseGeodata = true`.\r\n *\r\n * @default false\r\n * @since 4.10.11\r\n * @param value Reverse the order of geodata coordinates?\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"reverseGeodata\", value) && this._geodata) {\r\n this.processReverseGeodata(this._geodata);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Reverses the order of polygons on a GeoJSON data.\r\n *\r\n * @since 4.10.11\r\n * @param geodata Source geodata\r\n */\r\n MapChart.prototype.processReverseGeodata = function (geodata) {\r\n for (var i = 0; i < geodata.features.length; i++) {\r\n var feature = geodata.features[i];\r\n for (var x = 0; x < feature.geometry.coordinates.length; x++) {\r\n if (feature.geometry.type == \"MultiPolygon\") {\r\n for (var y = 0; y < feature.geometry.coordinates[x].length; y++) {\r\n feature.geometry.coordinates[x][y].reverse();\r\n }\r\n }\r\n else {\r\n feature.geometry.coordinates[x].reverse();\r\n }\r\n }\r\n }\r\n };\r\n /**\r\n * Zooms the map to particular zoom level and centers on a latitude/longitude\r\n * coordinate.\r\n *\r\n * @param point Center coordinate\r\n * @param zoomLevel Zoom level\r\n * @param center Center on the given coordinate?\r\n * @param duration Duration for zoom animation (ms)\r\n * @return Zoom animation\r\n */\r\n MapChart.prototype.zoomToGeoPoint = function (point, zoomLevel, center, duration, mapObject) {\r\n var _this = this;\r\n if (!point) {\r\n var hasData_1 = false;\r\n this.series.each(function (series) {\r\n if (series.dataItems.length > 0) {\r\n hasData_1 = true;\r\n }\r\n });\r\n if (hasData_1) {\r\n point = this.zoomGeoPoint;\r\n }\r\n else {\r\n return;\r\n }\r\n }\r\n if (!point || !$type.isNumber(point.longitude) || !$type.isNumber(point.latitude)) {\r\n return;\r\n }\r\n this._zoomGeoPointReal = point;\r\n zoomLevel = $math.fitToRange(zoomLevel, this.minZoomLevel, this.maxZoomLevel);\r\n var seriesPoint = this.projection.convert(point);\r\n if (seriesPoint) {\r\n var svgPoint = this.geoPointToSVG(point);\r\n var mapPoint = $utils.svgPointToSprite(svgPoint, this);\r\n if (center) {\r\n mapPoint = {\r\n x: this.innerWidth / 2,\r\n y: this.innerHeight / 2\r\n };\r\n }\r\n if (!$type.isNumber(duration)) {\r\n duration = this.zoomDuration;\r\n }\r\n var x = mapPoint.x - seriesPoint.x * zoomLevel * this.scaleRatio;\r\n var y = mapPoint.y - seriesPoint.y * zoomLevel * this.scaleRatio;\r\n if (!mapObject && zoomLevel < this.zoomLevel && this.centerMapOnZoomOut && zoomLevel < 1.5) {\r\n x = this.innerWidth / 2 - (this.seriesMaxLeft + (this.seriesMaxRight - this.seriesMaxLeft) / 2) * zoomLevel * this.scaleRatio;\r\n y = this.innerHeight / 2 - (this.seriesMaxTop + (this.seriesMaxBottom - this.seriesMaxTop) / 2) * zoomLevel * this.scaleRatio;\r\n }\r\n this._mapAnimation = this.seriesContainer.animate([{\r\n property: \"scale\",\r\n to: zoomLevel\r\n }, {\r\n property: \"x\", from: this.seriesContainer.pixelX,\r\n to: x\r\n }, {\r\n property: \"y\", from: this.seriesContainer.pixelY,\r\n to: y\r\n }], duration, this.zoomEasing);\r\n this._disposers.push(this._mapAnimation.events.on(\"animationended\", function () {\r\n _this._zoomGeoPointReal = _this.zoomGeoPoint;\r\n }));\r\n this.seriesContainer.validatePosition();\r\n return this._mapAnimation;\r\n }\r\n };\r\n /**\r\n * Zooms the map to a particular map object.\r\n *\r\n * @param mapObject Target map object\r\n * @param zoomLevel Zoom level\r\n * @param center Center on the given coordinate?\r\n * @param duration Duration for zoom animation (ms)\r\n * @return Zoom animation\r\n */\r\n MapChart.prototype.zoomToMapObject = function (mapObject, zoomLevel, center, duration) {\r\n if (center == undefined) {\r\n center = true;\r\n }\r\n var inertia = this.seriesContainer.interactions.inertias.getKey(\"move\");\r\n if (inertia) {\r\n inertia.done();\r\n }\r\n if (mapObject instanceof MapImage) {\r\n if ($type.isNaN(zoomLevel)) {\r\n zoomLevel = 5;\r\n }\r\n return this.zoomToGeoPoint({ latitude: mapObject.latitude, longitude: mapObject.longitude }, zoomLevel, center, duration, true);\r\n }\r\n var dataItem = mapObject.dataItem;\r\n if (dataItem && $type.isNumber(dataItem.zoomLevel)) {\r\n zoomLevel = dataItem.zoomLevel;\r\n }\r\n if (mapObject instanceof MapPolygon) {\r\n var dataItem_1 = mapObject.dataItem;\r\n var bbox = mapObject.polygon.bbox;\r\n if (bbox.width == 0 || bbox.height == 0) {\r\n bbox = mapObject.polygon.group.getBBox();\r\n }\r\n if (!$type.isNumber(zoomLevel)) {\r\n zoomLevel = Math.min(this.seriesWidth / bbox.width, this.seriesHeight / bbox.height);\r\n }\r\n var geoPoint = void 0;\r\n if (dataItem_1 && $type.hasValue(dataItem_1.zoomGeoPoint)) {\r\n geoPoint = dataItem_1.zoomGeoPoint;\r\n }\r\n else {\r\n // this is more accurate\r\n var polygonPoint = { x: bbox.x + bbox.width / 2, y: bbox.y + bbox.height / 2 };\r\n var seriesPoint = $utils.spritePointToSprite(polygonPoint, mapObject.polygon, mapObject.series);\r\n geoPoint = this.seriesPointToGeo(seriesPoint);\r\n }\r\n return this.zoomToGeoPoint(geoPoint, zoomLevel, true, duration, true);\r\n }\r\n };\r\n /**\r\n * Zooms the map to a particular viewport.\r\n *\r\n * The `north`, `east`, `south`, and `west` define boundaries of the\r\n * imaginary viewort we want to zoom the map to.\r\n *\r\n * `level` is not actual zoom level. The map will determine the zoom level\r\n * required to accommodated such zoom, and will adjust it by `level` if set.\r\n *\r\n * @param north Latitude of the North-most boundary\r\n * @param east Longitude of the East-most boundary\r\n * @param south Latitude of the South-most boundary\r\n * @param west Longitude of the West-most boundary\r\n * @param level Adjust zoom level\r\n * @param center Center on the given coordinate?\r\n * @param duration Duration for zoom animation (ms)\r\n * @return Zoom animation\r\n */\r\n MapChart.prototype.zoomToRectangle = function (north, east, south, west, level, center, duration) {\r\n if ($type.isNaN(level)) {\r\n level = 1;\r\n }\r\n var w = $math.min(west, east);\r\n var e = $math.max(west, east);\r\n west = w;\r\n east = e;\r\n var splitLongitude = $math.normalizeAngle(180 - this.deltaLongitude);\r\n if (splitLongitude > 180) {\r\n splitLongitude -= 360;\r\n }\r\n var newLong = west + (east - west) / 2;\r\n var d = (west - east);\r\n if (west < splitLongitude && east > splitLongitude) {\r\n newLong += 180;\r\n d = $math.normalizeAngle(east - west - 360);\r\n }\r\n var zoomLevel = level * Math.min((this.south - this.north) / (south - north), Math.abs((this.west - this.east) / d));\r\n return this.zoomToGeoPoint({ latitude: north + (south - north) / 2, longitude: newLong }, zoomLevel, center, duration, true);\r\n };\r\n /**\r\n * Zooms in the map, optionally centering on particular latitude/longitude\r\n * point.\r\n *\r\n * @param geoPoint Optional center point\r\n * @param duration Duration for zoom animation (ms)\r\n * @return Zoom animation\r\n */\r\n MapChart.prototype.zoomIn = function (geoPoint, duration, sensitivity) {\r\n if (sensitivity === void 0) { sensitivity = 1; }\r\n var step = 1 + (this.zoomStep - 1) * sensitivity;\r\n if (step < 1) {\r\n step = 1;\r\n }\r\n return this.zoomToGeoPoint(geoPoint, this.zoomLevel * step, false, duration);\r\n };\r\n /**\r\n * Zooms out the map, optionally centering on particular latitude/longitude\r\n * point.\r\n *\r\n * @param geoPoint Optional center point\r\n * @param duration Duration for zoom animation (ms)\r\n * @return Zoom animation\r\n */\r\n MapChart.prototype.zoomOut = function (geoPoint, duration, sensitivity) {\r\n if (sensitivity === void 0) { sensitivity = 1; }\r\n var step = 1 + (this.zoomStep - 1) * sensitivity;\r\n if (step < 1) {\r\n step = 1;\r\n }\r\n return this.zoomToGeoPoint(geoPoint, this.zoomLevel / step, false, duration);\r\n };\r\n /**\r\n * Pans the maps using relative coordinates. E.g.:\r\n *\r\n * ```JSON\r\n * {\r\n * x: 0.1,\r\n * y: -0.1\r\n * }\r\n * ```\r\n *\r\n * The above will move the map by 10% to the right, and by 10% upwards.\r\n *\r\n * @param shift Vertical and horizontal shift\r\n * @param duration Pan animation duration (ms)\r\n */\r\n MapChart.prototype.pan = function (shift, duration) {\r\n var point = this.geoPointToSVG(this.zoomGeoPoint);\r\n point.x += this.pixelWidth * shift.x;\r\n point.y += this.pixelHeight * shift.y;\r\n this.zoomToGeoPoint(this.svgPointToGeo(point), this.zoomLevel, true, duration, true);\r\n };\r\n Object.defineProperty(MapChart.prototype, \"zoomGeoPoint\", {\r\n /**\r\n * Current lat/long coordinates for the center of the viewport. (default\r\n * zoom reference point)\r\n *\r\n * @readonly\r\n * @return Coordinates\r\n */\r\n get: function () {\r\n var point = $utils.spritePointToSvg({ x: this.pixelWidth / 2, y: this.pixelHeight / 2 }, this);\r\n return this.svgPointToGeo(point);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapChart.prototype, \"zoomLevel\", {\r\n /**\r\n * @return Zoom level\r\n */\r\n get: function () {\r\n return this.seriesContainer.scale;\r\n },\r\n /**\r\n * Current zoom level.\r\n *\r\n * @readonly\r\n * @return Zoom level\r\n */\r\n set: function (value) {\r\n this.seriesContainer.scale = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Dispatches events after some map transformation, like pan or zoom.\r\n *\r\n * @ignore\r\n */\r\n MapChart.prototype.handleMapTransform = function () {\r\n if (this.zoomLevel != this._prevZoomLevel) {\r\n this.dispatch(\"zoomlevelchanged\");\r\n this._prevZoomLevel = this.zoomLevel;\r\n this.svgContainer.readerAlert(this.language.translate(\"Zoom level changed to %1\", this.language.locale, $type.castString(this.zoomLevel)));\r\n }\r\n if (this.zoomGeoPoint && (this._prevZoomGeoPoint.latitude != this.zoomGeoPoint.latitude || this._prevZoomGeoPoint.longitude != this.zoomGeoPoint.longitude)) {\r\n this.dispatch(\"mappositionchanged\");\r\n }\r\n };\r\n Object.defineProperty(MapChart.prototype, \"smallMap\", {\r\n /**\r\n * @return Small map\r\n */\r\n get: function () {\r\n if (!this._smallMap) {\r\n var smallMap = new SmallMap();\r\n this.smallMap = smallMap;\r\n }\r\n return this._smallMap;\r\n },\r\n /**\r\n * A [[SmallMap]] to be used on the map.\r\n *\r\n * Please note, that accessing this property will NOT create a small map\r\n * if it has not yet been created. (except in JSON)\r\n *\r\n * ```TypeScript\r\n * // Create a small map\r\n * map.smallMap = new am4maps.SmallMap();\r\n * ```\r\n * ```JavaScript\r\n * // Create a small map\r\n * map.smallMap = new am4maps.SmallMap();\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"smallMap\": {}\r\n * // ...\r\n * }\r\n * ```\r\n *\r\n * @param smallMap Small map\r\n */\r\n set: function (smallMap) {\r\n if (this._smallMap) {\r\n this.removeDispose(this._smallMap);\r\n }\r\n this._smallMap = smallMap;\r\n this._smallMap.chart = this;\r\n smallMap.parent = this.chartContainer;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapChart.prototype, \"zoomControl\", {\r\n /**\r\n * @return Zoom control\r\n */\r\n get: function () {\r\n return this._zoomControl;\r\n },\r\n /**\r\n * A [[ZoomControl]] to be used on the map.\r\n *\r\n * Please note, that accessing this property will NOT create a zoom control\r\n * if it has not yet been created. (except in JSON)\r\n *\r\n * ```TypeScript\r\n * // Create a zoom control\r\n * map.zoomControl = new am4maps.ZoomControl();\r\n * ```\r\n * ```JavaScript\r\n * // Create a zoom control\r\n * map.zoomControl = new am4maps.ZoomControl();\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"zoomControl\": {}\r\n * // ...\r\n * }\r\n * ```\r\n *\r\n * @param zoomControl Zoom control\r\n */\r\n set: function (zoomControl) {\r\n if (this._zoomControl) {\r\n this.removeDispose(this._zoomControl);\r\n }\r\n this._zoomControl = zoomControl;\r\n zoomControl.chart = this;\r\n zoomControl.parent = this.chartContainer;\r\n zoomControl.plusButton.exportable = false;\r\n zoomControl.minusButton.exportable = false;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Creates and returns a map series of appropriate type.\r\n *\r\n * @return Map series\r\n */\r\n MapChart.prototype.createSeries = function () {\r\n return new MapSeries();\r\n };\r\n Object.defineProperty(MapChart.prototype, \"deltaLongitude\", {\r\n /**\r\n * @return Rotation\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"deltaLongitude\");\r\n },\r\n /**\r\n * Degrees to rotate the map around vertical axis (Y).\r\n *\r\n * E.g. if set to -160, the longitude 20 will become a new center, creating\r\n * a Pacific-centered map.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/chart-types/map/#Map_rotation} For more info on map rotation.\r\n * @param value Rotation\r\n */\r\n set: function (value) {\r\n value = $math.round(value, 3);\r\n if (this.setPropertyValue(\"deltaLongitude\", $geo.wrapAngleTo180(value))) {\r\n this.rotateMap();\r\n this.updateZoomGeoPoint();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapChart.prototype, \"deltaLatitude\", {\r\n /**\r\n * @return Rotation\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"deltaLatitude\");\r\n },\r\n /**\r\n * Degrees to rotate the map around horizontal axis (X).\r\n *\r\n * E.g. setting this to 90 will put Antarctica directly in the center of\r\n * the map.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/chart-types/map/#Map_rotation} For more info on map rotation.\r\n * @since 4.3.0\r\n * @param value Rotation\r\n */\r\n set: function (value) {\r\n value = $math.round(value, 3);\r\n if (this.setPropertyValue(\"deltaLatitude\", value)) {\r\n this.rotateMap();\r\n this.updateZoomGeoPoint();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapChart.prototype, \"deltaGamma\", {\r\n /**\r\n * @return Rotation\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"deltaGamma\");\r\n },\r\n /**\r\n * Degrees to rotate the map around \"Z\" axis. This is the axis that pierces\r\n * the globe directly from the viewer's point of view.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/chart-types/map/#Map_rotation} For more info on map rotation.\r\n * @since 4.3.0\r\n * @param value Rotation\r\n */\r\n set: function (value) {\r\n value = $math.round(value, 3);\r\n if (this.setPropertyValue(\"deltaGamma\", value)) {\r\n this.rotateMap();\r\n this.updateZoomGeoPoint();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * @ignore\r\n */\r\n MapChart.prototype.rotateMap = function () {\r\n if (this.projection.d3Projection) {\r\n if (this.projection.d3Projection.rotate) {\r\n this.projection.d3Projection.rotate([this.deltaLongitude, this.deltaLatitude, this.deltaGamma]);\r\n this.invalidateProjection();\r\n //this.updateExtremes(); // removal fixes #3292\r\n }\r\n }\r\n };\r\n Object.defineProperty(MapChart.prototype, \"maxPanOut\", {\r\n /**\r\n * @return Max pan out\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"maxPanOut\");\r\n },\r\n /**\r\n * Maximum portion of the map's width/height to allow panning \"off screen\".\r\n *\r\n * A value of 0 (zero) will prevent any portion of the the map to be panned\r\n * outside the viewport.\r\n *\r\n * 0.5 will allow half of the map to be outside viewable area.\r\n *\r\n * @default 0.7\r\n * @param value Max pan out\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"maxPanOut\", value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapChart.prototype, \"homeGeoPoint\", {\r\n /**\r\n * @return Home geo point\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"homeGeoPoint\");\r\n },\r\n /**\r\n * The geographical point to center map on when it is first loaded.\r\n *\r\n * The map will also be centered to this point when you call `goHome()`\r\n * method.\r\n *\r\n * @param value Home geo point\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"homeGeoPoint\", value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapChart.prototype, \"homeZoomLevel\", {\r\n /**\r\n * @return Home zoom level\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"homeZoomLevel\");\r\n },\r\n /**\r\n * The zoom level to put the map in when it is first loaded.\r\n *\r\n * The map will also be set to this zoom level when you call `goHome()`\r\n * method.\r\n *\r\n * @param value Home zoom level\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"homeZoomLevel\", value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapChart.prototype, \"zoomStep\", {\r\n /**\r\n * @return Zoom factor\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"zoomStep\");\r\n },\r\n /**\r\n * When user zooms in or out current zoom level is multiplied or divided\r\n * by value of this setting.\r\n *\r\n * @default 2\r\n * @param value Zoom factor\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"zoomStep\", value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Invalidates projection, causing all series to be redrawn.\r\n *\r\n * Call this after changing projection or its settings.\r\n */\r\n MapChart.prototype.invalidateProjection = function () {\r\n this.east = undefined;\r\n this.invalidateDataUsers();\r\n this.updateCenterGeoPoint();\r\n };\r\n Object.defineProperty(MapChart.prototype, \"geodataSource\", {\r\n /**\r\n * Returns a [[DataSource]] specifically for loading Component's data.\r\n *\r\n * @return Data source\r\n */\r\n get: function () {\r\n var _this = this;\r\n if (!this._dataSources[\"geodata\"]) {\r\n var dataSource = this.getDataSource(\"geodata\");\r\n dataSource.events.on(\"parseended\", function () {\r\n _this.events.once(\"datavalidated\", function () {\r\n _this.goHome(0);\r\n });\r\n });\r\n }\r\n return this._dataSources[\"geodata\"];\r\n },\r\n /**\r\n * Sets a [[DataSource]] to be used for loading Component's data.\r\n *\r\n * @param value Data source\r\n */\r\n set: function (value) {\r\n var _this = this;\r\n if (this._dataSources[\"geodata\"]) {\r\n this.removeDispose(this._dataSources[\"geodata\"]);\r\n }\r\n this._dataSources[\"geodata\"] = value;\r\n this._dataSources[\"geodata\"].component = this;\r\n this.events.on(\"inited\", function () {\r\n _this.loadData(\"geodata\");\r\n }, this, false);\r\n this.setDataSourceEvents(value, \"geodata\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Processes JSON-based config before it is applied to the object.\r\n *\r\n * @ignore Exclude from docs\r\n * @param config Config\r\n */\r\n MapChart.prototype.processConfig = function (config) {\r\n if ($type.hasValue(config[\"geodata\"]) && $type.isString(config[\"geodata\"])) {\r\n var name_1 = config[\"geodata\"];\r\n // Check if there's a map loaded by such name\r\n if ($type.hasValue(window[\"am4geodata_\" + config[\"geodata\"]])) {\r\n config[\"geodata\"] = window[\"am4geodata_\" + config[\"geodata\"]];\r\n }\r\n // Nope. Let's try maybe we got JSON as string?\r\n else {\r\n try {\r\n config[\"geodata\"] = JSON.parse(config[\"geodata\"]);\r\n }\r\n catch (e) {\r\n // No go again. Error out.\r\n this.raiseCriticalError(Error(\"MapChart error: Geodata `\" + name_1 + \"` is not loaded or is incorrect.\"), true);\r\n }\r\n }\r\n }\r\n // Instantiate projection\r\n if ($type.hasValue(config[\"projection\"]) && $type.isString(config[\"projection\"])) {\r\n config[\"projection\"] = this.createClassInstance(config[\"projection\"]);\r\n }\r\n // Set up small map\r\n if ($type.hasValue(config.smallMap) && !$type.hasValue(config.smallMap.type)) {\r\n config.smallMap.type = \"SmallMap\";\r\n }\r\n // Set up zoom control\r\n if ($type.hasValue(config.zoomControl) && !$type.hasValue(config.zoomControl.type)) {\r\n config.zoomControl.type = \"ZoomControl\";\r\n }\r\n _super.prototype.processConfig.call(this, config);\r\n };\r\n /**\r\n * Decorates a new [[Series]] object with required parameters when it is\r\n * added to the chart.\r\n *\r\n * @ignore Exclude from docs\r\n * @param event Event\r\n */\r\n MapChart.prototype.handleSeriesAdded = function (event) {\r\n _super.prototype.handleSeriesAdded.call(this, event);\r\n var series = event.newValue;\r\n series.scale = this.scaleRatio;\r\n series.events.on(\"validated\", this.updateCenterGeoPoint, this, false);\r\n };\r\n /**\r\n * This function is used to sort element's JSON config properties, so that\r\n * some properties that absolutely need to be processed last, can be put at\r\n * the end.\r\n *\r\n * @ignore Exclude from docs\r\n * @param a Element 1\r\n * @param b Element 2\r\n * @return Sorting number\r\n */\r\n MapChart.prototype.configOrder = function (a, b) {\r\n if (a == b) {\r\n return 0;\r\n }\r\n // Must come last\r\n else if (a == \"smallMap\") {\r\n return 1;\r\n }\r\n else if (b == \"smallMap\") {\r\n return -1;\r\n }\r\n else if (a == \"series\") {\r\n return 1;\r\n }\r\n else if (b == \"series\") {\r\n return -1;\r\n }\r\n else {\r\n return _super.prototype.configOrder.call(this, a, b);\r\n }\r\n };\r\n /**\r\n * Adds `projection` to \"as is\" fields.\r\n *\r\n * @param field Field name\r\n * @return Assign as is?\r\n */\r\n MapChart.prototype.asIs = function (field) {\r\n return field == \"projection\" || field == \"geodata\" || _super.prototype.asIs.call(this, field);\r\n };\r\n Object.defineProperty(MapChart.prototype, \"centerGeoPoint\", {\r\n /**\r\n * Geo point of map center\r\n *\r\n * @readonly\r\n */\r\n get: function () {\r\n return this._centerGeoPoint;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Resets the map to its original position and zoom level.\r\n *\r\n * Use the only parameter to set number of milliseconds for the zoom\r\n * animation to play.\r\n *\r\n * @param duration Duration (ms)\r\n */\r\n MapChart.prototype.goHome = function (duration) {\r\n var homeGeoPoint = this.homeGeoPoint;\r\n if (!homeGeoPoint) {\r\n homeGeoPoint = this.centerGeoPoint;\r\n }\r\n if (homeGeoPoint) {\r\n this.zoomToGeoPoint(homeGeoPoint, this.homeZoomLevel, true, duration, true);\r\n }\r\n };\r\n /**\r\n * Sets [[Paper]] instance to use to draw elements.\r\n *\r\n * @ignore\r\n * @param paper Paper\r\n * @return true if paper was changed, false, if it's the same\r\n */\r\n MapChart.prototype.setPaper = function (paper) {\r\n if (this.svgContainer) {\r\n this.svgContainer.hideOverflow = true;\r\n }\r\n return _super.prototype.setPaper.call(this, paper);\r\n };\r\n Object.defineProperty(MapChart.prototype, \"backgroundSeries\", {\r\n /**\r\n * Background series will create polygons that will fill all the map area\r\n * with some color (or other fill).\r\n *\r\n * This might be useful with non-rectangular projections, like Orthographic,\r\n * Albers, etc.\r\n *\r\n * To change background color/opacity access polygon template.\r\n *\r\n * ```TypeScript\r\n * chart.backgroundSeries.mapPolygons.template.polygon.fill = am4core.color(\"#fff\");\r\n * chart.backgroundSeries.mapPolygons.template.polygon.fillOpacity = 0.1;\r\n * ```\r\n * ```JavaScript\r\n * chart.backgroundSeries.mapPolygons.template.polygon.fill = am4core.color(\"#fff\");\r\n * chart.backgroundSeries.mapPolygons.template.polygon.fillOpacity = 0.1;\r\n * ```\r\n * ```JSON\r\n * {\r\n * \"backgroundSeries\": {\r\n * \"mapPolygons\": {\r\n * \"polygon\": {\r\n * \"fill\": \"#fff\",\r\n * \"fillOpacity\": 0.1\r\n * }\r\n * }\r\n * }\r\n * }\r\n * ```\r\n *\r\n * @since 4.3.0\r\n */\r\n get: function () {\r\n var _this = this;\r\n if (!this._backgroundSeries) {\r\n var backgroundSeries = new MapPolygonSeries();\r\n backgroundSeries.parent = this.seriesContainer;\r\n backgroundSeries.chart = this;\r\n backgroundSeries.hiddenInLegend = true;\r\n backgroundSeries.mapPolygons.template.focusable = false;\r\n backgroundSeries.addDisposer(new Disposer(function () {\r\n _this._backgroundSeries = undefined;\r\n }));\r\n this._disposers.push(backgroundSeries);\r\n var interfaceColors = new InterfaceColorSet();\r\n var color = interfaceColors.getFor(\"background\");\r\n var polygonTemplate = backgroundSeries.mapPolygons.template.polygon;\r\n polygonTemplate.stroke = color;\r\n polygonTemplate.fill = color;\r\n polygonTemplate.fillOpacity = 0;\r\n polygonTemplate.strokeOpacity = 0;\r\n //polygonTemplate.focusable = false;\r\n backgroundSeries.mapPolygons.create();\r\n this._backgroundSeries = backgroundSeries;\r\n }\r\n return this._backgroundSeries;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Prepares the legend instance for use in this chart.\r\n *\r\n * @param legend Legend\r\n */\r\n MapChart.prototype.setLegend = function (legend) {\r\n _super.prototype.setLegend.call(this, legend);\r\n if (legend) {\r\n legend.parent = this;\r\n }\r\n };\r\n /**\r\n * @param value Tap to activate?\r\n */\r\n MapChart.prototype.setTapToActivate = function (value) {\r\n _super.prototype.setTapToActivate.call(this, value);\r\n // setup other containers\r\n this.seriesContainer.interactions.isTouchProtected = true;\r\n this.panSprite.interactions.isTouchProtected = true;\r\n };\r\n MapChart.prototype.handleTapToActivate = function () {\r\n _super.prototype.handleTapToActivate.call(this);\r\n this.seriesContainer.interactions.isTouchProtected = false;\r\n this.panSprite.interactions.isTouchProtected = false;\r\n };\r\n MapChart.prototype.handleTapToActivateDeactivation = function () {\r\n _super.prototype.handleTapToActivateDeactivation.call(this);\r\n this.seriesContainer.interactions.isTouchProtected = true;\r\n this.panSprite.interactions.isTouchProtected = true;\r\n };\r\n /**\r\n * Adds easing functions to \"function\" fields.\r\n *\r\n * @param field Field name\r\n * @return Assign as function?\r\n */\r\n MapChart.prototype.asFunction = function (field) {\r\n return field == \"zoomEasing\" || _super.prototype.asIs.call(this, field);\r\n };\r\n /**\r\n * @ignore\r\n * @return Has license?\r\n */\r\n MapChart.prototype.hasLicense = function () {\r\n if (options.commercialLicense) {\r\n return true;\r\n }\r\n if (!_super.prototype.hasLicense.call(this)) {\r\n return false;\r\n }\r\n for (var i = 0; i < options.licenses.length; i++) {\r\n if (options.licenses[i].match(/^MP.{5,}/i)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n };\r\n return MapChart;\r\n}(SerialChart));\r\nexport { MapChart };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"MapChart\"] = MapChart;\r\n","/**\r\n * Map spline module\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { MapLine } from \"./MapLine\";\r\nimport { Polyspline } from \"../../core/elements/Polyspline\";\r\nimport { registry } from \"../../core/Registry\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Used to draw a spline on the map.\r\n *\r\n * @see {@link IMapSplineEvents} for a list of available events\r\n * @see {@link IMapSplineAdapters} for a list of available Adapters\r\n */\r\nvar MapSpline = /** @class */ (function (_super) {\r\n __extends(MapSpline, _super);\r\n /**\r\n * Constructor\r\n */\r\n function MapSpline() {\r\n var _this = \r\n // Init\r\n _super.call(this) || this;\r\n _this.className = \"MapSpline\";\r\n // Apply theme\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * @ignore\r\n */\r\n MapSpline.prototype.createLine = function () {\r\n this.line = new Polyspline();\r\n this.line.tensionX = 0.8;\r\n this.line.tensionY = 0.8;\r\n };\r\n Object.defineProperty(MapSpline.prototype, \"shortestDistance\", {\r\n /**\r\n * ShortestDistance = true is not supported by MapSpline, only MapLine does support it\r\n * @default false\r\n * @param value\r\n * @todo: review description\r\n */\r\n get: function () {\r\n return false;\r\n },\r\n set: function (value) {\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return MapSpline;\r\n}(MapLine));\r\nexport { MapSpline };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"MapSpline\"] = MapSpline;\r\n","/**\r\n * Map arched line module\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { MapLine } from \"./MapLine\";\r\nimport { Polyarc } from \"../../core/elements/Polyarc\";\r\nimport { registry } from \"../../core/Registry\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Used to draw an arched line on the map.\r\n *\r\n * @see {@link IMapArcEvents} for a list of available events\r\n * @see {@link IMapArcAdapters} for a list of available Adapters\r\n */\r\nvar MapArc = /** @class */ (function (_super) {\r\n __extends(MapArc, _super);\r\n /**\r\n * Constructor\r\n */\r\n function MapArc() {\r\n var _this = \r\n // Init\r\n _super.call(this) || this;\r\n _this.className = \"MapArc\";\r\n // Apply theme\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * @ignore\r\n */\r\n MapArc.prototype.createLine = function () {\r\n this.line = new Polyarc();\r\n };\r\n Object.defineProperty(MapArc.prototype, \"shortestDistance\", {\r\n get: function () {\r\n return false;\r\n },\r\n /**\r\n * `shortestDistance = true` is not supported by `MapArc`.\r\n *\r\n * Only [[MapLine]] supports it.\r\n *\r\n * @default false\r\n * @param value\r\n */\r\n set: function (value) {\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return MapArc;\r\n}(MapLine));\r\nexport { MapArc };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"MapArc\"] = MapArc;\r\n","/**\r\n * Map spline series module\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { MapLineSeries, MapLineSeriesDataItem } from \"./MapLineSeries\";\r\nimport { MapSpline } from \"./MapSpline\";\r\nimport { registry } from \"../../core/Registry\";\r\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Defines a [[DataItem]] for [[MapSplineSeries]]\r\n * @see {@link DataItem}\r\n */\r\nvar MapSplineSeriesDataItem = /** @class */ (function (_super) {\r\n __extends(MapSplineSeriesDataItem, _super);\r\n /**\r\n * Constructor\r\n */\r\n function MapSplineSeriesDataItem() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"MapSplineSeriesDataItem\";\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n return MapSplineSeriesDataItem;\r\n}(MapLineSeriesDataItem));\r\nexport { MapSplineSeriesDataItem };\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * A series of map spline elements.\r\n *\r\n * @see {@link IMapSplineSeriesEvents} for a list of available Events\r\n * @see {@link IMapSplineSeriesAdapters} for a list of available Adapters\r\n * @important\r\n */\r\nvar MapSplineSeries = /** @class */ (function (_super) {\r\n __extends(MapSplineSeries, _super);\r\n /**\r\n * Constructor\r\n */\r\n function MapSplineSeries() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"MapSplineSeries\";\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * Returns a new/empty DataItem of the type appropriate for this object.\r\n *\r\n * @see {@link DataItem}\r\n * @return Data Item\r\n */\r\n MapSplineSeries.prototype.createDataItem = function () {\r\n return new MapSplineSeriesDataItem();\r\n };\r\n /**\r\n * Returns a new line instance of suitable type.\r\n *\r\n * @return New line\r\n */\r\n MapSplineSeries.prototype.createLine = function () {\r\n return new MapSpline();\r\n };\r\n return MapSplineSeries;\r\n}(MapLineSeries));\r\nexport { MapSplineSeries };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"MapSplineSeries\"] = MapSplineSeries;\r\nregistry.registeredClasses[\"MapSplineSeriesDataItem\"] = MapSplineSeriesDataItem;\r\n","/**\r\n * Map arc series module.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { MapLineSeries, MapLineSeriesDataItem } from \"./MapLineSeries\";\r\nimport { MapArc } from \"./MapArc\";\r\nimport { registry } from \"../../core/Registry\";\r\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Defines a [[DataItem]] for [[MapArcSeries]].\r\n *\r\n * @see {@link DataItem}\r\n */\r\nvar MapArcSeriesDataItem = /** @class */ (function (_super) {\r\n __extends(MapArcSeriesDataItem, _super);\r\n /**\r\n * Constructor\r\n */\r\n function MapArcSeriesDataItem() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"MapArcSeriesDataItem\";\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n return MapArcSeriesDataItem;\r\n}(MapLineSeriesDataItem));\r\nexport { MapArcSeriesDataItem };\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * A series of arc elements. (curved lines)\r\n *\r\n * @see {@link IMapArcSeriesEvents} for a list of available Events\r\n * @see {@link IMapArcSeriesAdapters} for a list of available Adapters\r\n * @important\r\n */\r\nvar MapArcSeries = /** @class */ (function (_super) {\r\n __extends(MapArcSeries, _super);\r\n /**\r\n * Constructor\r\n */\r\n function MapArcSeries() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"MapArcSeries\";\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * Returns a new/empty DataItem of the type appropriate for this object.\r\n *\r\n * @see {@link DataItem}\r\n * @return Data Item\r\n */\r\n MapArcSeries.prototype.createDataItem = function () {\r\n return new MapArcSeriesDataItem();\r\n };\r\n /**\r\n * Returns a new line instance of suitable type.\r\n *\r\n * @return New line\r\n */\r\n MapArcSeries.prototype.createLine = function () {\r\n return new MapArc();\r\n };\r\n return MapArcSeries;\r\n}(MapLineSeries));\r\nexport { MapArcSeries };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"MapArcSeries\"] = MapArcSeries;\r\nregistry.registeredClasses[\"MapArcSeriesDataItem\"] = MapArcSeriesDataItem;\r\n","/**\r\n * Zoom control module\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Container } from \"../../core/Container\";\r\nimport { Button } from \"../../core/elements/Button\";\r\nimport { RoundedRectangle } from \"../../core/elements/RoundedRectangle\";\r\nimport { MutableValueDisposer, MultiDisposer } from \"../../core/utils/Disposer\";\r\nimport { keyboard } from \"../../core/utils/Keyboard\";\r\nimport { getInteraction } from \"../../core/interaction/Interaction\";\r\nimport { percent } from \"../../core/utils/Percent\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Creates a control for zooming the map.\r\n *\r\n * @see {@link IZoomControlEvents} for a list of available events\r\n * @see {@link IZoomControlAdapters} for a list of available Adapters\r\n * @important\r\n */\r\nvar ZoomControl = /** @class */ (function (_super) {\r\n __extends(ZoomControl, _super);\r\n /**\r\n * Constructor\r\n */\r\n function ZoomControl() {\r\n var _this = _super.call(this) || this;\r\n /**\r\n * A target map.\r\n */\r\n _this._chart = new MutableValueDisposer();\r\n _this.className = \"ZoomControl\";\r\n _this.align = \"right\";\r\n _this.valign = \"bottom\";\r\n _this.layout = \"vertical\";\r\n _this.padding(5, 5, 5, 5);\r\n var interfaceColors = new InterfaceColorSet();\r\n var plusButton = _this.createChild(Button);\r\n plusButton.shouldClone = false;\r\n plusButton.label.text = \"+\";\r\n //plusButton.fontFamily = \"Verdana\";\r\n _this.plusButton = plusButton;\r\n var slider = _this.createChild(Container);\r\n slider.shouldClone = false;\r\n slider.background.fill = interfaceColors.getFor(\"alternativeBackground\");\r\n slider.background.fillOpacity = 0.05;\r\n slider.background.events.on(\"hit\", _this.handleBackgroundClick, _this, false);\r\n slider.events.on(\"sizechanged\", _this.updateThumbSize, _this, false);\r\n _this.slider = slider;\r\n var thumb = slider.createChild(Button);\r\n thumb.shouldClone = false;\r\n thumb.padding(0, 0, 0, 0);\r\n thumb.draggable = true;\r\n thumb.events.on(\"drag\", _this.handleThumbDrag, _this, false);\r\n _this.thumb = thumb;\r\n var minusButton = _this.createChild(Button);\r\n minusButton.shouldClone = false;\r\n minusButton.label.text = \"-\";\r\n //minusButton.fontFamily = \"Verdana\";\r\n _this.minusButton = minusButton;\r\n // Set roles\r\n _this.thumb.role = \"slider\";\r\n _this.thumb.readerLive = \"polite\";\r\n // Set reader text\r\n _this.thumb.readerTitle = _this.language.translate(\"Use arrow keys to zoom in and out\");\r\n _this.minusButton.readerTitle = _this.language.translate(\"Press ENTER to zoom in\");\r\n _this.plusButton.readerTitle = _this.language.translate(\"Press ENTER to zoom out\");\r\n _this.applyTheme();\r\n _this.events.on(\"propertychanged\", function (event) {\r\n if (event.property == \"layout\") {\r\n _this.fixLayout();\r\n }\r\n }, undefined, false);\r\n _this._disposers.push(_this._chart);\r\n _this.fixLayout();\r\n return _this;\r\n }\r\n /**\r\n * @ignore\r\n */\r\n ZoomControl.prototype.fixLayout = function () {\r\n var plusButton = this.plusButton;\r\n var minusButton = this.minusButton;\r\n var thumb = this.thumb;\r\n var slider = this.slider;\r\n plusButton.x = undefined;\r\n plusButton.y = undefined;\r\n minusButton.x = undefined;\r\n minusButton.y = undefined;\r\n thumb.x = undefined;\r\n thumb.y = undefined;\r\n slider.x = undefined;\r\n slider.y = undefined;\r\n plusButton.padding(6, 10, 6, 10);\r\n minusButton.padding(6, 10, 6, 10);\r\n minusButton.label.align = \"center\";\r\n minusButton.label.valign = \"middle\";\r\n plusButton.label.align = \"center\";\r\n plusButton.label.valign = \"middle\";\r\n if (this.layout == \"vertical\") {\r\n this.width = 40;\r\n this.height = undefined;\r\n minusButton.width = percent(100);\r\n minusButton.height = undefined;\r\n thumb.width = percent(100);\r\n thumb.height = undefined;\r\n plusButton.width = percent(100);\r\n plusButton.height = undefined;\r\n slider.width = percent(100);\r\n minusButton.marginTop = 1;\r\n plusButton.marginBottom = 2;\r\n slider.height = 0;\r\n minusButton.toFront();\r\n plusButton.toBack();\r\n thumb.minX = 0;\r\n thumb.maxX = 0;\r\n thumb.minY = 0;\r\n }\r\n else if (this.layout == \"horizontal\") {\r\n this.height = 40;\r\n this.width = undefined;\r\n minusButton.height = percent(100);\r\n minusButton.width = undefined;\r\n plusButton.height = percent(100);\r\n plusButton.width = undefined;\r\n thumb.height = percent(100);\r\n thumb.width = undefined;\r\n thumb.minX = 0;\r\n thumb.minY = 0;\r\n thumb.maxY = 0;\r\n slider.height = percent(100);\r\n slider.width = 0;\r\n minusButton.toBack();\r\n plusButton.toFront();\r\n }\r\n };\r\n /**\r\n * Handles zoom operation after clicking on the slider background.\r\n *\r\n * @ignore Exclude from docs\r\n * @param event Event\r\n */\r\n ZoomControl.prototype.handleBackgroundClick = function (event) {\r\n var sprite = event.target;\r\n var y = event.spritePoint.y;\r\n var chart = this.chart;\r\n var maxPower = Math.log(chart.maxZoomLevel) / Math.LN2;\r\n var minPower = Math.log(chart.minZoomLevel) / Math.LN2;\r\n var power = (sprite.pixelHeight - y) / sprite.pixelHeight * (minPower + (maxPower - minPower));\r\n var zoomLevel = Math.pow(2, power);\r\n chart.zoomToGeoPoint(chart.zoomGeoPoint, zoomLevel);\r\n };\r\n Object.defineProperty(ZoomControl.prototype, \"chart\", {\r\n /**\r\n * @return Map/chart\r\n */\r\n get: function () {\r\n return this._chart.get();\r\n },\r\n /**\r\n * A main chart/map that this zoom control is for.\r\n *\r\n * @param chart Map/chart\r\n */\r\n set: function (chart) {\r\n var _this = this;\r\n this._chart.set(chart, new MultiDisposer([\r\n chart.events.on(\"maxsizechanged\", this.updateThumbSize, this, false),\r\n chart.events.on(\"zoomlevelchanged\", this.updateThumb, this, false),\r\n this.minusButton.events.on(\"hit\", function () { chart.zoomOut(chart.zoomGeoPoint); }, chart, false),\r\n getInteraction().body.events.on(\"keyup\", function (ev) {\r\n if (_this.topParent.hasFocused) {\r\n // ENTER is now handled globally\r\n if (keyboard.isKey(ev.event, \"plus\")) {\r\n chart.zoomIn();\r\n }\r\n else if (keyboard.isKey(ev.event, \"minus\")) {\r\n chart.zoomOut();\r\n }\r\n }\r\n }, chart),\r\n this.plusButton.events.on(\"hit\", function () { chart.zoomIn(chart.zoomGeoPoint); }, chart, false)\r\n ]));\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Updates the slider's thumb size based on the available zoom space.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n ZoomControl.prototype.updateThumbSize = function () {\r\n var chart = this.chart;\r\n if (chart) {\r\n var slider = this.slider;\r\n var thumb = this.thumb;\r\n if (this.layout == \"vertical\") {\r\n thumb.minHeight = Math.min(this.slider.pixelHeight, 20);\r\n thumb.height = slider.pixelHeight / this.stepCount;\r\n thumb.maxY = slider.pixelHeight - thumb.pixelHeight;\r\n if (thumb.pixelHeight <= 1) {\r\n thumb.visible = false;\r\n }\r\n else {\r\n thumb.visible = true;\r\n }\r\n }\r\n else {\r\n thumb.minWidth = Math.min(this.slider.pixelWidth, 20);\r\n thumb.width = slider.pixelWidth / this.stepCount;\r\n thumb.maxX = slider.pixelWidth - thumb.pixelWidth;\r\n if (thumb.pixelWidth <= 1) {\r\n thumb.visible = false;\r\n }\r\n else {\r\n thumb.visible = true;\r\n }\r\n }\r\n }\r\n };\r\n /**\r\n * Updates thumb according to current zoom position from map.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n ZoomControl.prototype.updateThumb = function () {\r\n var slider = this.slider;\r\n var chart = this.chart;\r\n var thumb = this.thumb;\r\n if (!thumb.isDown) {\r\n var step = (Math.log(chart.zoomLevel) - Math.log(this.chart.minZoomLevel)) / Math.LN2;\r\n if (this.layout == \"vertical\") {\r\n thumb.y = slider.pixelHeight - (slider.pixelHeight - thumb.pixelHeight) * step / this.stepCount - thumb.pixelHeight;\r\n }\r\n else {\r\n thumb.x = slider.pixelWidth * step / this.stepCount;\r\n }\r\n }\r\n };\r\n /**\r\n * Zooms the actual map when slider position changes.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n ZoomControl.prototype.handleThumbDrag = function () {\r\n var slider = this.slider;\r\n var chart = this.chart;\r\n var thumb = this.thumb;\r\n var step;\r\n var minStep = Math.log(this.chart.minZoomLevel) / Math.LN2;\r\n if (this.layout == \"vertical\") {\r\n step = this.stepCount * (slider.pixelHeight - thumb.pixelY - thumb.pixelHeight) / (slider.pixelHeight - thumb.pixelHeight);\r\n }\r\n else {\r\n step = this.stepCount * thumb.pixelX / slider.pixelWidth;\r\n }\r\n step = minStep + step;\r\n var zoomLevel = Math.pow(2, step);\r\n chart.zoomToGeoPoint(undefined, zoomLevel, false, 0);\r\n };\r\n Object.defineProperty(ZoomControl.prototype, \"stepCount\", {\r\n /**\r\n * Returns the step countfor the slider grid according to map's min and max\r\n * zoom level settings.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Step count\r\n */\r\n get: function () {\r\n return Math.log(this.chart.maxZoomLevel) / Math.LN2 - Math.log(this.chart.minZoomLevel) / Math.LN2;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Creates a background element for slider control.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Background\r\n */\r\n ZoomControl.prototype.createBackground = function () {\r\n return new RoundedRectangle();\r\n };\r\n return ZoomControl;\r\n}(Container));\r\nexport { ZoomControl };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"ZoomControl\"] = ZoomControl;\r\n","import {atan, exp, halfPi, log, pi, tan, tau} from \"../math.js\";\nimport rotation from \"../rotation.js\";\nimport projection from \"./index.js\";\n\nexport function mercatorRaw(lambda, phi) {\n return [lambda, log(tan((halfPi + phi) / 2))];\n}\n\nmercatorRaw.invert = function(x, y) {\n return [x, 2 * atan(exp(y)) - halfPi];\n};\n\nexport default function() {\n return mercatorProjection(mercatorRaw)\n .scale(961 / tau);\n}\n\nexport function mercatorProjection(project) {\n var m = projection(project),\n center = m.center,\n scale = m.scale,\n translate = m.translate,\n clipExtent = m.clipExtent,\n x0 = null, y0, x1, y1; // clip extent\n\n m.scale = function(_) {\n return arguments.length ? (scale(_), reclip()) : scale();\n };\n\n m.translate = function(_) {\n return arguments.length ? (translate(_), reclip()) : translate();\n };\n\n m.center = function(_) {\n return arguments.length ? (center(_), reclip()) : center();\n };\n\n m.clipExtent = function(_) {\n return arguments.length ? ((_ == null ? x0 = y0 = x1 = y1 = null : (x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1])), reclip()) : x0 == null ? null : [[x0, y0], [x1, y1]];\n };\n\n function reclip() {\n var k = pi * scale(),\n t = m(rotation(m.rotate()).invert([0, 0]));\n return clipExtent(x0 == null\n ? [[t[0] - k, t[1] - k], [t[0] + k, t[1] + k]] : project === mercatorRaw\n ? [[Math.max(t[0] - k, x0), y0], [Math.min(t[0] + k, x1), y1]]\n : [[x0, Math.max(t[1] - k, y0)], [x1, Math.min(t[1] + k, y1)]]);\n }\n\n return reclip();\n}\n","/**\r\n * Functionality for Mercator projection\r\n *\r\n * The function(s) below are from D3.js library (https://d3js.org/)\r\n *\r\n * ```\r\n * Copyright 2017 Mike Bostock\r\n *\r\n * Redistribution and use in source and binary forms, with or without\r\n * modification, are permitted provided that the following conditions are met:\r\n *\r\n * 1. Redistributions of source code must retain the above copyright notice,\r\n * this list of conditions and the following disclaimer.\r\n *\r\n * 2. Redistributions in binary form must reproduce the above copyright notice,\r\n * this list of conditions and the following disclaimer in the documentation\r\n * and/or other materials provided with the distribution.\r\n *\r\n * 3. Neither the name of the copyright holder nor the names of its\r\n * contributors may be used to endorse or promote products derived from this\r\n * software without specific prior written permission.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\r\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\r\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\r\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\r\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n * ```\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Projection } from \"./Projection\";\r\nimport { registry } from \"../../../core/Registry\";\r\nimport * as d3geo from \"d3-geo\";\r\n/**\r\n * Mercator projection.\r\n */\r\nvar Mercator = /** @class */ (function (_super) {\r\n __extends(Mercator, _super);\r\n function Mercator() {\r\n var _this = _super.call(this) || this;\r\n _this.d3Projection = d3geo.geoMercator();\r\n return _this;\r\n }\r\n return Mercator;\r\n}(Projection));\r\nexport { Mercator };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"Mercator\"] = Mercator;\r\n","export var abs = Math.abs;\nexport var atan = Math.atan;\nexport var atan2 = Math.atan2;\nexport var ceil = Math.ceil;\nexport var cos = Math.cos;\nexport var exp = Math.exp;\nexport var floor = Math.floor;\nexport var log = Math.log;\nexport var max = Math.max;\nexport var min = Math.min;\nexport var pow = Math.pow;\nexport var round = Math.round;\nexport var sign = Math.sign || function(x) { return x > 0 ? 1 : x < 0 ? -1 : 0; };\nexport var sin = Math.sin;\nexport var tan = Math.tan;\n\nexport var epsilon = 1e-6;\nexport var epsilon2 = 1e-12;\nexport var pi = Math.PI;\nexport var halfPi = pi / 2;\nexport var quarterPi = pi / 4;\nexport var sqrt1_2 = Math.SQRT1_2;\nexport var sqrt2 = sqrt(2);\nexport var sqrtPi = sqrt(pi);\nexport var tau = pi * 2;\nexport var degrees = 180 / pi;\nexport var radians = pi / 180;\n\nexport function sinci(x) {\n return x ? x / Math.sin(x) : 1;\n}\n\nexport function asin(x) {\n return x > 1 ? halfPi : x < -1 ? -halfPi : Math.asin(x);\n}\n\nexport function acos(x) {\n return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);\n}\n\nexport function sqrt(x) {\n return x > 0 ? Math.sqrt(x) : 0;\n}\n\nexport function tanh(x) {\n x = exp(2 * x);\n return (x - 1) / (x + 1);\n}\n\nexport function sinh(x) {\n return (exp(x) - exp(-x)) / 2;\n}\n\nexport function cosh(x) {\n return (exp(x) + exp(-x)) / 2;\n}\n\nexport function arsinh(x) {\n return log(x + sqrt(x * x + 1));\n}\n\nexport function arcosh(x) {\n return log(x + sqrt(x * x - 1));\n}\n","import {geoProjection as projection} from \"d3-geo\";\nimport {atan, exp, log, quarterPi, pi, tan} from \"./math.js\";\n\nexport function millerRaw(lambda, phi) {\n return [lambda, 1.25 * log(tan(quarterPi + 0.4 * phi))];\n}\n\nmillerRaw.invert = function(x, y) {\n return [x, 2.5 * atan(exp(0.8 * y)) - 0.625 * pi];\n};\n\nexport default function() {\n return projection(millerRaw)\n .scale(108.318);\n}\n","/**\r\n * Functionality for Miller projection\r\n *\r\n * The function(s) below are from D3.js library (https://d3js.org/)\r\n *\r\n * ```\r\n * Copyright 2017 Mike Bostock\r\n *\r\n * Redistribution and use in source and binary forms, with or without\r\n * modification, are permitted provided that the following conditions are met:\r\n *\r\n * 1. Redistributions of source code must retain the above copyright notice,\r\n * this list of conditions and the following disclaimer.\r\n *\r\n * 2. Redistributions in binary form must reproduce the above copyright notice,\r\n * this list of conditions and the following disclaimer in the documentation\r\n * and/or other materials provided with the distribution.\r\n *\r\n * 3. Neither the name of the copyright holder nor the names of its\r\n * contributors may be used to endorse or promote products derived from this\r\n * software without specific prior written permission.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\r\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\r\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\r\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\r\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n * ```\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Projection } from \"./Projection\";\r\nimport { registry } from \"../../../core/Registry\";\r\n// @ts-ignore\r\nimport * as d3geoprojection from \"d3-geo-projection\";\r\n/**\r\n * Miller projection.\r\n */\r\nvar Miller = /** @class */ (function (_super) {\r\n __extends(Miller, _super);\r\n function Miller() {\r\n var _this = _super.call(this) || this;\r\n _this.d3Projection = d3geoprojection.geoMiller();\r\n return _this;\r\n }\r\n return Miller;\r\n}(Projection));\r\nexport { Miller };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"Miller\"] = Miller;\r\n","import {geoProjection as projection} from \"d3-geo\";\nimport {abs, asin, cos, epsilon, halfPi, pi, sin, sqrt} from \"./math.js\";\n\nexport function eckert6Raw(lambda, phi) {\n var k = (1 + halfPi) * sin(phi);\n for (var i = 0, delta = Infinity; i < 10 && abs(delta) > epsilon; i++) {\n phi -= delta = (phi + sin(phi) - k) / (1 + cos(phi));\n }\n k = sqrt(2 + pi);\n return [\n lambda * (1 + cos(phi)) / k,\n 2 * phi / k\n ];\n}\n\neckert6Raw.invert = function(x, y) {\n var j = 1 + halfPi,\n k = sqrt(j / 2);\n return [\n x * 2 * k / (1 + cos(y *= k)),\n asin((y + sin(y)) / j)\n ];\n};\n\nexport default function() {\n return projection(eckert6Raw)\n .scale(173.044);\n}\n","/**\r\n * Functionality for Eckert6 projection\r\n *\r\n * The function(s) below are from D3.js library (https://d3js.org/)\r\n *\r\n * ```\r\n * Copyright 2017 Mike Bostock\r\n *\r\n * Redistribution and use in source and binary forms, with or without\r\n * modification, are permitted provided that the following conditions are met:\r\n *\r\n * 1. Redistributions of source code must retain the above copyright notice,\r\n * this list of conditions and the following disclaimer.\r\n *\r\n * 2. Redistributions in binary form must reproduce the above copyright notice,\r\n * this list of conditions and the following disclaimer in the documentation\r\n * and/or other materials provided with the distribution.\r\n *\r\n * 3. Neither the name of the copyright holder nor the names of its\r\n * contributors may be used to endorse or promote products derived from this\r\n * software without specific prior written permission.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\r\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\r\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\r\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\r\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n * ```\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Projection } from \"./Projection\";\r\nimport { registry } from \"../../../core/Registry\";\r\n// @ts-ignore\r\nimport * as d3geoprojection from \"d3-geo-projection\";\r\n/**\r\n * Eckert6 projection.\r\n */\r\nvar Eckert6 = /** @class */ (function (_super) {\r\n __extends(Eckert6, _super);\r\n function Eckert6() {\r\n var _this = _super.call(this) || this;\r\n _this.d3Projection = d3geoprojection.geoEckert6();\r\n return _this;\r\n }\r\n return Eckert6;\r\n}(Projection));\r\nexport { Eckert6 };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"Eckert6\"] = Eckert6;\r\n","import {asin, atan2, cos, sin, sqrt} from \"../math.js\";\n\nexport function azimuthalRaw(scale) {\n return function(x, y) {\n var cx = cos(x),\n cy = cos(y),\n k = scale(cx * cy);\n if (k === Infinity) return [2, 0];\n return [\n k * cy * sin(x),\n k * sin(y)\n ];\n }\n}\n\nexport function azimuthalInvert(angle) {\n return function(x, y) {\n var z = sqrt(x * x + y * y),\n c = angle(z),\n sc = sin(c),\n cc = cos(c);\n return [\n atan2(x * sc, z * cc),\n asin(z && y * sc / z)\n ];\n }\n}\n","import {asin, cos, epsilon, sin} from \"../math.js\";\nimport {azimuthalInvert} from \"./azimuthal.js\";\nimport projection from \"./index.js\";\n\nexport function orthographicRaw(x, y) {\n return [cos(y) * sin(x), sin(y)];\n}\n\northographicRaw.invert = azimuthalInvert(asin);\n\nexport default function() {\n return projection(orthographicRaw)\n .scale(249.5)\n .clipAngle(90 + epsilon);\n}\n","/**\r\n * Functionality for Mercator projection\r\n *\r\n * The function(s) below are from D3.js library (https://d3js.org/)\r\n *\r\n * ```\r\n * Copyright 2017 Mike Bostock\r\n *\r\n * Redistribution and use in source and binary forms, with or without\r\n * modification, are permitted provided that the following conditions are met:\r\n *\r\n * 1. Redistributions of source code must retain the above copyright notice,\r\n * this list of conditions and the following disclaimer.\r\n *\r\n * 2. Redistributions in binary form must reproduce the above copyright notice,\r\n * this list of conditions and the following disclaimer in the documentation\r\n * and/or other materials provided with the distribution.\r\n *\r\n * 3. Neither the name of the copyright holder nor the names of its\r\n * contributors may be used to endorse or promote products derived from this\r\n * software without specific prior written permission.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\r\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\r\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\r\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\r\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n * ```\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Projection } from \"./Projection\";\r\nimport { registry } from \"../../../core/Registry\";\r\nimport * as d3geo from \"d3-geo\";\r\n/**\r\n * Orthographic projection.\r\n */\r\nvar Orthographic = /** @class */ (function (_super) {\r\n __extends(Orthographic, _super);\r\n function Orthographic() {\r\n var _this = _super.call(this) || this;\r\n _this.d3Projection = d3geo.geoOrthographic();\r\n return _this;\r\n }\r\n return Orthographic;\r\n}(Projection));\r\nexport { Orthographic };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"Orthographic\"] = Orthographic;\r\n","import {atan, cos, sin} from \"../math.js\";\nimport {azimuthalInvert} from \"./azimuthal.js\";\nimport projection from \"./index.js\";\n\nexport function stereographicRaw(x, y) {\n var cy = cos(y), k = 1 + cos(x) * cy;\n return [cy * sin(x) / k, sin(y) / k];\n}\n\nstereographicRaw.invert = azimuthalInvert(function(z) {\n return 2 * atan(z);\n});\n\nexport default function() {\n return projection(stereographicRaw)\n .scale(250)\n .clipAngle(142);\n}\n","/**\r\n * Functionality for Mercator projection\r\n *\r\n * The function(s) below are from D3.js library (https://d3js.org/)\r\n *\r\n * ```\r\n * Copyright 2017 Mike Bostock\r\n *\r\n * Redistribution and use in source and binary forms, with or without\r\n * modification, are permitted provided that the following conditions are met:\r\n *\r\n * 1. Redistributions of source code must retain the above copyright notice,\r\n * this list of conditions and the following disclaimer.\r\n *\r\n * 2. Redistributions in binary form must reproduce the above copyright notice,\r\n * this list of conditions and the following disclaimer in the documentation\r\n * and/or other materials provided with the distribution.\r\n *\r\n * 3. Neither the name of the copyright holder nor the names of its\r\n * contributors may be used to endorse or promote products derived from this\r\n * software without specific prior written permission.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\r\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\r\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\r\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\r\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n * ```\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Projection } from \"./Projection\";\r\nimport { registry } from \"../../../core/Registry\";\r\nimport * as d3geo from \"d3-geo\";\r\n/**\r\n * Orthographic projection.\r\n */\r\nvar Stereographic = /** @class */ (function (_super) {\r\n __extends(Stereographic, _super);\r\n function Stereographic() {\r\n var _this = _super.call(this) || this;\r\n _this.d3Projection = d3geo.geoStereographic();\r\n return _this;\r\n }\r\n return Stereographic;\r\n}(Projection));\r\nexport { Stereographic };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"Stereographic\"] = Stereographic;\r\n","import {abs, asin, atan2, cos, epsilon, pi, sign, sin, sqrt} from \"../math.js\";\nimport {conicProjection} from \"./conic.js\";\nimport {cylindricalEqualAreaRaw} from \"./cylindricalEqualArea.js\";\n\nexport function conicEqualAreaRaw(y0, y1) {\n var sy0 = sin(y0), n = (sy0 + sin(y1)) / 2;\n\n // Are the parallels symmetrical around the Equator?\n if (abs(n) < epsilon) return cylindricalEqualAreaRaw(y0);\n\n var c = 1 + sy0 * (2 * n - sy0), r0 = sqrt(c) / n;\n\n function project(x, y) {\n var r = sqrt(c - 2 * n * sin(y)) / n;\n return [r * sin(x *= n), r0 - r * cos(x)];\n }\n\n project.invert = function(x, y) {\n var r0y = r0 - y,\n l = atan2(x, abs(r0y)) * sign(r0y);\n if (r0y * n < 0)\n l -= pi * sign(x) * sign(r0y);\n return [l / n, asin((c - (x * x + r0y * r0y) * n * n) / (2 * n))];\n };\n\n return project;\n}\n\nexport default function() {\n return conicProjection(conicEqualAreaRaw)\n .scale(155.424)\n .center([0, 33.6442]);\n}\n","import {asin, cos, sin} from \"../math.js\";\n\nexport function cylindricalEqualAreaRaw(phi0) {\n var cosPhi0 = cos(phi0);\n\n function forward(lambda, phi) {\n return [lambda * cosPhi0, sin(phi) / cosPhi0];\n }\n\n forward.invert = function(x, y) {\n return [x / cosPhi0, asin(y * cosPhi0)];\n };\n\n return forward;\n}\n","import {degrees, pi, radians} from \"../math.js\";\nimport {projectionMutator} from \"./index.js\";\n\nexport function conicProjection(projectAt) {\n var phi0 = 0,\n phi1 = pi / 3,\n m = projectionMutator(projectAt),\n p = m(phi0, phi1);\n\n p.parallels = function(_) {\n return arguments.length ? m(phi0 = _[0] * radians, phi1 = _[1] * radians) : [phi0 * degrees, phi1 * degrees];\n };\n\n return p;\n}\n","import conicEqualArea from \"./conicEqualArea.js\";\n\nexport default function() {\n return conicEqualArea()\n .parallels([29.5, 45.5])\n .scale(1070)\n .translate([480, 250])\n .rotate([96, 0])\n .center([-0.6, 38.7]);\n}\n","/**\r\n * Functionality for Mercator projection\r\n *\r\n * The function(s) below are from D3.js library (https://d3js.org/)\r\n *\r\n * ```\r\n * Copyright 2017 Mike Bostock\r\n *\r\n * Redistribution and use in source and binary forms, with or without\r\n * modification, are permitted provided that the following conditions are met:\r\n *\r\n * 1. Redistributions of source code must retain the above copyright notice,\r\n * this list of conditions and the following disclaimer.\r\n *\r\n * 2. Redistributions in binary form must reproduce the above copyright notice,\r\n * this list of conditions and the following disclaimer in the documentation\r\n * and/or other materials provided with the distribution.\r\n *\r\n * 3. Neither the name of the copyright holder nor the names of its\r\n * contributors may be used to endorse or promote products derived from this\r\n * software without specific prior written permission.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\r\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\r\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\r\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\r\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n * ```\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Projection } from \"./Projection\";\r\nimport { registry } from \"../../../core/Registry\";\r\nimport * as d3geo from \"d3-geo\";\r\n/**\r\n * Orthographic projection.\r\n */\r\nvar Albers = /** @class */ (function (_super) {\r\n __extends(Albers, _super);\r\n function Albers() {\r\n var _this = _super.call(this) || this;\r\n _this.d3Projection = d3geo.geoAlbers();\r\n return _this;\r\n }\r\n return Albers;\r\n}(Projection));\r\nexport { Albers };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"Albers\"] = Albers;\r\n","/**\r\n * Functionality for Mercator projection\r\n *\r\n * The function(s) below are from D3.js library (https://d3js.org/)\r\n *\r\n * ```\r\n * Copyright 2017 Mike Bostock\r\n *\r\n * Redistribution and use in source and binary forms, with or without\r\n * modification, are permitted provided that the following conditions are met:\r\n *\r\n * 1. Redistributions of source code must retain the above copyright notice,\r\n * this list of conditions and the following disclaimer.\r\n *\r\n * 2. Redistributions in binary form must reproduce the above copyright notice,\r\n * this list of conditions and the following disclaimer in the documentation\r\n * and/or other materials provided with the distribution.\r\n *\r\n * 3. Neither the name of the copyright holder nor the names of its\r\n * contributors may be used to endorse or promote products derived from this\r\n * software without specific prior written permission.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\r\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\r\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\r\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\r\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n * ```\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Projection } from \"./Projection\";\r\nimport { registry } from \"../../../core/Registry\";\r\nimport * as d3geo from \"d3-geo\";\r\n/**\r\n * Orthographic projection.\r\n */\r\nvar AlbersUsa = /** @class */ (function (_super) {\r\n __extends(AlbersUsa, _super);\r\n function AlbersUsa() {\r\n var _this = _super.call(this) || this;\r\n _this.d3Projection = d3geo.geoAlbersUsa();\r\n return _this;\r\n }\r\n return AlbersUsa;\r\n}(Projection));\r\nexport { AlbersUsa };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"AlbersUsa\"] = AlbersUsa;\r\n","import {epsilon} from \"../math.js\";\nimport albers from \"./albers.js\";\nimport conicEqualArea from \"./conicEqualArea.js\";\nimport {fitExtent, fitSize, fitWidth, fitHeight} from \"./fit.js\";\n\n// The projections must have mutually exclusive clip regions on the sphere,\n// as this will avoid emitting interleaving lines and polygons.\nfunction multiplex(streams) {\n var n = streams.length;\n return {\n point: function(x, y) { var i = -1; while (++i < n) streams[i].point(x, y); },\n sphere: function() { var i = -1; while (++i < n) streams[i].sphere(); },\n lineStart: function() { var i = -1; while (++i < n) streams[i].lineStart(); },\n lineEnd: function() { var i = -1; while (++i < n) streams[i].lineEnd(); },\n polygonStart: function() { var i = -1; while (++i < n) streams[i].polygonStart(); },\n polygonEnd: function() { var i = -1; while (++i < n) streams[i].polygonEnd(); }\n };\n}\n\n// A composite projection for the United States, configured by default for\n// 960×500. The projection also works quite well at 960×600 if you change the\n// scale to 1285 and adjust the translate accordingly. The set of standard\n// parallels for each region comes from USGS, which is published here:\n// http://egsc.usgs.gov/isb/pubs/MapProjections/projections.html#albers\nexport default function() {\n var cache,\n cacheStream,\n lower48 = albers(), lower48Point,\n alaska = conicEqualArea().rotate([154, 0]).center([-2, 58.5]).parallels([55, 65]), alaskaPoint, // EPSG:3338\n hawaii = conicEqualArea().rotate([157, 0]).center([-3, 19.9]).parallels([8, 18]), hawaiiPoint, // ESRI:102007\n point, pointStream = {point: function(x, y) { point = [x, y]; }};\n\n function albersUsa(coordinates) {\n var x = coordinates[0], y = coordinates[1];\n return point = null,\n (lower48Point.point(x, y), point)\n || (alaskaPoint.point(x, y), point)\n || (hawaiiPoint.point(x, y), point);\n }\n\n albersUsa.invert = function(coordinates) {\n var k = lower48.scale(),\n t = lower48.translate(),\n x = (coordinates[0] - t[0]) / k,\n y = (coordinates[1] - t[1]) / k;\n return (y >= 0.120 && y < 0.234 && x >= -0.425 && x < -0.214 ? alaska\n : y >= 0.166 && y < 0.234 && x >= -0.214 && x < -0.115 ? hawaii\n : lower48).invert(coordinates);\n };\n\n albersUsa.stream = function(stream) {\n return cache && cacheStream === stream ? cache : cache = multiplex([lower48.stream(cacheStream = stream), alaska.stream(stream), hawaii.stream(stream)]);\n };\n\n albersUsa.precision = function(_) {\n if (!arguments.length) return lower48.precision();\n lower48.precision(_), alaska.precision(_), hawaii.precision(_);\n return reset();\n };\n\n albersUsa.scale = function(_) {\n if (!arguments.length) return lower48.scale();\n lower48.scale(_), alaska.scale(_ * 0.35), hawaii.scale(_);\n return albersUsa.translate(lower48.translate());\n };\n\n albersUsa.translate = function(_) {\n if (!arguments.length) return lower48.translate();\n var k = lower48.scale(), x = +_[0], y = +_[1];\n\n lower48Point = lower48\n .translate(_)\n .clipExtent([[x - 0.455 * k, y - 0.238 * k], [x + 0.455 * k, y + 0.238 * k]])\n .stream(pointStream);\n\n alaskaPoint = alaska\n .translate([x - 0.307 * k, y + 0.201 * k])\n .clipExtent([[x - 0.425 * k + epsilon, y + 0.120 * k + epsilon], [x - 0.214 * k - epsilon, y + 0.234 * k - epsilon]])\n .stream(pointStream);\n\n hawaiiPoint = hawaii\n .translate([x - 0.205 * k, y + 0.212 * k])\n .clipExtent([[x - 0.214 * k + epsilon, y + 0.166 * k + epsilon], [x - 0.115 * k - epsilon, y + 0.234 * k - epsilon]])\n .stream(pointStream);\n\n return reset();\n };\n\n albersUsa.fitExtent = function(extent, object) {\n return fitExtent(albersUsa, extent, object);\n };\n\n albersUsa.fitSize = function(size, object) {\n return fitSize(albersUsa, size, object);\n };\n\n albersUsa.fitWidth = function(width, object) {\n return fitWidth(albersUsa, width, object);\n };\n\n albersUsa.fitHeight = function(height, object) {\n return fitHeight(albersUsa, height, object);\n };\n\n function reset() {\n cache = cacheStream = null;\n return albersUsa;\n }\n\n return albersUsa.scale(1070);\n}\n","import projection from \"./index.js\";\nimport {abs, epsilon} from \"../math.js\";\n\nexport function naturalEarth1Raw(lambda, phi) {\n var phi2 = phi * phi, phi4 = phi2 * phi2;\n return [\n lambda * (0.8707 - 0.131979 * phi2 + phi4 * (-0.013791 + phi4 * (0.003971 * phi2 - 0.001529 * phi4))),\n phi * (1.007226 + phi2 * (0.015085 + phi4 * (-0.044475 + 0.028874 * phi2 - 0.005916 * phi4)))\n ];\n}\n\nnaturalEarth1Raw.invert = function(x, y) {\n var phi = y, i = 25, delta;\n do {\n var phi2 = phi * phi, phi4 = phi2 * phi2;\n phi -= delta = (phi * (1.007226 + phi2 * (0.015085 + phi4 * (-0.044475 + 0.028874 * phi2 - 0.005916 * phi4))) - y) /\n (1.007226 + phi2 * (0.015085 * 3 + phi4 * (-0.044475 * 7 + 0.028874 * 9 * phi2 - 0.005916 * 11 * phi4)));\n } while (abs(delta) > epsilon && --i > 0);\n return [\n x / (0.8707 + (phi2 = phi * phi) * (-0.131979 + phi2 * (-0.013791 + phi2 * phi2 * phi2 * (0.003971 - 0.001529 * phi2)))),\n phi\n ];\n};\n\nexport default function() {\n return projection(naturalEarth1Raw)\n .scale(175.295);\n}\n","/**\r\n * Functionality for Mercator projection\r\n *\r\n * The function(s) below are from D3.js library (https://d3js.org/)\r\n *\r\n * ```\r\n * Copyright 2017 Mike Bostock\r\n *\r\n * Redistribution and use in source and binary forms, with or without\r\n * modification, are permitted provided that the following conditions are met:\r\n *\r\n * 1. Redistributions of source code must retain the above copyright notice,\r\n * this list of conditions and the following disclaimer.\r\n *\r\n * 2. Redistributions in binary form must reproduce the above copyright notice,\r\n * this list of conditions and the following disclaimer in the documentation\r\n * and/or other materials provided with the distribution.\r\n *\r\n * 3. Neither the name of the copyright holder nor the names of its\r\n * contributors may be used to endorse or promote products derived from this\r\n * software without specific prior written permission.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\r\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\r\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\r\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\r\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n * ```\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Projection } from \"./Projection\";\r\nimport { registry } from \"../../../core/Registry\";\r\nimport * as d3geo from \"d3-geo\";\r\n/**\r\n * Orthographic projection.\r\n */\r\nvar NaturalEarth1 = /** @class */ (function (_super) {\r\n __extends(NaturalEarth1, _super);\r\n function NaturalEarth1() {\r\n var _this = _super.call(this) || this;\r\n _this.d3Projection = d3geo.geoNaturalEarth1();\r\n return _this;\r\n }\r\n return NaturalEarth1;\r\n}(Projection));\r\nexport { NaturalEarth1 };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"NaturalEarth1\"] = NaturalEarth1;\r\n","import {asin, sqrt} from \"../math.js\";\nimport {azimuthalRaw, azimuthalInvert} from \"./azimuthal.js\";\nimport projection from \"./index.js\";\n\nexport var azimuthalEqualAreaRaw = azimuthalRaw(function(cxcy) {\n return sqrt(2 / (1 + cxcy));\n});\n\nazimuthalEqualAreaRaw.invert = azimuthalInvert(function(z) {\n return 2 * asin(z / 2);\n});\n\nexport default function() {\n return projection(azimuthalEqualAreaRaw)\n .scale(124.75)\n .clipAngle(180 - 1e-3);\n}\n","/**\r\n * Functionality for Mercator projection\r\n *\r\n * The function(s) below are from D3.js library (https://d3js.org/)\r\n *\r\n * ```\r\n * Copyright 2017 Mike Bostock\r\n *\r\n * Redistribution and use in source and binary forms, with or without\r\n * modification, are permitted provided that the following conditions are met:\r\n *\r\n * 1. Redistributions of source code must retain the above copyright notice,\r\n * this list of conditions and the following disclaimer.\r\n *\r\n * 2. Redistributions in binary form must reproduce the above copyright notice,\r\n * this list of conditions and the following disclaimer in the documentation\r\n * and/or other materials provided with the distribution.\r\n *\r\n * 3. Neither the name of the copyright holder nor the names of its\r\n * contributors may be used to endorse or promote products derived from this\r\n * software without specific prior written permission.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\r\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\r\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\r\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\r\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n * ```\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Projection } from \"./Projection\";\r\nimport { registry } from \"../../../core/Registry\";\r\nimport * as d3geo from \"d3-geo\";\r\n/**\r\n * Orthographic projection.\r\n */\r\nvar AzimuthalEqualArea = /** @class */ (function (_super) {\r\n __extends(AzimuthalEqualArea, _super);\r\n function AzimuthalEqualArea() {\r\n var _this = _super.call(this) || this;\r\n _this.d3Projection = d3geo.geoAzimuthalEqualArea();\r\n return _this;\r\n }\r\n return AzimuthalEqualArea;\r\n}(Projection));\r\nexport { AzimuthalEqualArea };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"AzimuthalEqualArea\"] = AzimuthalEqualArea;\r\n","import projection from \"./index.js\";\nimport {abs, asin, cos, epsilon2, sin, sqrt} from \"../math.js\";\n\nvar A1 = 1.340264,\n A2 = -0.081106,\n A3 = 0.000893,\n A4 = 0.003796,\n M = sqrt(3) / 2,\n iterations = 12;\n\nexport function equalEarthRaw(lambda, phi) {\n var l = asin(M * sin(phi)), l2 = l * l, l6 = l2 * l2 * l2;\n return [\n lambda * cos(l) / (M * (A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2))),\n l * (A1 + A2 * l2 + l6 * (A3 + A4 * l2))\n ];\n}\n\nequalEarthRaw.invert = function(x, y) {\n var l = y, l2 = l * l, l6 = l2 * l2 * l2;\n for (var i = 0, delta, fy, fpy; i < iterations; ++i) {\n fy = l * (A1 + A2 * l2 + l6 * (A3 + A4 * l2)) - y;\n fpy = A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2);\n l -= delta = fy / fpy, l2 = l * l, l6 = l2 * l2 * l2;\n if (abs(delta) < epsilon2) break;\n }\n return [\n M * x * (A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2)) / cos(l),\n asin(sin(l) / M)\n ];\n};\n\nexport default function() {\n return projection(equalEarthRaw)\n .scale(177.158);\n}\n","/**\r\n * Functionality for Mercator projection\r\n *\r\n * The function(s) below are from D3.js library (https://d3js.org/)\r\n *\r\n * ```\r\n * Copyright 2017 Mike Bostock\r\n *\r\n * Redistribution and use in source and binary forms, with or without\r\n * modification, are permitted provided that the following conditions are met:\r\n *\r\n * 1. Redistributions of source code must retain the above copyright notice,\r\n * this list of conditions and the following disclaimer.\r\n *\r\n * 2. Redistributions in binary form must reproduce the above copyright notice,\r\n * this list of conditions and the following disclaimer in the documentation\r\n * and/or other materials provided with the distribution.\r\n *\r\n * 3. Neither the name of the copyright holder nor the names of its\r\n * contributors may be used to endorse or promote products derived from this\r\n * software without specific prior written permission.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\r\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\r\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\r\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\r\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n * ```\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Projection } from \"./Projection\";\r\nimport { registry } from \"../../../core/Registry\";\r\nimport * as d3geo from \"d3-geo\";\r\n/**\r\n * Orthographic projection.\r\n */\r\nvar EqualEarth = /** @class */ (function (_super) {\r\n __extends(EqualEarth, _super);\r\n function EqualEarth() {\r\n var _this = _super.call(this) || this;\r\n _this.d3Projection = d3geo.geoEqualEarth();\r\n return _this;\r\n }\r\n return EqualEarth;\r\n}(Projection));\r\nexport { EqualEarth };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"EqualEarth\"] = EqualEarth;\r\n","/*!\n * chartjs-plugin-datalabels v2.2.0\n * https://chartjs-plugin-datalabels.netlify.app\n * (c) 2017-2022 chartjs-plugin-datalabels contributors\n * Released under the MIT license\n */\nimport { isNullOrUndef, merge, toFont, resolve, toPadding, valueOrDefault, callback, isObject, each } from 'chart.js/helpers';\nimport { defaults as defaults$1, ArcElement, PointElement, BarElement } from 'chart.js';\n\nvar devicePixelRatio = (function() {\n if (typeof window !== 'undefined') {\n if (window.devicePixelRatio) {\n return window.devicePixelRatio;\n }\n\n // devicePixelRatio is undefined on IE10\n // https://stackoverflow.com/a/20204180/8837887\n // https://github.com/chartjs/chartjs-plugin-datalabels/issues/85\n var screen = window.screen;\n if (screen) {\n return (screen.deviceXDPI || 1) / (screen.logicalXDPI || 1);\n }\n }\n\n return 1;\n}());\n\nvar utils = {\n // @todo move this in Chart.helpers.toTextLines\n toTextLines: function(inputs) {\n var lines = [];\n var input;\n\n inputs = [].concat(inputs);\n while (inputs.length) {\n input = inputs.pop();\n if (typeof input === 'string') {\n lines.unshift.apply(lines, input.split('\\n'));\n } else if (Array.isArray(input)) {\n inputs.push.apply(inputs, input);\n } else if (!isNullOrUndef(inputs)) {\n lines.unshift('' + input);\n }\n }\n\n return lines;\n },\n\n // @todo move this in Chart.helpers.canvas.textSize\n // @todo cache calls of measureText if font doesn't change?!\n textSize: function(ctx, lines, font) {\n var items = [].concat(lines);\n var ilen = items.length;\n var prev = ctx.font;\n var width = 0;\n var i;\n\n ctx.font = font.string;\n\n for (i = 0; i < ilen; ++i) {\n width = Math.max(ctx.measureText(items[i]).width, width);\n }\n\n ctx.font = prev;\n\n return {\n height: ilen * font.lineHeight,\n width: width\n };\n },\n\n /**\n * Returns value bounded by min and max. This is equivalent to max(min, min(value, max)).\n * @todo move this method in Chart.helpers.bound\n * https://doc.qt.io/qt-5/qtglobal.html#qBound\n */\n bound: function(min, value, max) {\n return Math.max(min, Math.min(value, max));\n },\n\n /**\n * Returns an array of pair [value, state] where state is:\n * * -1: value is only in a0 (removed)\n * * 1: value is only in a1 (added)\n */\n arrayDiff: function(a0, a1) {\n var prev = a0.slice();\n var updates = [];\n var i, j, ilen, v;\n\n for (i = 0, ilen = a1.length; i < ilen; ++i) {\n v = a1[i];\n j = prev.indexOf(v);\n\n if (j === -1) {\n updates.push([v, 1]);\n } else {\n prev.splice(j, 1);\n }\n }\n\n for (i = 0, ilen = prev.length; i < ilen; ++i) {\n updates.push([prev[i], -1]);\n }\n\n return updates;\n },\n\n /**\n * https://github.com/chartjs/chartjs-plugin-datalabels/issues/70\n */\n rasterize: function(v) {\n return Math.round(v * devicePixelRatio) / devicePixelRatio;\n }\n};\n\nfunction orient(point, origin) {\n var x0 = origin.x;\n var y0 = origin.y;\n\n if (x0 === null) {\n return {x: 0, y: -1};\n }\n if (y0 === null) {\n return {x: 1, y: 0};\n }\n\n var dx = point.x - x0;\n var dy = point.y - y0;\n var ln = Math.sqrt(dx * dx + dy * dy);\n\n return {\n x: ln ? dx / ln : 0,\n y: ln ? dy / ln : -1\n };\n}\n\nfunction aligned(x, y, vx, vy, align) {\n switch (align) {\n case 'center':\n vx = vy = 0;\n break;\n case 'bottom':\n vx = 0;\n vy = 1;\n break;\n case 'right':\n vx = 1;\n vy = 0;\n break;\n case 'left':\n vx = -1;\n vy = 0;\n break;\n case 'top':\n vx = 0;\n vy = -1;\n break;\n case 'start':\n vx = -vx;\n vy = -vy;\n break;\n case 'end':\n // keep natural orientation\n break;\n default:\n // clockwise rotation (in degree)\n align *= (Math.PI / 180);\n vx = Math.cos(align);\n vy = Math.sin(align);\n break;\n }\n\n return {\n x: x,\n y: y,\n vx: vx,\n vy: vy\n };\n}\n\n// Line clipping (Cohen–Sutherland algorithm)\n// https://en.wikipedia.org/wiki/Cohen–Sutherland_algorithm\n\nvar R_INSIDE = 0;\nvar R_LEFT = 1;\nvar R_RIGHT = 2;\nvar R_BOTTOM = 4;\nvar R_TOP = 8;\n\nfunction region(x, y, rect) {\n var res = R_INSIDE;\n\n if (x < rect.left) {\n res |= R_LEFT;\n } else if (x > rect.right) {\n res |= R_RIGHT;\n }\n if (y < rect.top) {\n res |= R_TOP;\n } else if (y > rect.bottom) {\n res |= R_BOTTOM;\n }\n\n return res;\n}\n\nfunction clipped(segment, area) {\n var x0 = segment.x0;\n var y0 = segment.y0;\n var x1 = segment.x1;\n var y1 = segment.y1;\n var r0 = region(x0, y0, area);\n var r1 = region(x1, y1, area);\n var r, x, y;\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n if (!(r0 | r1) || (r0 & r1)) {\n // both points inside or on the same side: no clipping\n break;\n }\n\n // at least one point is outside\n r = r0 || r1;\n\n if (r & R_TOP) {\n x = x0 + (x1 - x0) * (area.top - y0) / (y1 - y0);\n y = area.top;\n } else if (r & R_BOTTOM) {\n x = x0 + (x1 - x0) * (area.bottom - y0) / (y1 - y0);\n y = area.bottom;\n } else if (r & R_RIGHT) {\n y = y0 + (y1 - y0) * (area.right - x0) / (x1 - x0);\n x = area.right;\n } else if (r & R_LEFT) {\n y = y0 + (y1 - y0) * (area.left - x0) / (x1 - x0);\n x = area.left;\n }\n\n if (r === r0) {\n x0 = x;\n y0 = y;\n r0 = region(x0, y0, area);\n } else {\n x1 = x;\n y1 = y;\n r1 = region(x1, y1, area);\n }\n }\n\n return {\n x0: x0,\n x1: x1,\n y0: y0,\n y1: y1\n };\n}\n\nfunction compute$1(range, config) {\n var anchor = config.anchor;\n var segment = range;\n var x, y;\n\n if (config.clamp) {\n segment = clipped(segment, config.area);\n }\n\n if (anchor === 'start') {\n x = segment.x0;\n y = segment.y0;\n } else if (anchor === 'end') {\n x = segment.x1;\n y = segment.y1;\n } else {\n x = (segment.x0 + segment.x1) / 2;\n y = (segment.y0 + segment.y1) / 2;\n }\n\n return aligned(x, y, range.vx, range.vy, config.align);\n}\n\nvar positioners = {\n arc: function(el, config) {\n var angle = (el.startAngle + el.endAngle) / 2;\n var vx = Math.cos(angle);\n var vy = Math.sin(angle);\n var r0 = el.innerRadius;\n var r1 = el.outerRadius;\n\n return compute$1({\n x0: el.x + vx * r0,\n y0: el.y + vy * r0,\n x1: el.x + vx * r1,\n y1: el.y + vy * r1,\n vx: vx,\n vy: vy\n }, config);\n },\n\n point: function(el, config) {\n var v = orient(el, config.origin);\n var rx = v.x * el.options.radius;\n var ry = v.y * el.options.radius;\n\n return compute$1({\n x0: el.x - rx,\n y0: el.y - ry,\n x1: el.x + rx,\n y1: el.y + ry,\n vx: v.x,\n vy: v.y\n }, config);\n },\n\n bar: function(el, config) {\n var v = orient(el, config.origin);\n var x = el.x;\n var y = el.y;\n var sx = 0;\n var sy = 0;\n\n if (el.horizontal) {\n x = Math.min(el.x, el.base);\n sx = Math.abs(el.base - el.x);\n } else {\n y = Math.min(el.y, el.base);\n sy = Math.abs(el.base - el.y);\n }\n\n return compute$1({\n x0: x,\n y0: y + sy,\n x1: x + sx,\n y1: y,\n vx: v.x,\n vy: v.y\n }, config);\n },\n\n fallback: function(el, config) {\n var v = orient(el, config.origin);\n\n return compute$1({\n x0: el.x,\n y0: el.y,\n x1: el.x + (el.width || 0),\n y1: el.y + (el.height || 0),\n vx: v.x,\n vy: v.y\n }, config);\n }\n};\n\nvar rasterize = utils.rasterize;\n\nfunction boundingRects(model) {\n var borderWidth = model.borderWidth || 0;\n var padding = model.padding;\n var th = model.size.height;\n var tw = model.size.width;\n var tx = -tw / 2;\n var ty = -th / 2;\n\n return {\n frame: {\n x: tx - padding.left - borderWidth,\n y: ty - padding.top - borderWidth,\n w: tw + padding.width + borderWidth * 2,\n h: th + padding.height + borderWidth * 2\n },\n text: {\n x: tx,\n y: ty,\n w: tw,\n h: th\n }\n };\n}\n\nfunction getScaleOrigin(el, context) {\n var scale = context.chart.getDatasetMeta(context.datasetIndex).vScale;\n\n if (!scale) {\n return null;\n }\n\n if (scale.xCenter !== undefined && scale.yCenter !== undefined) {\n return {x: scale.xCenter, y: scale.yCenter};\n }\n\n var pixel = scale.getBasePixel();\n return el.horizontal ?\n {x: pixel, y: null} :\n {x: null, y: pixel};\n}\n\nfunction getPositioner(el) {\n if (el instanceof ArcElement) {\n return positioners.arc;\n }\n if (el instanceof PointElement) {\n return positioners.point;\n }\n if (el instanceof BarElement) {\n return positioners.bar;\n }\n return positioners.fallback;\n}\n\nfunction drawRoundedRect(ctx, x, y, w, h, radius) {\n var HALF_PI = Math.PI / 2;\n\n if (radius) {\n var r = Math.min(radius, h / 2, w / 2);\n var left = x + r;\n var top = y + r;\n var right = x + w - r;\n var bottom = y + h - r;\n\n ctx.moveTo(x, top);\n if (left < right && top < bottom) {\n ctx.arc(left, top, r, -Math.PI, -HALF_PI);\n ctx.arc(right, top, r, -HALF_PI, 0);\n ctx.arc(right, bottom, r, 0, HALF_PI);\n ctx.arc(left, bottom, r, HALF_PI, Math.PI);\n } else if (left < right) {\n ctx.moveTo(left, y);\n ctx.arc(right, top, r, -HALF_PI, HALF_PI);\n ctx.arc(left, top, r, HALF_PI, Math.PI + HALF_PI);\n } else if (top < bottom) {\n ctx.arc(left, top, r, -Math.PI, 0);\n ctx.arc(left, bottom, r, 0, Math.PI);\n } else {\n ctx.arc(left, top, r, -Math.PI, Math.PI);\n }\n ctx.closePath();\n ctx.moveTo(x, y);\n } else {\n ctx.rect(x, y, w, h);\n }\n}\n\nfunction drawFrame(ctx, rect, model) {\n var bgColor = model.backgroundColor;\n var borderColor = model.borderColor;\n var borderWidth = model.borderWidth;\n\n if (!bgColor && (!borderColor || !borderWidth)) {\n return;\n }\n\n ctx.beginPath();\n\n drawRoundedRect(\n ctx,\n rasterize(rect.x) + borderWidth / 2,\n rasterize(rect.y) + borderWidth / 2,\n rasterize(rect.w) - borderWidth,\n rasterize(rect.h) - borderWidth,\n model.borderRadius);\n\n ctx.closePath();\n\n if (bgColor) {\n ctx.fillStyle = bgColor;\n ctx.fill();\n }\n\n if (borderColor && borderWidth) {\n ctx.strokeStyle = borderColor;\n ctx.lineWidth = borderWidth;\n ctx.lineJoin = 'miter';\n ctx.stroke();\n }\n}\n\nfunction textGeometry(rect, align, font) {\n var h = font.lineHeight;\n var w = rect.w;\n var x = rect.x;\n var y = rect.y + h / 2;\n\n if (align === 'center') {\n x += w / 2;\n } else if (align === 'end' || align === 'right') {\n x += w;\n }\n\n return {\n h: h,\n w: w,\n x: x,\n y: y\n };\n}\n\nfunction drawTextLine(ctx, text, cfg) {\n var shadow = ctx.shadowBlur;\n var stroked = cfg.stroked;\n var x = rasterize(cfg.x);\n var y = rasterize(cfg.y);\n var w = rasterize(cfg.w);\n\n if (stroked) {\n ctx.strokeText(text, x, y, w);\n }\n\n if (cfg.filled) {\n if (shadow && stroked) {\n // Prevent drawing shadow on both the text stroke and fill, so\n // if the text is stroked, remove the shadow for the text fill.\n ctx.shadowBlur = 0;\n }\n\n ctx.fillText(text, x, y, w);\n\n if (shadow && stroked) {\n ctx.shadowBlur = shadow;\n }\n }\n}\n\nfunction drawText(ctx, lines, rect, model) {\n var align = model.textAlign;\n var color = model.color;\n var filled = !!color;\n var font = model.font;\n var ilen = lines.length;\n var strokeColor = model.textStrokeColor;\n var strokeWidth = model.textStrokeWidth;\n var stroked = strokeColor && strokeWidth;\n var i;\n\n if (!ilen || (!filled && !stroked)) {\n return;\n }\n\n // Adjust coordinates based on text alignment and line height\n rect = textGeometry(rect, align, font);\n\n ctx.font = font.string;\n ctx.textAlign = align;\n ctx.textBaseline = 'middle';\n ctx.shadowBlur = model.textShadowBlur;\n ctx.shadowColor = model.textShadowColor;\n\n if (filled) {\n ctx.fillStyle = color;\n }\n if (stroked) {\n ctx.lineJoin = 'round';\n ctx.lineWidth = strokeWidth;\n ctx.strokeStyle = strokeColor;\n }\n\n for (i = 0, ilen = lines.length; i < ilen; ++i) {\n drawTextLine(ctx, lines[i], {\n stroked: stroked,\n filled: filled,\n w: rect.w,\n x: rect.x,\n y: rect.y + rect.h * i\n });\n }\n}\n\nvar Label = function(config, ctx, el, index) {\n var me = this;\n\n me._config = config;\n me._index = index;\n me._model = null;\n me._rects = null;\n me._ctx = ctx;\n me._el = el;\n};\n\nmerge(Label.prototype, {\n /**\n * @private\n */\n _modelize: function(display, lines, config, context) {\n var me = this;\n var index = me._index;\n var font = toFont(resolve([config.font, {}], context, index));\n var color = resolve([config.color, defaults$1.color], context, index);\n\n return {\n align: resolve([config.align, 'center'], context, index),\n anchor: resolve([config.anchor, 'center'], context, index),\n area: context.chart.chartArea,\n backgroundColor: resolve([config.backgroundColor, null], context, index),\n borderColor: resolve([config.borderColor, null], context, index),\n borderRadius: resolve([config.borderRadius, 0], context, index),\n borderWidth: resolve([config.borderWidth, 0], context, index),\n clamp: resolve([config.clamp, false], context, index),\n clip: resolve([config.clip, false], context, index),\n color: color,\n display: display,\n font: font,\n lines: lines,\n offset: resolve([config.offset, 4], context, index),\n opacity: resolve([config.opacity, 1], context, index),\n origin: getScaleOrigin(me._el, context),\n padding: toPadding(resolve([config.padding, 4], context, index)),\n positioner: getPositioner(me._el),\n rotation: resolve([config.rotation, 0], context, index) * (Math.PI / 180),\n size: utils.textSize(me._ctx, lines, font),\n textAlign: resolve([config.textAlign, 'start'], context, index),\n textShadowBlur: resolve([config.textShadowBlur, 0], context, index),\n textShadowColor: resolve([config.textShadowColor, color], context, index),\n textStrokeColor: resolve([config.textStrokeColor, color], context, index),\n textStrokeWidth: resolve([config.textStrokeWidth, 0], context, index)\n };\n },\n\n update: function(context) {\n var me = this;\n var model = null;\n var rects = null;\n var index = me._index;\n var config = me._config;\n var value, label, lines;\n\n // We first resolve the display option (separately) to avoid computing\n // other options in case the label is hidden (i.e. display: false).\n var display = resolve([config.display, true], context, index);\n\n if (display) {\n value = context.dataset.data[index];\n label = valueOrDefault(callback(config.formatter, [value, context]), value);\n lines = isNullOrUndef(label) ? [] : utils.toTextLines(label);\n\n if (lines.length) {\n model = me._modelize(display, lines, config, context);\n rects = boundingRects(model);\n }\n }\n\n me._model = model;\n me._rects = rects;\n },\n\n geometry: function() {\n return this._rects ? this._rects.frame : {};\n },\n\n rotation: function() {\n return this._model ? this._model.rotation : 0;\n },\n\n visible: function() {\n return this._model && this._model.opacity;\n },\n\n model: function() {\n return this._model;\n },\n\n draw: function(chart, center) {\n var me = this;\n var ctx = chart.ctx;\n var model = me._model;\n var rects = me._rects;\n var area;\n\n if (!this.visible()) {\n return;\n }\n\n ctx.save();\n\n if (model.clip) {\n area = model.area;\n ctx.beginPath();\n ctx.rect(\n area.left,\n area.top,\n area.right - area.left,\n area.bottom - area.top);\n ctx.clip();\n }\n\n ctx.globalAlpha = utils.bound(0, model.opacity, 1);\n ctx.translate(rasterize(center.x), rasterize(center.y));\n ctx.rotate(model.rotation);\n\n drawFrame(ctx, rects.frame, model);\n drawText(ctx, model.lines, rects.text, model);\n\n ctx.restore();\n }\n});\n\nvar MIN_INTEGER = Number.MIN_SAFE_INTEGER || -9007199254740991; // eslint-disable-line es/no-number-minsafeinteger\nvar MAX_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991; // eslint-disable-line es/no-number-maxsafeinteger\n\nfunction rotated(point, center, angle) {\n var cos = Math.cos(angle);\n var sin = Math.sin(angle);\n var cx = center.x;\n var cy = center.y;\n\n return {\n x: cx + cos * (point.x - cx) - sin * (point.y - cy),\n y: cy + sin * (point.x - cx) + cos * (point.y - cy)\n };\n}\n\nfunction projected(points, axis) {\n var min = MAX_INTEGER;\n var max = MIN_INTEGER;\n var origin = axis.origin;\n var i, pt, vx, vy, dp;\n\n for (i = 0; i < points.length; ++i) {\n pt = points[i];\n vx = pt.x - origin.x;\n vy = pt.y - origin.y;\n dp = axis.vx * vx + axis.vy * vy;\n min = Math.min(min, dp);\n max = Math.max(max, dp);\n }\n\n return {\n min: min,\n max: max\n };\n}\n\nfunction toAxis(p0, p1) {\n var vx = p1.x - p0.x;\n var vy = p1.y - p0.y;\n var ln = Math.sqrt(vx * vx + vy * vy);\n\n return {\n vx: (p1.x - p0.x) / ln,\n vy: (p1.y - p0.y) / ln,\n origin: p0,\n ln: ln\n };\n}\n\nvar HitBox = function() {\n this._rotation = 0;\n this._rect = {\n x: 0,\n y: 0,\n w: 0,\n h: 0\n };\n};\n\nmerge(HitBox.prototype, {\n center: function() {\n var r = this._rect;\n return {\n x: r.x + r.w / 2,\n y: r.y + r.h / 2\n };\n },\n\n update: function(center, rect, rotation) {\n this._rotation = rotation;\n this._rect = {\n x: rect.x + center.x,\n y: rect.y + center.y,\n w: rect.w,\n h: rect.h\n };\n },\n\n contains: function(point) {\n var me = this;\n var margin = 1;\n var rect = me._rect;\n\n point = rotated(point, me.center(), -me._rotation);\n\n return !(point.x < rect.x - margin\n || point.y < rect.y - margin\n || point.x > rect.x + rect.w + margin * 2\n || point.y > rect.y + rect.h + margin * 2);\n },\n\n // Separating Axis Theorem\n // https://gamedevelopment.tutsplus.com/tutorials/collision-detection-using-the-separating-axis-theorem--gamedev-169\n intersects: function(other) {\n var r0 = this._points();\n var r1 = other._points();\n var axes = [\n toAxis(r0[0], r0[1]),\n toAxis(r0[0], r0[3])\n ];\n var i, pr0, pr1;\n\n if (this._rotation !== other._rotation) {\n // Only separate with r1 axis if the rotation is different,\n // else it's enough to separate r0 and r1 with r0 axis only!\n axes.push(\n toAxis(r1[0], r1[1]),\n toAxis(r1[0], r1[3])\n );\n }\n\n for (i = 0; i < axes.length; ++i) {\n pr0 = projected(r0, axes[i]);\n pr1 = projected(r1, axes[i]);\n\n if (pr0.max < pr1.min || pr1.max < pr0.min) {\n return false;\n }\n }\n\n return true;\n },\n\n /**\n * @private\n */\n _points: function() {\n var me = this;\n var rect = me._rect;\n var angle = me._rotation;\n var center = me.center();\n\n return [\n rotated({x: rect.x, y: rect.y}, center, angle),\n rotated({x: rect.x + rect.w, y: rect.y}, center, angle),\n rotated({x: rect.x + rect.w, y: rect.y + rect.h}, center, angle),\n rotated({x: rect.x, y: rect.y + rect.h}, center, angle)\n ];\n }\n});\n\nfunction coordinates(el, model, geometry) {\n var point = model.positioner(el, model);\n var vx = point.vx;\n var vy = point.vy;\n\n if (!vx && !vy) {\n // if aligned center, we don't want to offset the center point\n return {x: point.x, y: point.y};\n }\n\n var w = geometry.w;\n var h = geometry.h;\n\n // take in account the label rotation\n var rotation = model.rotation;\n var dx = Math.abs(w / 2 * Math.cos(rotation)) + Math.abs(h / 2 * Math.sin(rotation));\n var dy = Math.abs(w / 2 * Math.sin(rotation)) + Math.abs(h / 2 * Math.cos(rotation));\n\n // scale the unit vector (vx, vy) to get at least dx or dy equal to\n // w or h respectively (else we would calculate the distance to the\n // ellipse inscribed in the bounding rect)\n var vs = 1 / Math.max(Math.abs(vx), Math.abs(vy));\n dx *= vx * vs;\n dy *= vy * vs;\n\n // finally, include the explicit offset\n dx += model.offset * vx;\n dy += model.offset * vy;\n\n return {\n x: point.x + dx,\n y: point.y + dy\n };\n}\n\nfunction collide(labels, collider) {\n var i, j, s0, s1;\n\n // IMPORTANT Iterate in the reverse order since items at the end of the\n // list have an higher weight/priority and thus should be less impacted\n // by the overlapping strategy.\n\n for (i = labels.length - 1; i >= 0; --i) {\n s0 = labels[i].$layout;\n\n for (j = i - 1; j >= 0 && s0._visible; --j) {\n s1 = labels[j].$layout;\n\n if (s1._visible && s0._box.intersects(s1._box)) {\n collider(s0, s1);\n }\n }\n }\n\n return labels;\n}\n\nfunction compute(labels) {\n var i, ilen, label, state, geometry, center, proxy;\n\n // Initialize labels for overlap detection\n for (i = 0, ilen = labels.length; i < ilen; ++i) {\n label = labels[i];\n state = label.$layout;\n\n if (state._visible) {\n // Chart.js 3 removed el._model in favor of getProps(), making harder to\n // abstract reading values in positioners. Also, using string arrays to\n // read values (i.e. var {a,b,c} = el.getProps([\"a\",\"b\",\"c\"])) would make\n // positioners inefficient in the normal case (i.e. not the final values)\n // and the code a bit ugly, so let's use a Proxy instead.\n proxy = new Proxy(label._el, {get: (el, p) => el.getProps([p], true)[p]});\n\n geometry = label.geometry();\n center = coordinates(proxy, label.model(), geometry);\n state._box.update(center, geometry, label.rotation());\n }\n }\n\n // Auto hide overlapping labels\n return collide(labels, function(s0, s1) {\n var h0 = s0._hidable;\n var h1 = s1._hidable;\n\n if ((h0 && h1) || h1) {\n s1._visible = false;\n } else if (h0) {\n s0._visible = false;\n }\n });\n}\n\nvar layout = {\n prepare: function(datasets) {\n var labels = [];\n var i, j, ilen, jlen, label;\n\n for (i = 0, ilen = datasets.length; i < ilen; ++i) {\n for (j = 0, jlen = datasets[i].length; j < jlen; ++j) {\n label = datasets[i][j];\n labels.push(label);\n label.$layout = {\n _box: new HitBox(),\n _hidable: false,\n _visible: true,\n _set: i,\n _idx: label._index\n };\n }\n }\n\n // TODO New `z` option: labels with a higher z-index are drawn\n // of top of the ones with a lower index. Lowest z-index labels\n // are also discarded first when hiding overlapping labels.\n labels.sort(function(a, b) {\n var sa = a.$layout;\n var sb = b.$layout;\n\n return sa._idx === sb._idx\n ? sb._set - sa._set\n : sb._idx - sa._idx;\n });\n\n this.update(labels);\n\n return labels;\n },\n\n update: function(labels) {\n var dirty = false;\n var i, ilen, label, model, state;\n\n for (i = 0, ilen = labels.length; i < ilen; ++i) {\n label = labels[i];\n model = label.model();\n state = label.$layout;\n state._hidable = model && model.display === 'auto';\n state._visible = label.visible();\n dirty |= state._hidable;\n }\n\n if (dirty) {\n compute(labels);\n }\n },\n\n lookup: function(labels, point) {\n var i, state;\n\n // IMPORTANT Iterate in the reverse order since items at the end of\n // the list have an higher z-index, thus should be picked first.\n\n for (i = labels.length - 1; i >= 0; --i) {\n state = labels[i].$layout;\n\n if (state && state._visible && state._box.contains(point)) {\n return labels[i];\n }\n }\n\n return null;\n },\n\n draw: function(chart, labels) {\n var i, ilen, label, state, geometry, center;\n\n for (i = 0, ilen = labels.length; i < ilen; ++i) {\n label = labels[i];\n state = label.$layout;\n\n if (state._visible) {\n geometry = label.geometry();\n center = coordinates(label._el, label.model(), geometry);\n state._box.update(center, geometry, label.rotation());\n label.draw(chart, center);\n }\n }\n }\n};\n\nvar formatter = function(value) {\n if (isNullOrUndef(value)) {\n return null;\n }\n\n var label = value;\n var keys, klen, k;\n if (isObject(value)) {\n if (!isNullOrUndef(value.label)) {\n label = value.label;\n } else if (!isNullOrUndef(value.r)) {\n label = value.r;\n } else {\n label = '';\n keys = Object.keys(value);\n for (k = 0, klen = keys.length; k < klen; ++k) {\n label += (k !== 0 ? ', ' : '') + keys[k] + ': ' + value[keys[k]];\n }\n }\n }\n\n return '' + label;\n};\n\n/**\n * IMPORTANT: make sure to also update tests and TypeScript definition\n * files (`/test/specs/defaults.spec.js` and `/types/options.d.ts`)\n */\n\nvar defaults = {\n align: 'center',\n anchor: 'center',\n backgroundColor: null,\n borderColor: null,\n borderRadius: 0,\n borderWidth: 0,\n clamp: false,\n clip: false,\n color: undefined,\n display: true,\n font: {\n family: undefined,\n lineHeight: 1.2,\n size: undefined,\n style: undefined,\n weight: null\n },\n formatter: formatter,\n labels: undefined,\n listeners: {},\n offset: 4,\n opacity: 1,\n padding: {\n top: 4,\n right: 4,\n bottom: 4,\n left: 4\n },\n rotation: 0,\n textAlign: 'start',\n textStrokeColor: undefined,\n textStrokeWidth: 0,\n textShadowBlur: 0,\n textShadowColor: undefined\n};\n\n/**\n * @see https://github.com/chartjs/Chart.js/issues/4176\n */\n\nvar EXPANDO_KEY = '$datalabels';\nvar DEFAULT_KEY = '$default';\n\nfunction configure(dataset, options) {\n var override = dataset.datalabels;\n var listeners = {};\n var configs = [];\n var labels, keys;\n\n if (override === false) {\n return null;\n }\n if (override === true) {\n override = {};\n }\n\n options = merge({}, [options, override]);\n labels = options.labels || {};\n keys = Object.keys(labels);\n delete options.labels;\n\n if (keys.length) {\n keys.forEach(function(key) {\n if (labels[key]) {\n configs.push(merge({}, [\n options,\n labels[key],\n {_key: key}\n ]));\n }\n });\n } else {\n // Default label if no \"named\" label defined.\n configs.push(options);\n }\n\n // listeners: {<event-type>: {<label-key>: <fn>}}\n listeners = configs.reduce(function(target, config) {\n each(config.listeners || {}, function(fn, event) {\n target[event] = target[event] || {};\n target[event][config._key || DEFAULT_KEY] = fn;\n });\n\n delete config.listeners;\n return target;\n }, {});\n\n return {\n labels: configs,\n listeners: listeners\n };\n}\n\nfunction dispatchEvent(chart, listeners, label, event) {\n if (!listeners) {\n return;\n }\n\n var context = label.$context;\n var groups = label.$groups;\n var callback$1;\n\n if (!listeners[groups._set]) {\n return;\n }\n\n callback$1 = listeners[groups._set][groups._key];\n if (!callback$1) {\n return;\n }\n\n if (callback(callback$1, [context, event]) === true) {\n // Users are allowed to tweak the given context by injecting values that can be\n // used in scriptable options to display labels differently based on the current\n // event (e.g. highlight an hovered label). That's why we update the label with\n // the output context and schedule a new chart render by setting it dirty.\n chart[EXPANDO_KEY]._dirty = true;\n label.update(context);\n }\n}\n\nfunction dispatchMoveEvents(chart, listeners, previous, label, event) {\n var enter, leave;\n\n if (!previous && !label) {\n return;\n }\n\n if (!previous) {\n enter = true;\n } else if (!label) {\n leave = true;\n } else if (previous !== label) {\n leave = enter = true;\n }\n\n if (leave) {\n dispatchEvent(chart, listeners.leave, previous, event);\n }\n if (enter) {\n dispatchEvent(chart, listeners.enter, label, event);\n }\n}\n\nfunction handleMoveEvents(chart, event) {\n var expando = chart[EXPANDO_KEY];\n var listeners = expando._listeners;\n var previous, label;\n\n if (!listeners.enter && !listeners.leave) {\n return;\n }\n\n if (event.type === 'mousemove') {\n label = layout.lookup(expando._labels, event);\n } else if (event.type !== 'mouseout') {\n return;\n }\n\n previous = expando._hovered;\n expando._hovered = label;\n dispatchMoveEvents(chart, listeners, previous, label, event);\n}\n\nfunction handleClickEvents(chart, event) {\n var expando = chart[EXPANDO_KEY];\n var handlers = expando._listeners.click;\n var label = handlers && layout.lookup(expando._labels, event);\n if (label) {\n dispatchEvent(chart, handlers, label, event);\n }\n}\n\nvar plugin = {\n id: 'datalabels',\n\n defaults: defaults,\n\n beforeInit: function(chart) {\n chart[EXPANDO_KEY] = {\n _actives: []\n };\n },\n\n beforeUpdate: function(chart) {\n var expando = chart[EXPANDO_KEY];\n expando._listened = false;\n expando._listeners = {}; // {<event-type>: {<dataset-index>: {<label-key>: <fn>}}}\n expando._datasets = []; // per dataset labels: [Label[]]\n expando._labels = []; // layouted labels: Label[]\n },\n\n afterDatasetUpdate: function(chart, args, options) {\n var datasetIndex = args.index;\n var expando = chart[EXPANDO_KEY];\n var labels = expando._datasets[datasetIndex] = [];\n var visible = chart.isDatasetVisible(datasetIndex);\n var dataset = chart.data.datasets[datasetIndex];\n var config = configure(dataset, options);\n var elements = args.meta.data || [];\n var ctx = chart.ctx;\n var i, j, ilen, jlen, cfg, key, el, label;\n\n ctx.save();\n\n for (i = 0, ilen = elements.length; i < ilen; ++i) {\n el = elements[i];\n el[EXPANDO_KEY] = [];\n\n if (visible && el && chart.getDataVisibility(i) && !el.skip) {\n for (j = 0, jlen = config.labels.length; j < jlen; ++j) {\n cfg = config.labels[j];\n key = cfg._key;\n\n label = new Label(cfg, ctx, el, i);\n label.$groups = {\n _set: datasetIndex,\n _key: key || DEFAULT_KEY\n };\n label.$context = {\n active: false,\n chart: chart,\n dataIndex: i,\n dataset: dataset,\n datasetIndex: datasetIndex\n };\n\n label.update(label.$context);\n el[EXPANDO_KEY].push(label);\n labels.push(label);\n }\n }\n }\n\n ctx.restore();\n\n // Store listeners at the chart level and per event type to optimize\n // cases where no listeners are registered for a specific event.\n merge(expando._listeners, config.listeners, {\n merger: function(event, target, source) {\n target[event] = target[event] || {};\n target[event][args.index] = source[event];\n expando._listened = true;\n }\n });\n },\n\n afterUpdate: function(chart) {\n chart[EXPANDO_KEY]._labels = layout.prepare(chart[EXPANDO_KEY]._datasets);\n },\n\n // Draw labels on top of all dataset elements\n // https://github.com/chartjs/chartjs-plugin-datalabels/issues/29\n // https://github.com/chartjs/chartjs-plugin-datalabels/issues/32\n afterDatasetsDraw: function(chart) {\n layout.draw(chart, chart[EXPANDO_KEY]._labels);\n },\n\n beforeEvent: function(chart, args) {\n // If there is no listener registered for this chart, `listened` will be false,\n // meaning we can immediately ignore the incoming event and avoid useless extra\n // computation for users who don't implement label interactions.\n if (chart[EXPANDO_KEY]._listened) {\n var event = args.event;\n switch (event.type) {\n case 'mousemove':\n case 'mouseout':\n handleMoveEvents(chart, event);\n break;\n case 'click':\n handleClickEvents(chart, event);\n break;\n }\n }\n },\n\n afterEvent: function(chart) {\n var expando = chart[EXPANDO_KEY];\n var previous = expando._actives;\n var actives = expando._actives = chart.getActiveElements();\n var updates = utils.arrayDiff(previous, actives);\n var i, ilen, j, jlen, update, label, labels;\n\n for (i = 0, ilen = updates.length; i < ilen; ++i) {\n update = updates[i];\n if (update[1]) {\n labels = update[0].element[EXPANDO_KEY] || [];\n for (j = 0, jlen = labels.length; j < jlen; ++j) {\n label = labels[j];\n label.$context.active = (update[1] === 1);\n label.update(label.$context);\n }\n }\n }\n\n if (expando._dirty || updates.length) {\n layout.update(expando._labels);\n chart.render();\n }\n\n delete expando._dirty;\n }\n};\n\nexport { plugin as default };\n","(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-selection')) :\n typeof define === 'function' && define.amd ? define(['exports', 'd3-selection'], factory) :\n (factory((global.d3 = global.d3 || {}),global.d3));\n}(this, function (exports,d3Selection) { 'use strict';\n\n function d3Tip () {\n const functor = function functor(v) {\n return typeof v === \"function\" ? v : function () {\n return v;\n };\n };\n\n var direction = d3_tip_direction,\n offset = d3_tip_offset,\n html = d3_tip_html,\n node = initNode(),\n svg = null,\n point = null,\n target = null,\n rootElement = functor(document.body)\n\n function tip(vis) {\n svg = getSVGNode(vis)\n point = svg.createSVGPoint()\n rootElement().appendChild(node)\n }\n\n // Public - show the tooltip on the screen\n //\n // Returns a tip\n tip.show = function () {\n var args = Array.prototype.slice.call(arguments)\n if (args[0] instanceof Event) {\n target = args[0].target;\n }\n if (args[args.length - 1] instanceof SVGElement) target = args.pop()\n\n var content = html.apply(this, args),\n poffset = offset.apply(this, args),\n dir = direction.apply(this, args),\n nodel = getNodeEl(),\n i = directions.length,\n coords,\n scrollTop = document.documentElement.scrollTop || rootElement().scrollTop,\n scrollLeft = document.documentElement.scrollLeft || rootElement().scrollLeft\n\n nodel.html(content)\n .style('position', 'absolute')\n .style('opacity', 1)\n .style('pointer-events', 'all')\n\n while (i--) nodel.classed(directions[i], false)\n coords = direction_callbacks[dir].apply(this)\n nodel.classed(dir, true)\n .style('top', (coords.top + poffset[0]) + scrollTop + 'px')\n .style('left', (coords.left + poffset[1]) + scrollLeft + 'px')\n\n return tip\n }\n\n // Public - hide the tooltip\n //\n // Returns a tip\n tip.hide = function () {\n var nodel = getNodeEl()\n nodel\n .style('opacity', 0)\n .style('pointer-events', 'none')\n return tip\n }\n\n // Public: Proxy attr calls to the d3 tip container. Sets or gets attribute value.\n //\n // n - name of the attribute\n // v - value of the attribute\n //\n // Returns tip or attribute value\n tip.attr = function (n, v) {\n if (arguments.length < 2 && typeof n === 'string') {\n return getNodeEl().attr(n)\n } else {\n var args = Array.prototype.slice.call(arguments)\n if (n == 'class') {\n // Prevent internal class override internally\n getNodeEl()\n .classed(v, true);\n } else {\n d3Selection.selection.prototype.attr.apply(getNodeEl(), args)\n }\n\n }\n\n return tip\n }\n\n // Public: Proxy style calls to the d3 tip container. Sets or gets a style value.\n //\n // n - name of the property\n // v - value of the property\n //\n // Returns tip or style property value\n tip.style = function (n, v) {\n if (arguments.length < 2 && typeof n === 'string') {\n return getNodeEl().style(n)\n } else {\n var args = Array.prototype.slice.call(arguments);\n if (args.length === 1) {\n var styles = args[0];\n Object.keys(styles).forEach(function (key) {\n return d3Selection.selection.prototype.style.apply(getNodeEl(), [key, styles[key]]);\n });\n }\n }\n\n return tip\n }\n\n // Public: Set or get the direction of the tooltip\n //\n // v - One of n(north), s(south), e(east), or w(west), nw(northwest),\n // sw(southwest), ne(northeast) or se(southeast)\n //\n // Returns tip or direction\n tip.direction = function (v) {\n if (!arguments.length) return direction\n direction = v == null ? v : functor(v)\n\n return tip\n }\n\n // Public: Sets or gets the offset of the tip\n //\n // v - Array of [x, y] offset\n //\n // Returns offset or\n tip.offset = function (v) {\n if (!arguments.length) return offset\n offset = v == null ? v : functor(v)\n\n return tip;\n }\n\n // Public: sets or gets the html value of the tooltip\n //\n // v - String value of the tip\n //\n // Returns html value or tip\n tip.html = function (v) {\n if (!arguments.length) return html\n html = v == null ? v : functor(v)\n\n return tip\n }\n\n // Public: sets or gets the root element anchor of the tooltip\n //\n // v - the html rootElement \n //\n // Returns root node of tip\n tip.rootElement = function (v) {\n if (!arguments.length) return rootElement\n rootElement = v == null ? v : functor(v)\n\n return tip\n }\n\n // Public: destroys the tooltip and removes it from the DOM\n //\n // Returns a tip\n tip.destroy = function () {\n if (node) {\n getNodeEl().remove();\n node = null;\n }\n return tip;\n }\n\n function d3_tip_direction() { return 'n' }\n function d3_tip_offset() { return [0, 0] }\n function d3_tip_html() { return ' ' }\n\n var direction_callbacks = {\n n: direction_n,\n s: direction_s,\n e: direction_e,\n w: direction_w,\n nw: direction_nw,\n ne: direction_ne,\n sw: direction_sw,\n se: direction_se\n };\n\n var directions = Object.keys(direction_callbacks);\n\n function direction_n() {\n var bbox = getScreenBBox()\n return {\n top: bbox.n.y - node.offsetHeight,\n left: bbox.n.x - node.offsetWidth / 2\n }\n }\n\n function direction_s() {\n var bbox = getScreenBBox()\n return {\n top: bbox.s.y,\n left: bbox.s.x - node.offsetWidth / 2\n }\n }\n\n function direction_e() {\n var bbox = getScreenBBox()\n return {\n top: bbox.e.y - node.offsetHeight / 2,\n left: bbox.e.x\n }\n }\n\n function direction_w() {\n var bbox = getScreenBBox()\n return {\n top: bbox.w.y - node.offsetHeight / 2,\n left: bbox.w.x - node.offsetWidth\n }\n }\n\n function direction_nw() {\n var bbox = getScreenBBox()\n return {\n top: bbox.nw.y - node.offsetHeight,\n left: bbox.nw.x - node.offsetWidth\n }\n }\n\n function direction_ne() {\n var bbox = getScreenBBox()\n return {\n top: bbox.ne.y - node.offsetHeight,\n left: bbox.ne.x\n }\n }\n\n function direction_sw() {\n var bbox = getScreenBBox()\n return {\n top: bbox.sw.y,\n left: bbox.sw.x - node.offsetWidth\n }\n }\n\n function direction_se() {\n var bbox = getScreenBBox()\n return {\n top: bbox.se.y,\n left: bbox.e.x\n }\n }\n\n function initNode() {\n let tipNode2 = 2;\n let tipNode = d3Selection.select('.d3-tip-lib-node');\n if (!tipNode.node()) {\n tipNode = d3Selection.select(document.createElement('div'))\n }\n tipNode\n .classed('d3-tip-lib-node', true)\n .style('position', 'absolute')\n .style('top', '0')\n .style('opacity', '0')\n .style('pointer-events', 'none')\n .style('box-sizing', 'border-box')\n\n return tipNode.node()\n }\n\n function getSVGNode(el) {\n el = el.node()\n if (el.tagName.toLowerCase() === 'svg')\n return el\n\n return el.ownerSVGElement\n }\n\n function getNodeEl() {\n if (node === null) {\n node = initNode();\n // re-add node to DOM\n document.body.appendChild(node);\n };\n return d3Selection.select(node);\n }\n\n // Private - gets the screen coordinates of a shape\n //\n // Given a shape on the screen, will return an SVGPoint for the directions\n // n(north), s(south), e(east), w(west), ne(northeast), se(southeast), nw(northwest),\n // sw(southwest).\n //\n // +-+-+\n // | |\n // + +\n // | |\n // +-+-+\n //\n // Returns an Object {n, s, e, w, nw, sw, ne, se}\n function getScreenBBox() {\n var targetel = target || d3.event.target;\n\n while ('undefined' === typeof targetel.getScreenCTM && 'undefined' === targetel.parentNode) {\n targetel = targetel.parentNode;\n }\n\n var bbox = {},\n matrix = targetel.getScreenCTM(),\n tbbox = targetel.getBBox(),\n width = tbbox.width,\n height = tbbox.height,\n x = tbbox.x,\n y = tbbox.y\n\n point.x = x\n point.y = y\n bbox.nw = point.matrixTransform(matrix)\n point.x += width\n bbox.ne = point.matrixTransform(matrix)\n point.y += height\n bbox.se = point.matrixTransform(matrix)\n point.x -= width\n bbox.sw = point.matrixTransform(matrix)\n point.y -= height / 2\n bbox.w = point.matrixTransform(matrix)\n point.x += width\n bbox.e = point.matrixTransform(matrix)\n point.x -= width / 2\n point.y -= height / 2\n bbox.n = point.matrixTransform(matrix)\n point.y += height\n bbox.s = point.matrixTransform(matrix)\n\n return bbox\n }\n\n return tip\n };\n\n exports.tip = d3Tip;\n\n Object.defineProperty(exports, '__esModule', { value: true });\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","import namespaces from \"./namespaces.js\";\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; // eslint-disable-line no-prototype-builtins\n}\n","import namespace from \"./namespace.js\";\nimport {xhtml} from \"./namespaces.js\";\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","function none() {}\n\nexport default function(selector) {\n return selector == null ? none : function() {\n return this.querySelector(selector);\n };\n}\n","export default function(x) {\n return typeof x === \"object\" && \"length\" in x\n ? x // Array, TypedArray, NodeList, array-like\n : Array.from(x); // Map, Set, iterable, string, or anything else\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","export default function(selector) {\n return function() {\n return this.matches(selector);\n };\n}\n\nexport function childMatcher(selector) {\n return function(node) {\n return node.matches(selector);\n };\n}\n\n","import {childMatcher} from \"../matcher.js\";\n\nvar find = Array.prototype.find;\n\nfunction childFind(match) {\n return function() {\n return find.call(this.children, match);\n };\n}\n\nfunction childFirst() {\n return this.firstElementChild;\n}\n\nexport default function(match) {\n return this.select(match == null ? childFirst\n : childFind(typeof match === \"function\" ? match : childMatcher(match)));\n}\n","import {childMatcher} from \"../matcher.js\";\n\nvar filter = Array.prototype.filter;\n\nfunction children() {\n return this.children;\n}\n\nfunction childrenFilter(match) {\n return function() {\n return filter.call(this.children, match);\n };\n}\n\nexport default function(match) {\n return this.selectAll(match == null ? children\n : childrenFilter(typeof match === \"function\" ? match : childMatcher(match)));\n}\n","export default function(update) {\n return new Array(update.length);\n}\n","import sparse from \"./sparse.js\";\nimport {Selection} from \"./index.js\";\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","export default function(x) {\n return function() {\n return x;\n };\n}\n","import {Selection} from \"./index.js\";\nimport {EnterNode} from \"./enter.js\";\nimport array from \"../array.js\";\nimport constant from \"../constant.js\";\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 = new Map,\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 = key.call(node, node.__data__, i, group) + \"\";\n if (nodeByKeyValue.has(keyValue)) {\n exit[i] = node;\n } else {\n nodeByKeyValue.set(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 = key.call(parent, data[i], i, data) + \"\";\n if (node = nodeByKeyValue.get(keyValue)) {\n update[i] = node;\n node.__data__ = data[i];\n nodeByKeyValue.delete(keyValue);\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.get(keyValues[i]) === node)) {\n exit[i] = node;\n }\n }\n}\n\nfunction datum(node) {\n return node.__data__;\n}\n\nexport default function(value, key) {\n if (!arguments.length) return Array.from(this, datum);\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 = array(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.js\";\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.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, 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","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","import defaultView from \"../window.js\";\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 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.js\";\nimport selector from \"../selector.js\";\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","function contextListener(listener) {\n return function(event) {\n listener.call(this, event, this.__data__);\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.options);\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, options) {\n return function() {\n var on = this.__on, o, listener = contextListener(value);\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.options);\n this.addEventListener(o.type, o.listener = listener, o.options = options);\n o.value = value;\n return;\n }\n }\n this.addEventListener(typename.type, listener, options);\n o = {type: typename.type, name: typename.name, value: value, listener: listener, options: options};\n if (!on) this.__on = [o];\n else on.push(o);\n };\n}\n\nexport default function(typename, value, options) {\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 for (i = 0; i < n; ++i) this.each(on(typenames[i], value, options));\n return this;\n}\n","import defaultView from \"../window.js\";\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.js\";\nimport selection_selectAll from \"./selectAll.js\";\nimport selection_selectChild from \"./selectChild.js\";\nimport selection_selectChildren from \"./selectChildren.js\";\nimport selection_filter from \"./filter.js\";\nimport selection_data from \"./data.js\";\nimport selection_enter from \"./enter.js\";\nimport selection_exit from \"./exit.js\";\nimport selection_join from \"./join.js\";\nimport selection_merge from \"./merge.js\";\nimport selection_order from \"./order.js\";\nimport selection_sort from \"./sort.js\";\nimport selection_call from \"./call.js\";\nimport selection_nodes from \"./nodes.js\";\nimport selection_node from \"./node.js\";\nimport selection_size from \"./size.js\";\nimport selection_empty from \"./empty.js\";\nimport selection_each from \"./each.js\";\nimport selection_attr from \"./attr.js\";\nimport selection_style from \"./style.js\";\nimport selection_property from \"./property.js\";\nimport selection_classed from \"./classed.js\";\nimport selection_text from \"./text.js\";\nimport selection_html from \"./html.js\";\nimport selection_raise from \"./raise.js\";\nimport selection_lower from \"./lower.js\";\nimport selection_append from \"./append.js\";\nimport selection_insert from \"./insert.js\";\nimport selection_remove from \"./remove.js\";\nimport selection_clone from \"./clone.js\";\nimport selection_datum from \"./datum.js\";\nimport selection_on from \"./on.js\";\nimport selection_dispatch from \"./dispatch.js\";\nimport selection_iterator from \"./iterator.js\";\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\nfunction selection_selection() {\n return this;\n}\n\nSelection.prototype = selection.prototype = {\n constructor: Selection,\n select: selection_select,\n selectAll: selection_selectAll,\n selectChild: selection_selectChild,\n selectChildren: selection_selectChildren,\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 selection: selection_selection,\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 [Symbol.iterator]: selection_iterator\n};\n\nexport default selection;\n","import {Selection} from \"./index.js\";\nimport selector from \"../selector.js\";\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.js\";\nimport array from \"../array.js\";\nimport selectorAll from \"../selectorAll.js\";\n\nfunction arrayAll(select) {\n return function() {\n var group = select.apply(this, arguments);\n return group == null ? [] : array(group);\n };\n}\n\nexport default function(select) {\n if (typeof select === \"function\") select = arrayAll(select);\n else 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.js\";\nimport matcher from \"../matcher.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 Selection(subgroups, this._parents);\n}\n","import sparse from \"./sparse.js\";\nimport {Selection} from \"./index.js\";\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.js\";\n\nexport default function(selection) {\n if (!(selection instanceof Selection)) throw new Error(\"invalid merge\");\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 return Array.from(this);\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 let size = 0;\n for (const node of this) ++size; // eslint-disable-line no-unused-vars\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.js\";\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","export default function*() {\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]) yield node;\n }\n }\n}\n","import {Selection, root} from \"./selection/index.js\";\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","import creator from \"./creator.js\";\nimport select from \"./select.js\";\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","export default function(event) {\n let sourceEvent;\n while (sourceEvent = event.sourceEvent) event = sourceEvent;\n return event;\n}\n","import sourceEvent from \"./sourceEvent.js\";\n\nexport default function(event, node) {\n event = sourceEvent(event);\n if (node === undefined) node = event.currentTarget;\n if (node) {\n var svg = node.ownerSVGElement || node;\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 if (node.getBoundingClientRect) {\n var rect = node.getBoundingClientRect();\n return [event.clientX - rect.left - node.clientLeft, event.clientY - rect.top - node.clientTop];\n }\n }\n return [event.pageX, event.pageY];\n}\n","import pointer from \"./pointer.js\";\nimport sourceEvent from \"./sourceEvent.js\";\n\nexport default function(events, node) {\n if (events.target) { // i.e., instanceof Event, not TouchList or iterable\n events = sourceEvent(events);\n if (node === undefined) node = events.currentTarget;\n events = events.touches || [events];\n }\n return Array.from(events, event => pointer(event, node));\n}\n","import array from \"./array.js\";\nimport {Selection, root} from \"./selection/index.js\";\n\nexport default function(selector) {\n return typeof selector === \"string\"\n ? new Selection([document.querySelectorAll(selector)], [document.documentElement])\n : new Selection([selector == null ? [] : array(selector)], root);\n}\n","(function(a,b){if(\"function\"==typeof define&&define.amd)define([],b);else if(\"undefined\"!=typeof exports)b();else{b(),a.FileSaver={exports:{}}.exports}})(this,function(){\"use strict\";function b(a,b){return\"undefined\"==typeof b?b={autoBom:!1}:\"object\"!=typeof b&&(console.warn(\"Deprecated: Expected third argument to be a object\"),b={autoBom:!b}),b.autoBom&&/^\\s*(?:text\\/\\S*|application\\/xml|\\S*\\/\\S*\\+xml)\\s*;.*charset\\s*=\\s*utf-8/i.test(a.type)?new Blob([\"\\uFEFF\",a],{type:a.type}):a}function c(a,b,c){var d=new XMLHttpRequest;d.open(\"GET\",a),d.responseType=\"blob\",d.onload=function(){g(d.response,b,c)},d.onerror=function(){console.error(\"could not download file\")},d.send()}function d(a){var b=new XMLHttpRequest;b.open(\"HEAD\",a,!1);try{b.send()}catch(a){}return 200<=b.status&&299>=b.status}function e(a){try{a.dispatchEvent(new MouseEvent(\"click\"))}catch(c){var b=document.createEvent(\"MouseEvents\");b.initMouseEvent(\"click\",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),a.dispatchEvent(b)}}var f=\"object\"==typeof window&&window.window===window?window:\"object\"==typeof self&&self.self===self?self:\"object\"==typeof global&&global.global===global?global:void 0,a=f.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),g=f.saveAs||(\"object\"!=typeof window||window!==f?function(){}:\"download\"in HTMLAnchorElement.prototype&&!a?function(b,g,h){var i=f.URL||f.webkitURL,j=document.createElement(\"a\");g=g||b.name||\"download\",j.download=g,j.rel=\"noopener\",\"string\"==typeof b?(j.href=b,j.origin===location.origin?e(j):d(j.href)?c(b,g,h):e(j,j.target=\"_blank\")):(j.href=i.createObjectURL(b),setTimeout(function(){i.revokeObjectURL(j.href)},4E4),setTimeout(function(){e(j)},0))}:\"msSaveOrOpenBlob\"in navigator?function(f,g,h){if(g=g||f.name||\"download\",\"string\"!=typeof f)navigator.msSaveOrOpenBlob(b(f,h),g);else if(d(f))c(f,g,h);else{var i=document.createElement(\"a\");i.href=f,i.target=\"_blank\",setTimeout(function(){e(i)})}}:function(b,d,e,g){if(g=g||open(\"\",\"_blank\"),g&&(g.document.title=g.document.body.innerText=\"downloading...\"),\"string\"==typeof b)return c(b,d,e);var h=\"application/octet-stream\"===b.type,i=/constructor/i.test(f.HTMLElement)||f.safari,j=/CriOS\\/[\\d]+/.test(navigator.userAgent);if((j||h&&i||a)&&\"undefined\"!=typeof FileReader){var k=new FileReader;k.onloadend=function(){var a=k.result;a=j?a:a.replace(/^data:[^;]*;/,\"data:attachment/file;\"),g?g.location.href=a:location=a,g=null},k.readAsDataURL(b)}else{var l=f.URL||f.webkitURL,m=l.createObjectURL(b);g?g.location=m:location.href=m,g=null,setTimeout(function(){l.revokeObjectURL(m)},4E4)}});f.saveAs=g.saveAs=g,\"undefined\"!=typeof module&&(module.exports=g)});\n\n","/**\n * @license\n * Lodash <https://lodash.com/>\n * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n;(function() {\n\n /** Used as a safe reference for `undefined` in pre-ES5 environments. */\n var undefined;\n\n /** Used as the semantic version number. */\n var VERSION = '4.17.21';\n\n /** Used as the size to enable large array optimizations. */\n var LARGE_ARRAY_SIZE = 200;\n\n /** Error message constants. */\n var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',\n FUNC_ERROR_TEXT = 'Expected a function',\n INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`';\n\n /** Used to stand-in for `undefined` hash values. */\n var HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n /** Used as the maximum memoize cache size. */\n var MAX_MEMOIZE_SIZE = 500;\n\n /** Used as the internal argument placeholder. */\n var PLACEHOLDER = '__lodash_placeholder__';\n\n /** Used to compose bitmasks for cloning. */\n var CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n /** Used to compose bitmasks for value comparisons. */\n var COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n /** Used to compose bitmasks for function metadata. */\n var WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\n WRAP_CURRY_BOUND_FLAG = 4,\n WRAP_CURRY_FLAG = 8,\n WRAP_CURRY_RIGHT_FLAG = 16,\n WRAP_PARTIAL_FLAG = 32,\n WRAP_PARTIAL_RIGHT_FLAG = 64,\n WRAP_ARY_FLAG = 128,\n WRAP_REARG_FLAG = 256,\n WRAP_FLIP_FLAG = 512;\n\n /** Used as default options for `_.truncate`. */\n var DEFAULT_TRUNC_LENGTH = 30,\n DEFAULT_TRUNC_OMISSION = '...';\n\n /** Used to detect hot functions by number of calls within a span of milliseconds. */\n var HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n /** Used to indicate the type of lazy iteratees. */\n var LAZY_FILTER_FLAG = 1,\n LAZY_MAP_FLAG = 2,\n LAZY_WHILE_FLAG = 3;\n\n /** Used as references for various `Number` constants. */\n var INFINITY = 1 / 0,\n MAX_SAFE_INTEGER = 9007199254740991,\n MAX_INTEGER = 1.7976931348623157e+308,\n NAN = 0 / 0;\n\n /** Used as references for the maximum length and index of an array. */\n var MAX_ARRAY_LENGTH = 4294967295,\n MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,\n HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;\n\n /** Used to associate wrap methods with their bit flags. */\n var wrapFlags = [\n ['ary', WRAP_ARY_FLAG],\n ['bind', WRAP_BIND_FLAG],\n ['bindKey', WRAP_BIND_KEY_FLAG],\n ['curry', WRAP_CURRY_FLAG],\n ['curryRight', WRAP_CURRY_RIGHT_FLAG],\n ['flip', WRAP_FLIP_FLAG],\n ['partial', WRAP_PARTIAL_FLAG],\n ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],\n ['rearg', WRAP_REARG_FLAG]\n ];\n\n /** `Object#toString` result references. */\n var argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n asyncTag = '[object AsyncFunction]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n domExcTag = '[object DOMException]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n nullTag = '[object Null]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n proxyTag = '[object Proxy]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n undefinedTag = '[object Undefined]',\n weakMapTag = '[object WeakMap]',\n weakSetTag = '[object WeakSet]';\n\n var arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n /** Used to match empty string literals in compiled template source. */\n var reEmptyStringLeading = /\\b__p \\+= '';/g,\n reEmptyStringMiddle = /\\b(__p \\+=) '' \\+/g,\n reEmptyStringTrailing = /(__e\\(.*?\\)|\\b__t\\)) \\+\\n'';/g;\n\n /** Used to match HTML entities and HTML characters. */\n var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,\n reUnescapedHtml = /[&<>\"']/g,\n reHasEscapedHtml = RegExp(reEscapedHtml.source),\n reHasUnescapedHtml = RegExp(reUnescapedHtml.source);\n\n /** Used to match template delimiters. */\n var reEscape = /<%-([\\s\\S]+?)%>/g,\n reEvaluate = /<%([\\s\\S]+?)%>/g,\n reInterpolate = /<%=([\\s\\S]+?)%>/g;\n\n /** Used to match property names within property paths. */\n var reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/,\n rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n /**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g,\n reHasRegExpChar = RegExp(reRegExpChar.source);\n\n /** Used to match leading whitespace. */\n var reTrimStart = /^\\s+/;\n\n /** Used to match a single whitespace character. */\n var reWhitespace = /\\s/;\n\n /** Used to match wrap detail comments. */\n var reWrapComment = /\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,\n reWrapDetails = /\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,\n reSplitDetails = /,? & /;\n\n /** Used to match words composed of alphanumeric characters. */\n var reAsciiWord = /[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g;\n\n /**\n * Used to validate the `validate` option in `_.template` variable.\n *\n * Forbids characters which could potentially change the meaning of the function argument definition:\n * - \"(),\" (modification of function parameters)\n * - \"=\" (default value)\n * - \"[]{}\" (destructuring of function parameters)\n * - \"/\" (beginning of a comment)\n * - whitespace\n */\n var reForbiddenIdentifierChars = /[()=,{}\\[\\]\\/\\s]/;\n\n /** Used to match backslashes in property paths. */\n var reEscapeChar = /\\\\(\\\\)?/g;\n\n /**\n * Used to match\n * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).\n */\n var reEsTemplate = /\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g;\n\n /** Used to match `RegExp` flags from their coerced string values. */\n var reFlags = /\\w*$/;\n\n /** Used to detect bad signed hexadecimal string values. */\n var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n /** Used to detect binary string values. */\n var reIsBinary = /^0b[01]+$/i;\n\n /** Used to detect host constructors (Safari). */\n var reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n /** Used to detect octal string values. */\n var reIsOctal = /^0o[0-7]+$/i;\n\n /** Used to detect unsigned integer values. */\n var reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n /** Used to match Latin Unicode letters (excluding mathematical operators). */\n var reLatin = /[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g;\n\n /** Used to ensure capturing order of template delimiters. */\n var reNoMatch = /($^)/;\n\n /** Used to match unescaped characters in compiled string literals. */\n var reUnescapedString = /['\\n\\r\\u2028\\u2029\\\\]/g;\n\n /** Used to compose unicode character classes. */\n var rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsDingbatRange = '\\\\u2700-\\\\u27bf',\n rsLowerRange = 'a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff',\n rsMathOpRange = '\\\\xac\\\\xb1\\\\xd7\\\\xf7',\n rsNonCharRange = '\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf',\n rsPunctuationRange = '\\\\u2000-\\\\u206f',\n rsSpaceRange = ' \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000',\n rsUpperRange = 'A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde',\n rsVarRange = '\\\\ufe0e\\\\ufe0f',\n rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;\n\n /** Used to compose unicode capture groups. */\n var rsApos = \"['\\u2019]\",\n rsAstral = '[' + rsAstralRange + ']',\n rsBreak = '[' + rsBreakRange + ']',\n rsCombo = '[' + rsComboRange + ']',\n rsDigits = '\\\\d+',\n rsDingbat = '[' + rsDingbatRange + ']',\n rsLower = '[' + rsLowerRange + ']',\n rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',\n rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n rsNonAstral = '[^' + rsAstralRange + ']',\n rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n rsUpper = '[' + rsUpperRange + ']',\n rsZWJ = '\\\\u200d';\n\n /** Used to compose unicode regexes. */\n var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',\n rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',\n rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',\n rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',\n reOptMod = rsModifier + '?',\n rsOptVar = '[' + rsVarRange + ']?',\n rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n rsOrdLower = '\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])',\n rsOrdUpper = '\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])',\n rsSeq = rsOptVar + reOptMod + rsOptJoin,\n rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,\n rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';\n\n /** Used to match apostrophes. */\n var reApos = RegExp(rsApos, 'g');\n\n /**\n * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and\n * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).\n */\n var reComboMark = RegExp(rsCombo, 'g');\n\n /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */\n var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');\n\n /** Used to match complex or compound words. */\n var reUnicodeWord = RegExp([\n rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',\n rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',\n rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,\n rsUpper + '+' + rsOptContrUpper,\n rsOrdUpper,\n rsOrdLower,\n rsDigits,\n rsEmoji\n ].join('|'), 'g');\n\n /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */\n var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');\n\n /** Used to detect strings that need a more robust regexp to match words. */\n var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;\n\n /** Used to assign default `context` object properties. */\n var contextProps = [\n 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',\n 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',\n 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',\n 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',\n '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'\n ];\n\n /** Used to make template sourceURLs easier to identify. */\n var templateCounter = -1;\n\n /** Used to identify `toStringTag` values of typed arrays. */\n var typedArrayTags = {};\n typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\n typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\n typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\n typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\n typedArrayTags[uint32Tag] = true;\n typedArrayTags[argsTag] = typedArrayTags[arrayTag] =\n typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\n typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\n typedArrayTags[errorTag] = typedArrayTags[funcTag] =\n typedArrayTags[mapTag] = typedArrayTags[numberTag] =\n typedArrayTags[objectTag] = typedArrayTags[regexpTag] =\n typedArrayTags[setTag] = typedArrayTags[stringTag] =\n typedArrayTags[weakMapTag] = false;\n\n /** Used to identify `toStringTag` values supported by `_.clone`. */\n var cloneableTags = {};\n cloneableTags[argsTag] = cloneableTags[arrayTag] =\n cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\n cloneableTags[boolTag] = cloneableTags[dateTag] =\n cloneableTags[float32Tag] = cloneableTags[float64Tag] =\n cloneableTags[int8Tag] = cloneableTags[int16Tag] =\n cloneableTags[int32Tag] = cloneableTags[mapTag] =\n cloneableTags[numberTag] = cloneableTags[objectTag] =\n cloneableTags[regexpTag] = cloneableTags[setTag] =\n cloneableTags[stringTag] = cloneableTags[symbolTag] =\n cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\n cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\n cloneableTags[errorTag] = cloneableTags[funcTag] =\n cloneableTags[weakMapTag] = false;\n\n /** Used to map Latin Unicode letters to basic Latin letters. */\n var deburredLetters = {\n // Latin-1 Supplement block.\n '\\xc0': 'A', '\\xc1': 'A', '\\xc2': 'A', '\\xc3': 'A', '\\xc4': 'A', '\\xc5': 'A',\n '\\xe0': 'a', '\\xe1': 'a', '\\xe2': 'a', '\\xe3': 'a', '\\xe4': 'a', '\\xe5': 'a',\n '\\xc7': 'C', '\\xe7': 'c',\n '\\xd0': 'D', '\\xf0': 'd',\n '\\xc8': 'E', '\\xc9': 'E', '\\xca': 'E', '\\xcb': 'E',\n '\\xe8': 'e', '\\xe9': 'e', '\\xea': 'e', '\\xeb': 'e',\n '\\xcc': 'I', '\\xcd': 'I', '\\xce': 'I', '\\xcf': 'I',\n '\\xec': 'i', '\\xed': 'i', '\\xee': 'i', '\\xef': 'i',\n '\\xd1': 'N', '\\xf1': 'n',\n '\\xd2': 'O', '\\xd3': 'O', '\\xd4': 'O', '\\xd5': 'O', '\\xd6': 'O', '\\xd8': 'O',\n '\\xf2': 'o', '\\xf3': 'o', '\\xf4': 'o', '\\xf5': 'o', '\\xf6': 'o', '\\xf8': 'o',\n '\\xd9': 'U', '\\xda': 'U', '\\xdb': 'U', '\\xdc': 'U',\n '\\xf9': 'u', '\\xfa': 'u', '\\xfb': 'u', '\\xfc': 'u',\n '\\xdd': 'Y', '\\xfd': 'y', '\\xff': 'y',\n '\\xc6': 'Ae', '\\xe6': 'ae',\n '\\xde': 'Th', '\\xfe': 'th',\n '\\xdf': 'ss',\n // Latin Extended-A block.\n '\\u0100': 'A', '\\u0102': 'A', '\\u0104': 'A',\n '\\u0101': 'a', '\\u0103': 'a', '\\u0105': 'a',\n '\\u0106': 'C', '\\u0108': 'C', '\\u010a': 'C', '\\u010c': 'C',\n '\\u0107': 'c', '\\u0109': 'c', '\\u010b': 'c', '\\u010d': 'c',\n '\\u010e': 'D', '\\u0110': 'D', '\\u010f': 'd', '\\u0111': 'd',\n '\\u0112': 'E', '\\u0114': 'E', '\\u0116': 'E', '\\u0118': 'E', '\\u011a': 'E',\n '\\u0113': 'e', '\\u0115': 'e', '\\u0117': 'e', '\\u0119': 'e', '\\u011b': 'e',\n '\\u011c': 'G', '\\u011e': 'G', '\\u0120': 'G', '\\u0122': 'G',\n '\\u011d': 'g', '\\u011f': 'g', '\\u0121': 'g', '\\u0123': 'g',\n '\\u0124': 'H', '\\u0126': 'H', '\\u0125': 'h', '\\u0127': 'h',\n '\\u0128': 'I', '\\u012a': 'I', '\\u012c': 'I', '\\u012e': 'I', '\\u0130': 'I',\n '\\u0129': 'i', '\\u012b': 'i', '\\u012d': 'i', '\\u012f': 'i', '\\u0131': 'i',\n '\\u0134': 'J', '\\u0135': 'j',\n '\\u0136': 'K', '\\u0137': 'k', '\\u0138': 'k',\n '\\u0139': 'L', '\\u013b': 'L', '\\u013d': 'L', '\\u013f': 'L', '\\u0141': 'L',\n '\\u013a': 'l', '\\u013c': 'l', '\\u013e': 'l', '\\u0140': 'l', '\\u0142': 'l',\n '\\u0143': 'N', '\\u0145': 'N', '\\u0147': 'N', '\\u014a': 'N',\n '\\u0144': 'n', '\\u0146': 'n', '\\u0148': 'n', '\\u014b': 'n',\n '\\u014c': 'O', '\\u014e': 'O', '\\u0150': 'O',\n '\\u014d': 'o', '\\u014f': 'o', '\\u0151': 'o',\n '\\u0154': 'R', '\\u0156': 'R', '\\u0158': 'R',\n '\\u0155': 'r', '\\u0157': 'r', '\\u0159': 'r',\n '\\u015a': 'S', '\\u015c': 'S', '\\u015e': 'S', '\\u0160': 'S',\n '\\u015b': 's', '\\u015d': 's', '\\u015f': 's', '\\u0161': 's',\n '\\u0162': 'T', '\\u0164': 'T', '\\u0166': 'T',\n '\\u0163': 't', '\\u0165': 't', '\\u0167': 't',\n '\\u0168': 'U', '\\u016a': 'U', '\\u016c': 'U', '\\u016e': 'U', '\\u0170': 'U', '\\u0172': 'U',\n '\\u0169': 'u', '\\u016b': 'u', '\\u016d': 'u', '\\u016f': 'u', '\\u0171': 'u', '\\u0173': 'u',\n '\\u0174': 'W', '\\u0175': 'w',\n '\\u0176': 'Y', '\\u0177': 'y', '\\u0178': 'Y',\n '\\u0179': 'Z', '\\u017b': 'Z', '\\u017d': 'Z',\n '\\u017a': 'z', '\\u017c': 'z', '\\u017e': 'z',\n '\\u0132': 'IJ', '\\u0133': 'ij',\n '\\u0152': 'Oe', '\\u0153': 'oe',\n '\\u0149': \"'n\", '\\u017f': 's'\n };\n\n /** Used to map characters to HTML entities. */\n var htmlEscapes = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": '''\n };\n\n /** Used to map HTML entities to characters. */\n var htmlUnescapes = {\n '&': '&',\n '<': '<',\n '>': '>',\n '"': '\"',\n ''': \"'\"\n };\n\n /** Used to escape characters for inclusion in compiled string literals. */\n var stringEscapes = {\n '\\\\': '\\\\',\n \"'\": \"'\",\n '\\n': 'n',\n '\\r': 'r',\n '\\u2028': 'u2028',\n '\\u2029': 'u2029'\n };\n\n /** Built-in method references without a dependency on `root`. */\n var freeParseFloat = parseFloat,\n freeParseInt = parseInt;\n\n /** Detect free variable `global` from Node.js. */\n var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n /** Detect free variable `self`. */\n var freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n /** Used as a reference to the global object. */\n var root = freeGlobal || freeSelf || Function('return this')();\n\n /** Detect free variable `exports`. */\n var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n /** Detect free variable `module`. */\n var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n /** Detect the popular CommonJS extension `module.exports`. */\n var moduleExports = freeModule && freeModule.exports === freeExports;\n\n /** Detect free variable `process` from Node.js. */\n var freeProcess = moduleExports && freeGlobal.process;\n\n /** Used to access faster Node.js helpers. */\n var nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n }());\n\n /* Node.js helper references. */\n var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,\n nodeIsDate = nodeUtil && nodeUtil.isDate,\n nodeIsMap = nodeUtil && nodeUtil.isMap,\n nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,\n nodeIsSet = nodeUtil && nodeUtil.isSet,\n nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n /*--------------------------------------------------------------------------*/\n\n /**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\n function apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n }\n\n /**\n * A specialized version of `baseAggregator` for arrays.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\n function arrayAggregator(array, setter, iteratee, accumulator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n var value = array[index];\n setter(accumulator, value, iteratee(value), array);\n }\n return accumulator;\n }\n\n /**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\n function arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n }\n\n /**\n * A specialized version of `_.forEachRight` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\n function arrayEachRight(array, iteratee) {\n var length = array == null ? 0 : array.length;\n\n while (length--) {\n if (iteratee(array[length], length, array) === false) {\n break;\n }\n }\n return array;\n }\n\n /**\n * A specialized version of `_.every` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`.\n */\n function arrayEvery(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (!predicate(array[index], index, array)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\n function arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n }\n\n /**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\n function arrayIncludes(array, value) {\n var length = array == null ? 0 : array.length;\n return !!length && baseIndexOf(array, value, 0) > -1;\n }\n\n /**\n * This function is like `arrayIncludes` except that it accepts a comparator.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\n function arrayIncludesWith(array, value, comparator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (comparator(value, array[index])) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\n function arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n }\n\n /**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\n function arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n }\n\n /**\n * A specialized version of `_.reduce` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the first element of `array` as\n * the initial value.\n * @returns {*} Returns the accumulated value.\n */\n function arrayReduce(array, iteratee, accumulator, initAccum) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n if (initAccum && length) {\n accumulator = array[++index];\n }\n while (++index < length) {\n accumulator = iteratee(accumulator, array[index], index, array);\n }\n return accumulator;\n }\n\n /**\n * A specialized version of `_.reduceRight` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the last element of `array` as\n * the initial value.\n * @returns {*} Returns the accumulated value.\n */\n function arrayReduceRight(array, iteratee, accumulator, initAccum) {\n var length = array == null ? 0 : array.length;\n if (initAccum && length) {\n accumulator = array[--length];\n }\n while (length--) {\n accumulator = iteratee(accumulator, array[length], length, array);\n }\n return accumulator;\n }\n\n /**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\n function arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Gets the size of an ASCII `string`.\n *\n * @private\n * @param {string} string The string inspect.\n * @returns {number} Returns the string size.\n */\n var asciiSize = baseProperty('length');\n\n /**\n * Converts an ASCII `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\n function asciiToArray(string) {\n return string.split('');\n }\n\n /**\n * Splits an ASCII `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\n function asciiWords(string) {\n return string.match(reAsciiWord) || [];\n }\n\n /**\n * The base implementation of methods like `_.findKey` and `_.findLastKey`,\n * without support for iteratee shorthands, which iterates over `collection`\n * using `eachFunc`.\n *\n * @private\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {Function} eachFunc The function to iterate over `collection`.\n * @returns {*} Returns the found element or its key, else `undefined`.\n */\n function baseFindKey(collection, predicate, eachFunc) {\n var result;\n eachFunc(collection, function(value, key, collection) {\n if (predicate(value, key, collection)) {\n result = key;\n return false;\n }\n });\n return result;\n }\n\n /**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function baseIndexOf(array, value, fromIndex) {\n return value === value\n ? strictIndexOf(array, value, fromIndex)\n : baseFindIndex(array, baseIsNaN, fromIndex);\n }\n\n /**\n * This function is like `baseIndexOf` except that it accepts a comparator.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function baseIndexOfWith(array, value, fromIndex, comparator) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (comparator(array[index], value)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\n function baseIsNaN(value) {\n return value !== value;\n }\n\n /**\n * The base implementation of `_.mean` and `_.meanBy` without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {number} Returns the mean.\n */\n function baseMean(array, iteratee) {\n var length = array == null ? 0 : array.length;\n return length ? (baseSum(array, iteratee) / length) : NAN;\n }\n\n /**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\n function baseProperty(key) {\n return function(object) {\n return object == null ? undefined : object[key];\n };\n }\n\n /**\n * The base implementation of `_.propertyOf` without support for deep paths.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Function} Returns the new accessor function.\n */\n function basePropertyOf(object) {\n return function(key) {\n return object == null ? undefined : object[key];\n };\n }\n\n /**\n * The base implementation of `_.reduce` and `_.reduceRight`, without support\n * for iteratee shorthands, which iterates over `collection` using `eachFunc`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} accumulator The initial value.\n * @param {boolean} initAccum Specify using the first or last element of\n * `collection` as the initial value.\n * @param {Function} eachFunc The function to iterate over `collection`.\n * @returns {*} Returns the accumulated value.\n */\n function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {\n eachFunc(collection, function(value, index, collection) {\n accumulator = initAccum\n ? (initAccum = false, value)\n : iteratee(accumulator, value, index, collection);\n });\n return accumulator;\n }\n\n /**\n * The base implementation of `_.sortBy` which uses `comparer` to define the\n * sort order of `array` and replaces criteria objects with their corresponding\n * values.\n *\n * @private\n * @param {Array} array The array to sort.\n * @param {Function} comparer The function to define sort order.\n * @returns {Array} Returns `array`.\n */\n function baseSortBy(array, comparer) {\n var length = array.length;\n\n array.sort(comparer);\n while (length--) {\n array[length] = array[length].value;\n }\n return array;\n }\n\n /**\n * The base implementation of `_.sum` and `_.sumBy` without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {number} Returns the sum.\n */\n function baseSum(array, iteratee) {\n var result,\n index = -1,\n length = array.length;\n\n while (++index < length) {\n var current = iteratee(array[index]);\n if (current !== undefined) {\n result = result === undefined ? current : (result + current);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\n function baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n }\n\n /**\n * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array\n * of key-value pairs for `object` corresponding to the property names of `props`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} props The property names to get values for.\n * @returns {Object} Returns the key-value pairs.\n */\n function baseToPairs(object, props) {\n return arrayMap(props, function(key) {\n return [key, object[key]];\n });\n }\n\n /**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\n function baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n }\n\n /**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\n function baseUnary(func) {\n return function(value) {\n return func(value);\n };\n }\n\n /**\n * The base implementation of `_.values` and `_.valuesIn` which creates an\n * array of `object` property values corresponding to the property names\n * of `props`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} props The property names to get values for.\n * @returns {Object} Returns the array of property values.\n */\n function baseValues(object, props) {\n return arrayMap(props, function(key) {\n return object[key];\n });\n }\n\n /**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function cacheHas(cache, key) {\n return cache.has(key);\n }\n\n /**\n * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol\n * that is not found in the character symbols.\n *\n * @private\n * @param {Array} strSymbols The string symbols to inspect.\n * @param {Array} chrSymbols The character symbols to find.\n * @returns {number} Returns the index of the first unmatched string symbol.\n */\n function charsStartIndex(strSymbols, chrSymbols) {\n var index = -1,\n length = strSymbols.length;\n\n while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n return index;\n }\n\n /**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol\n * that is not found in the character symbols.\n *\n * @private\n * @param {Array} strSymbols The string symbols to inspect.\n * @param {Array} chrSymbols The character symbols to find.\n * @returns {number} Returns the index of the last unmatched string symbol.\n */\n function charsEndIndex(strSymbols, chrSymbols) {\n var index = strSymbols.length;\n\n while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n return index;\n }\n\n /**\n * Gets the number of `placeholder` occurrences in `array`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} placeholder The placeholder to search for.\n * @returns {number} Returns the placeholder count.\n */\n function countHolders(array, placeholder) {\n var length = array.length,\n result = 0;\n\n while (length--) {\n if (array[length] === placeholder) {\n ++result;\n }\n }\n return result;\n }\n\n /**\n * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A\n * letters to basic Latin letters.\n *\n * @private\n * @param {string} letter The matched letter to deburr.\n * @returns {string} Returns the deburred letter.\n */\n var deburrLetter = basePropertyOf(deburredLetters);\n\n /**\n * Used by `_.escape` to convert characters to HTML entities.\n *\n * @private\n * @param {string} chr The matched character to escape.\n * @returns {string} Returns the escaped character.\n */\n var escapeHtmlChar = basePropertyOf(htmlEscapes);\n\n /**\n * Used by `_.template` to escape characters for inclusion in compiled string literals.\n *\n * @private\n * @param {string} chr The matched character to escape.\n * @returns {string} Returns the escaped character.\n */\n function escapeStringChar(chr) {\n return '\\\\' + stringEscapes[chr];\n }\n\n /**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\n function getValue(object, key) {\n return object == null ? undefined : object[key];\n }\n\n /**\n * Checks if `string` contains Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a symbol is found, else `false`.\n */\n function hasUnicode(string) {\n return reHasUnicode.test(string);\n }\n\n /**\n * Checks if `string` contains a word composed of Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a word is found, else `false`.\n */\n function hasUnicodeWord(string) {\n return reHasUnicodeWord.test(string);\n }\n\n /**\n * Converts `iterator` to an array.\n *\n * @private\n * @param {Object} iterator The iterator to convert.\n * @returns {Array} Returns the converted array.\n */\n function iteratorToArray(iterator) {\n var data,\n result = [];\n\n while (!(data = iterator.next()).done) {\n result.push(data.value);\n }\n return result;\n }\n\n /**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\n function mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n }\n\n /**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\n function overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n }\n\n /**\n * Replaces all `placeholder` elements in `array` with an internal placeholder\n * and returns an array of their indexes.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {*} placeholder The placeholder to replace.\n * @returns {Array} Returns the new array of placeholder indexes.\n */\n function replaceHolders(array, placeholder) {\n var index = -1,\n length = array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (value === placeholder || value === PLACEHOLDER) {\n array[index] = PLACEHOLDER;\n result[resIndex++] = index;\n }\n }\n return result;\n }\n\n /**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\n function setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n }\n\n /**\n * Converts `set` to its value-value pairs.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the value-value pairs.\n */\n function setToPairs(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = [value, value];\n });\n return result;\n }\n\n /**\n * A specialized version of `_.indexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function strictIndexOf(array, value, fromIndex) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * A specialized version of `_.lastIndexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function strictLastIndexOf(array, value, fromIndex) {\n var index = fromIndex + 1;\n while (index--) {\n if (array[index] === value) {\n return index;\n }\n }\n return index;\n }\n\n /**\n * Gets the number of symbols in `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the string size.\n */\n function stringSize(string) {\n return hasUnicode(string)\n ? unicodeSize(string)\n : asciiSize(string);\n }\n\n /**\n * Converts `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\n function stringToArray(string) {\n return hasUnicode(string)\n ? unicodeToArray(string)\n : asciiToArray(string);\n }\n\n /**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\n function trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n }\n\n /**\n * Used by `_.unescape` to convert HTML entities to characters.\n *\n * @private\n * @param {string} chr The matched character to unescape.\n * @returns {string} Returns the unescaped character.\n */\n var unescapeHtmlChar = basePropertyOf(htmlUnescapes);\n\n /**\n * Gets the size of a Unicode `string`.\n *\n * @private\n * @param {string} string The string inspect.\n * @returns {number} Returns the string size.\n */\n function unicodeSize(string) {\n var result = reUnicode.lastIndex = 0;\n while (reUnicode.test(string)) {\n ++result;\n }\n return result;\n }\n\n /**\n * Converts a Unicode `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\n function unicodeToArray(string) {\n return string.match(reUnicode) || [];\n }\n\n /**\n * Splits a Unicode `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\n function unicodeWords(string) {\n return string.match(reUnicodeWord) || [];\n }\n\n /*--------------------------------------------------------------------------*/\n\n /**\n * Create a new pristine `lodash` function using the `context` object.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Util\n * @param {Object} [context=root] The context object.\n * @returns {Function} Returns a new `lodash` function.\n * @example\n *\n * _.mixin({ 'foo': _.constant('foo') });\n *\n * var lodash = _.runInContext();\n * lodash.mixin({ 'bar': lodash.constant('bar') });\n *\n * _.isFunction(_.foo);\n * // => true\n * _.isFunction(_.bar);\n * // => false\n *\n * lodash.isFunction(lodash.foo);\n * // => false\n * lodash.isFunction(lodash.bar);\n * // => true\n *\n * // Create a suped-up `defer` in Node.js.\n * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;\n */\n var runInContext = (function runInContext(context) {\n context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));\n\n /** Built-in constructor references. */\n var Array = context.Array,\n Date = context.Date,\n Error = context.Error,\n Function = context.Function,\n Math = context.Math,\n Object = context.Object,\n RegExp = context.RegExp,\n String = context.String,\n TypeError = context.TypeError;\n\n /** Used for built-in method references. */\n var arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n /** Used to detect overreaching core-js shims. */\n var coreJsData = context['__core-js_shared__'];\n\n /** Used to resolve the decompiled source of functions. */\n var funcToString = funcProto.toString;\n\n /** Used to check objects for own properties. */\n var hasOwnProperty = objectProto.hasOwnProperty;\n\n /** Used to generate unique IDs. */\n var idCounter = 0;\n\n /** Used to detect methods masquerading as native. */\n var maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n }());\n\n /**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\n var nativeObjectToString = objectProto.toString;\n\n /** Used to infer the `Object` constructor. */\n var objectCtorString = funcToString.call(Object);\n\n /** Used to restore the original `_` reference in `_.noConflict`. */\n var oldDash = root._;\n\n /** Used to detect if a method is native. */\n var reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n );\n\n /** Built-in value references. */\n var Buffer = moduleExports ? context.Buffer : undefined,\n Symbol = context.Symbol,\n Uint8Array = context.Uint8Array,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,\n getPrototype = overArg(Object.getPrototypeOf, Object),\n objectCreate = Object.create,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice,\n spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,\n symIterator = Symbol ? Symbol.iterator : undefined,\n symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n var defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n }());\n\n /** Mocked built-ins. */\n var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,\n ctxNow = Date && Date.now !== root.Date.now && Date.now,\n ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;\n\n /* Built-in method references for those with the same name as other `lodash` methods. */\n var nativeCeil = Math.ceil,\n nativeFloor = Math.floor,\n nativeGetSymbols = Object.getOwnPropertySymbols,\n nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n nativeIsFinite = context.isFinite,\n nativeJoin = arrayProto.join,\n nativeKeys = overArg(Object.keys, Object),\n nativeMax = Math.max,\n nativeMin = Math.min,\n nativeNow = Date.now,\n nativeParseInt = context.parseInt,\n nativeRandom = Math.random,\n nativeReverse = arrayProto.reverse;\n\n /* Built-in method references that are verified to be native. */\n var DataView = getNative(context, 'DataView'),\n Map = getNative(context, 'Map'),\n Promise = getNative(context, 'Promise'),\n Set = getNative(context, 'Set'),\n WeakMap = getNative(context, 'WeakMap'),\n nativeCreate = getNative(Object, 'create');\n\n /** Used to store function metadata. */\n var metaMap = WeakMap && new WeakMap;\n\n /** Used to lookup unminified function names. */\n var realNames = {};\n\n /** Used to detect maps, sets, and weakmaps. */\n var dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n /** Used to convert symbols to primitives and strings. */\n var symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a `lodash` object which wraps `value` to enable implicit method\n * chain sequences. Methods that operate on and return arrays, collections,\n * and functions can be chained together. Methods that retrieve a single value\n * or may return a primitive value will automatically end the chain sequence\n * and return the unwrapped value. Otherwise, the value must be unwrapped\n * with `_#value`.\n *\n * Explicit chain sequences, which must be unwrapped with `_#value`, may be\n * enabled using `_.chain`.\n *\n * The execution of chained methods is lazy, that is, it's deferred until\n * `_#value` is implicitly or explicitly called.\n *\n * Lazy evaluation allows several methods to support shortcut fusion.\n * Shortcut fusion is an optimization to merge iteratee calls; this avoids\n * the creation of intermediate arrays and can greatly reduce the number of\n * iteratee executions. Sections of a chain sequence qualify for shortcut\n * fusion if the section is applied to an array and iteratees accept only\n * one argument. The heuristic for whether a section qualifies for shortcut\n * fusion is subject to change.\n *\n * Chaining is supported in custom builds as long as the `_#value` method is\n * directly or indirectly included in the build.\n *\n * In addition to lodash methods, wrappers have `Array` and `String` methods.\n *\n * The wrapper `Array` methods are:\n * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`\n *\n * The wrapper `String` methods are:\n * `replace` and `split`\n *\n * The wrapper methods that support shortcut fusion are:\n * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,\n * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,\n * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`\n *\n * The chainable wrapper methods are:\n * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,\n * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,\n * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,\n * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,\n * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,\n * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,\n * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,\n * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,\n * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,\n * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,\n * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,\n * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,\n * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,\n * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,\n * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,\n * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,\n * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,\n * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,\n * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,\n * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,\n * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,\n * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,\n * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,\n * `zipObject`, `zipObjectDeep`, and `zipWith`\n *\n * The wrapper methods that are **not** chainable by default are:\n * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,\n * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,\n * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,\n * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,\n * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,\n * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,\n * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,\n * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,\n * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,\n * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,\n * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,\n * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,\n * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,\n * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,\n * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,\n * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,\n * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,\n * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,\n * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,\n * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,\n * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,\n * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,\n * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,\n * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,\n * `upperFirst`, `value`, and `words`\n *\n * @name _\n * @constructor\n * @category Seq\n * @param {*} value The value to wrap in a `lodash` instance.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var wrapped = _([1, 2, 3]);\n *\n * // Returns an unwrapped value.\n * wrapped.reduce(_.add);\n * // => 6\n *\n * // Returns a wrapped value.\n * var squares = wrapped.map(square);\n *\n * _.isArray(squares);\n * // => false\n *\n * _.isArray(squares.value());\n * // => true\n */\n function lodash(value) {\n if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {\n if (value instanceof LodashWrapper) {\n return value;\n }\n if (hasOwnProperty.call(value, '__wrapped__')) {\n return wrapperClone(value);\n }\n }\n return new LodashWrapper(value);\n }\n\n /**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\n var baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n }());\n\n /**\n * The function whose prototype chain sequence wrappers inherit from.\n *\n * @private\n */\n function baseLodash() {\n // No operation performed.\n }\n\n /**\n * The base constructor for creating `lodash` wrapper objects.\n *\n * @private\n * @param {*} value The value to wrap.\n * @param {boolean} [chainAll] Enable explicit method chain sequences.\n */\n function LodashWrapper(value, chainAll) {\n this.__wrapped__ = value;\n this.__actions__ = [];\n this.__chain__ = !!chainAll;\n this.__index__ = 0;\n this.__values__ = undefined;\n }\n\n /**\n * By default, the template delimiters used by lodash are like those in\n * embedded Ruby (ERB) as well as ES2015 template strings. Change the\n * following template settings to use alternative delimiters.\n *\n * @static\n * @memberOf _\n * @type {Object}\n */\n lodash.templateSettings = {\n\n /**\n * Used to detect `data` property values to be HTML-escaped.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'escape': reEscape,\n\n /**\n * Used to detect code to be evaluated.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'evaluate': reEvaluate,\n\n /**\n * Used to detect `data` property values to inject.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'interpolate': reInterpolate,\n\n /**\n * Used to reference the data object in the template text.\n *\n * @memberOf _.templateSettings\n * @type {string}\n */\n 'variable': '',\n\n /**\n * Used to import variables into the compiled template.\n *\n * @memberOf _.templateSettings\n * @type {Object}\n */\n 'imports': {\n\n /**\n * A reference to the `lodash` function.\n *\n * @memberOf _.templateSettings.imports\n * @type {Function}\n */\n '_': lodash\n }\n };\n\n // Ensure wrappers are instances of `baseLodash`.\n lodash.prototype = baseLodash.prototype;\n lodash.prototype.constructor = lodash;\n\n LodashWrapper.prototype = baseCreate(baseLodash.prototype);\n LodashWrapper.prototype.constructor = LodashWrapper;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.\n *\n * @private\n * @constructor\n * @param {*} value The value to wrap.\n */\n function LazyWrapper(value) {\n this.__wrapped__ = value;\n this.__actions__ = [];\n this.__dir__ = 1;\n this.__filtered__ = false;\n this.__iteratees__ = [];\n this.__takeCount__ = MAX_ARRAY_LENGTH;\n this.__views__ = [];\n }\n\n /**\n * Creates a clone of the lazy wrapper object.\n *\n * @private\n * @name clone\n * @memberOf LazyWrapper\n * @returns {Object} Returns the cloned `LazyWrapper` object.\n */\n function lazyClone() {\n var result = new LazyWrapper(this.__wrapped__);\n result.__actions__ = copyArray(this.__actions__);\n result.__dir__ = this.__dir__;\n result.__filtered__ = this.__filtered__;\n result.__iteratees__ = copyArray(this.__iteratees__);\n result.__takeCount__ = this.__takeCount__;\n result.__views__ = copyArray(this.__views__);\n return result;\n }\n\n /**\n * Reverses the direction of lazy iteration.\n *\n * @private\n * @name reverse\n * @memberOf LazyWrapper\n * @returns {Object} Returns the new reversed `LazyWrapper` object.\n */\n function lazyReverse() {\n if (this.__filtered__) {\n var result = new LazyWrapper(this);\n result.__dir__ = -1;\n result.__filtered__ = true;\n } else {\n result = this.clone();\n result.__dir__ *= -1;\n }\n return result;\n }\n\n /**\n * Extracts the unwrapped value from its lazy wrapper.\n *\n * @private\n * @name value\n * @memberOf LazyWrapper\n * @returns {*} Returns the unwrapped value.\n */\n function lazyValue() {\n var array = this.__wrapped__.value(),\n dir = this.__dir__,\n isArr = isArray(array),\n isRight = dir < 0,\n arrLength = isArr ? array.length : 0,\n view = getView(0, arrLength, this.__views__),\n start = view.start,\n end = view.end,\n length = end - start,\n index = isRight ? end : (start - 1),\n iteratees = this.__iteratees__,\n iterLength = iteratees.length,\n resIndex = 0,\n takeCount = nativeMin(length, this.__takeCount__);\n\n if (!isArr || (!isRight && arrLength == length && takeCount == length)) {\n return baseWrapperValue(array, this.__actions__);\n }\n var result = [];\n\n outer:\n while (length-- && resIndex < takeCount) {\n index += dir;\n\n var iterIndex = -1,\n value = array[index];\n\n while (++iterIndex < iterLength) {\n var data = iteratees[iterIndex],\n iteratee = data.iteratee,\n type = data.type,\n computed = iteratee(value);\n\n if (type == LAZY_MAP_FLAG) {\n value = computed;\n } else if (!computed) {\n if (type == LAZY_FILTER_FLAG) {\n continue outer;\n } else {\n break outer;\n }\n }\n }\n result[resIndex++] = value;\n }\n return result;\n }\n\n // Ensure `LazyWrapper` is an instance of `baseLodash`.\n LazyWrapper.prototype = baseCreate(baseLodash.prototype);\n LazyWrapper.prototype.constructor = LazyWrapper;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n }\n\n /**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\n function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }\n\n /**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n }\n\n /**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n }\n\n /**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n }\n\n /**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\n function hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n }\n\n // Add methods to `Hash`.\n Hash.prototype.clear = hashClear;\n Hash.prototype['delete'] = hashDelete;\n Hash.prototype.get = hashGet;\n Hash.prototype.has = hashHas;\n Hash.prototype.set = hashSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n }\n\n /**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\n function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }\n\n /**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n }\n\n /**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n }\n\n /**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n }\n\n /**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\n function listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n }\n\n // Add methods to `ListCache`.\n ListCache.prototype.clear = listCacheClear;\n ListCache.prototype['delete'] = listCacheDelete;\n ListCache.prototype.get = listCacheGet;\n ListCache.prototype.has = listCacheHas;\n ListCache.prototype.set = listCacheSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n }\n\n /**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\n function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n }\n\n /**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n }\n\n /**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function mapCacheGet(key) {\n return getMapData(this, key).get(key);\n }\n\n /**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function mapCacheHas(key) {\n return getMapData(this, key).has(key);\n }\n\n /**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\n function mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n }\n\n // Add methods to `MapCache`.\n MapCache.prototype.clear = mapCacheClear;\n MapCache.prototype['delete'] = mapCacheDelete;\n MapCache.prototype.get = mapCacheGet;\n MapCache.prototype.has = mapCacheHas;\n MapCache.prototype.set = mapCacheSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\n function SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n }\n\n /**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\n function setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n }\n\n /**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\n function setCacheHas(value) {\n return this.__data__.has(value);\n }\n\n // Add methods to `SetCache`.\n SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\n SetCache.prototype.has = setCacheHas;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n }\n\n /**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\n function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n }\n\n /**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n }\n\n /**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function stackGet(key) {\n return this.__data__.get(key);\n }\n\n /**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function stackHas(key) {\n return this.__data__.has(key);\n }\n\n /**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\n function stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n }\n\n // Add methods to `Stack`.\n Stack.prototype.clear = stackClear;\n Stack.prototype['delete'] = stackDelete;\n Stack.prototype.get = stackGet;\n Stack.prototype.has = stackHas;\n Stack.prototype.set = stackSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\n function arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * A specialized version of `_.sample` for arrays.\n *\n * @private\n * @param {Array} array The array to sample.\n * @returns {*} Returns the random element.\n */\n function arraySample(array) {\n var length = array.length;\n return length ? array[baseRandom(0, length - 1)] : undefined;\n }\n\n /**\n * A specialized version of `_.sampleSize` for arrays.\n *\n * @private\n * @param {Array} array The array to sample.\n * @param {number} n The number of elements to sample.\n * @returns {Array} Returns the random elements.\n */\n function arraySampleSize(array, n) {\n return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));\n }\n\n /**\n * A specialized version of `_.shuffle` for arrays.\n *\n * @private\n * @param {Array} array The array to shuffle.\n * @returns {Array} Returns the new shuffled array.\n */\n function arrayShuffle(array) {\n return shuffleSelf(copyArray(array));\n }\n\n /**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n function assignMergeValue(object, key, value) {\n if ((value !== undefined && !eq(object[key], value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n }\n\n /**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n function assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n }\n\n /**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n }\n\n /**\n * Aggregates elements of `collection` on `accumulator` with keys transformed\n * by `iteratee` and values set by `setter`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\n function baseAggregator(collection, setter, iteratee, accumulator) {\n baseEach(collection, function(value, key, collection) {\n setter(accumulator, value, iteratee(value), collection);\n });\n return accumulator;\n }\n\n /**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\n function baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n }\n\n /**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\n function baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n }\n\n /**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n function baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n }\n\n /**\n * The base implementation of `_.at` without support for individual paths.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {string[]} paths The property paths to pick.\n * @returns {Array} Returns the picked elements.\n */\n function baseAt(object, paths) {\n var index = -1,\n length = paths.length,\n result = Array(length),\n skip = object == null;\n\n while (++index < length) {\n result[index] = skip ? undefined : get(object, paths[index]);\n }\n return result;\n }\n\n /**\n * The base implementation of `_.clamp` which doesn't coerce arguments.\n *\n * @private\n * @param {number} number The number to clamp.\n * @param {number} [lower] The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the clamped number.\n */\n function baseClamp(number, lower, upper) {\n if (number === number) {\n if (upper !== undefined) {\n number = number <= upper ? number : upper;\n }\n if (lower !== undefined) {\n number = number >= lower ? number : lower;\n }\n }\n return number;\n }\n\n /**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\n function baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n }\n\n /**\n * The base implementation of `_.conforms` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property predicates to conform to.\n * @returns {Function} Returns the new spec function.\n */\n function baseConforms(source) {\n var props = keys(source);\n return function(object) {\n return baseConformsTo(object, source, props);\n };\n }\n\n /**\n * The base implementation of `_.conformsTo` which accepts `props` to check.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property predicates to conform to.\n * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n */\n function baseConformsTo(object, source, props) {\n var length = props.length;\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (length--) {\n var key = props[length],\n predicate = source[key],\n value = object[key];\n\n if ((value === undefined && !(key in object)) || !predicate(value)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * The base implementation of `_.delay` and `_.defer` which accepts `args`\n * to provide to `func`.\n *\n * @private\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @param {Array} args The arguments to provide to `func`.\n * @returns {number|Object} Returns the timer id or timeout object.\n */\n function baseDelay(func, wait, args) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return setTimeout(function() { func.apply(undefined, args); }, wait);\n }\n\n /**\n * The base implementation of methods like `_.difference` without support\n * for excluding multiple arrays or iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Array} values The values to exclude.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n */\n function baseDifference(array, values, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n isCommon = true,\n length = array.length,\n result = [],\n valuesLength = values.length;\n\n if (!length) {\n return result;\n }\n if (iteratee) {\n values = arrayMap(values, baseUnary(iteratee));\n }\n if (comparator) {\n includes = arrayIncludesWith;\n isCommon = false;\n }\n else if (values.length >= LARGE_ARRAY_SIZE) {\n includes = cacheHas;\n isCommon = false;\n values = new SetCache(values);\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee == null ? value : iteratee(value);\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var valuesIndex = valuesLength;\n while (valuesIndex--) {\n if (values[valuesIndex] === computed) {\n continue outer;\n }\n }\n result.push(value);\n }\n else if (!includes(values, computed, comparator)) {\n result.push(value);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\n var baseEach = createBaseEach(baseForOwn);\n\n /**\n * The base implementation of `_.forEachRight` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\n var baseEachRight = createBaseEach(baseForOwnRight, true);\n\n /**\n * The base implementation of `_.every` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`\n */\n function baseEvery(collection, predicate) {\n var result = true;\n baseEach(collection, function(value, index, collection) {\n result = !!predicate(value, index, collection);\n return result;\n });\n return result;\n }\n\n /**\n * The base implementation of methods like `_.max` and `_.min` which accepts a\n * `comparator` to determine the extremum value.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The iteratee invoked per iteration.\n * @param {Function} comparator The comparator used to compare values.\n * @returns {*} Returns the extremum value.\n */\n function baseExtremum(array, iteratee, comparator) {\n var index = -1,\n length = array.length;\n\n while (++index < length) {\n var value = array[index],\n current = iteratee(value);\n\n if (current != null && (computed === undefined\n ? (current === current && !isSymbol(current))\n : comparator(current, computed)\n )) {\n var computed = current,\n result = value;\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.fill` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to fill.\n * @param {*} value The value to fill `array` with.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns `array`.\n */\n function baseFill(array, value, start, end) {\n var length = array.length;\n\n start = toInteger(start);\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = (end === undefined || end > length) ? length : toInteger(end);\n if (end < 0) {\n end += length;\n }\n end = start > end ? 0 : toLength(end);\n while (start < end) {\n array[start++] = value;\n }\n return array;\n }\n\n /**\n * The base implementation of `_.filter` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\n function baseFilter(collection, predicate) {\n var result = [];\n baseEach(collection, function(value, index, collection) {\n if (predicate(value, index, collection)) {\n result.push(value);\n }\n });\n return result;\n }\n\n /**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\n function baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n\n predicate || (predicate = isFlattenable);\n result || (result = []);\n\n while (++index < length) {\n var value = array[index];\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\n var baseFor = createBaseFor();\n\n /**\n * This function is like `baseFor` except that it iterates over properties\n * in the opposite order.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\n var baseForRight = createBaseFor(true);\n\n /**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\n function baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n }\n\n /**\n * The base implementation of `_.forOwnRight` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\n function baseForOwnRight(object, iteratee) {\n return object && baseForRight(object, iteratee, keys);\n }\n\n /**\n * The base implementation of `_.functions` which creates an array of\n * `object` function property names filtered from `props`.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Array} props The property names to filter.\n * @returns {Array} Returns the function names.\n */\n function baseFunctions(object, props) {\n return arrayFilter(props, function(key) {\n return isFunction(object[key]);\n });\n }\n\n /**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\n function baseGet(object, path) {\n path = castPath(path, object);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n }\n\n /**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\n function baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n }\n\n /**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\n function baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n }\n\n /**\n * The base implementation of `_.gt` which doesn't coerce arguments.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than `other`,\n * else `false`.\n */\n function baseGt(value, other) {\n return value > other;\n }\n\n /**\n * The base implementation of `_.has` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\n function baseHas(object, key) {\n return object != null && hasOwnProperty.call(object, key);\n }\n\n /**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\n function baseHasIn(object, key) {\n return object != null && key in Object(object);\n }\n\n /**\n * The base implementation of `_.inRange` which doesn't coerce arguments.\n *\n * @private\n * @param {number} number The number to check.\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n */\n function baseInRange(number, start, end) {\n return number >= nativeMin(start, end) && number < nativeMax(start, end);\n }\n\n /**\n * The base implementation of methods like `_.intersection`, without support\n * for iteratee shorthands, that accepts an array of arrays to inspect.\n *\n * @private\n * @param {Array} arrays The arrays to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of shared values.\n */\n function baseIntersection(arrays, iteratee, comparator) {\n var includes = comparator ? arrayIncludesWith : arrayIncludes,\n length = arrays[0].length,\n othLength = arrays.length,\n othIndex = othLength,\n caches = Array(othLength),\n maxLength = Infinity,\n result = [];\n\n while (othIndex--) {\n var array = arrays[othIndex];\n if (othIndex && iteratee) {\n array = arrayMap(array, baseUnary(iteratee));\n }\n maxLength = nativeMin(array.length, maxLength);\n caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))\n ? new SetCache(othIndex && array)\n : undefined;\n }\n array = arrays[0];\n\n var index = -1,\n seen = caches[0];\n\n outer:\n while (++index < length && result.length < maxLength) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (!(seen\n ? cacheHas(seen, computed)\n : includes(result, computed, comparator)\n )) {\n othIndex = othLength;\n while (--othIndex) {\n var cache = caches[othIndex];\n if (!(cache\n ? cacheHas(cache, computed)\n : includes(arrays[othIndex], computed, comparator))\n ) {\n continue outer;\n }\n }\n if (seen) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.invert` and `_.invertBy` which inverts\n * `object` with values transformed by `iteratee` and set by `setter`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform values.\n * @param {Object} accumulator The initial inverted object.\n * @returns {Function} Returns `accumulator`.\n */\n function baseInverter(object, setter, iteratee, accumulator) {\n baseForOwn(object, function(value, key, object) {\n setter(accumulator, iteratee(value), key, object);\n });\n return accumulator;\n }\n\n /**\n * The base implementation of `_.invoke` without support for individual\n * method arguments.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the method to invoke.\n * @param {Array} args The arguments to invoke the method with.\n * @returns {*} Returns the result of the invoked method.\n */\n function baseInvoke(object, path, args) {\n path = castPath(path, object);\n object = parent(object, path);\n var func = object == null ? object : object[toKey(last(path))];\n return func == null ? undefined : apply(func, object, args);\n }\n\n /**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\n function baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n }\n\n /**\n * The base implementation of `_.isArrayBuffer` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\n */\n function baseIsArrayBuffer(value) {\n return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;\n }\n\n /**\n * The base implementation of `_.isDate` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n */\n function baseIsDate(value) {\n return isObjectLike(value) && baseGetTag(value) == dateTag;\n }\n\n /**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\n function baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n }\n\n /**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n }\n\n /**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\n function baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n }\n\n /**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\n function baseIsMatch(object, source, matchData, customizer) {\n var index = matchData.length,\n length = index,\n noCustomizer = !customizer;\n\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (index--) {\n var data = matchData[index];\n if ((noCustomizer && data[2])\n ? data[1] !== object[data[0]]\n : !(data[0] in object)\n ) {\n return false;\n }\n }\n while (++index < length) {\n data = matchData[index];\n var key = data[0],\n objValue = object[key],\n srcValue = data[1];\n\n if (noCustomizer && data[2]) {\n if (objValue === undefined && !(key in object)) {\n return false;\n }\n } else {\n var stack = new Stack;\n if (customizer) {\n var result = customizer(objValue, srcValue, key, object, source, stack);\n }\n if (!(result === undefined\n ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n : result\n )) {\n return false;\n }\n }\n }\n return true;\n }\n\n /**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\n function baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n }\n\n /**\n * The base implementation of `_.isRegExp` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n */\n function baseIsRegExp(value) {\n return isObjectLike(value) && baseGetTag(value) == regexpTag;\n }\n\n /**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\n function baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n }\n\n /**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\n function baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n }\n\n /**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\n function baseIteratee(value) {\n // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n if (typeof value == 'function') {\n return value;\n }\n if (value == null) {\n return identity;\n }\n if (typeof value == 'object') {\n return isArray(value)\n ? baseMatchesProperty(value[0], value[1])\n : baseMatches(value);\n }\n return property(value);\n }\n\n /**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n function baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n function baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.lt` which doesn't coerce arguments.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than `other`,\n * else `false`.\n */\n function baseLt(value, other) {\n return value < other;\n }\n\n /**\n * The base implementation of `_.map` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\n function baseMap(collection, iteratee) {\n var index = -1,\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value, key, collection) {\n result[++index] = iteratee(value, key, collection);\n });\n return result;\n }\n\n /**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n */\n function baseMatches(source) {\n var matchData = getMatchData(source);\n if (matchData.length == 1 && matchData[0][2]) {\n return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n }\n return function(object) {\n return object === source || baseIsMatch(object, source, matchData);\n };\n }\n\n /**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\n function baseMatchesProperty(path, srcValue) {\n if (isKey(path) && isStrictComparable(srcValue)) {\n return matchesStrictComparable(toKey(path), srcValue);\n }\n return function(object) {\n var objValue = get(object, path);\n return (objValue === undefined && objValue === srcValue)\n ? hasIn(object, path)\n : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n };\n }\n\n /**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\n function baseMerge(object, source, srcIndex, customizer, stack) {\n if (object === source) {\n return;\n }\n baseFor(source, function(srcValue, key) {\n stack || (stack = new Stack);\n if (isObject(srcValue)) {\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n }\n else {\n var newValue = customizer\n ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n : undefined;\n\n if (newValue === undefined) {\n newValue = srcValue;\n }\n assignMergeValue(object, key, newValue);\n }\n }, keysIn);\n }\n\n /**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\n function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n var objValue = safeGet(object, key),\n srcValue = safeGet(source, key),\n stacked = stack.get(srcValue);\n\n if (stacked) {\n assignMergeValue(object, key, stacked);\n return;\n }\n var newValue = customizer\n ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n : undefined;\n\n var isCommon = newValue === undefined;\n\n if (isCommon) {\n var isArr = isArray(srcValue),\n isBuff = !isArr && isBuffer(srcValue),\n isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n newValue = srcValue;\n if (isArr || isBuff || isTyped) {\n if (isArray(objValue)) {\n newValue = objValue;\n }\n else if (isArrayLikeObject(objValue)) {\n newValue = copyArray(objValue);\n }\n else if (isBuff) {\n isCommon = false;\n newValue = cloneBuffer(srcValue, true);\n }\n else if (isTyped) {\n isCommon = false;\n newValue = cloneTypedArray(srcValue, true);\n }\n else {\n newValue = [];\n }\n }\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n newValue = objValue;\n if (isArguments(objValue)) {\n newValue = toPlainObject(objValue);\n }\n else if (!isObject(objValue) || isFunction(objValue)) {\n newValue = initCloneObject(srcValue);\n }\n }\n else {\n isCommon = false;\n }\n }\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, newValue);\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n stack['delete'](srcValue);\n }\n assignMergeValue(object, key, newValue);\n }\n\n /**\n * The base implementation of `_.nth` which doesn't coerce arguments.\n *\n * @private\n * @param {Array} array The array to query.\n * @param {number} n The index of the element to return.\n * @returns {*} Returns the nth element of `array`.\n */\n function baseNth(array, n) {\n var length = array.length;\n if (!length) {\n return;\n }\n n += n < 0 ? length : 0;\n return isIndex(n, length) ? array[n] : undefined;\n }\n\n /**\n * The base implementation of `_.orderBy` without param guards.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.\n * @param {string[]} orders The sort orders of `iteratees`.\n * @returns {Array} Returns the new sorted array.\n */\n function baseOrderBy(collection, iteratees, orders) {\n if (iteratees.length) {\n iteratees = arrayMap(iteratees, function(iteratee) {\n if (isArray(iteratee)) {\n return function(value) {\n return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);\n }\n }\n return iteratee;\n });\n } else {\n iteratees = [identity];\n }\n\n var index = -1;\n iteratees = arrayMap(iteratees, baseUnary(getIteratee()));\n\n var result = baseMap(collection, function(value, key, collection) {\n var criteria = arrayMap(iteratees, function(iteratee) {\n return iteratee(value);\n });\n return { 'criteria': criteria, 'index': ++index, 'value': value };\n });\n\n return baseSortBy(result, function(object, other) {\n return compareMultiple(object, other, orders);\n });\n }\n\n /**\n * The base implementation of `_.pick` without support for individual\n * property identifiers.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @returns {Object} Returns the new object.\n */\n function basePick(object, paths) {\n return basePickBy(object, paths, function(value, path) {\n return hasIn(object, path);\n });\n }\n\n /**\n * The base implementation of `_.pickBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @param {Function} predicate The function invoked per property.\n * @returns {Object} Returns the new object.\n */\n function basePickBy(object, paths, predicate) {\n var index = -1,\n length = paths.length,\n result = {};\n\n while (++index < length) {\n var path = paths[index],\n value = baseGet(object, path);\n\n if (predicate(value, path)) {\n baseSet(result, castPath(path, object), value);\n }\n }\n return result;\n }\n\n /**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\n function basePropertyDeep(path) {\n return function(object) {\n return baseGet(object, path);\n };\n }\n\n /**\n * The base implementation of `_.pullAllBy` without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns `array`.\n */\n function basePullAll(array, values, iteratee, comparator) {\n var indexOf = comparator ? baseIndexOfWith : baseIndexOf,\n index = -1,\n length = values.length,\n seen = array;\n\n if (array === values) {\n values = copyArray(values);\n }\n if (iteratee) {\n seen = arrayMap(array, baseUnary(iteratee));\n }\n while (++index < length) {\n var fromIndex = 0,\n value = values[index],\n computed = iteratee ? iteratee(value) : value;\n\n while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {\n if (seen !== array) {\n splice.call(seen, fromIndex, 1);\n }\n splice.call(array, fromIndex, 1);\n }\n }\n return array;\n }\n\n /**\n * The base implementation of `_.pullAt` without support for individual\n * indexes or capturing the removed elements.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {number[]} indexes The indexes of elements to remove.\n * @returns {Array} Returns `array`.\n */\n function basePullAt(array, indexes) {\n var length = array ? indexes.length : 0,\n lastIndex = length - 1;\n\n while (length--) {\n var index = indexes[length];\n if (length == lastIndex || index !== previous) {\n var previous = index;\n if (isIndex(index)) {\n splice.call(array, index, 1);\n } else {\n baseUnset(array, index);\n }\n }\n }\n return array;\n }\n\n /**\n * The base implementation of `_.random` without support for returning\n * floating-point numbers.\n *\n * @private\n * @param {number} lower The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the random number.\n */\n function baseRandom(lower, upper) {\n return lower + nativeFloor(nativeRandom() * (upper - lower + 1));\n }\n\n /**\n * The base implementation of `_.range` and `_.rangeRight` which doesn't\n * coerce arguments.\n *\n * @private\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @param {number} step The value to increment or decrement by.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the range of numbers.\n */\n function baseRange(start, end, step, fromRight) {\n var index = -1,\n length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),\n result = Array(length);\n\n while (length--) {\n result[fromRight ? length : ++index] = start;\n start += step;\n }\n return result;\n }\n\n /**\n * The base implementation of `_.repeat` which doesn't coerce arguments.\n *\n * @private\n * @param {string} string The string to repeat.\n * @param {number} n The number of times to repeat the string.\n * @returns {string} Returns the repeated string.\n */\n function baseRepeat(string, n) {\n var result = '';\n if (!string || n < 1 || n > MAX_SAFE_INTEGER) {\n return result;\n }\n // Leverage the exponentiation by squaring algorithm for a faster repeat.\n // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.\n do {\n if (n % 2) {\n result += string;\n }\n n = nativeFloor(n / 2);\n if (n) {\n string += string;\n }\n } while (n);\n\n return result;\n }\n\n /**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\n function baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n }\n\n /**\n * The base implementation of `_.sample`.\n *\n * @private\n * @param {Array|Object} collection The collection to sample.\n * @returns {*} Returns the random element.\n */\n function baseSample(collection) {\n return arraySample(values(collection));\n }\n\n /**\n * The base implementation of `_.sampleSize` without param guards.\n *\n * @private\n * @param {Array|Object} collection The collection to sample.\n * @param {number} n The number of elements to sample.\n * @returns {Array} Returns the random elements.\n */\n function baseSampleSize(collection, n) {\n var array = values(collection);\n return shuffleSelf(array, baseClamp(n, 0, array.length));\n }\n\n /**\n * The base implementation of `_.set`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\n function baseSet(object, path, value, customizer) {\n if (!isObject(object)) {\n return object;\n }\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n lastIndex = length - 1,\n nested = object;\n\n while (nested != null && ++index < length) {\n var key = toKey(path[index]),\n newValue = value;\n\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n return object;\n }\n\n if (index != lastIndex) {\n var objValue = nested[key];\n newValue = customizer ? customizer(objValue, key, nested) : undefined;\n if (newValue === undefined) {\n newValue = isObject(objValue)\n ? objValue\n : (isIndex(path[index + 1]) ? [] : {});\n }\n }\n assignValue(nested, key, newValue);\n nested = nested[key];\n }\n return object;\n }\n\n /**\n * The base implementation of `setData` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to associate metadata with.\n * @param {*} data The metadata.\n * @returns {Function} Returns `func`.\n */\n var baseSetData = !metaMap ? identity : function(func, data) {\n metaMap.set(func, data);\n return func;\n };\n\n /**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\n var baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n };\n\n /**\n * The base implementation of `_.shuffle`.\n *\n * @private\n * @param {Array|Object} collection The collection to shuffle.\n * @returns {Array} Returns the new shuffled array.\n */\n function baseShuffle(collection) {\n return shuffleSelf(values(collection));\n }\n\n /**\n * The base implementation of `_.slice` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\n function baseSlice(array, start, end) {\n var index = -1,\n length = array.length;\n\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = end > length ? length : end;\n if (end < 0) {\n end += length;\n }\n length = start > end ? 0 : ((end - start) >>> 0);\n start >>>= 0;\n\n var result = Array(length);\n while (++index < length) {\n result[index] = array[index + start];\n }\n return result;\n }\n\n /**\n * The base implementation of `_.some` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\n function baseSome(collection, predicate) {\n var result;\n\n baseEach(collection, function(value, index, collection) {\n result = predicate(value, index, collection);\n return !result;\n });\n return !!result;\n }\n\n /**\n * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which\n * performs a binary search of `array` to determine the index at which `value`\n * should be inserted into `array` in order to maintain its sort order.\n *\n * @private\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {boolean} [retHighest] Specify returning the highest qualified index.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n */\n function baseSortedIndex(array, value, retHighest) {\n var low = 0,\n high = array == null ? low : array.length;\n\n if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {\n while (low < high) {\n var mid = (low + high) >>> 1,\n computed = array[mid];\n\n if (computed !== null && !isSymbol(computed) &&\n (retHighest ? (computed <= value) : (computed < value))) {\n low = mid + 1;\n } else {\n high = mid;\n }\n }\n return high;\n }\n return baseSortedIndexBy(array, value, identity, retHighest);\n }\n\n /**\n * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`\n * which invokes `iteratee` for `value` and each element of `array` to compute\n * their sort ranking. The iteratee is invoked with one argument; (value).\n *\n * @private\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} iteratee The iteratee invoked per element.\n * @param {boolean} [retHighest] Specify returning the highest qualified index.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n */\n function baseSortedIndexBy(array, value, iteratee, retHighest) {\n var low = 0,\n high = array == null ? 0 : array.length;\n if (high === 0) {\n return 0;\n }\n\n value = iteratee(value);\n var valIsNaN = value !== value,\n valIsNull = value === null,\n valIsSymbol = isSymbol(value),\n valIsUndefined = value === undefined;\n\n while (low < high) {\n var mid = nativeFloor((low + high) / 2),\n computed = iteratee(array[mid]),\n othIsDefined = computed !== undefined,\n othIsNull = computed === null,\n othIsReflexive = computed === computed,\n othIsSymbol = isSymbol(computed);\n\n if (valIsNaN) {\n var setLow = retHighest || othIsReflexive;\n } else if (valIsUndefined) {\n setLow = othIsReflexive && (retHighest || othIsDefined);\n } else if (valIsNull) {\n setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);\n } else if (valIsSymbol) {\n setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);\n } else if (othIsNull || othIsSymbol) {\n setLow = false;\n } else {\n setLow = retHighest ? (computed <= value) : (computed < value);\n }\n if (setLow) {\n low = mid + 1;\n } else {\n high = mid;\n }\n }\n return nativeMin(high, MAX_ARRAY_INDEX);\n }\n\n /**\n * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\n function baseSortedUniq(array, iteratee) {\n var index = -1,\n length = array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n if (!index || !eq(computed, seen)) {\n var seen = computed;\n result[resIndex++] = value === 0 ? 0 : value;\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.toNumber` which doesn't ensure correct\n * conversions of binary, hexadecimal, or octal string values.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n */\n function baseToNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n return +value;\n }\n\n /**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\n function baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n }\n\n /**\n * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\n function baseUniq(array, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n length = array.length,\n isCommon = true,\n result = [],\n seen = result;\n\n if (comparator) {\n isCommon = false;\n includes = arrayIncludesWith;\n }\n else if (length >= LARGE_ARRAY_SIZE) {\n var set = iteratee ? null : createSet(array);\n if (set) {\n return setToArray(set);\n }\n isCommon = false;\n includes = cacheHas;\n seen = new SetCache;\n }\n else {\n seen = iteratee ? [] : result;\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var seenIndex = seen.length;\n while (seenIndex--) {\n if (seen[seenIndex] === computed) {\n continue outer;\n }\n }\n if (iteratee) {\n seen.push(computed);\n }\n result.push(value);\n }\n else if (!includes(seen, computed, comparator)) {\n if (seen !== result) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.unset`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The property path to unset.\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n */\n function baseUnset(object, path) {\n path = castPath(path, object);\n object = parent(object, path);\n return object == null || delete object[toKey(last(path))];\n }\n\n /**\n * The base implementation of `_.update`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to update.\n * @param {Function} updater The function to produce the updated value.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\n function baseUpdate(object, path, updater, customizer) {\n return baseSet(object, path, updater(baseGet(object, path)), customizer);\n }\n\n /**\n * The base implementation of methods like `_.dropWhile` and `_.takeWhile`\n * without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to query.\n * @param {Function} predicate The function invoked per iteration.\n * @param {boolean} [isDrop] Specify dropping elements instead of taking them.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the slice of `array`.\n */\n function baseWhile(array, predicate, isDrop, fromRight) {\n var length = array.length,\n index = fromRight ? length : -1;\n\n while ((fromRight ? index-- : ++index < length) &&\n predicate(array[index], index, array)) {}\n\n return isDrop\n ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))\n : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));\n }\n\n /**\n * The base implementation of `wrapperValue` which returns the result of\n * performing a sequence of actions on the unwrapped `value`, where each\n * successive action is supplied the return value of the previous.\n *\n * @private\n * @param {*} value The unwrapped value.\n * @param {Array} actions Actions to perform to resolve the unwrapped value.\n * @returns {*} Returns the resolved value.\n */\n function baseWrapperValue(value, actions) {\n var result = value;\n if (result instanceof LazyWrapper) {\n result = result.value();\n }\n return arrayReduce(actions, function(result, action) {\n return action.func.apply(action.thisArg, arrayPush([result], action.args));\n }, result);\n }\n\n /**\n * The base implementation of methods like `_.xor`, without support for\n * iteratee shorthands, that accepts an array of arrays to inspect.\n *\n * @private\n * @param {Array} arrays The arrays to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of values.\n */\n function baseXor(arrays, iteratee, comparator) {\n var length = arrays.length;\n if (length < 2) {\n return length ? baseUniq(arrays[0]) : [];\n }\n var index = -1,\n result = Array(length);\n\n while (++index < length) {\n var array = arrays[index],\n othIndex = -1;\n\n while (++othIndex < length) {\n if (othIndex != index) {\n result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);\n }\n }\n }\n return baseUniq(baseFlatten(result, 1), iteratee, comparator);\n }\n\n /**\n * This base implementation of `_.zipObject` which assigns values using `assignFunc`.\n *\n * @private\n * @param {Array} props The property identifiers.\n * @param {Array} values The property values.\n * @param {Function} assignFunc The function to assign values.\n * @returns {Object} Returns the new object.\n */\n function baseZipObject(props, values, assignFunc) {\n var index = -1,\n length = props.length,\n valsLength = values.length,\n result = {};\n\n while (++index < length) {\n var value = index < valsLength ? values[index] : undefined;\n assignFunc(result, props[index], value);\n }\n return result;\n }\n\n /**\n * Casts `value` to an empty array if it's not an array like object.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Array|Object} Returns the cast array-like object.\n */\n function castArrayLikeObject(value) {\n return isArrayLikeObject(value) ? value : [];\n }\n\n /**\n * Casts `value` to `identity` if it's not a function.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Function} Returns cast function.\n */\n function castFunction(value) {\n return typeof value == 'function' ? value : identity;\n }\n\n /**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\n function castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n }\n\n /**\n * A `baseRest` alias which can be replaced with `identity` by module\n * replacement plugins.\n *\n * @private\n * @type {Function}\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\n var castRest = baseRest;\n\n /**\n * Casts `array` to a slice if it's needed.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {number} start The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the cast slice.\n */\n function castSlice(array, start, end) {\n var length = array.length;\n end = end === undefined ? length : end;\n return (!start && end >= length) ? array : baseSlice(array, start, end);\n }\n\n /**\n * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).\n *\n * @private\n * @param {number|Object} id The timer id or timeout object of the timer to clear.\n */\n var clearTimeout = ctxClearTimeout || function(id) {\n return root.clearTimeout(id);\n };\n\n /**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\n function cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n }\n\n /**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\n function cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n }\n\n /**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\n function cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n }\n\n /**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\n function cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n }\n\n /**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\n function cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n }\n\n /**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\n function cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n }\n\n /**\n * Compares values to sort them in ascending order.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {number} Returns the sort order indicator for `value`.\n */\n function compareAscending(value, other) {\n if (value !== other) {\n var valIsDefined = value !== undefined,\n valIsNull = value === null,\n valIsReflexive = value === value,\n valIsSymbol = isSymbol(value);\n\n var othIsDefined = other !== undefined,\n othIsNull = other === null,\n othIsReflexive = other === other,\n othIsSymbol = isSymbol(other);\n\n if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||\n (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||\n (valIsNull && othIsDefined && othIsReflexive) ||\n (!valIsDefined && othIsReflexive) ||\n !valIsReflexive) {\n return 1;\n }\n if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||\n (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||\n (othIsNull && valIsDefined && valIsReflexive) ||\n (!othIsDefined && valIsReflexive) ||\n !othIsReflexive) {\n return -1;\n }\n }\n return 0;\n }\n\n /**\n * Used by `_.orderBy` to compare multiple properties of a value to another\n * and stable sort them.\n *\n * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,\n * specify an order of \"desc\" for descending or \"asc\" for ascending sort order\n * of corresponding values.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {boolean[]|string[]} orders The order to sort by for each property.\n * @returns {number} Returns the sort order indicator for `object`.\n */\n function compareMultiple(object, other, orders) {\n var index = -1,\n objCriteria = object.criteria,\n othCriteria = other.criteria,\n length = objCriteria.length,\n ordersLength = orders.length;\n\n while (++index < length) {\n var result = compareAscending(objCriteria[index], othCriteria[index]);\n if (result) {\n if (index >= ordersLength) {\n return result;\n }\n var order = orders[index];\n return result * (order == 'desc' ? -1 : 1);\n }\n }\n // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications\n // that causes it, under certain circumstances, to provide the same value for\n // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247\n // for more details.\n //\n // This also ensures a stable sort in V8 and other engines.\n // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.\n return object.index - other.index;\n }\n\n /**\n * Creates an array that is the composition of partially applied arguments,\n * placeholders, and provided arguments into a single array of arguments.\n *\n * @private\n * @param {Array} args The provided arguments.\n * @param {Array} partials The arguments to prepend to those provided.\n * @param {Array} holders The `partials` placeholder indexes.\n * @params {boolean} [isCurried] Specify composing for a curried function.\n * @returns {Array} Returns the new array of composed arguments.\n */\n function composeArgs(args, partials, holders, isCurried) {\n var argsIndex = -1,\n argsLength = args.length,\n holdersLength = holders.length,\n leftIndex = -1,\n leftLength = partials.length,\n rangeLength = nativeMax(argsLength - holdersLength, 0),\n result = Array(leftLength + rangeLength),\n isUncurried = !isCurried;\n\n while (++leftIndex < leftLength) {\n result[leftIndex] = partials[leftIndex];\n }\n while (++argsIndex < holdersLength) {\n if (isUncurried || argsIndex < argsLength) {\n result[holders[argsIndex]] = args[argsIndex];\n }\n }\n while (rangeLength--) {\n result[leftIndex++] = args[argsIndex++];\n }\n return result;\n }\n\n /**\n * This function is like `composeArgs` except that the arguments composition\n * is tailored for `_.partialRight`.\n *\n * @private\n * @param {Array} args The provided arguments.\n * @param {Array} partials The arguments to append to those provided.\n * @param {Array} holders The `partials` placeholder indexes.\n * @params {boolean} [isCurried] Specify composing for a curried function.\n * @returns {Array} Returns the new array of composed arguments.\n */\n function composeArgsRight(args, partials, holders, isCurried) {\n var argsIndex = -1,\n argsLength = args.length,\n holdersIndex = -1,\n holdersLength = holders.length,\n rightIndex = -1,\n rightLength = partials.length,\n rangeLength = nativeMax(argsLength - holdersLength, 0),\n result = Array(rangeLength + rightLength),\n isUncurried = !isCurried;\n\n while (++argsIndex < rangeLength) {\n result[argsIndex] = args[argsIndex];\n }\n var offset = argsIndex;\n while (++rightIndex < rightLength) {\n result[offset + rightIndex] = partials[rightIndex];\n }\n while (++holdersIndex < holdersLength) {\n if (isUncurried || argsIndex < argsLength) {\n result[offset + holders[holdersIndex]] = args[argsIndex++];\n }\n }\n return result;\n }\n\n /**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\n function copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n }\n\n /**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\n function copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n }\n\n /**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\n function copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n }\n\n /**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\n function copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n }\n\n /**\n * Creates a function like `_.groupBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} [initializer] The accumulator object initializer.\n * @returns {Function} Returns the new aggregator function.\n */\n function createAggregator(setter, initializer) {\n return function(collection, iteratee) {\n var func = isArray(collection) ? arrayAggregator : baseAggregator,\n accumulator = initializer ? initializer() : {};\n\n return func(collection, setter, getIteratee(iteratee, 2), accumulator);\n };\n }\n\n /**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\n function createAssigner(assigner) {\n return baseRest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n }\n\n /**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\n function createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n }\n\n /**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\n function createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n }\n\n /**\n * Creates a function that wraps `func` to invoke it with the optional `this`\n * binding of `thisArg`.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createBind(func, bitmask, thisArg) {\n var isBind = bitmask & WRAP_BIND_FLAG,\n Ctor = createCtor(func);\n\n function wrapper() {\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n return fn.apply(isBind ? thisArg : this, arguments);\n }\n return wrapper;\n }\n\n /**\n * Creates a function like `_.lowerFirst`.\n *\n * @private\n * @param {string} methodName The name of the `String` case method to use.\n * @returns {Function} Returns the new case function.\n */\n function createCaseFirst(methodName) {\n return function(string) {\n string = toString(string);\n\n var strSymbols = hasUnicode(string)\n ? stringToArray(string)\n : undefined;\n\n var chr = strSymbols\n ? strSymbols[0]\n : string.charAt(0);\n\n var trailing = strSymbols\n ? castSlice(strSymbols, 1).join('')\n : string.slice(1);\n\n return chr[methodName]() + trailing;\n };\n }\n\n /**\n * Creates a function like `_.camelCase`.\n *\n * @private\n * @param {Function} callback The function to combine each word.\n * @returns {Function} Returns the new compounder function.\n */\n function createCompounder(callback) {\n return function(string) {\n return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');\n };\n }\n\n /**\n * Creates a function that produces an instance of `Ctor` regardless of\n * whether it was invoked as part of a `new` expression or by `call` or `apply`.\n *\n * @private\n * @param {Function} Ctor The constructor to wrap.\n * @returns {Function} Returns the new wrapped function.\n */\n function createCtor(Ctor) {\n return function() {\n // Use a `switch` statement to work with class constructors. See\n // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist\n // for more details.\n var args = arguments;\n switch (args.length) {\n case 0: return new Ctor;\n case 1: return new Ctor(args[0]);\n case 2: return new Ctor(args[0], args[1]);\n case 3: return new Ctor(args[0], args[1], args[2]);\n case 4: return new Ctor(args[0], args[1], args[2], args[3]);\n case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);\n case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);\n case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);\n }\n var thisBinding = baseCreate(Ctor.prototype),\n result = Ctor.apply(thisBinding, args);\n\n // Mimic the constructor's `return` behavior.\n // See https://es5.github.io/#x13.2.2 for more details.\n return isObject(result) ? result : thisBinding;\n };\n }\n\n /**\n * Creates a function that wraps `func` to enable currying.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {number} arity The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createCurry(func, bitmask, arity) {\n var Ctor = createCtor(func);\n\n function wrapper() {\n var length = arguments.length,\n args = Array(length),\n index = length,\n placeholder = getHolder(wrapper);\n\n while (index--) {\n args[index] = arguments[index];\n }\n var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)\n ? []\n : replaceHolders(args, placeholder);\n\n length -= holders.length;\n if (length < arity) {\n return createRecurry(\n func, bitmask, createHybrid, wrapper.placeholder, undefined,\n args, holders, undefined, undefined, arity - length);\n }\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n return apply(fn, this, args);\n }\n return wrapper;\n }\n\n /**\n * Creates a `_.find` or `_.findLast` function.\n *\n * @private\n * @param {Function} findIndexFunc The function to find the collection index.\n * @returns {Function} Returns the new find function.\n */\n function createFind(findIndexFunc) {\n return function(collection, predicate, fromIndex) {\n var iterable = Object(collection);\n if (!isArrayLike(collection)) {\n var iteratee = getIteratee(predicate, 3);\n collection = keys(collection);\n predicate = function(key) { return iteratee(iterable[key], key, iterable); };\n }\n var index = findIndexFunc(collection, predicate, fromIndex);\n return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;\n };\n }\n\n /**\n * Creates a `_.flow` or `_.flowRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new flow function.\n */\n function createFlow(fromRight) {\n return flatRest(function(funcs) {\n var length = funcs.length,\n index = length,\n prereq = LodashWrapper.prototype.thru;\n\n if (fromRight) {\n funcs.reverse();\n }\n while (index--) {\n var func = funcs[index];\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (prereq && !wrapper && getFuncName(func) == 'wrapper') {\n var wrapper = new LodashWrapper([], true);\n }\n }\n index = wrapper ? index : length;\n while (++index < length) {\n func = funcs[index];\n\n var funcName = getFuncName(func),\n data = funcName == 'wrapper' ? getData(func) : undefined;\n\n if (data && isLaziable(data[0]) &&\n data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&\n !data[4].length && data[9] == 1\n ) {\n wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);\n } else {\n wrapper = (func.length == 1 && isLaziable(func))\n ? wrapper[funcName]()\n : wrapper.thru(func);\n }\n }\n return function() {\n var args = arguments,\n value = args[0];\n\n if (wrapper && args.length == 1 && isArray(value)) {\n return wrapper.plant(value).value();\n }\n var index = 0,\n result = length ? funcs[index].apply(this, args) : value;\n\n while (++index < length) {\n result = funcs[index].call(this, result);\n }\n return result;\n };\n });\n }\n\n /**\n * Creates a function that wraps `func` to invoke it with optional `this`\n * binding of `thisArg`, partial application, and currying.\n *\n * @private\n * @param {Function|string} func The function or method name to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to prepend to those provided to\n * the new function.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [partialsRight] The arguments to append to those provided\n * to the new function.\n * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {\n var isAry = bitmask & WRAP_ARY_FLAG,\n isBind = bitmask & WRAP_BIND_FLAG,\n isBindKey = bitmask & WRAP_BIND_KEY_FLAG,\n isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),\n isFlip = bitmask & WRAP_FLIP_FLAG,\n Ctor = isBindKey ? undefined : createCtor(func);\n\n function wrapper() {\n var length = arguments.length,\n args = Array(length),\n index = length;\n\n while (index--) {\n args[index] = arguments[index];\n }\n if (isCurried) {\n var placeholder = getHolder(wrapper),\n holdersCount = countHolders(args, placeholder);\n }\n if (partials) {\n args = composeArgs(args, partials, holders, isCurried);\n }\n if (partialsRight) {\n args = composeArgsRight(args, partialsRight, holdersRight, isCurried);\n }\n length -= holdersCount;\n if (isCurried && length < arity) {\n var newHolders = replaceHolders(args, placeholder);\n return createRecurry(\n func, bitmask, createHybrid, wrapper.placeholder, thisArg,\n args, newHolders, argPos, ary, arity - length\n );\n }\n var thisBinding = isBind ? thisArg : this,\n fn = isBindKey ? thisBinding[func] : func;\n\n length = args.length;\n if (argPos) {\n args = reorder(args, argPos);\n } else if (isFlip && length > 1) {\n args.reverse();\n }\n if (isAry && ary < length) {\n args.length = ary;\n }\n if (this && this !== root && this instanceof wrapper) {\n fn = Ctor || createCtor(fn);\n }\n return fn.apply(thisBinding, args);\n }\n return wrapper;\n }\n\n /**\n * Creates a function like `_.invertBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} toIteratee The function to resolve iteratees.\n * @returns {Function} Returns the new inverter function.\n */\n function createInverter(setter, toIteratee) {\n return function(object, iteratee) {\n return baseInverter(object, setter, toIteratee(iteratee), {});\n };\n }\n\n /**\n * Creates a function that performs a mathematical operation on two values.\n *\n * @private\n * @param {Function} operator The function to perform the operation.\n * @param {number} [defaultValue] The value used for `undefined` arguments.\n * @returns {Function} Returns the new mathematical operation function.\n */\n function createMathOperation(operator, defaultValue) {\n return function(value, other) {\n var result;\n if (value === undefined && other === undefined) {\n return defaultValue;\n }\n if (value !== undefined) {\n result = value;\n }\n if (other !== undefined) {\n if (result === undefined) {\n return other;\n }\n if (typeof value == 'string' || typeof other == 'string') {\n value = baseToString(value);\n other = baseToString(other);\n } else {\n value = baseToNumber(value);\n other = baseToNumber(other);\n }\n result = operator(value, other);\n }\n return result;\n };\n }\n\n /**\n * Creates a function like `_.over`.\n *\n * @private\n * @param {Function} arrayFunc The function to iterate over iteratees.\n * @returns {Function} Returns the new over function.\n */\n function createOver(arrayFunc) {\n return flatRest(function(iteratees) {\n iteratees = arrayMap(iteratees, baseUnary(getIteratee()));\n return baseRest(function(args) {\n var thisArg = this;\n return arrayFunc(iteratees, function(iteratee) {\n return apply(iteratee, thisArg, args);\n });\n });\n });\n }\n\n /**\n * Creates the padding for `string` based on `length`. The `chars` string\n * is truncated if the number of characters exceeds `length`.\n *\n * @private\n * @param {number} length The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padding for `string`.\n */\n function createPadding(length, chars) {\n chars = chars === undefined ? ' ' : baseToString(chars);\n\n var charsLength = chars.length;\n if (charsLength < 2) {\n return charsLength ? baseRepeat(chars, length) : chars;\n }\n var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));\n return hasUnicode(chars)\n ? castSlice(stringToArray(result), 0, length).join('')\n : result.slice(0, length);\n }\n\n /**\n * Creates a function that wraps `func` to invoke it with the `this` binding\n * of `thisArg` and `partials` prepended to the arguments it receives.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} partials The arguments to prepend to those provided to\n * the new function.\n * @returns {Function} Returns the new wrapped function.\n */\n function createPartial(func, bitmask, thisArg, partials) {\n var isBind = bitmask & WRAP_BIND_FLAG,\n Ctor = createCtor(func);\n\n function wrapper() {\n var argsIndex = -1,\n argsLength = arguments.length,\n leftIndex = -1,\n leftLength = partials.length,\n args = Array(leftLength + argsLength),\n fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n\n while (++leftIndex < leftLength) {\n args[leftIndex] = partials[leftIndex];\n }\n while (argsLength--) {\n args[leftIndex++] = arguments[++argsIndex];\n }\n return apply(fn, isBind ? thisArg : this, args);\n }\n return wrapper;\n }\n\n /**\n * Creates a `_.range` or `_.rangeRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new range function.\n */\n function createRange(fromRight) {\n return function(start, end, step) {\n if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {\n end = step = undefined;\n }\n // Ensure the sign of `-0` is preserved.\n start = toFinite(start);\n if (end === undefined) {\n end = start;\n start = 0;\n } else {\n end = toFinite(end);\n }\n step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);\n return baseRange(start, end, step, fromRight);\n };\n }\n\n /**\n * Creates a function that performs a relational operation on two values.\n *\n * @private\n * @param {Function} operator The function to perform the operation.\n * @returns {Function} Returns the new relational operation function.\n */\n function createRelationalOperation(operator) {\n return function(value, other) {\n if (!(typeof value == 'string' && typeof other == 'string')) {\n value = toNumber(value);\n other = toNumber(other);\n }\n return operator(value, other);\n };\n }\n\n /**\n * Creates a function that wraps `func` to continue currying.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {Function} wrapFunc The function to create the `func` wrapper.\n * @param {*} placeholder The placeholder value.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to prepend to those provided to\n * the new function.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {\n var isCurry = bitmask & WRAP_CURRY_FLAG,\n newHolders = isCurry ? holders : undefined,\n newHoldersRight = isCurry ? undefined : holders,\n newPartials = isCurry ? partials : undefined,\n newPartialsRight = isCurry ? undefined : partials;\n\n bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);\n bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);\n\n if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {\n bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);\n }\n var newData = [\n func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,\n newHoldersRight, argPos, ary, arity\n ];\n\n var result = wrapFunc.apply(undefined, newData);\n if (isLaziable(func)) {\n setData(result, newData);\n }\n result.placeholder = placeholder;\n return setWrapToString(result, func, bitmask);\n }\n\n /**\n * Creates a function like `_.round`.\n *\n * @private\n * @param {string} methodName The name of the `Math` method to use when rounding.\n * @returns {Function} Returns the new round function.\n */\n function createRound(methodName) {\n var func = Math[methodName];\n return function(number, precision) {\n number = toNumber(number);\n precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);\n if (precision && nativeIsFinite(number)) {\n // Shift with exponential notation to avoid floating-point issues.\n // See [MDN](https://mdn.io/round#Examples) for more details.\n var pair = (toString(number) + 'e').split('e'),\n value = func(pair[0] + 'e' + (+pair[1] + precision));\n\n pair = (toString(value) + 'e').split('e');\n return +(pair[0] + 'e' + (+pair[1] - precision));\n }\n return func(number);\n };\n }\n\n /**\n * Creates a set object of `values`.\n *\n * @private\n * @param {Array} values The values to add to the set.\n * @returns {Object} Returns the new set.\n */\n var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n return new Set(values);\n };\n\n /**\n * Creates a `_.toPairs` or `_.toPairsIn` function.\n *\n * @private\n * @param {Function} keysFunc The function to get the keys of a given object.\n * @returns {Function} Returns the new pairs function.\n */\n function createToPairs(keysFunc) {\n return function(object) {\n var tag = getTag(object);\n if (tag == mapTag) {\n return mapToArray(object);\n }\n if (tag == setTag) {\n return setToPairs(object);\n }\n return baseToPairs(object, keysFunc(object));\n };\n }\n\n /**\n * Creates a function that either curries or invokes `func` with optional\n * `this` binding and partially applied arguments.\n *\n * @private\n * @param {Function|string} func The function or method name to wrap.\n * @param {number} bitmask The bitmask flags.\n * 1 - `_.bind`\n * 2 - `_.bindKey`\n * 4 - `_.curry` or `_.curryRight` of a bound function\n * 8 - `_.curry`\n * 16 - `_.curryRight`\n * 32 - `_.partial`\n * 64 - `_.partialRight`\n * 128 - `_.rearg`\n * 256 - `_.ary`\n * 512 - `_.flip`\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to be partially applied.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {\n var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;\n if (!isBindKey && typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var length = partials ? partials.length : 0;\n if (!length) {\n bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);\n partials = holders = undefined;\n }\n ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);\n arity = arity === undefined ? arity : toInteger(arity);\n length -= holders ? holders.length : 0;\n\n if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {\n var partialsRight = partials,\n holdersRight = holders;\n\n partials = holders = undefined;\n }\n var data = isBindKey ? undefined : getData(func);\n\n var newData = [\n func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,\n argPos, ary, arity\n ];\n\n if (data) {\n mergeData(newData, data);\n }\n func = newData[0];\n bitmask = newData[1];\n thisArg = newData[2];\n partials = newData[3];\n holders = newData[4];\n arity = newData[9] = newData[9] === undefined\n ? (isBindKey ? 0 : func.length)\n : nativeMax(newData[9] - length, 0);\n\n if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {\n bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);\n }\n if (!bitmask || bitmask == WRAP_BIND_FLAG) {\n var result = createBind(func, bitmask, thisArg);\n } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {\n result = createCurry(func, bitmask, arity);\n } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {\n result = createPartial(func, bitmask, thisArg, partials);\n } else {\n result = createHybrid.apply(undefined, newData);\n }\n var setter = data ? baseSetData : setData;\n return setWrapToString(setter(result, newData), func, bitmask);\n }\n\n /**\n * Used by `_.defaults` to customize its `_.assignIn` use to assign properties\n * of source objects to the destination object for all destination properties\n * that resolve to `undefined`.\n *\n * @private\n * @param {*} objValue The destination value.\n * @param {*} srcValue The source value.\n * @param {string} key The key of the property to assign.\n * @param {Object} object The parent object of `objValue`.\n * @returns {*} Returns the value to assign.\n */\n function customDefaultsAssignIn(objValue, srcValue, key, object) {\n if (objValue === undefined ||\n (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n return srcValue;\n }\n return objValue;\n }\n\n /**\n * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source\n * objects into destination objects that are passed thru.\n *\n * @private\n * @param {*} objValue The destination value.\n * @param {*} srcValue The source value.\n * @param {string} key The key of the property to merge.\n * @param {Object} object The parent object of `objValue`.\n * @param {Object} source The parent object of `srcValue`.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n * @returns {*} Returns the value to assign.\n */\n function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {\n if (isObject(objValue) && isObject(srcValue)) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, objValue);\n baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);\n stack['delete'](srcValue);\n }\n return objValue;\n }\n\n /**\n * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain\n * objects.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {string} key The key of the property to inspect.\n * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.\n */\n function customOmitClone(value) {\n return isPlainObject(value) ? undefined : value;\n }\n\n /**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\n function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n }\n\n /**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n }\n\n /**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n }\n\n /**\n * A specialized version of `baseRest` which flattens the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\n function flatRest(func) {\n return setToString(overRest(func, undefined, flatten), func + '');\n }\n\n /**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\n function getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n }\n\n /**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\n function getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n }\n\n /**\n * Gets metadata for `func`.\n *\n * @private\n * @param {Function} func The function to query.\n * @returns {*} Returns the metadata for `func`.\n */\n var getData = !metaMap ? noop : function(func) {\n return metaMap.get(func);\n };\n\n /**\n * Gets the name of `func`.\n *\n * @private\n * @param {Function} func The function to query.\n * @returns {string} Returns the function name.\n */\n function getFuncName(func) {\n var result = (func.name + ''),\n array = realNames[result],\n length = hasOwnProperty.call(realNames, result) ? array.length : 0;\n\n while (length--) {\n var data = array[length],\n otherFunc = data.func;\n if (otherFunc == null || otherFunc == func) {\n return data.name;\n }\n }\n return result;\n }\n\n /**\n * Gets the argument placeholder value for `func`.\n *\n * @private\n * @param {Function} func The function to inspect.\n * @returns {*} Returns the placeholder value.\n */\n function getHolder(func) {\n var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;\n return object.placeholder;\n }\n\n /**\n * Gets the appropriate \"iteratee\" function. If `_.iteratee` is customized,\n * this function returns the custom method, otherwise it returns `baseIteratee`.\n * If arguments are provided, the chosen function is invoked with them and\n * its result is returned.\n *\n * @private\n * @param {*} [value] The value to convert to an iteratee.\n * @param {number} [arity] The arity of the created iteratee.\n * @returns {Function} Returns the chosen function or its result.\n */\n function getIteratee() {\n var result = lodash.iteratee || iteratee;\n result = result === iteratee ? baseIteratee : result;\n return arguments.length ? result(arguments[0], arguments[1]) : result;\n }\n\n /**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\n function getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n }\n\n /**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\n function getMatchData(object) {\n var result = keys(object),\n length = result.length;\n\n while (length--) {\n var key = result[length],\n value = object[key];\n\n result[length] = [key, value, isStrictComparable(value)];\n }\n return result;\n }\n\n /**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\n function getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n }\n\n /**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\n function getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n }\n\n /**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\n var getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n };\n\n /**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\n var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n };\n\n /**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\n var getTag = baseGetTag;\n\n // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\n if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n }\n\n /**\n * Gets the view, applying any `transforms` to the `start` and `end` positions.\n *\n * @private\n * @param {number} start The start of the view.\n * @param {number} end The end of the view.\n * @param {Array} transforms The transformations to apply to the view.\n * @returns {Object} Returns an object containing the `start` and `end`\n * positions of the view.\n */\n function getView(start, end, transforms) {\n var index = -1,\n length = transforms.length;\n\n while (++index < length) {\n var data = transforms[index],\n size = data.size;\n\n switch (data.type) {\n case 'drop': start += size; break;\n case 'dropRight': end -= size; break;\n case 'take': end = nativeMin(end, start + size); break;\n case 'takeRight': start = nativeMax(start, end - size); break;\n }\n }\n return { 'start': start, 'end': end };\n }\n\n /**\n * Extracts wrapper details from the `source` body comment.\n *\n * @private\n * @param {string} source The source to inspect.\n * @returns {Array} Returns the wrapper details.\n */\n function getWrapDetails(source) {\n var match = source.match(reWrapDetails);\n return match ? match[1].split(reSplitDetails) : [];\n }\n\n /**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\n function hasPath(object, path, hasFunc) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n result = false;\n\n while (++index < length) {\n var key = toKey(path[index]);\n if (!(result = object != null && hasFunc(object, key))) {\n break;\n }\n object = object[key];\n }\n if (result || ++index != length) {\n return result;\n }\n length = object == null ? 0 : object.length;\n return !!length && isLength(length) && isIndex(key, length) &&\n (isArray(object) || isArguments(object));\n }\n\n /**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\n function initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n }\n\n /**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\n function initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n }\n\n /**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\n function initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n }\n\n /**\n * Inserts wrapper `details` in a comment at the top of the `source` body.\n *\n * @private\n * @param {string} source The source to modify.\n * @returns {Array} details The details to insert.\n * @returns {string} Returns the modified source.\n */\n function insertWrapDetails(source, details) {\n var length = details.length;\n if (!length) {\n return source;\n }\n var lastIndex = length - 1;\n details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];\n details = details.join(length > 2 ? ', ' : ' ');\n return source.replace(reWrapComment, '{\\n/* [wrapped with ' + details + '] */\\n');\n }\n\n /**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\n function isFlattenable(value) {\n return isArray(value) || isArguments(value) ||\n !!(spreadableSymbol && value && value[spreadableSymbol]);\n }\n\n /**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\n function isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n }\n\n /**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\n function isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n }\n\n /**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\n function isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n }\n\n /**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\n function isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n }\n\n /**\n * Checks if `func` has a lazy counterpart.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` has a lazy counterpart,\n * else `false`.\n */\n function isLaziable(func) {\n var funcName = getFuncName(func),\n other = lodash[funcName];\n\n if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {\n return false;\n }\n if (func === other) {\n return true;\n }\n var data = getData(other);\n return !!data && func === data[0];\n }\n\n /**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\n function isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n }\n\n /**\n * Checks if `func` is capable of being masked.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `func` is maskable, else `false`.\n */\n var isMaskable = coreJsData ? isFunction : stubFalse;\n\n /**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\n function isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n }\n\n /**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n * equality comparisons, else `false`.\n */\n function isStrictComparable(value) {\n return value === value && !isObject(value);\n }\n\n /**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\n function matchesStrictComparable(key, srcValue) {\n return function(object) {\n if (object == null) {\n return false;\n }\n return object[key] === srcValue &&\n (srcValue !== undefined || (key in Object(object)));\n };\n }\n\n /**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\n function memoizeCapped(func) {\n var result = memoize(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n }\n\n /**\n * Merges the function metadata of `source` into `data`.\n *\n * Merging metadata reduces the number of wrappers used to invoke a function.\n * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`\n * may be applied regardless of execution order. Methods like `_.ary` and\n * `_.rearg` modify function arguments, making the order in which they are\n * executed important, preventing the merging of metadata. However, we make\n * an exception for a safe combined case where curried functions have `_.ary`\n * and or `_.rearg` applied.\n *\n * @private\n * @param {Array} data The destination metadata.\n * @param {Array} source The source metadata.\n * @returns {Array} Returns `data`.\n */\n function mergeData(data, source) {\n var bitmask = data[1],\n srcBitmask = source[1],\n newBitmask = bitmask | srcBitmask,\n isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);\n\n var isCombo =\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||\n ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));\n\n // Exit early if metadata can't be merged.\n if (!(isCommon || isCombo)) {\n return data;\n }\n // Use source `thisArg` if available.\n if (srcBitmask & WRAP_BIND_FLAG) {\n data[2] = source[2];\n // Set when currying a bound function.\n newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;\n }\n // Compose partial arguments.\n var value = source[3];\n if (value) {\n var partials = data[3];\n data[3] = partials ? composeArgs(partials, value, source[4]) : value;\n data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];\n }\n // Compose partial right arguments.\n value = source[5];\n if (value) {\n partials = data[5];\n data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;\n data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];\n }\n // Use source `argPos` if available.\n value = source[7];\n if (value) {\n data[7] = value;\n }\n // Use source `ary` if it's smaller.\n if (srcBitmask & WRAP_ARY_FLAG) {\n data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);\n }\n // Use source `arity` if one is not provided.\n if (data[9] == null) {\n data[9] = source[9];\n }\n // Use source `func` and merge bitmasks.\n data[0] = source[0];\n data[1] = newBitmask;\n\n return data;\n }\n\n /**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n function nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\n function objectToString(value) {\n return nativeObjectToString.call(value);\n }\n\n /**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\n function overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n }\n\n /**\n * Gets the parent value at `path` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} path The path to get the parent value of.\n * @returns {*} Returns the parent value.\n */\n function parent(object, path) {\n return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));\n }\n\n /**\n * Reorder `array` according to the specified indexes where the element at\n * the first index is assigned as the first element, the element at\n * the second index is assigned as the second element, and so on.\n *\n * @private\n * @param {Array} array The array to reorder.\n * @param {Array} indexes The arranged array indexes.\n * @returns {Array} Returns `array`.\n */\n function reorder(array, indexes) {\n var arrLength = array.length,\n length = nativeMin(indexes.length, arrLength),\n oldArray = copyArray(array);\n\n while (length--) {\n var index = indexes[length];\n array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;\n }\n return array;\n }\n\n /**\n * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\n function safeGet(object, key) {\n if (key === 'constructor' && typeof object[key] === 'function') {\n return;\n }\n\n if (key == '__proto__') {\n return;\n }\n\n return object[key];\n }\n\n /**\n * Sets metadata for `func`.\n *\n * **Note:** If this function becomes hot, i.e. is invoked a lot in a short\n * period of time, it will trip its breaker and transition to an identity\n * function to avoid garbage collection pauses in V8. See\n * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)\n * for more details.\n *\n * @private\n * @param {Function} func The function to associate metadata with.\n * @param {*} data The metadata.\n * @returns {Function} Returns `func`.\n */\n var setData = shortOut(baseSetData);\n\n /**\n * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).\n *\n * @private\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @returns {number|Object} Returns the timer id or timeout object.\n */\n var setTimeout = ctxSetTimeout || function(func, wait) {\n return root.setTimeout(func, wait);\n };\n\n /**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\n var setToString = shortOut(baseSetToString);\n\n /**\n * Sets the `toString` method of `wrapper` to mimic the source of `reference`\n * with wrapper details in a comment at the top of the source body.\n *\n * @private\n * @param {Function} wrapper The function to modify.\n * @param {Function} reference The reference function.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @returns {Function} Returns `wrapper`.\n */\n function setWrapToString(wrapper, reference, bitmask) {\n var source = (reference + '');\n return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));\n }\n\n /**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\n function shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n }\n\n /**\n * A specialized version of `_.shuffle` which mutates and sets the size of `array`.\n *\n * @private\n * @param {Array} array The array to shuffle.\n * @param {number} [size=array.length] The size of `array`.\n * @returns {Array} Returns `array`.\n */\n function shuffleSelf(array, size) {\n var index = -1,\n length = array.length,\n lastIndex = length - 1;\n\n size = size === undefined ? length : size;\n while (++index < size) {\n var rand = baseRandom(index, lastIndex),\n value = array[rand];\n\n array[rand] = array[index];\n array[index] = value;\n }\n array.length = size;\n return array;\n }\n\n /**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\n var stringToPath = memoizeCapped(function(string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n });\n\n /**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\n function toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n }\n\n /**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\n function toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n }\n\n /**\n * Updates wrapper `details` based on `bitmask` flags.\n *\n * @private\n * @returns {Array} details The details to modify.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @returns {Array} Returns `details`.\n */\n function updateWrapDetails(details, bitmask) {\n arrayEach(wrapFlags, function(pair) {\n var value = '_.' + pair[0];\n if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {\n details.push(value);\n }\n });\n return details.sort();\n }\n\n /**\n * Creates a clone of `wrapper`.\n *\n * @private\n * @param {Object} wrapper The wrapper to clone.\n * @returns {Object} Returns the cloned wrapper.\n */\n function wrapperClone(wrapper) {\n if (wrapper instanceof LazyWrapper) {\n return wrapper.clone();\n }\n var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);\n result.__actions__ = copyArray(wrapper.__actions__);\n result.__index__ = wrapper.__index__;\n result.__values__ = wrapper.__values__;\n return result;\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an array of elements split into groups the length of `size`.\n * If `array` can't be split evenly, the final chunk will be the remaining\n * elements.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to process.\n * @param {number} [size=1] The length of each chunk\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the new array of chunks.\n * @example\n *\n * _.chunk(['a', 'b', 'c', 'd'], 2);\n * // => [['a', 'b'], ['c', 'd']]\n *\n * _.chunk(['a', 'b', 'c', 'd'], 3);\n * // => [['a', 'b', 'c'], ['d']]\n */\n function chunk(array, size, guard) {\n if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {\n size = 1;\n } else {\n size = nativeMax(toInteger(size), 0);\n }\n var length = array == null ? 0 : array.length;\n if (!length || size < 1) {\n return [];\n }\n var index = 0,\n resIndex = 0,\n result = Array(nativeCeil(length / size));\n\n while (index < length) {\n result[resIndex++] = baseSlice(array, index, (index += size));\n }\n return result;\n }\n\n /**\n * Creates an array with all falsey values removed. The values `false`, `null`,\n * `0`, `\"\"`, `undefined`, and `NaN` are falsey.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to compact.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.compact([0, 1, false, 2, '', 3]);\n * // => [1, 2, 3]\n */\n function compact(array) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (value) {\n result[resIndex++] = value;\n }\n }\n return result;\n }\n\n /**\n * Creates a new array concatenating `array` with any additional arrays\n * and/or values.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to concatenate.\n * @param {...*} [values] The values to concatenate.\n * @returns {Array} Returns the new concatenated array.\n * @example\n *\n * var array = [1];\n * var other = _.concat(array, 2, [3], [[4]]);\n *\n * console.log(other);\n * // => [1, 2, 3, [4]]\n *\n * console.log(array);\n * // => [1]\n */\n function concat() {\n var length = arguments.length;\n if (!length) {\n return [];\n }\n var args = Array(length - 1),\n array = arguments[0],\n index = length;\n\n while (index--) {\n args[index - 1] = arguments[index];\n }\n return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));\n }\n\n /**\n * Creates an array of `array` values not included in the other given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * **Note:** Unlike `_.pullAll`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.without, _.xor\n * @example\n *\n * _.difference([2, 1], [2, 3]);\n * // => [1]\n */\n var difference = baseRest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))\n : [];\n });\n\n /**\n * This method is like `_.difference` except that it accepts `iteratee` which\n * is invoked for each element of `array` and `values` to generate the criterion\n * by which they're compared. The order and references of result values are\n * determined by the first array. The iteratee is invoked with one argument:\n * (value).\n *\n * **Note:** Unlike `_.pullAllBy`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');\n * // => [{ 'x': 2 }]\n */\n var differenceBy = baseRest(function(array, values) {\n var iteratee = last(values);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))\n : [];\n });\n\n /**\n * This method is like `_.difference` except that it accepts `comparator`\n * which is invoked to compare elements of `array` to `values`. The order and\n * references of result values are determined by the first array. The comparator\n * is invoked with two arguments: (arrVal, othVal).\n *\n * **Note:** Unlike `_.pullAllWith`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n *\n * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);\n * // => [{ 'x': 2, 'y': 1 }]\n */\n var differenceWith = baseRest(function(array, values) {\n var comparator = last(values);\n if (isArrayLikeObject(comparator)) {\n comparator = undefined;\n }\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)\n : [];\n });\n\n /**\n * Creates a slice of `array` with `n` elements dropped from the beginning.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to drop.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.drop([1, 2, 3]);\n * // => [2, 3]\n *\n * _.drop([1, 2, 3], 2);\n * // => [3]\n *\n * _.drop([1, 2, 3], 5);\n * // => []\n *\n * _.drop([1, 2, 3], 0);\n * // => [1, 2, 3]\n */\n function drop(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n return baseSlice(array, n < 0 ? 0 : n, length);\n }\n\n /**\n * Creates a slice of `array` with `n` elements dropped from the end.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to drop.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.dropRight([1, 2, 3]);\n * // => [1, 2]\n *\n * _.dropRight([1, 2, 3], 2);\n * // => [1]\n *\n * _.dropRight([1, 2, 3], 5);\n * // => []\n *\n * _.dropRight([1, 2, 3], 0);\n * // => [1, 2, 3]\n */\n function dropRight(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n n = length - n;\n return baseSlice(array, 0, n < 0 ? 0 : n);\n }\n\n /**\n * Creates a slice of `array` excluding elements dropped from the end.\n * Elements are dropped until `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.dropRightWhile(users, function(o) { return !o.active; });\n * // => objects for ['barney']\n *\n * // The `_.matches` iteratee shorthand.\n * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });\n * // => objects for ['barney', 'fred']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.dropRightWhile(users, ['active', false]);\n * // => objects for ['barney']\n *\n * // The `_.property` iteratee shorthand.\n * _.dropRightWhile(users, 'active');\n * // => objects for ['barney', 'fred', 'pebbles']\n */\n function dropRightWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3), true, true)\n : [];\n }\n\n /**\n * Creates a slice of `array` excluding elements dropped from the beginning.\n * Elements are dropped until `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.dropWhile(users, function(o) { return !o.active; });\n * // => objects for ['pebbles']\n *\n * // The `_.matches` iteratee shorthand.\n * _.dropWhile(users, { 'user': 'barney', 'active': false });\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.dropWhile(users, ['active', false]);\n * // => objects for ['pebbles']\n *\n * // The `_.property` iteratee shorthand.\n * _.dropWhile(users, 'active');\n * // => objects for ['barney', 'fred', 'pebbles']\n */\n function dropWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3), true)\n : [];\n }\n\n /**\n * Fills elements of `array` with `value` from `start` up to, but not\n * including, `end`.\n *\n * **Note:** This method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 3.2.0\n * @category Array\n * @param {Array} array The array to fill.\n * @param {*} value The value to fill `array` with.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _.fill(array, 'a');\n * console.log(array);\n * // => ['a', 'a', 'a']\n *\n * _.fill(Array(3), 2);\n * // => [2, 2, 2]\n *\n * _.fill([4, 6, 8, 10], '*', 1, 3);\n * // => [4, '*', '*', 10]\n */\n function fill(array, value, start, end) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {\n start = 0;\n end = length;\n }\n return baseFill(array, value, start, end);\n }\n\n /**\n * This method is like `_.find` except that it returns the index of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.findIndex(users, function(o) { return o.user == 'barney'; });\n * // => 0\n *\n * // The `_.matches` iteratee shorthand.\n * _.findIndex(users, { 'user': 'fred', 'active': false });\n * // => 1\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findIndex(users, ['active', false]);\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.findIndex(users, 'active');\n * // => 2\n */\n function findIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseFindIndex(array, getIteratee(predicate, 3), index);\n }\n\n /**\n * This method is like `_.findIndex` except that it iterates over elements\n * of `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=array.length-1] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });\n * // => 2\n *\n * // The `_.matches` iteratee shorthand.\n * _.findLastIndex(users, { 'user': 'barney', 'active': true });\n * // => 0\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findLastIndex(users, ['active', false]);\n * // => 2\n *\n * // The `_.property` iteratee shorthand.\n * _.findLastIndex(users, 'active');\n * // => 0\n */\n function findLastIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = length - 1;\n if (fromIndex !== undefined) {\n index = toInteger(fromIndex);\n index = fromIndex < 0\n ? nativeMax(length + index, 0)\n : nativeMin(index, length - 1);\n }\n return baseFindIndex(array, getIteratee(predicate, 3), index, true);\n }\n\n /**\n * Flattens `array` a single level deep.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flatten([1, [2, [3, [4]], 5]]);\n * // => [1, 2, [3, [4]], 5]\n */\n function flatten(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, 1) : [];\n }\n\n /**\n * Recursively flattens `array`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flattenDeep([1, [2, [3, [4]], 5]]);\n * // => [1, 2, 3, 4, 5]\n */\n function flattenDeep(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, INFINITY) : [];\n }\n\n /**\n * Recursively flatten `array` up to `depth` times.\n *\n * @static\n * @memberOf _\n * @since 4.4.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @param {number} [depth=1] The maximum recursion depth.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * var array = [1, [2, [3, [4]], 5]];\n *\n * _.flattenDepth(array, 1);\n * // => [1, 2, [3, [4]], 5]\n *\n * _.flattenDepth(array, 2);\n * // => [1, 2, 3, [4], 5]\n */\n function flattenDepth(array, depth) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n depth = depth === undefined ? 1 : toInteger(depth);\n return baseFlatten(array, depth);\n }\n\n /**\n * The inverse of `_.toPairs`; this method returns an object composed\n * from key-value `pairs`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} pairs The key-value pairs.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.fromPairs([['a', 1], ['b', 2]]);\n * // => { 'a': 1, 'b': 2 }\n */\n function fromPairs(pairs) {\n var index = -1,\n length = pairs == null ? 0 : pairs.length,\n result = {};\n\n while (++index < length) {\n var pair = pairs[index];\n result[pair[0]] = pair[1];\n }\n return result;\n }\n\n /**\n * Gets the first element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias first\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the first element of `array`.\n * @example\n *\n * _.head([1, 2, 3]);\n * // => 1\n *\n * _.head([]);\n * // => undefined\n */\n function head(array) {\n return (array && array.length) ? array[0] : undefined;\n }\n\n /**\n * Gets the index at which the first occurrence of `value` is found in `array`\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. If `fromIndex` is negative, it's used as the\n * offset from the end of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.indexOf([1, 2, 1, 2], 2);\n * // => 1\n *\n * // Search from the `fromIndex`.\n * _.indexOf([1, 2, 1, 2], 2, 2);\n * // => 3\n */\n function indexOf(array, value, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseIndexOf(array, value, index);\n }\n\n /**\n * Gets all but the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.initial([1, 2, 3]);\n * // => [1, 2]\n */\n function initial(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseSlice(array, 0, -1) : [];\n }\n\n /**\n * Creates an array of unique values that are included in all given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * _.intersection([2, 1], [2, 3]);\n * // => [2]\n */\n var intersection = baseRest(function(arrays) {\n var mapped = arrayMap(arrays, castArrayLikeObject);\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped)\n : [];\n });\n\n /**\n * This method is like `_.intersection` except that it accepts `iteratee`\n * which is invoked for each element of each `arrays` to generate the criterion\n * by which they're compared. The order and references of result values are\n * determined by the first array. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [2.1]\n *\n * // The `_.property` iteratee shorthand.\n * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }]\n */\n var intersectionBy = baseRest(function(arrays) {\n var iteratee = last(arrays),\n mapped = arrayMap(arrays, castArrayLikeObject);\n\n if (iteratee === last(mapped)) {\n iteratee = undefined;\n } else {\n mapped.pop();\n }\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped, getIteratee(iteratee, 2))\n : [];\n });\n\n /**\n * This method is like `_.intersection` except that it accepts `comparator`\n * which is invoked to compare elements of `arrays`. The order and references\n * of result values are determined by the first array. The comparator is\n * invoked with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.intersectionWith(objects, others, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }]\n */\n var intersectionWith = baseRest(function(arrays) {\n var comparator = last(arrays),\n mapped = arrayMap(arrays, castArrayLikeObject);\n\n comparator = typeof comparator == 'function' ? comparator : undefined;\n if (comparator) {\n mapped.pop();\n }\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped, undefined, comparator)\n : [];\n });\n\n /**\n * Converts all elements in `array` into a string separated by `separator`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to convert.\n * @param {string} [separator=','] The element separator.\n * @returns {string} Returns the joined string.\n * @example\n *\n * _.join(['a', 'b', 'c'], '~');\n * // => 'a~b~c'\n */\n function join(array, separator) {\n return array == null ? '' : nativeJoin.call(array, separator);\n }\n\n /**\n * Gets the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the last element of `array`.\n * @example\n *\n * _.last([1, 2, 3]);\n * // => 3\n */\n function last(array) {\n var length = array == null ? 0 : array.length;\n return length ? array[length - 1] : undefined;\n }\n\n /**\n * This method is like `_.indexOf` except that it iterates over elements of\n * `array` from right to left.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=array.length-1] The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.lastIndexOf([1, 2, 1, 2], 2);\n * // => 3\n *\n * // Search from the `fromIndex`.\n * _.lastIndexOf([1, 2, 1, 2], 2, 2);\n * // => 1\n */\n function lastIndexOf(array, value, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = length;\n if (fromIndex !== undefined) {\n index = toInteger(fromIndex);\n index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);\n }\n return value === value\n ? strictLastIndexOf(array, value, index)\n : baseFindIndex(array, baseIsNaN, index, true);\n }\n\n /**\n * Gets the element at index `n` of `array`. If `n` is negative, the nth\n * element from the end is returned.\n *\n * @static\n * @memberOf _\n * @since 4.11.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=0] The index of the element to return.\n * @returns {*} Returns the nth element of `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'd'];\n *\n * _.nth(array, 1);\n * // => 'b'\n *\n * _.nth(array, -2);\n * // => 'c';\n */\n function nth(array, n) {\n return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;\n }\n\n /**\n * Removes all given values from `array` using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`\n * to remove elements from an array by predicate.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {...*} [values] The values to remove.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n *\n * _.pull(array, 'a', 'c');\n * console.log(array);\n * // => ['b', 'b']\n */\n var pull = baseRest(pullAll);\n\n /**\n * This method is like `_.pull` except that it accepts an array of values to remove.\n *\n * **Note:** Unlike `_.difference`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n *\n * _.pullAll(array, ['a', 'c']);\n * console.log(array);\n * // => ['b', 'b']\n */\n function pullAll(array, values) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values)\n : array;\n }\n\n /**\n * This method is like `_.pullAll` except that it accepts `iteratee` which is\n * invoked for each element of `array` and `values` to generate the criterion\n * by which they're compared. The iteratee is invoked with one argument: (value).\n *\n * **Note:** Unlike `_.differenceBy`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];\n *\n * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');\n * console.log(array);\n * // => [{ 'x': 2 }]\n */\n function pullAllBy(array, values, iteratee) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values, getIteratee(iteratee, 2))\n : array;\n }\n\n /**\n * This method is like `_.pullAll` except that it accepts `comparator` which\n * is invoked to compare elements of `array` to `values`. The comparator is\n * invoked with two arguments: (arrVal, othVal).\n *\n * **Note:** Unlike `_.differenceWith`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];\n *\n * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);\n * console.log(array);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]\n */\n function pullAllWith(array, values, comparator) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values, undefined, comparator)\n : array;\n }\n\n /**\n * Removes elements from `array` corresponding to `indexes` and returns an\n * array of removed elements.\n *\n * **Note:** Unlike `_.at`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {...(number|number[])} [indexes] The indexes of elements to remove.\n * @returns {Array} Returns the new array of removed elements.\n * @example\n *\n * var array = ['a', 'b', 'c', 'd'];\n * var pulled = _.pullAt(array, [1, 3]);\n *\n * console.log(array);\n * // => ['a', 'c']\n *\n * console.log(pulled);\n * // => ['b', 'd']\n */\n var pullAt = flatRest(function(array, indexes) {\n var length = array == null ? 0 : array.length,\n result = baseAt(array, indexes);\n\n basePullAt(array, arrayMap(indexes, function(index) {\n return isIndex(index, length) ? +index : index;\n }).sort(compareAscending));\n\n return result;\n });\n\n /**\n * Removes all elements from `array` that `predicate` returns truthy for\n * and returns an array of the removed elements. The predicate is invoked\n * with three arguments: (value, index, array).\n *\n * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`\n * to pull elements from an array by value.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new array of removed elements.\n * @example\n *\n * var array = [1, 2, 3, 4];\n * var evens = _.remove(array, function(n) {\n * return n % 2 == 0;\n * });\n *\n * console.log(array);\n * // => [1, 3]\n *\n * console.log(evens);\n * // => [2, 4]\n */\n function remove(array, predicate) {\n var result = [];\n if (!(array && array.length)) {\n return result;\n }\n var index = -1,\n indexes = [],\n length = array.length;\n\n predicate = getIteratee(predicate, 3);\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result.push(value);\n indexes.push(index);\n }\n }\n basePullAt(array, indexes);\n return result;\n }\n\n /**\n * Reverses `array` so that the first element becomes the last, the second\n * element becomes the second to last, and so on.\n *\n * **Note:** This method mutates `array` and is based on\n * [`Array#reverse`](https://mdn.io/Array/reverse).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _.reverse(array);\n * // => [3, 2, 1]\n *\n * console.log(array);\n * // => [3, 2, 1]\n */\n function reverse(array) {\n return array == null ? array : nativeReverse.call(array);\n }\n\n /**\n * Creates a slice of `array` from `start` up to, but not including, `end`.\n *\n * **Note:** This method is used instead of\n * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are\n * returned.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\n function slice(array, start, end) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {\n start = 0;\n end = length;\n }\n else {\n start = start == null ? 0 : toInteger(start);\n end = end === undefined ? length : toInteger(end);\n }\n return baseSlice(array, start, end);\n }\n\n /**\n * Uses a binary search to determine the lowest index at which `value`\n * should be inserted into `array` in order to maintain its sort order.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * _.sortedIndex([30, 50], 40);\n * // => 1\n */\n function sortedIndex(array, value) {\n return baseSortedIndex(array, value);\n }\n\n /**\n * This method is like `_.sortedIndex` except that it accepts `iteratee`\n * which is invoked for `value` and each element of `array` to compute their\n * sort ranking. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * var objects = [{ 'x': 4 }, { 'x': 5 }];\n *\n * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.sortedIndexBy(objects, { 'x': 4 }, 'x');\n * // => 0\n */\n function sortedIndexBy(array, value, iteratee) {\n return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));\n }\n\n /**\n * This method is like `_.indexOf` except that it performs a binary\n * search on a sorted `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.sortedIndexOf([4, 5, 5, 5, 6], 5);\n * // => 1\n */\n function sortedIndexOf(array, value) {\n var length = array == null ? 0 : array.length;\n if (length) {\n var index = baseSortedIndex(array, value);\n if (index < length && eq(array[index], value)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * This method is like `_.sortedIndex` except that it returns the highest\n * index at which `value` should be inserted into `array` in order to\n * maintain its sort order.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * _.sortedLastIndex([4, 5, 5, 5, 6], 5);\n * // => 4\n */\n function sortedLastIndex(array, value) {\n return baseSortedIndex(array, value, true);\n }\n\n /**\n * This method is like `_.sortedLastIndex` except that it accepts `iteratee`\n * which is invoked for `value` and each element of `array` to compute their\n * sort ranking. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * var objects = [{ 'x': 4 }, { 'x': 5 }];\n *\n * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n * // => 1\n *\n * // The `_.property` iteratee shorthand.\n * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');\n * // => 1\n */\n function sortedLastIndexBy(array, value, iteratee) {\n return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);\n }\n\n /**\n * This method is like `_.lastIndexOf` except that it performs a binary\n * search on a sorted `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);\n * // => 3\n */\n function sortedLastIndexOf(array, value) {\n var length = array == null ? 0 : array.length;\n if (length) {\n var index = baseSortedIndex(array, value, true) - 1;\n if (eq(array[index], value)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * This method is like `_.uniq` except that it's designed and optimized\n * for sorted arrays.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.sortedUniq([1, 1, 2]);\n * // => [1, 2]\n */\n function sortedUniq(array) {\n return (array && array.length)\n ? baseSortedUniq(array)\n : [];\n }\n\n /**\n * This method is like `_.uniqBy` except that it's designed and optimized\n * for sorted arrays.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);\n * // => [1.1, 2.3]\n */\n function sortedUniqBy(array, iteratee) {\n return (array && array.length)\n ? baseSortedUniq(array, getIteratee(iteratee, 2))\n : [];\n }\n\n /**\n * Gets all but the first element of `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.tail([1, 2, 3]);\n * // => [2, 3]\n */\n function tail(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseSlice(array, 1, length) : [];\n }\n\n /**\n * Creates a slice of `array` with `n` elements taken from the beginning.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to take.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.take([1, 2, 3]);\n * // => [1]\n *\n * _.take([1, 2, 3], 2);\n * // => [1, 2]\n *\n * _.take([1, 2, 3], 5);\n * // => [1, 2, 3]\n *\n * _.take([1, 2, 3], 0);\n * // => []\n */\n function take(array, n, guard) {\n if (!(array && array.length)) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n return baseSlice(array, 0, n < 0 ? 0 : n);\n }\n\n /**\n * Creates a slice of `array` with `n` elements taken from the end.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to take.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.takeRight([1, 2, 3]);\n * // => [3]\n *\n * _.takeRight([1, 2, 3], 2);\n * // => [2, 3]\n *\n * _.takeRight([1, 2, 3], 5);\n * // => [1, 2, 3]\n *\n * _.takeRight([1, 2, 3], 0);\n * // => []\n */\n function takeRight(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n n = length - n;\n return baseSlice(array, n < 0 ? 0 : n, length);\n }\n\n /**\n * Creates a slice of `array` with elements taken from the end. Elements are\n * taken until `predicate` returns falsey. The predicate is invoked with\n * three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.takeRightWhile(users, function(o) { return !o.active; });\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.matches` iteratee shorthand.\n * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });\n * // => objects for ['pebbles']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.takeRightWhile(users, ['active', false]);\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.property` iteratee shorthand.\n * _.takeRightWhile(users, 'active');\n * // => []\n */\n function takeRightWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3), false, true)\n : [];\n }\n\n /**\n * Creates a slice of `array` with elements taken from the beginning. Elements\n * are taken until `predicate` returns falsey. The predicate is invoked with\n * three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.takeWhile(users, function(o) { return !o.active; });\n * // => objects for ['barney', 'fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.takeWhile(users, { 'user': 'barney', 'active': false });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.takeWhile(users, ['active', false]);\n * // => objects for ['barney', 'fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.takeWhile(users, 'active');\n * // => []\n */\n function takeWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3))\n : [];\n }\n\n /**\n * Creates an array of unique values, in order, from all given arrays using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * _.union([2], [1, 2]);\n * // => [2, 1]\n */\n var union = baseRest(function(arrays) {\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));\n });\n\n /**\n * This method is like `_.union` except that it accepts `iteratee` which is\n * invoked for each element of each `arrays` to generate the criterion by\n * which uniqueness is computed. Result values are chosen from the first\n * array in which the value occurs. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * _.unionBy([2.1], [1.2, 2.3], Math.floor);\n * // => [2.1, 1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }, { 'x': 2 }]\n */\n var unionBy = baseRest(function(arrays) {\n var iteratee = last(arrays);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));\n });\n\n /**\n * This method is like `_.union` except that it accepts `comparator` which\n * is invoked to compare elements of `arrays`. Result values are chosen from\n * the first array in which the value occurs. The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.unionWith(objects, others, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n */\n var unionWith = baseRest(function(arrays) {\n var comparator = last(arrays);\n comparator = typeof comparator == 'function' ? comparator : undefined;\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);\n });\n\n /**\n * Creates a duplicate-free version of an array, using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons, in which only the first occurrence of each element\n * is kept. The order of result values is determined by the order they occur\n * in the array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniq([2, 1, 2]);\n * // => [2, 1]\n */\n function uniq(array) {\n return (array && array.length) ? baseUniq(array) : [];\n }\n\n /**\n * This method is like `_.uniq` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the criterion by which\n * uniqueness is computed. The order of result values is determined by the\n * order they occur in the array. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniqBy([2.1, 1.2, 2.3], Math.floor);\n * // => [2.1, 1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }, { 'x': 2 }]\n */\n function uniqBy(array, iteratee) {\n return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];\n }\n\n /**\n * This method is like `_.uniq` except that it accepts `comparator` which\n * is invoked to compare elements of `array`. The order of result values is\n * determined by the order they occur in the array.The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.uniqWith(objects, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]\n */\n function uniqWith(array, comparator) {\n comparator = typeof comparator == 'function' ? comparator : undefined;\n return (array && array.length) ? baseUniq(array, undefined, comparator) : [];\n }\n\n /**\n * This method is like `_.zip` except that it accepts an array of grouped\n * elements and creates an array regrouping the elements to their pre-zip\n * configuration.\n *\n * @static\n * @memberOf _\n * @since 1.2.0\n * @category Array\n * @param {Array} array The array of grouped elements to process.\n * @returns {Array} Returns the new array of regrouped elements.\n * @example\n *\n * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n *\n * _.unzip(zipped);\n * // => [['a', 'b'], [1, 2], [true, false]]\n */\n function unzip(array) {\n if (!(array && array.length)) {\n return [];\n }\n var length = 0;\n array = arrayFilter(array, function(group) {\n if (isArrayLikeObject(group)) {\n length = nativeMax(group.length, length);\n return true;\n }\n });\n return baseTimes(length, function(index) {\n return arrayMap(array, baseProperty(index));\n });\n }\n\n /**\n * This method is like `_.unzip` except that it accepts `iteratee` to specify\n * how regrouped values should be combined. The iteratee is invoked with the\n * elements of each group: (...group).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Array\n * @param {Array} array The array of grouped elements to process.\n * @param {Function} [iteratee=_.identity] The function to combine\n * regrouped values.\n * @returns {Array} Returns the new array of regrouped elements.\n * @example\n *\n * var zipped = _.zip([1, 2], [10, 20], [100, 200]);\n * // => [[1, 10, 100], [2, 20, 200]]\n *\n * _.unzipWith(zipped, _.add);\n * // => [3, 30, 300]\n */\n function unzipWith(array, iteratee) {\n if (!(array && array.length)) {\n return [];\n }\n var result = unzip(array);\n if (iteratee == null) {\n return result;\n }\n return arrayMap(result, function(group) {\n return apply(iteratee, undefined, group);\n });\n }\n\n /**\n * Creates an array excluding all given values using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * **Note:** Unlike `_.pull`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...*} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.difference, _.xor\n * @example\n *\n * _.without([2, 1, 2, 3], 1, 2);\n * // => [3]\n */\n var without = baseRest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, values)\n : [];\n });\n\n /**\n * Creates an array of unique values that is the\n * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)\n * of the given arrays. The order of result values is determined by the order\n * they occur in the arrays.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.difference, _.without\n * @example\n *\n * _.xor([2, 1], [2, 3]);\n * // => [1, 3]\n */\n var xor = baseRest(function(arrays) {\n return baseXor(arrayFilter(arrays, isArrayLikeObject));\n });\n\n /**\n * This method is like `_.xor` except that it accepts `iteratee` which is\n * invoked for each element of each `arrays` to generate the criterion by\n * which by which they're compared. The order of result values is determined\n * by the order they occur in the arrays. The iteratee is invoked with one\n * argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [1.2, 3.4]\n *\n * // The `_.property` iteratee shorthand.\n * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 2 }]\n */\n var xorBy = baseRest(function(arrays) {\n var iteratee = last(arrays);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));\n });\n\n /**\n * This method is like `_.xor` except that it accepts `comparator` which is\n * invoked to compare elements of `arrays`. The order of result values is\n * determined by the order they occur in the arrays. The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.xorWith(objects, others, _.isEqual);\n * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n */\n var xorWith = baseRest(function(arrays) {\n var comparator = last(arrays);\n comparator = typeof comparator == 'function' ? comparator : undefined;\n return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);\n });\n\n /**\n * Creates an array of grouped elements, the first of which contains the\n * first elements of the given arrays, the second of which contains the\n * second elements of the given arrays, and so on.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to process.\n * @returns {Array} Returns the new array of grouped elements.\n * @example\n *\n * _.zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n */\n var zip = baseRest(unzip);\n\n /**\n * This method is like `_.fromPairs` except that it accepts two arrays,\n * one of property identifiers and one of corresponding values.\n *\n * @static\n * @memberOf _\n * @since 0.4.0\n * @category Array\n * @param {Array} [props=[]] The property identifiers.\n * @param {Array} [values=[]] The property values.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.zipObject(['a', 'b'], [1, 2]);\n * // => { 'a': 1, 'b': 2 }\n */\n function zipObject(props, values) {\n return baseZipObject(props || [], values || [], assignValue);\n }\n\n /**\n * This method is like `_.zipObject` except that it supports property paths.\n *\n * @static\n * @memberOf _\n * @since 4.1.0\n * @category Array\n * @param {Array} [props=[]] The property identifiers.\n * @param {Array} [values=[]] The property values.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);\n * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }\n */\n function zipObjectDeep(props, values) {\n return baseZipObject(props || [], values || [], baseSet);\n }\n\n /**\n * This method is like `_.zip` except that it accepts `iteratee` to specify\n * how grouped values should be combined. The iteratee is invoked with the\n * elements of each group: (...group).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Array\n * @param {...Array} [arrays] The arrays to process.\n * @param {Function} [iteratee=_.identity] The function to combine\n * grouped values.\n * @returns {Array} Returns the new array of grouped elements.\n * @example\n *\n * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {\n * return a + b + c;\n * });\n * // => [111, 222]\n */\n var zipWith = baseRest(function(arrays) {\n var length = arrays.length,\n iteratee = length > 1 ? arrays[length - 1] : undefined;\n\n iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;\n return unzipWith(arrays, iteratee);\n });\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a `lodash` wrapper instance that wraps `value` with explicit method\n * chain sequences enabled. The result of such sequences must be unwrapped\n * with `_#value`.\n *\n * @static\n * @memberOf _\n * @since 1.3.0\n * @category Seq\n * @param {*} value The value to wrap.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 40 },\n * { 'user': 'pebbles', 'age': 1 }\n * ];\n *\n * var youngest = _\n * .chain(users)\n * .sortBy('age')\n * .map(function(o) {\n * return o.user + ' is ' + o.age;\n * })\n * .head()\n * .value();\n * // => 'pebbles is 1'\n */\n function chain(value) {\n var result = lodash(value);\n result.__chain__ = true;\n return result;\n }\n\n /**\n * This method invokes `interceptor` and returns `value`. The interceptor\n * is invoked with one argument; (value). The purpose of this method is to\n * \"tap into\" a method chain sequence in order to modify intermediate results.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Seq\n * @param {*} value The value to provide to `interceptor`.\n * @param {Function} interceptor The function to invoke.\n * @returns {*} Returns `value`.\n * @example\n *\n * _([1, 2, 3])\n * .tap(function(array) {\n * // Mutate input array.\n * array.pop();\n * })\n * .reverse()\n * .value();\n * // => [2, 1]\n */\n function tap(value, interceptor) {\n interceptor(value);\n return value;\n }\n\n /**\n * This method is like `_.tap` except that it returns the result of `interceptor`.\n * The purpose of this method is to \"pass thru\" values replacing intermediate\n * results in a method chain sequence.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Seq\n * @param {*} value The value to provide to `interceptor`.\n * @param {Function} interceptor The function to invoke.\n * @returns {*} Returns the result of `interceptor`.\n * @example\n *\n * _(' abc ')\n * .chain()\n * .trim()\n * .thru(function(value) {\n * return [value];\n * })\n * .value();\n * // => ['abc']\n */\n function thru(value, interceptor) {\n return interceptor(value);\n }\n\n /**\n * This method is the wrapper version of `_.at`.\n *\n * @name at\n * @memberOf _\n * @since 1.0.0\n * @category Seq\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n *\n * _(object).at(['a[0].b.c', 'a[1]']).value();\n * // => [3, 4]\n */\n var wrapperAt = flatRest(function(paths) {\n var length = paths.length,\n start = length ? paths[0] : 0,\n value = this.__wrapped__,\n interceptor = function(object) { return baseAt(object, paths); };\n\n if (length > 1 || this.__actions__.length ||\n !(value instanceof LazyWrapper) || !isIndex(start)) {\n return this.thru(interceptor);\n }\n value = value.slice(start, +start + (length ? 1 : 0));\n value.__actions__.push({\n 'func': thru,\n 'args': [interceptor],\n 'thisArg': undefined\n });\n return new LodashWrapper(value, this.__chain__).thru(function(array) {\n if (length && !array.length) {\n array.push(undefined);\n }\n return array;\n });\n });\n\n /**\n * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.\n *\n * @name chain\n * @memberOf _\n * @since 0.1.0\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 40 }\n * ];\n *\n * // A sequence without explicit chaining.\n * _(users).head();\n * // => { 'user': 'barney', 'age': 36 }\n *\n * // A sequence with explicit chaining.\n * _(users)\n * .chain()\n * .head()\n * .pick('user')\n * .value();\n * // => { 'user': 'barney' }\n */\n function wrapperChain() {\n return chain(this);\n }\n\n /**\n * Executes the chain sequence and returns the wrapped result.\n *\n * @name commit\n * @memberOf _\n * @since 3.2.0\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var array = [1, 2];\n * var wrapped = _(array).push(3);\n *\n * console.log(array);\n * // => [1, 2]\n *\n * wrapped = wrapped.commit();\n * console.log(array);\n * // => [1, 2, 3]\n *\n * wrapped.last();\n * // => 3\n *\n * console.log(array);\n * // => [1, 2, 3]\n */\n function wrapperCommit() {\n return new LodashWrapper(this.value(), this.__chain__);\n }\n\n /**\n * Gets the next value on a wrapped object following the\n * [iterator protocol](https://mdn.io/iteration_protocols#iterator).\n *\n * @name next\n * @memberOf _\n * @since 4.0.0\n * @category Seq\n * @returns {Object} Returns the next iterator value.\n * @example\n *\n * var wrapped = _([1, 2]);\n *\n * wrapped.next();\n * // => { 'done': false, 'value': 1 }\n *\n * wrapped.next();\n * // => { 'done': false, 'value': 2 }\n *\n * wrapped.next();\n * // => { 'done': true, 'value': undefined }\n */\n function wrapperNext() {\n if (this.__values__ === undefined) {\n this.__values__ = toArray(this.value());\n }\n var done = this.__index__ >= this.__values__.length,\n value = done ? undefined : this.__values__[this.__index__++];\n\n return { 'done': done, 'value': value };\n }\n\n /**\n * Enables the wrapper to be iterable.\n *\n * @name Symbol.iterator\n * @memberOf _\n * @since 4.0.0\n * @category Seq\n * @returns {Object} Returns the wrapper object.\n * @example\n *\n * var wrapped = _([1, 2]);\n *\n * wrapped[Symbol.iterator]() === wrapped;\n * // => true\n *\n * Array.from(wrapped);\n * // => [1, 2]\n */\n function wrapperToIterator() {\n return this;\n }\n\n /**\n * Creates a clone of the chain sequence planting `value` as the wrapped value.\n *\n * @name plant\n * @memberOf _\n * @since 3.2.0\n * @category Seq\n * @param {*} value The value to plant.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var wrapped = _([1, 2]).map(square);\n * var other = wrapped.plant([3, 4]);\n *\n * other.value();\n * // => [9, 16]\n *\n * wrapped.value();\n * // => [1, 4]\n */\n function wrapperPlant(value) {\n var result,\n parent = this;\n\n while (parent instanceof baseLodash) {\n var clone = wrapperClone(parent);\n clone.__index__ = 0;\n clone.__values__ = undefined;\n if (result) {\n previous.__wrapped__ = clone;\n } else {\n result = clone;\n }\n var previous = clone;\n parent = parent.__wrapped__;\n }\n previous.__wrapped__ = value;\n return result;\n }\n\n /**\n * This method is the wrapper version of `_.reverse`.\n *\n * **Note:** This method mutates the wrapped array.\n *\n * @name reverse\n * @memberOf _\n * @since 0.1.0\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _(array).reverse().value()\n * // => [3, 2, 1]\n *\n * console.log(array);\n * // => [3, 2, 1]\n */\n function wrapperReverse() {\n var value = this.__wrapped__;\n if (value instanceof LazyWrapper) {\n var wrapped = value;\n if (this.__actions__.length) {\n wrapped = new LazyWrapper(this);\n }\n wrapped = wrapped.reverse();\n wrapped.__actions__.push({\n 'func': thru,\n 'args': [reverse],\n 'thisArg': undefined\n });\n return new LodashWrapper(wrapped, this.__chain__);\n }\n return this.thru(reverse);\n }\n\n /**\n * Executes the chain sequence to resolve the unwrapped value.\n *\n * @name value\n * @memberOf _\n * @since 0.1.0\n * @alias toJSON, valueOf\n * @category Seq\n * @returns {*} Returns the resolved unwrapped value.\n * @example\n *\n * _([1, 2, 3]).value();\n * // => [1, 2, 3]\n */\n function wrapperValue() {\n return baseWrapperValue(this.__wrapped__, this.__actions__);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The corresponding value of\n * each key is the number of times the key was returned by `iteratee`. The\n * iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * _.countBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': 1, '6': 2 }\n *\n * // The `_.property` iteratee shorthand.\n * _.countBy(['one', 'two', 'three'], 'length');\n * // => { '3': 2, '5': 1 }\n */\n var countBy = createAggregator(function(result, value, key) {\n if (hasOwnProperty.call(result, key)) {\n ++result[key];\n } else {\n baseAssignValue(result, key, 1);\n }\n });\n\n /**\n * Checks if `predicate` returns truthy for **all** elements of `collection`.\n * Iteration is stopped once `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index|key, collection).\n *\n * **Note:** This method returns `true` for\n * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because\n * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of\n * elements of empty collections.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`.\n * @example\n *\n * _.every([true, 1, null, 'yes'], Boolean);\n * // => false\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.every(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.every(users, ['active', false]);\n * // => true\n *\n * // The `_.property` iteratee shorthand.\n * _.every(users, 'active');\n * // => false\n */\n function every(collection, predicate, guard) {\n var func = isArray(collection) ? arrayEvery : baseEvery;\n if (guard && isIterateeCall(collection, predicate, guard)) {\n predicate = undefined;\n }\n return func(collection, getIteratee(predicate, 3));\n }\n\n /**\n * Iterates over elements of `collection`, returning an array of all elements\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * **Note:** Unlike `_.remove`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n * @see _.reject\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * _.filter(users, function(o) { return !o.active; });\n * // => objects for ['fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.filter(users, { 'age': 36, 'active': true });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.filter(users, ['active', false]);\n * // => objects for ['fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.filter(users, 'active');\n * // => objects for ['barney']\n *\n * // Combining several predicates using `_.overEvery` or `_.overSome`.\n * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));\n * // => objects for ['fred', 'barney']\n */\n function filter(collection, predicate) {\n var func = isArray(collection) ? arrayFilter : baseFilter;\n return func(collection, getIteratee(predicate, 3));\n }\n\n /**\n * Iterates over elements of `collection`, returning the first element\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false },\n * { 'user': 'pebbles', 'age': 1, 'active': true }\n * ];\n *\n * _.find(users, function(o) { return o.age < 40; });\n * // => object for 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.find(users, { 'age': 1, 'active': true });\n * // => object for 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.find(users, ['active', false]);\n * // => object for 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.find(users, 'active');\n * // => object for 'barney'\n */\n var find = createFind(findIndex);\n\n /**\n * This method is like `_.find` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=collection.length-1] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * _.findLast([1, 2, 3, 4], function(n) {\n * return n % 2 == 1;\n * });\n * // => 3\n */\n var findLast = createFind(findLastIndex);\n\n /**\n * Creates a flattened array of values by running each element in `collection`\n * thru `iteratee` and flattening the mapped results. The iteratee is invoked\n * with three arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [n, n];\n * }\n *\n * _.flatMap([1, 2], duplicate);\n * // => [1, 1, 2, 2]\n */\n function flatMap(collection, iteratee) {\n return baseFlatten(map(collection, iteratee), 1);\n }\n\n /**\n * This method is like `_.flatMap` except that it recursively flattens the\n * mapped results.\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [[[n, n]]];\n * }\n *\n * _.flatMapDeep([1, 2], duplicate);\n * // => [1, 1, 2, 2]\n */\n function flatMapDeep(collection, iteratee) {\n return baseFlatten(map(collection, iteratee), INFINITY);\n }\n\n /**\n * This method is like `_.flatMap` except that it recursively flattens the\n * mapped results up to `depth` times.\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {number} [depth=1] The maximum recursion depth.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [[[n, n]]];\n * }\n *\n * _.flatMapDepth([1, 2], duplicate, 2);\n * // => [[1, 1], [2, 2]]\n */\n function flatMapDepth(collection, iteratee, depth) {\n depth = depth === undefined ? 1 : toInteger(depth);\n return baseFlatten(map(collection, iteratee), depth);\n }\n\n /**\n * Iterates over elements of `collection` and invokes `iteratee` for each element.\n * The iteratee is invoked with three arguments: (value, index|key, collection).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * **Note:** As with other \"Collections\" methods, objects with a \"length\"\n * property are iterated like arrays. To avoid this behavior use `_.forIn`\n * or `_.forOwn` for object iteration.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias each\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @see _.forEachRight\n * @example\n *\n * _.forEach([1, 2], function(value) {\n * console.log(value);\n * });\n * // => Logs `1` then `2`.\n *\n * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\n function forEach(collection, iteratee) {\n var func = isArray(collection) ? arrayEach : baseEach;\n return func(collection, getIteratee(iteratee, 3));\n }\n\n /**\n * This method is like `_.forEach` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @alias eachRight\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @see _.forEach\n * @example\n *\n * _.forEachRight([1, 2], function(value) {\n * console.log(value);\n * });\n * // => Logs `2` then `1`.\n */\n function forEachRight(collection, iteratee) {\n var func = isArray(collection) ? arrayEachRight : baseEachRight;\n return func(collection, getIteratee(iteratee, 3));\n }\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The order of grouped values\n * is determined by the order they occur in `collection`. The corresponding\n * value of each key is an array of elements responsible for generating the\n * key. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * _.groupBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': [4.2], '6': [6.1, 6.3] }\n *\n * // The `_.property` iteratee shorthand.\n * _.groupBy(['one', 'two', 'three'], 'length');\n * // => { '3': ['one', 'two'], '5': ['three'] }\n */\n var groupBy = createAggregator(function(result, value, key) {\n if (hasOwnProperty.call(result, key)) {\n result[key].push(value);\n } else {\n baseAssignValue(result, key, [value]);\n }\n });\n\n /**\n * Checks if `value` is in `collection`. If `collection` is a string, it's\n * checked for a substring of `value`, otherwise\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * is used for equality comparisons. If `fromIndex` is negative, it's used as\n * the offset from the end of `collection`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object|string} collection The collection to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=0] The index to search from.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n * @returns {boolean} Returns `true` if `value` is found, else `false`.\n * @example\n *\n * _.includes([1, 2, 3], 1);\n * // => true\n *\n * _.includes([1, 2, 3], 1, 2);\n * // => false\n *\n * _.includes({ 'a': 1, 'b': 2 }, 1);\n * // => true\n *\n * _.includes('abcd', 'bc');\n * // => true\n */\n function includes(collection, value, fromIndex, guard) {\n collection = isArrayLike(collection) ? collection : values(collection);\n fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;\n\n var length = collection.length;\n if (fromIndex < 0) {\n fromIndex = nativeMax(length + fromIndex, 0);\n }\n return isString(collection)\n ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)\n : (!!length && baseIndexOf(collection, value, fromIndex) > -1);\n }\n\n /**\n * Invokes the method at `path` of each element in `collection`, returning\n * an array of the results of each invoked method. Any additional arguments\n * are provided to each invoked method. If `path` is a function, it's invoked\n * for, and `this` bound to, each element in `collection`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Array|Function|string} path The path of the method to invoke or\n * the function invoked per iteration.\n * @param {...*} [args] The arguments to invoke each method with.\n * @returns {Array} Returns the array of results.\n * @example\n *\n * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');\n * // => [[1, 5, 7], [1, 2, 3]]\n *\n * _.invokeMap([123, 456], String.prototype.split, '');\n * // => [['1', '2', '3'], ['4', '5', '6']]\n */\n var invokeMap = baseRest(function(collection, path, args) {\n var index = -1,\n isFunc = typeof path == 'function',\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value) {\n result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);\n });\n return result;\n });\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The corresponding value of\n * each key is the last element responsible for generating the key. The\n * iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * var array = [\n * { 'dir': 'left', 'code': 97 },\n * { 'dir': 'right', 'code': 100 }\n * ];\n *\n * _.keyBy(array, function(o) {\n * return String.fromCharCode(o.code);\n * });\n * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }\n *\n * _.keyBy(array, 'dir');\n * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }\n */\n var keyBy = createAggregator(function(result, value, key) {\n baseAssignValue(result, key, value);\n });\n\n /**\n * Creates an array of values by running each element in `collection` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.\n *\n * The guarded methods are:\n * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,\n * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,\n * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,\n * `template`, `trim`, `trimEnd`, `trimStart`, and `words`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * _.map([4, 8], square);\n * // => [16, 64]\n *\n * _.map({ 'a': 4, 'b': 8 }, square);\n * // => [16, 64] (iteration order is not guaranteed)\n *\n * var users = [\n * { 'user': 'barney' },\n * { 'user': 'fred' }\n * ];\n *\n * // The `_.property` iteratee shorthand.\n * _.map(users, 'user');\n * // => ['barney', 'fred']\n */\n function map(collection, iteratee) {\n var func = isArray(collection) ? arrayMap : baseMap;\n return func(collection, getIteratee(iteratee, 3));\n }\n\n /**\n * This method is like `_.sortBy` except that it allows specifying the sort\n * orders of the iteratees to sort by. If `orders` is unspecified, all values\n * are sorted in ascending order. Otherwise, specify an order of \"desc\" for\n * descending or \"asc\" for ascending sort order of corresponding values.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]\n * The iteratees to sort by.\n * @param {string[]} [orders] The sort orders of `iteratees`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * var users = [\n * { 'user': 'fred', 'age': 48 },\n * { 'user': 'barney', 'age': 34 },\n * { 'user': 'fred', 'age': 40 },\n * { 'user': 'barney', 'age': 36 }\n * ];\n *\n * // Sort by `user` in ascending order and by `age` in descending order.\n * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]\n */\n function orderBy(collection, iteratees, orders, guard) {\n if (collection == null) {\n return [];\n }\n if (!isArray(iteratees)) {\n iteratees = iteratees == null ? [] : [iteratees];\n }\n orders = guard ? undefined : orders;\n if (!isArray(orders)) {\n orders = orders == null ? [] : [orders];\n }\n return baseOrderBy(collection, iteratees, orders);\n }\n\n /**\n * Creates an array of elements split into two groups, the first of which\n * contains elements `predicate` returns truthy for, the second of which\n * contains elements `predicate` returns falsey for. The predicate is\n * invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the array of grouped elements.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': true },\n * { 'user': 'pebbles', 'age': 1, 'active': false }\n * ];\n *\n * _.partition(users, function(o) { return o.active; });\n * // => objects for [['fred'], ['barney', 'pebbles']]\n *\n * // The `_.matches` iteratee shorthand.\n * _.partition(users, { 'age': 1, 'active': false });\n * // => objects for [['pebbles'], ['barney', 'fred']]\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.partition(users, ['active', false]);\n * // => objects for [['barney', 'pebbles'], ['fred']]\n *\n * // The `_.property` iteratee shorthand.\n * _.partition(users, 'active');\n * // => objects for [['fred'], ['barney', 'pebbles']]\n */\n var partition = createAggregator(function(result, value, key) {\n result[key ? 0 : 1].push(value);\n }, function() { return [[], []]; });\n\n /**\n * Reduces `collection` to a value which is the accumulated result of running\n * each element in `collection` thru `iteratee`, where each successive\n * invocation is supplied the return value of the previous. If `accumulator`\n * is not given, the first element of `collection` is used as the initial\n * value. The iteratee is invoked with four arguments:\n * (accumulator, value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.reduce`, `_.reduceRight`, and `_.transform`.\n *\n * The guarded methods are:\n * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,\n * and `sortBy`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @returns {*} Returns the accumulated value.\n * @see _.reduceRight\n * @example\n *\n * _.reduce([1, 2], function(sum, n) {\n * return sum + n;\n * }, 0);\n * // => 3\n *\n * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n * (result[value] || (result[value] = [])).push(key);\n * return result;\n * }, {});\n * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)\n */\n function reduce(collection, iteratee, accumulator) {\n var func = isArray(collection) ? arrayReduce : baseReduce,\n initAccum = arguments.length < 3;\n\n return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);\n }\n\n /**\n * This method is like `_.reduce` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @returns {*} Returns the accumulated value.\n * @see _.reduce\n * @example\n *\n * var array = [[0, 1], [2, 3], [4, 5]];\n *\n * _.reduceRight(array, function(flattened, other) {\n * return flattened.concat(other);\n * }, []);\n * // => [4, 5, 2, 3, 0, 1]\n */\n function reduceRight(collection, iteratee, accumulator) {\n var func = isArray(collection) ? arrayReduceRight : baseReduce,\n initAccum = arguments.length < 3;\n\n return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);\n }\n\n /**\n * The opposite of `_.filter`; this method returns the elements of `collection`\n * that `predicate` does **not** return truthy for.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n * @see _.filter\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': true }\n * ];\n *\n * _.reject(users, function(o) { return !o.active; });\n * // => objects for ['fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.reject(users, { 'age': 40, 'active': true });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.reject(users, ['active', false]);\n * // => objects for ['fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.reject(users, 'active');\n * // => objects for ['barney']\n */\n function reject(collection, predicate) {\n var func = isArray(collection) ? arrayFilter : baseFilter;\n return func(collection, negate(getIteratee(predicate, 3)));\n }\n\n /**\n * Gets a random element from `collection`.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to sample.\n * @returns {*} Returns the random element.\n * @example\n *\n * _.sample([1, 2, 3, 4]);\n * // => 2\n */\n function sample(collection) {\n var func = isArray(collection) ? arraySample : baseSample;\n return func(collection);\n }\n\n /**\n * Gets `n` random elements at unique keys from `collection` up to the\n * size of `collection`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to sample.\n * @param {number} [n=1] The number of elements to sample.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the random elements.\n * @example\n *\n * _.sampleSize([1, 2, 3], 2);\n * // => [3, 1]\n *\n * _.sampleSize([1, 2, 3], 4);\n * // => [2, 3, 1]\n */\n function sampleSize(collection, n, guard) {\n if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {\n n = 1;\n } else {\n n = toInteger(n);\n }\n var func = isArray(collection) ? arraySampleSize : baseSampleSize;\n return func(collection, n);\n }\n\n /**\n * Creates an array of shuffled values, using a version of the\n * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to shuffle.\n * @returns {Array} Returns the new shuffled array.\n * @example\n *\n * _.shuffle([1, 2, 3, 4]);\n * // => [4, 1, 3, 2]\n */\n function shuffle(collection) {\n var func = isArray(collection) ? arrayShuffle : baseShuffle;\n return func(collection);\n }\n\n /**\n * Gets the size of `collection` by returning its length for array-like\n * values or the number of own enumerable string keyed properties for objects.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object|string} collection The collection to inspect.\n * @returns {number} Returns the collection size.\n * @example\n *\n * _.size([1, 2, 3]);\n * // => 3\n *\n * _.size({ 'a': 1, 'b': 2 });\n * // => 2\n *\n * _.size('pebbles');\n * // => 7\n */\n function size(collection) {\n if (collection == null) {\n return 0;\n }\n if (isArrayLike(collection)) {\n return isString(collection) ? stringSize(collection) : collection.length;\n }\n var tag = getTag(collection);\n if (tag == mapTag || tag == setTag) {\n return collection.size;\n }\n return baseKeys(collection).length;\n }\n\n /**\n * Checks if `predicate` returns truthy for **any** element of `collection`.\n * Iteration is stopped once `predicate` returns truthy. The predicate is\n * invoked with three arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n * @example\n *\n * _.some([null, 0, 'yes', false], Boolean);\n * // => true\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.some(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.some(users, ['active', false]);\n * // => true\n *\n * // The `_.property` iteratee shorthand.\n * _.some(users, 'active');\n * // => true\n */\n function some(collection, predicate, guard) {\n var func = isArray(collection) ? arraySome : baseSome;\n if (guard && isIterateeCall(collection, predicate, guard)) {\n predicate = undefined;\n }\n return func(collection, getIteratee(predicate, 3));\n }\n\n /**\n * Creates an array of elements, sorted in ascending order by the results of\n * running each element in a collection thru each iteratee. This method\n * performs a stable sort, that is, it preserves the original sort order of\n * equal elements. The iteratees are invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {...(Function|Function[])} [iteratees=[_.identity]]\n * The iteratees to sort by.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * var users = [\n * { 'user': 'fred', 'age': 48 },\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 30 },\n * { 'user': 'barney', 'age': 34 }\n * ];\n *\n * _.sortBy(users, [function(o) { return o.user; }]);\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]\n *\n * _.sortBy(users, ['user', 'age']);\n * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]\n */\n var sortBy = baseRest(function(collection, iteratees) {\n if (collection == null) {\n return [];\n }\n var length = iteratees.length;\n if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {\n iteratees = [];\n } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {\n iteratees = [iteratees[0]];\n }\n return baseOrderBy(collection, baseFlatten(iteratees, 1), []);\n });\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\n var now = ctxNow || function() {\n return root.Date.now();\n };\n\n /*------------------------------------------------------------------------*/\n\n /**\n * The opposite of `_.before`; this method creates a function that invokes\n * `func` once it's called `n` or more times.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {number} n The number of calls before `func` is invoked.\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var saves = ['profile', 'settings'];\n *\n * var done = _.after(saves.length, function() {\n * console.log('done saving!');\n * });\n *\n * _.forEach(saves, function(type) {\n * asyncSave({ 'type': type, 'complete': done });\n * });\n * // => Logs 'done saving!' after the two async saves have completed.\n */\n function after(n, func) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n n = toInteger(n);\n return function() {\n if (--n < 1) {\n return func.apply(this, arguments);\n }\n };\n }\n\n /**\n * Creates a function that invokes `func`, with up to `n` arguments,\n * ignoring any additional arguments.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to cap arguments for.\n * @param {number} [n=func.length] The arity cap.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new capped function.\n * @example\n *\n * _.map(['6', '8', '10'], _.ary(parseInt, 1));\n * // => [6, 8, 10]\n */\n function ary(func, n, guard) {\n n = guard ? undefined : n;\n n = (func && n == null) ? func.length : n;\n return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);\n }\n\n /**\n * Creates a function that invokes `func`, with the `this` binding and arguments\n * of the created function, while it's called less than `n` times. Subsequent\n * calls to the created function return the result of the last `func` invocation.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {number} n The number of calls at which `func` is no longer invoked.\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * jQuery(element).on('click', _.before(5, addContactToList));\n * // => Allows adding up to 4 contacts to the list.\n */\n function before(n, func) {\n var result;\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n n = toInteger(n);\n return function() {\n if (--n > 0) {\n result = func.apply(this, arguments);\n }\n if (n <= 1) {\n func = undefined;\n }\n return result;\n };\n }\n\n /**\n * Creates a function that invokes `func` with the `this` binding of `thisArg`\n * and `partials` prepended to the arguments it receives.\n *\n * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,\n * may be used as a placeholder for partially applied arguments.\n *\n * **Note:** Unlike native `Function#bind`, this method doesn't set the \"length\"\n * property of bound functions.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to bind.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new bound function.\n * @example\n *\n * function greet(greeting, punctuation) {\n * return greeting + ' ' + this.user + punctuation;\n * }\n *\n * var object = { 'user': 'fred' };\n *\n * var bound = _.bind(greet, object, 'hi');\n * bound('!');\n * // => 'hi fred!'\n *\n * // Bound with placeholders.\n * var bound = _.bind(greet, object, _, '!');\n * bound('hi');\n * // => 'hi fred!'\n */\n var bind = baseRest(function(func, thisArg, partials) {\n var bitmask = WRAP_BIND_FLAG;\n if (partials.length) {\n var holders = replaceHolders(partials, getHolder(bind));\n bitmask |= WRAP_PARTIAL_FLAG;\n }\n return createWrap(func, bitmask, thisArg, partials, holders);\n });\n\n /**\n * Creates a function that invokes the method at `object[key]` with `partials`\n * prepended to the arguments it receives.\n *\n * This method differs from `_.bind` by allowing bound functions to reference\n * methods that may be redefined or don't yet exist. See\n * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)\n * for more details.\n *\n * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * @static\n * @memberOf _\n * @since 0.10.0\n * @category Function\n * @param {Object} object The object to invoke the method on.\n * @param {string} key The key of the method.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new bound function.\n * @example\n *\n * var object = {\n * 'user': 'fred',\n * 'greet': function(greeting, punctuation) {\n * return greeting + ' ' + this.user + punctuation;\n * }\n * };\n *\n * var bound = _.bindKey(object, 'greet', 'hi');\n * bound('!');\n * // => 'hi fred!'\n *\n * object.greet = function(greeting, punctuation) {\n * return greeting + 'ya ' + this.user + punctuation;\n * };\n *\n * bound('!');\n * // => 'hiya fred!'\n *\n * // Bound with placeholders.\n * var bound = _.bindKey(object, 'greet', _, '!');\n * bound('hi');\n * // => 'hiya fred!'\n */\n var bindKey = baseRest(function(object, key, partials) {\n var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;\n if (partials.length) {\n var holders = replaceHolders(partials, getHolder(bindKey));\n bitmask |= WRAP_PARTIAL_FLAG;\n }\n return createWrap(key, bitmask, object, partials, holders);\n });\n\n /**\n * Creates a function that accepts arguments of `func` and either invokes\n * `func` returning its result, if at least `arity` number of arguments have\n * been provided, or returns a function that accepts the remaining `func`\n * arguments, and so on. The arity of `func` may be specified if `func.length`\n * is not sufficient.\n *\n * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,\n * may be used as a placeholder for provided arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of curried functions.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Function\n * @param {Function} func The function to curry.\n * @param {number} [arity=func.length] The arity of `func`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new curried function.\n * @example\n *\n * var abc = function(a, b, c) {\n * return [a, b, c];\n * };\n *\n * var curried = _.curry(abc);\n *\n * curried(1)(2)(3);\n * // => [1, 2, 3]\n *\n * curried(1, 2)(3);\n * // => [1, 2, 3]\n *\n * curried(1, 2, 3);\n * // => [1, 2, 3]\n *\n * // Curried with placeholders.\n * curried(1)(_, 3)(2);\n * // => [1, 2, 3]\n */\n function curry(func, arity, guard) {\n arity = guard ? undefined : arity;\n var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n result.placeholder = curry.placeholder;\n return result;\n }\n\n /**\n * This method is like `_.curry` except that arguments are applied to `func`\n * in the manner of `_.partialRight` instead of `_.partial`.\n *\n * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for provided arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of curried functions.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to curry.\n * @param {number} [arity=func.length] The arity of `func`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new curried function.\n * @example\n *\n * var abc = function(a, b, c) {\n * return [a, b, c];\n * };\n *\n * var curried = _.curryRight(abc);\n *\n * curried(3)(2)(1);\n * // => [1, 2, 3]\n *\n * curried(2, 3)(1);\n * // => [1, 2, 3]\n *\n * curried(1, 2, 3);\n * // => [1, 2, 3]\n *\n * // Curried with placeholders.\n * curried(3)(1, _)(2);\n * // => [1, 2, 3]\n */\n function curryRight(func, arity, guard) {\n arity = guard ? undefined : arity;\n var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n result.placeholder = curryRight.placeholder;\n return result;\n }\n\n /**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\n function debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n }\n\n /**\n * Defers invoking the `func` until the current call stack has cleared. Any\n * additional arguments are provided to `func` when it's invoked.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to defer.\n * @param {...*} [args] The arguments to invoke `func` with.\n * @returns {number} Returns the timer id.\n * @example\n *\n * _.defer(function(text) {\n * console.log(text);\n * }, 'deferred');\n * // => Logs 'deferred' after one millisecond.\n */\n var defer = baseRest(function(func, args) {\n return baseDelay(func, 1, args);\n });\n\n /**\n * Invokes `func` after `wait` milliseconds. Any additional arguments are\n * provided to `func` when it's invoked.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @param {...*} [args] The arguments to invoke `func` with.\n * @returns {number} Returns the timer id.\n * @example\n *\n * _.delay(function(text) {\n * console.log(text);\n * }, 1000, 'later');\n * // => Logs 'later' after one second.\n */\n var delay = baseRest(function(func, wait, args) {\n return baseDelay(func, toNumber(wait) || 0, args);\n });\n\n /**\n * Creates a function that invokes `func` with arguments reversed.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to flip arguments for.\n * @returns {Function} Returns the new flipped function.\n * @example\n *\n * var flipped = _.flip(function() {\n * return _.toArray(arguments);\n * });\n *\n * flipped('a', 'b', 'c', 'd');\n * // => ['d', 'c', 'b', 'a']\n */\n function flip(func) {\n return createWrap(func, WRAP_FLIP_FLAG);\n }\n\n /**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\n function memoize(func, resolver) {\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n }\n\n // Expose `MapCache`.\n memoize.Cache = MapCache;\n\n /**\n * Creates a function that negates the result of the predicate `func`. The\n * `func` predicate is invoked with the `this` binding and arguments of the\n * created function.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} predicate The predicate to negate.\n * @returns {Function} Returns the new negated function.\n * @example\n *\n * function isEven(n) {\n * return n % 2 == 0;\n * }\n *\n * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));\n * // => [1, 3, 5]\n */\n function negate(predicate) {\n if (typeof predicate != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return function() {\n var args = arguments;\n switch (args.length) {\n case 0: return !predicate.call(this);\n case 1: return !predicate.call(this, args[0]);\n case 2: return !predicate.call(this, args[0], args[1]);\n case 3: return !predicate.call(this, args[0], args[1], args[2]);\n }\n return !predicate.apply(this, args);\n };\n }\n\n /**\n * Creates a function that is restricted to invoking `func` once. Repeat calls\n * to the function return the value of the first invocation. The `func` is\n * invoked with the `this` binding and arguments of the created function.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var initialize = _.once(createApplication);\n * initialize();\n * initialize();\n * // => `createApplication` is invoked once\n */\n function once(func) {\n return before(2, func);\n }\n\n /**\n * Creates a function that invokes `func` with its arguments transformed.\n *\n * @static\n * @since 4.0.0\n * @memberOf _\n * @category Function\n * @param {Function} func The function to wrap.\n * @param {...(Function|Function[])} [transforms=[_.identity]]\n * The argument transforms.\n * @returns {Function} Returns the new function.\n * @example\n *\n * function doubled(n) {\n * return n * 2;\n * }\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var func = _.overArgs(function(x, y) {\n * return [x, y];\n * }, [square, doubled]);\n *\n * func(9, 3);\n * // => [81, 6]\n *\n * func(10, 5);\n * // => [100, 10]\n */\n var overArgs = castRest(function(func, transforms) {\n transforms = (transforms.length == 1 && isArray(transforms[0]))\n ? arrayMap(transforms[0], baseUnary(getIteratee()))\n : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));\n\n var funcsLength = transforms.length;\n return baseRest(function(args) {\n var index = -1,\n length = nativeMin(args.length, funcsLength);\n\n while (++index < length) {\n args[index] = transforms[index].call(this, args[index]);\n }\n return apply(func, this, args);\n });\n });\n\n /**\n * Creates a function that invokes `func` with `partials` prepended to the\n * arguments it receives. This method is like `_.bind` except it does **not**\n * alter the `this` binding.\n *\n * The `_.partial.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of partially\n * applied functions.\n *\n * @static\n * @memberOf _\n * @since 0.2.0\n * @category Function\n * @param {Function} func The function to partially apply arguments to.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new partially applied function.\n * @example\n *\n * function greet(greeting, name) {\n * return greeting + ' ' + name;\n * }\n *\n * var sayHelloTo = _.partial(greet, 'hello');\n * sayHelloTo('fred');\n * // => 'hello fred'\n *\n * // Partially applied with placeholders.\n * var greetFred = _.partial(greet, _, 'fred');\n * greetFred('hi');\n * // => 'hi fred'\n */\n var partial = baseRest(function(func, partials) {\n var holders = replaceHolders(partials, getHolder(partial));\n return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);\n });\n\n /**\n * This method is like `_.partial` except that partially applied arguments\n * are appended to the arguments it receives.\n *\n * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of partially\n * applied functions.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Function\n * @param {Function} func The function to partially apply arguments to.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new partially applied function.\n * @example\n *\n * function greet(greeting, name) {\n * return greeting + ' ' + name;\n * }\n *\n * var greetFred = _.partialRight(greet, 'fred');\n * greetFred('hi');\n * // => 'hi fred'\n *\n * // Partially applied with placeholders.\n * var sayHelloTo = _.partialRight(greet, 'hello', _);\n * sayHelloTo('fred');\n * // => 'hello fred'\n */\n var partialRight = baseRest(function(func, partials) {\n var holders = replaceHolders(partials, getHolder(partialRight));\n return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);\n });\n\n /**\n * Creates a function that invokes `func` with arguments arranged according\n * to the specified `indexes` where the argument value at the first index is\n * provided as the first argument, the argument value at the second index is\n * provided as the second argument, and so on.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to rearrange arguments for.\n * @param {...(number|number[])} indexes The arranged argument indexes.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var rearged = _.rearg(function(a, b, c) {\n * return [a, b, c];\n * }, [2, 0, 1]);\n *\n * rearged('b', 'c', 'a')\n * // => ['a', 'b', 'c']\n */\n var rearg = flatRest(function(func, indexes) {\n return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);\n });\n\n /**\n * Creates a function that invokes `func` with the `this` binding of the\n * created function and arguments from `start` and beyond provided as\n * an array.\n *\n * **Note:** This method is based on the\n * [rest parameter](https://mdn.io/rest_parameters).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var say = _.rest(function(what, names) {\n * return what + ' ' + _.initial(names).join(', ') +\n * (_.size(names) > 1 ? ', & ' : '') + _.last(names);\n * });\n *\n * say('hello', 'fred', 'barney', 'pebbles');\n * // => 'hello fred, barney, & pebbles'\n */\n function rest(func, start) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n start = start === undefined ? start : toInteger(start);\n return baseRest(func, start);\n }\n\n /**\n * Creates a function that invokes `func` with the `this` binding of the\n * create function and an array of arguments much like\n * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).\n *\n * **Note:** This method is based on the\n * [spread operator](https://mdn.io/spread_operator).\n *\n * @static\n * @memberOf _\n * @since 3.2.0\n * @category Function\n * @param {Function} func The function to spread arguments over.\n * @param {number} [start=0] The start position of the spread.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var say = _.spread(function(who, what) {\n * return who + ' says ' + what;\n * });\n *\n * say(['fred', 'hello']);\n * // => 'fred says hello'\n *\n * var numbers = Promise.all([\n * Promise.resolve(40),\n * Promise.resolve(36)\n * ]);\n *\n * numbers.then(_.spread(function(x, y) {\n * return x + y;\n * }));\n * // => a Promise of 76\n */\n function spread(func, start) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n start = start == null ? 0 : nativeMax(toInteger(start), 0);\n return baseRest(function(args) {\n var array = args[start],\n otherArgs = castSlice(args, 0, start);\n\n if (array) {\n arrayPush(otherArgs, array);\n }\n return apply(func, this, otherArgs);\n });\n }\n\n /**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\n function throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n }\n\n /**\n * Creates a function that accepts up to one argument, ignoring any\n * additional arguments.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n * @example\n *\n * _.map(['6', '8', '10'], _.unary(parseInt));\n * // => [6, 8, 10]\n */\n function unary(func) {\n return ary(func, 1);\n }\n\n /**\n * Creates a function that provides `value` to `wrapper` as its first\n * argument. Any additional arguments provided to the function are appended\n * to those provided to the `wrapper`. The wrapper is invoked with the `this`\n * binding of the created function.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {*} value The value to wrap.\n * @param {Function} [wrapper=identity] The wrapper function.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var p = _.wrap(_.escape, function(func, text) {\n * return '<p>' + func(text) + '</p>';\n * });\n *\n * p('fred, barney, & pebbles');\n * // => '<p>fred, barney, & pebbles</p>'\n */\n function wrap(value, wrapper) {\n return partial(castFunction(wrapper), value);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Casts `value` as an array if it's not one.\n *\n * @static\n * @memberOf _\n * @since 4.4.0\n * @category Lang\n * @param {*} value The value to inspect.\n * @returns {Array} Returns the cast array.\n * @example\n *\n * _.castArray(1);\n * // => [1]\n *\n * _.castArray({ 'a': 1 });\n * // => [{ 'a': 1 }]\n *\n * _.castArray('abc');\n * // => ['abc']\n *\n * _.castArray(null);\n * // => [null]\n *\n * _.castArray(undefined);\n * // => [undefined]\n *\n * _.castArray();\n * // => []\n *\n * var array = [1, 2, 3];\n * console.log(_.castArray(array) === array);\n * // => true\n */\n function castArray() {\n if (!arguments.length) {\n return [];\n }\n var value = arguments[0];\n return isArray(value) ? value : [value];\n }\n\n /**\n * Creates a shallow clone of `value`.\n *\n * **Note:** This method is loosely based on the\n * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\n * and supports cloning arrays, array buffers, booleans, date objects, maps,\n * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\n * arrays. The own enumerable properties of `arguments` objects are cloned\n * as plain objects. An empty object is returned for uncloneable values such\n * as error objects, functions, DOM nodes, and WeakMaps.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to clone.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeep\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var shallow = _.clone(objects);\n * console.log(shallow[0] === objects[0]);\n * // => true\n */\n function clone(value) {\n return baseClone(value, CLONE_SYMBOLS_FLAG);\n }\n\n /**\n * This method is like `_.clone` except that it accepts `customizer` which\n * is invoked to produce the cloned value. If `customizer` returns `undefined`,\n * cloning is handled by the method instead. The `customizer` is invoked with\n * up to four arguments; (value [, index|key, object, stack]).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to clone.\n * @param {Function} [customizer] The function to customize cloning.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeepWith\n * @example\n *\n * function customizer(value) {\n * if (_.isElement(value)) {\n * return value.cloneNode(false);\n * }\n * }\n *\n * var el = _.cloneWith(document.body, customizer);\n *\n * console.log(el === document.body);\n * // => false\n * console.log(el.nodeName);\n * // => 'BODY'\n * console.log(el.childNodes.length);\n * // => 0\n */\n function cloneWith(value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);\n }\n\n /**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\n function cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n }\n\n /**\n * This method is like `_.cloneWith` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @param {Function} [customizer] The function to customize cloning.\n * @returns {*} Returns the deep cloned value.\n * @see _.cloneWith\n * @example\n *\n * function customizer(value) {\n * if (_.isElement(value)) {\n * return value.cloneNode(true);\n * }\n * }\n *\n * var el = _.cloneDeepWith(document.body, customizer);\n *\n * console.log(el === document.body);\n * // => false\n * console.log(el.nodeName);\n * // => 'BODY'\n * console.log(el.childNodes.length);\n * // => 20\n */\n function cloneDeepWith(value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);\n }\n\n /**\n * Checks if `object` conforms to `source` by invoking the predicate\n * properties of `source` with the corresponding property values of `object`.\n *\n * **Note:** This method is equivalent to `_.conforms` when `source` is\n * partially applied.\n *\n * @static\n * @memberOf _\n * @since 4.14.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property predicates to conform to.\n * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n *\n * _.conformsTo(object, { 'b': function(n) { return n > 1; } });\n * // => true\n *\n * _.conformsTo(object, { 'b': function(n) { return n > 2; } });\n * // => false\n */\n function conformsTo(object, source) {\n return source == null || baseConformsTo(object, source, keys(source));\n }\n\n /**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\n function eq(value, other) {\n return value === other || (value !== value && other !== other);\n }\n\n /**\n * Checks if `value` is greater than `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than `other`,\n * else `false`.\n * @see _.lt\n * @example\n *\n * _.gt(3, 1);\n * // => true\n *\n * _.gt(3, 3);\n * // => false\n *\n * _.gt(1, 3);\n * // => false\n */\n var gt = createRelationalOperation(baseGt);\n\n /**\n * Checks if `value` is greater than or equal to `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than or equal to\n * `other`, else `false`.\n * @see _.lte\n * @example\n *\n * _.gte(3, 1);\n * // => true\n *\n * _.gte(3, 3);\n * // => true\n *\n * _.gte(1, 3);\n * // => false\n */\n var gte = createRelationalOperation(function(value, other) {\n return value >= other;\n });\n\n /**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\n var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n };\n\n /**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\n var isArray = Array.isArray;\n\n /**\n * Checks if `value` is classified as an `ArrayBuffer` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\n * @example\n *\n * _.isArrayBuffer(new ArrayBuffer(2));\n * // => true\n *\n * _.isArrayBuffer(new Array(2));\n * // => false\n */\n var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;\n\n /**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\n function isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n }\n\n /**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\n function isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n }\n\n /**\n * Checks if `value` is classified as a boolean primitive or object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.\n * @example\n *\n * _.isBoolean(false);\n * // => true\n *\n * _.isBoolean(null);\n * // => false\n */\n function isBoolean(value) {\n return value === true || value === false ||\n (isObjectLike(value) && baseGetTag(value) == boolTag);\n }\n\n /**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\n var isBuffer = nativeIsBuffer || stubFalse;\n\n /**\n * Checks if `value` is classified as a `Date` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n * @example\n *\n * _.isDate(new Date);\n * // => true\n *\n * _.isDate('Mon April 23 2012');\n * // => false\n */\n var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;\n\n /**\n * Checks if `value` is likely a DOM element.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.\n * @example\n *\n * _.isElement(document.body);\n * // => true\n *\n * _.isElement('<body>');\n * // => false\n */\n function isElement(value) {\n return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);\n }\n\n /**\n * Checks if `value` is an empty object, collection, map, or set.\n *\n * Objects are considered empty if they have no own enumerable string keyed\n * properties.\n *\n * Array-like values such as `arguments` objects, arrays, buffers, strings, or\n * jQuery-like collections are considered empty if they have a `length` of `0`.\n * Similarly, maps and sets are considered empty if they have a `size` of `0`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is empty, else `false`.\n * @example\n *\n * _.isEmpty(null);\n * // => true\n *\n * _.isEmpty(true);\n * // => true\n *\n * _.isEmpty(1);\n * // => true\n *\n * _.isEmpty([1, 2, 3]);\n * // => false\n *\n * _.isEmpty({ 'a': 1 });\n * // => false\n */\n function isEmpty(value) {\n if (value == null) {\n return true;\n }\n if (isArrayLike(value) &&\n (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||\n isBuffer(value) || isTypedArray(value) || isArguments(value))) {\n return !value.length;\n }\n var tag = getTag(value);\n if (tag == mapTag || tag == setTag) {\n return !value.size;\n }\n if (isPrototype(value)) {\n return !baseKeys(value).length;\n }\n for (var key in value) {\n if (hasOwnProperty.call(value, key)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\n function isEqual(value, other) {\n return baseIsEqual(value, other);\n }\n\n /**\n * This method is like `_.isEqual` except that it accepts `customizer` which\n * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n * are handled by the method instead. The `customizer` is invoked with up to\n * six arguments: (objValue, othValue [, index|key, object, other, stack]).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * function isGreeting(value) {\n * return /^h(?:i|ello)$/.test(value);\n * }\n *\n * function customizer(objValue, othValue) {\n * if (isGreeting(objValue) && isGreeting(othValue)) {\n * return true;\n * }\n * }\n *\n * var array = ['hello', 'goodbye'];\n * var other = ['hi', 'goodbye'];\n *\n * _.isEqualWith(array, other, customizer);\n * // => true\n */\n function isEqualWith(value, other, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n var result = customizer ? customizer(value, other) : undefined;\n return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;\n }\n\n /**\n * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,\n * `SyntaxError`, `TypeError`, or `URIError` object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an error object, else `false`.\n * @example\n *\n * _.isError(new Error);\n * // => true\n *\n * _.isError(Error);\n * // => false\n */\n function isError(value) {\n if (!isObjectLike(value)) {\n return false;\n }\n var tag = baseGetTag(value);\n return tag == errorTag || tag == domExcTag ||\n (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));\n }\n\n /**\n * Checks if `value` is a finite primitive number.\n *\n * **Note:** This method is based on\n * [`Number.isFinite`](https://mdn.io/Number/isFinite).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.\n * @example\n *\n * _.isFinite(3);\n * // => true\n *\n * _.isFinite(Number.MIN_VALUE);\n * // => true\n *\n * _.isFinite(Infinity);\n * // => false\n *\n * _.isFinite('3');\n * // => false\n */\n function isFinite(value) {\n return typeof value == 'number' && nativeIsFinite(value);\n }\n\n /**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\n function isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n }\n\n /**\n * Checks if `value` is an integer.\n *\n * **Note:** This method is based on\n * [`Number.isInteger`](https://mdn.io/Number/isInteger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an integer, else `false`.\n * @example\n *\n * _.isInteger(3);\n * // => true\n *\n * _.isInteger(Number.MIN_VALUE);\n * // => false\n *\n * _.isInteger(Infinity);\n * // => false\n *\n * _.isInteger('3');\n * // => false\n */\n function isInteger(value) {\n return typeof value == 'number' && value == toInteger(value);\n }\n\n /**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\n function isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n }\n\n /**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\n function isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n }\n\n /**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\n function isObjectLike(value) {\n return value != null && typeof value == 'object';\n }\n\n /**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\n var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\n /**\n * Performs a partial deep comparison between `object` and `source` to\n * determine if `object` contains equivalent property values.\n *\n * **Note:** This method is equivalent to `_.matches` when `source` is\n * partially applied.\n *\n * Partial comparisons will match empty array and empty object `source`\n * values against any array or object value, respectively. See `_.isEqual`\n * for a list of supported value comparisons.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n *\n * _.isMatch(object, { 'b': 2 });\n * // => true\n *\n * _.isMatch(object, { 'b': 1 });\n * // => false\n */\n function isMatch(object, source) {\n return object === source || baseIsMatch(object, source, getMatchData(source));\n }\n\n /**\n * This method is like `_.isMatch` except that it accepts `customizer` which\n * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n * are handled by the method instead. The `customizer` is invoked with five\n * arguments: (objValue, srcValue, index|key, object, source).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n * @example\n *\n * function isGreeting(value) {\n * return /^h(?:i|ello)$/.test(value);\n * }\n *\n * function customizer(objValue, srcValue) {\n * if (isGreeting(objValue) && isGreeting(srcValue)) {\n * return true;\n * }\n * }\n *\n * var object = { 'greeting': 'hello' };\n * var source = { 'greeting': 'hi' };\n *\n * _.isMatchWith(object, source, customizer);\n * // => true\n */\n function isMatchWith(object, source, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseIsMatch(object, source, getMatchData(source), customizer);\n }\n\n /**\n * Checks if `value` is `NaN`.\n *\n * **Note:** This method is based on\n * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as\n * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for\n * `undefined` and other non-number values.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n * @example\n *\n * _.isNaN(NaN);\n * // => true\n *\n * _.isNaN(new Number(NaN));\n * // => true\n *\n * isNaN(undefined);\n * // => true\n *\n * _.isNaN(undefined);\n * // => false\n */\n function isNaN(value) {\n // An `NaN` primitive is the only value that is not equal to itself.\n // Perform the `toStringTag` check first to avoid errors with some\n // ActiveX objects in IE.\n return isNumber(value) && value != +value;\n }\n\n /**\n * Checks if `value` is a pristine native function.\n *\n * **Note:** This method can't reliably detect native functions in the presence\n * of the core-js package because core-js circumvents this kind of detection.\n * Despite multiple requests, the core-js maintainer has made it clear: any\n * attempt to fix the detection will be obstructed. As a result, we're left\n * with little choice but to throw an error. Unfortunately, this also affects\n * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),\n * which rely on core-js.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n * @example\n *\n * _.isNative(Array.prototype.push);\n * // => true\n *\n * _.isNative(_);\n * // => false\n */\n function isNative(value) {\n if (isMaskable(value)) {\n throw new Error(CORE_ERROR_TEXT);\n }\n return baseIsNative(value);\n }\n\n /**\n * Checks if `value` is `null`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `null`, else `false`.\n * @example\n *\n * _.isNull(null);\n * // => true\n *\n * _.isNull(void 0);\n * // => false\n */\n function isNull(value) {\n return value === null;\n }\n\n /**\n * Checks if `value` is `null` or `undefined`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is nullish, else `false`.\n * @example\n *\n * _.isNil(null);\n * // => true\n *\n * _.isNil(void 0);\n * // => true\n *\n * _.isNil(NaN);\n * // => false\n */\n function isNil(value) {\n return value == null;\n }\n\n /**\n * Checks if `value` is classified as a `Number` primitive or object.\n *\n * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are\n * classified as numbers, use the `_.isFinite` method.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a number, else `false`.\n * @example\n *\n * _.isNumber(3);\n * // => true\n *\n * _.isNumber(Number.MIN_VALUE);\n * // => true\n *\n * _.isNumber(Infinity);\n * // => true\n *\n * _.isNumber('3');\n * // => false\n */\n function isNumber(value) {\n return typeof value == 'number' ||\n (isObjectLike(value) && baseGetTag(value) == numberTag);\n }\n\n /**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\n function isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n }\n\n /**\n * Checks if `value` is classified as a `RegExp` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n * @example\n *\n * _.isRegExp(/abc/);\n * // => true\n *\n * _.isRegExp('/abc/');\n * // => false\n */\n var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;\n\n /**\n * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754\n * double precision number which isn't the result of a rounded unsafe integer.\n *\n * **Note:** This method is based on\n * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.\n * @example\n *\n * _.isSafeInteger(3);\n * // => true\n *\n * _.isSafeInteger(Number.MIN_VALUE);\n * // => false\n *\n * _.isSafeInteger(Infinity);\n * // => false\n *\n * _.isSafeInteger('3');\n * // => false\n */\n function isSafeInteger(value) {\n return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;\n }\n\n /**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\n var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\n /**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */\n function isString(value) {\n return typeof value == 'string' ||\n (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);\n }\n\n /**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\n function isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n }\n\n /**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\n var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n /**\n * Checks if `value` is `undefined`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.\n * @example\n *\n * _.isUndefined(void 0);\n * // => true\n *\n * _.isUndefined(null);\n * // => false\n */\n function isUndefined(value) {\n return value === undefined;\n }\n\n /**\n * Checks if `value` is classified as a `WeakMap` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.\n * @example\n *\n * _.isWeakMap(new WeakMap);\n * // => true\n *\n * _.isWeakMap(new Map);\n * // => false\n */\n function isWeakMap(value) {\n return isObjectLike(value) && getTag(value) == weakMapTag;\n }\n\n /**\n * Checks if `value` is classified as a `WeakSet` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.\n * @example\n *\n * _.isWeakSet(new WeakSet);\n * // => true\n *\n * _.isWeakSet(new Set);\n * // => false\n */\n function isWeakSet(value) {\n return isObjectLike(value) && baseGetTag(value) == weakSetTag;\n }\n\n /**\n * Checks if `value` is less than `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than `other`,\n * else `false`.\n * @see _.gt\n * @example\n *\n * _.lt(1, 3);\n * // => true\n *\n * _.lt(3, 3);\n * // => false\n *\n * _.lt(3, 1);\n * // => false\n */\n var lt = createRelationalOperation(baseLt);\n\n /**\n * Checks if `value` is less than or equal to `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than or equal to\n * `other`, else `false`.\n * @see _.gte\n * @example\n *\n * _.lte(1, 3);\n * // => true\n *\n * _.lte(3, 3);\n * // => true\n *\n * _.lte(3, 1);\n * // => false\n */\n var lte = createRelationalOperation(function(value, other) {\n return value <= other;\n });\n\n /**\n * Converts `value` to an array.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Array} Returns the converted array.\n * @example\n *\n * _.toArray({ 'a': 1, 'b': 2 });\n * // => [1, 2]\n *\n * _.toArray('abc');\n * // => ['a', 'b', 'c']\n *\n * _.toArray(1);\n * // => []\n *\n * _.toArray(null);\n * // => []\n */\n function toArray(value) {\n if (!value) {\n return [];\n }\n if (isArrayLike(value)) {\n return isString(value) ? stringToArray(value) : copyArray(value);\n }\n if (symIterator && value[symIterator]) {\n return iteratorToArray(value[symIterator]());\n }\n var tag = getTag(value),\n func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);\n\n return func(value);\n }\n\n /**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\n function toFinite(value) {\n if (!value) {\n return value === 0 ? value : 0;\n }\n value = toNumber(value);\n if (value === INFINITY || value === -INFINITY) {\n var sign = (value < 0 ? -1 : 1);\n return sign * MAX_INTEGER;\n }\n return value === value ? value : 0;\n }\n\n /**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\n function toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n\n return result === result ? (remainder ? result - remainder : result) : 0;\n }\n\n /**\n * Converts `value` to an integer suitable for use as the length of an\n * array-like object.\n *\n * **Note:** This method is based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toLength(3.2);\n * // => 3\n *\n * _.toLength(Number.MIN_VALUE);\n * // => 0\n *\n * _.toLength(Infinity);\n * // => 4294967295\n *\n * _.toLength('3.2');\n * // => 3\n */\n function toLength(value) {\n return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;\n }\n\n /**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\n function toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n }\n\n /**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\n function toPlainObject(value) {\n return copyObject(value, keysIn(value));\n }\n\n /**\n * Converts `value` to a safe integer. A safe integer can be compared and\n * represented correctly.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toSafeInteger(3.2);\n * // => 3\n *\n * _.toSafeInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toSafeInteger(Infinity);\n * // => 9007199254740991\n *\n * _.toSafeInteger('3.2');\n * // => 3\n */\n function toSafeInteger(value) {\n return value\n ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)\n : (value === 0 ? value : 0);\n }\n\n /**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\n function toString(value) {\n return value == null ? '' : baseToString(value);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Assigns own enumerable string keyed properties of source objects to the\n * destination object. Source objects are applied from left to right.\n * Subsequent sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object` and is loosely based on\n * [`Object.assign`](https://mdn.io/Object/assign).\n *\n * @static\n * @memberOf _\n * @since 0.10.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.assignIn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * function Bar() {\n * this.c = 3;\n * }\n *\n * Foo.prototype.b = 2;\n * Bar.prototype.d = 4;\n *\n * _.assign({ 'a': 0 }, new Foo, new Bar);\n * // => { 'a': 1, 'c': 3 }\n */\n var assign = createAssigner(function(object, source) {\n if (isPrototype(source) || isArrayLike(source)) {\n copyObject(source, keys(source), object);\n return;\n }\n for (var key in source) {\n if (hasOwnProperty.call(source, key)) {\n assignValue(object, key, source[key]);\n }\n }\n });\n\n /**\n * This method is like `_.assign` except that it iterates over own and\n * inherited source properties.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias extend\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.assign\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * function Bar() {\n * this.c = 3;\n * }\n *\n * Foo.prototype.b = 2;\n * Bar.prototype.d = 4;\n *\n * _.assignIn({ 'a': 0 }, new Foo, new Bar);\n * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }\n */\n var assignIn = createAssigner(function(object, source) {\n copyObject(source, keysIn(source), object);\n });\n\n /**\n * This method is like `_.assignIn` except that it accepts `customizer`\n * which is invoked to produce the assigned values. If `customizer` returns\n * `undefined`, assignment is handled by the method instead. The `customizer`\n * is invoked with five arguments: (objValue, srcValue, key, object, source).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias extendWith\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @see _.assignWith\n * @example\n *\n * function customizer(objValue, srcValue) {\n * return _.isUndefined(objValue) ? srcValue : objValue;\n * }\n *\n * var defaults = _.partialRight(_.assignInWith, customizer);\n *\n * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {\n copyObject(source, keysIn(source), object, customizer);\n });\n\n /**\n * This method is like `_.assign` except that it accepts `customizer`\n * which is invoked to produce the assigned values. If `customizer` returns\n * `undefined`, assignment is handled by the method instead. The `customizer`\n * is invoked with five arguments: (objValue, srcValue, key, object, source).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @see _.assignInWith\n * @example\n *\n * function customizer(objValue, srcValue) {\n * return _.isUndefined(objValue) ? srcValue : objValue;\n * }\n *\n * var defaults = _.partialRight(_.assignWith, customizer);\n *\n * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n var assignWith = createAssigner(function(object, source, srcIndex, customizer) {\n copyObject(source, keys(source), object, customizer);\n });\n\n /**\n * Creates an array of values corresponding to `paths` of `object`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Array} Returns the picked values.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n *\n * _.at(object, ['a[0].b.c', 'a[1]']);\n * // => [3, 4]\n */\n var at = flatRest(baseAt);\n\n /**\n * Creates an object that inherits from the `prototype` object. If a\n * `properties` object is given, its own enumerable string keyed properties\n * are assigned to the created object.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Object\n * @param {Object} prototype The object to inherit from.\n * @param {Object} [properties] The properties to assign to the object.\n * @returns {Object} Returns the new object.\n * @example\n *\n * function Shape() {\n * this.x = 0;\n * this.y = 0;\n * }\n *\n * function Circle() {\n * Shape.call(this);\n * }\n *\n * Circle.prototype = _.create(Shape.prototype, {\n * 'constructor': Circle\n * });\n *\n * var circle = new Circle;\n * circle instanceof Circle;\n * // => true\n *\n * circle instanceof Shape;\n * // => true\n */\n function create(prototype, properties) {\n var result = baseCreate(prototype);\n return properties == null ? result : baseAssign(result, properties);\n }\n\n /**\n * Assigns own and inherited enumerable string keyed properties of source\n * objects to the destination object for all destination properties that\n * resolve to `undefined`. Source objects are applied from left to right.\n * Once a property is set, additional values of the same property are ignored.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaultsDeep\n * @example\n *\n * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n var defaults = baseRest(function(object, sources) {\n object = Object(object);\n\n var index = -1;\n var length = sources.length;\n var guard = length > 2 ? sources[2] : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n length = 1;\n }\n\n while (++index < length) {\n var source = sources[index];\n var props = keysIn(source);\n var propsIndex = -1;\n var propsLength = props.length;\n\n while (++propsIndex < propsLength) {\n var key = props[propsIndex];\n var value = object[key];\n\n if (value === undefined ||\n (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n object[key] = source[key];\n }\n }\n }\n\n return object;\n });\n\n /**\n * This method is like `_.defaults` except that it recursively assigns\n * default properties.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.10.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaults\n * @example\n *\n * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });\n * // => { 'a': { 'b': 2, 'c': 3 } }\n */\n var defaultsDeep = baseRest(function(args) {\n args.push(undefined, customDefaultsMerge);\n return apply(mergeWith, undefined, args);\n });\n\n /**\n * This method is like `_.find` except that it returns the key of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {string|undefined} Returns the key of the matched element,\n * else `undefined`.\n * @example\n *\n * var users = {\n * 'barney': { 'age': 36, 'active': true },\n * 'fred': { 'age': 40, 'active': false },\n * 'pebbles': { 'age': 1, 'active': true }\n * };\n *\n * _.findKey(users, function(o) { return o.age < 40; });\n * // => 'barney' (iteration order is not guaranteed)\n *\n * // The `_.matches` iteratee shorthand.\n * _.findKey(users, { 'age': 1, 'active': true });\n * // => 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findKey(users, ['active', false]);\n * // => 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.findKey(users, 'active');\n * // => 'barney'\n */\n function findKey(object, predicate) {\n return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);\n }\n\n /**\n * This method is like `_.findKey` except that it iterates over elements of\n * a collection in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {string|undefined} Returns the key of the matched element,\n * else `undefined`.\n * @example\n *\n * var users = {\n * 'barney': { 'age': 36, 'active': true },\n * 'fred': { 'age': 40, 'active': false },\n * 'pebbles': { 'age': 1, 'active': true }\n * };\n *\n * _.findLastKey(users, function(o) { return o.age < 40; });\n * // => returns 'pebbles' assuming `_.findKey` returns 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.findLastKey(users, { 'age': 36, 'active': true });\n * // => 'barney'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findLastKey(users, ['active', false]);\n * // => 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.findLastKey(users, 'active');\n * // => 'pebbles'\n */\n function findLastKey(object, predicate) {\n return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);\n }\n\n /**\n * Iterates over own and inherited enumerable string keyed properties of an\n * object and invokes `iteratee` for each property. The iteratee is invoked\n * with three arguments: (value, key, object). Iteratee functions may exit\n * iteration early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 0.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forInRight\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forIn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).\n */\n function forIn(object, iteratee) {\n return object == null\n ? object\n : baseFor(object, getIteratee(iteratee, 3), keysIn);\n }\n\n /**\n * This method is like `_.forIn` except that it iterates over properties of\n * `object` in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forIn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forInRight(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.\n */\n function forInRight(object, iteratee) {\n return object == null\n ? object\n : baseForRight(object, getIteratee(iteratee, 3), keysIn);\n }\n\n /**\n * Iterates over own enumerable string keyed properties of an object and\n * invokes `iteratee` for each property. The iteratee is invoked with three\n * arguments: (value, key, object). Iteratee functions may exit iteration\n * early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 0.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forOwnRight\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forOwn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\n function forOwn(object, iteratee) {\n return object && baseForOwn(object, getIteratee(iteratee, 3));\n }\n\n /**\n * This method is like `_.forOwn` except that it iterates over properties of\n * `object` in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forOwn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forOwnRight(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.\n */\n function forOwnRight(object, iteratee) {\n return object && baseForOwnRight(object, getIteratee(iteratee, 3));\n }\n\n /**\n * Creates an array of function property names from own enumerable properties\n * of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to inspect.\n * @returns {Array} Returns the function names.\n * @see _.functionsIn\n * @example\n *\n * function Foo() {\n * this.a = _.constant('a');\n * this.b = _.constant('b');\n * }\n *\n * Foo.prototype.c = _.constant('c');\n *\n * _.functions(new Foo);\n * // => ['a', 'b']\n */\n function functions(object) {\n return object == null ? [] : baseFunctions(object, keys(object));\n }\n\n /**\n * Creates an array of function property names from own and inherited\n * enumerable properties of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @returns {Array} Returns the function names.\n * @see _.functions\n * @example\n *\n * function Foo() {\n * this.a = _.constant('a');\n * this.b = _.constant('b');\n * }\n *\n * Foo.prototype.c = _.constant('c');\n *\n * _.functionsIn(new Foo);\n * // => ['a', 'b', 'c']\n */\n function functionsIn(object) {\n return object == null ? [] : baseFunctions(object, keysIn(object));\n }\n\n /**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\n function get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n }\n\n /**\n * Checks if `path` is a direct property of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = { 'a': { 'b': 2 } };\n * var other = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.has(object, 'a');\n * // => true\n *\n * _.has(object, 'a.b');\n * // => true\n *\n * _.has(object, ['a', 'b']);\n * // => true\n *\n * _.has(other, 'a');\n * // => false\n */\n function has(object, path) {\n return object != null && hasPath(object, path, baseHas);\n }\n\n /**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\n function hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n }\n\n /**\n * Creates an object composed of the inverted keys and values of `object`.\n * If `object` contains duplicate values, subsequent values overwrite\n * property assignments of previous values.\n *\n * @static\n * @memberOf _\n * @since 0.7.0\n * @category Object\n * @param {Object} object The object to invert.\n * @returns {Object} Returns the new inverted object.\n * @example\n *\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\n *\n * _.invert(object);\n * // => { '1': 'c', '2': 'b' }\n */\n var invert = createInverter(function(result, value, key) {\n if (value != null &&\n typeof value.toString != 'function') {\n value = nativeObjectToString.call(value);\n }\n\n result[value] = key;\n }, constant(identity));\n\n /**\n * This method is like `_.invert` except that the inverted object is generated\n * from the results of running each element of `object` thru `iteratee`. The\n * corresponding inverted value of each inverted key is an array of keys\n * responsible for generating the inverted value. The iteratee is invoked\n * with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.1.0\n * @category Object\n * @param {Object} object The object to invert.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Object} Returns the new inverted object.\n * @example\n *\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\n *\n * _.invertBy(object);\n * // => { '1': ['a', 'c'], '2': ['b'] }\n *\n * _.invertBy(object, function(value) {\n * return 'group' + value;\n * });\n * // => { 'group1': ['a', 'c'], 'group2': ['b'] }\n */\n var invertBy = createInverter(function(result, value, key) {\n if (value != null &&\n typeof value.toString != 'function') {\n value = nativeObjectToString.call(value);\n }\n\n if (hasOwnProperty.call(result, value)) {\n result[value].push(key);\n } else {\n result[value] = [key];\n }\n }, getIteratee);\n\n /**\n * Invokes the method at `path` of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the method to invoke.\n * @param {...*} [args] The arguments to invoke the method with.\n * @returns {*} Returns the result of the invoked method.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };\n *\n * _.invoke(object, 'a[0].b.c.slice', 1, 3);\n * // => [2, 3]\n */\n var invoke = baseRest(baseInvoke);\n\n /**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\n function keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n }\n\n /**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\n function keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n }\n\n /**\n * The opposite of `_.mapValues`; this method creates an object with the\n * same values as `object` and keys generated by running each own enumerable\n * string keyed property of `object` thru `iteratee`. The iteratee is invoked\n * with three arguments: (value, key, object).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @see _.mapValues\n * @example\n *\n * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {\n * return key + value;\n * });\n * // => { 'a1': 1, 'b2': 2 }\n */\n function mapKeys(object, iteratee) {\n var result = {};\n iteratee = getIteratee(iteratee, 3);\n\n baseForOwn(object, function(value, key, object) {\n baseAssignValue(result, iteratee(value, key, object), value);\n });\n return result;\n }\n\n /**\n * Creates an object with the same keys as `object` and values generated\n * by running each own enumerable string keyed property of `object` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, key, object).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @see _.mapKeys\n * @example\n *\n * var users = {\n * 'fred': { 'user': 'fred', 'age': 40 },\n * 'pebbles': { 'user': 'pebbles', 'age': 1 }\n * };\n *\n * _.mapValues(users, function(o) { return o.age; });\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n *\n * // The `_.property` iteratee shorthand.\n * _.mapValues(users, 'age');\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n */\n function mapValues(object, iteratee) {\n var result = {};\n iteratee = getIteratee(iteratee, 3);\n\n baseForOwn(object, function(value, key, object) {\n baseAssignValue(result, key, iteratee(value, key, object));\n });\n return result;\n }\n\n /**\n * This method is like `_.assign` except that it recursively merges own and\n * inherited enumerable string keyed properties of source objects into the\n * destination object. Source properties that resolve to `undefined` are\n * skipped if a destination value exists. Array and plain object properties\n * are merged recursively. Other objects and value types are overridden by\n * assignment. Source objects are applied from left to right. Subsequent\n * sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {\n * 'a': [{ 'b': 2 }, { 'd': 4 }]\n * };\n *\n * var other = {\n * 'a': [{ 'c': 3 }, { 'e': 5 }]\n * };\n *\n * _.merge(object, other);\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n */\n var merge = createAssigner(function(object, source, srcIndex) {\n baseMerge(object, source, srcIndex);\n });\n\n /**\n * This method is like `_.merge` except that it accepts `customizer` which\n * is invoked to produce the merged values of the destination and source\n * properties. If `customizer` returns `undefined`, merging is handled by the\n * method instead. The `customizer` is invoked with six arguments:\n * (objValue, srcValue, key, object, source, stack).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} customizer The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * function customizer(objValue, srcValue) {\n * if (_.isArray(objValue)) {\n * return objValue.concat(srcValue);\n * }\n * }\n *\n * var object = { 'a': [1], 'b': [2] };\n * var other = { 'a': [3], 'b': [4] };\n *\n * _.mergeWith(object, other, customizer);\n * // => { 'a': [1, 3], 'b': [2, 4] }\n */\n var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {\n baseMerge(object, source, srcIndex, customizer);\n });\n\n /**\n * The opposite of `_.pick`; this method creates an object composed of the\n * own and inherited enumerable property paths of `object` that are not omitted.\n *\n * **Note:** This method is considerably slower than `_.pick`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to omit.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.omit(object, ['a', 'c']);\n * // => { 'b': '2' }\n */\n var omit = flatRest(function(object, paths) {\n var result = {};\n if (object == null) {\n return result;\n }\n var isDeep = false;\n paths = arrayMap(paths, function(path) {\n path = castPath(path, object);\n isDeep || (isDeep = path.length > 1);\n return path;\n });\n copyObject(object, getAllKeysIn(object), result);\n if (isDeep) {\n result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);\n }\n var length = paths.length;\n while (length--) {\n baseUnset(result, paths[length]);\n }\n return result;\n });\n\n /**\n * The opposite of `_.pickBy`; this method creates an object composed of\n * the own and inherited enumerable string keyed properties of `object` that\n * `predicate` doesn't return truthy for. The predicate is invoked with two\n * arguments: (value, key).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The source object.\n * @param {Function} [predicate=_.identity] The function invoked per property.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.omitBy(object, _.isNumber);\n * // => { 'b': '2' }\n */\n function omitBy(object, predicate) {\n return pickBy(object, negate(getIteratee(predicate)));\n }\n\n /**\n * Creates an object composed of the picked `object` properties.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pick(object, ['a', 'c']);\n * // => { 'a': 1, 'c': 3 }\n */\n var pick = flatRest(function(object, paths) {\n return object == null ? {} : basePick(object, paths);\n });\n\n /**\n * Creates an object composed of the `object` properties `predicate` returns\n * truthy for. The predicate is invoked with two arguments: (value, key).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The source object.\n * @param {Function} [predicate=_.identity] The function invoked per property.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pickBy(object, _.isNumber);\n * // => { 'a': 1, 'c': 3 }\n */\n function pickBy(object, predicate) {\n if (object == null) {\n return {};\n }\n var props = arrayMap(getAllKeysIn(object), function(prop) {\n return [prop];\n });\n predicate = getIteratee(predicate);\n return basePickBy(object, props, function(value, path) {\n return predicate(value, path[0]);\n });\n }\n\n /**\n * This method is like `_.get` except that if the resolved value is a\n * function it's invoked with the `this` binding of its parent object and\n * its result is returned.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to resolve.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };\n *\n * _.result(object, 'a[0].b.c1');\n * // => 3\n *\n * _.result(object, 'a[0].b.c2');\n * // => 4\n *\n * _.result(object, 'a[0].b.c3', 'default');\n * // => 'default'\n *\n * _.result(object, 'a[0].b.c3', _.constant('default'));\n * // => 'default'\n */\n function result(object, path, defaultValue) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length;\n\n // Ensure the loop is entered when path is empty.\n if (!length) {\n length = 1;\n object = undefined;\n }\n while (++index < length) {\n var value = object == null ? undefined : object[toKey(path[index])];\n if (value === undefined) {\n index = length;\n value = defaultValue;\n }\n object = isFunction(value) ? value.call(object) : value;\n }\n return object;\n }\n\n /**\n * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,\n * it's created. Arrays are created for missing index properties while objects\n * are created for all other missing properties. Use `_.setWith` to customize\n * `path` creation.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.set(object, 'a[0].b.c', 4);\n * console.log(object.a[0].b.c);\n * // => 4\n *\n * _.set(object, ['x', '0', 'y', 'z'], 5);\n * console.log(object.x[0].y.z);\n * // => 5\n */\n function set(object, path, value) {\n return object == null ? object : baseSet(object, path, value);\n }\n\n /**\n * This method is like `_.set` except that it accepts `customizer` which is\n * invoked to produce the objects of `path`. If `customizer` returns `undefined`\n * path creation is handled by the method instead. The `customizer` is invoked\n * with three arguments: (nsValue, key, nsObject).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {};\n *\n * _.setWith(object, '[0][1]', 'a', Object);\n * // => { '0': { '1': 'a' } }\n */\n function setWith(object, path, value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return object == null ? object : baseSet(object, path, value, customizer);\n }\n\n /**\n * Creates an array of own enumerable string keyed-value pairs for `object`\n * which can be consumed by `_.fromPairs`. If `object` is a map or set, its\n * entries are returned.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias entries\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the key-value pairs.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.toPairs(new Foo);\n * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)\n */\n var toPairs = createToPairs(keys);\n\n /**\n * Creates an array of own and inherited enumerable string keyed-value pairs\n * for `object` which can be consumed by `_.fromPairs`. If `object` is a map\n * or set, its entries are returned.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias entriesIn\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the key-value pairs.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.toPairsIn(new Foo);\n * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)\n */\n var toPairsIn = createToPairs(keysIn);\n\n /**\n * An alternative to `_.reduce`; this method transforms `object` to a new\n * `accumulator` object which is the result of running each of its own\n * enumerable string keyed properties thru `iteratee`, with each invocation\n * potentially mutating the `accumulator` object. If `accumulator` is not\n * provided, a new object with the same `[[Prototype]]` will be used. The\n * iteratee is invoked with four arguments: (accumulator, value, key, object).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 1.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The custom accumulator value.\n * @returns {*} Returns the accumulated value.\n * @example\n *\n * _.transform([2, 3, 4], function(result, n) {\n * result.push(n *= n);\n * return n % 2 == 0;\n * }, []);\n * // => [4, 9]\n *\n * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n * (result[value] || (result[value] = [])).push(key);\n * }, {});\n * // => { '1': ['a', 'c'], '2': ['b'] }\n */\n function transform(object, iteratee, accumulator) {\n var isArr = isArray(object),\n isArrLike = isArr || isBuffer(object) || isTypedArray(object);\n\n iteratee = getIteratee(iteratee, 4);\n if (accumulator == null) {\n var Ctor = object && object.constructor;\n if (isArrLike) {\n accumulator = isArr ? new Ctor : [];\n }\n else if (isObject(object)) {\n accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};\n }\n else {\n accumulator = {};\n }\n }\n (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {\n return iteratee(accumulator, value, index, object);\n });\n return accumulator;\n }\n\n /**\n * Removes the property at `path` of `object`.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to unset.\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 7 } }] };\n * _.unset(object, 'a[0].b.c');\n * // => true\n *\n * console.log(object);\n * // => { 'a': [{ 'b': {} }] };\n *\n * _.unset(object, ['a', '0', 'b', 'c']);\n * // => true\n *\n * console.log(object);\n * // => { 'a': [{ 'b': {} }] };\n */\n function unset(object, path) {\n return object == null ? true : baseUnset(object, path);\n }\n\n /**\n * This method is like `_.set` except that accepts `updater` to produce the\n * value to set. Use `_.updateWith` to customize `path` creation. The `updater`\n * is invoked with one argument: (value).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {Function} updater The function to produce the updated value.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.update(object, 'a[0].b.c', function(n) { return n * n; });\n * console.log(object.a[0].b.c);\n * // => 9\n *\n * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });\n * console.log(object.x[0].y.z);\n * // => 0\n */\n function update(object, path, updater) {\n return object == null ? object : baseUpdate(object, path, castFunction(updater));\n }\n\n /**\n * This method is like `_.update` except that it accepts `customizer` which is\n * invoked to produce the objects of `path`. If `customizer` returns `undefined`\n * path creation is handled by the method instead. The `customizer` is invoked\n * with three arguments: (nsValue, key, nsObject).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {Function} updater The function to produce the updated value.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {};\n *\n * _.updateWith(object, '[0][1]', _.constant('a'), Object);\n * // => { '0': { '1': 'a' } }\n */\n function updateWith(object, path, updater, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);\n }\n\n /**\n * Creates an array of the own enumerable string keyed property values of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property values.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.values(new Foo);\n * // => [1, 2] (iteration order is not guaranteed)\n *\n * _.values('hi');\n * // => ['h', 'i']\n */\n function values(object) {\n return object == null ? [] : baseValues(object, keys(object));\n }\n\n /**\n * Creates an array of the own and inherited enumerable string keyed property\n * values of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property values.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.valuesIn(new Foo);\n * // => [1, 2, 3] (iteration order is not guaranteed)\n */\n function valuesIn(object) {\n return object == null ? [] : baseValues(object, keysIn(object));\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Clamps `number` within the inclusive `lower` and `upper` bounds.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Number\n * @param {number} number The number to clamp.\n * @param {number} [lower] The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the clamped number.\n * @example\n *\n * _.clamp(-10, -5, 5);\n * // => -5\n *\n * _.clamp(10, -5, 5);\n * // => 5\n */\n function clamp(number, lower, upper) {\n if (upper === undefined) {\n upper = lower;\n lower = undefined;\n }\n if (upper !== undefined) {\n upper = toNumber(upper);\n upper = upper === upper ? upper : 0;\n }\n if (lower !== undefined) {\n lower = toNumber(lower);\n lower = lower === lower ? lower : 0;\n }\n return baseClamp(toNumber(number), lower, upper);\n }\n\n /**\n * Checks if `n` is between `start` and up to, but not including, `end`. If\n * `end` is not specified, it's set to `start` with `start` then set to `0`.\n * If `start` is greater than `end` the params are swapped to support\n * negative ranges.\n *\n * @static\n * @memberOf _\n * @since 3.3.0\n * @category Number\n * @param {number} number The number to check.\n * @param {number} [start=0] The start of the range.\n * @param {number} end The end of the range.\n * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n * @see _.range, _.rangeRight\n * @example\n *\n * _.inRange(3, 2, 4);\n * // => true\n *\n * _.inRange(4, 8);\n * // => true\n *\n * _.inRange(4, 2);\n * // => false\n *\n * _.inRange(2, 2);\n * // => false\n *\n * _.inRange(1.2, 2);\n * // => true\n *\n * _.inRange(5.2, 4);\n * // => false\n *\n * _.inRange(-3, -2, -6);\n * // => true\n */\n function inRange(number, start, end) {\n start = toFinite(start);\n if (end === undefined) {\n end = start;\n start = 0;\n } else {\n end = toFinite(end);\n }\n number = toNumber(number);\n return baseInRange(number, start, end);\n }\n\n /**\n * Produces a random number between the inclusive `lower` and `upper` bounds.\n * If only one argument is provided a number between `0` and the given number\n * is returned. If `floating` is `true`, or either `lower` or `upper` are\n * floats, a floating-point number is returned instead of an integer.\n *\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\n * floating-point values which can produce unexpected results.\n *\n * @static\n * @memberOf _\n * @since 0.7.0\n * @category Number\n * @param {number} [lower=0] The lower bound.\n * @param {number} [upper=1] The upper bound.\n * @param {boolean} [floating] Specify returning a floating-point number.\n * @returns {number} Returns the random number.\n * @example\n *\n * _.random(0, 5);\n * // => an integer between 0 and 5\n *\n * _.random(5);\n * // => also an integer between 0 and 5\n *\n * _.random(5, true);\n * // => a floating-point number between 0 and 5\n *\n * _.random(1.2, 5.2);\n * // => a floating-point number between 1.2 and 5.2\n */\n function random(lower, upper, floating) {\n if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {\n upper = floating = undefined;\n }\n if (floating === undefined) {\n if (typeof upper == 'boolean') {\n floating = upper;\n upper = undefined;\n }\n else if (typeof lower == 'boolean') {\n floating = lower;\n lower = undefined;\n }\n }\n if (lower === undefined && upper === undefined) {\n lower = 0;\n upper = 1;\n }\n else {\n lower = toFinite(lower);\n if (upper === undefined) {\n upper = lower;\n lower = 0;\n } else {\n upper = toFinite(upper);\n }\n }\n if (lower > upper) {\n var temp = lower;\n lower = upper;\n upper = temp;\n }\n if (floating || lower % 1 || upper % 1) {\n var rand = nativeRandom();\n return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);\n }\n return baseRandom(lower, upper);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the camel cased string.\n * @example\n *\n * _.camelCase('Foo Bar');\n * // => 'fooBar'\n *\n * _.camelCase('--foo-bar--');\n * // => 'fooBar'\n *\n * _.camelCase('__FOO_BAR__');\n * // => 'fooBar'\n */\n var camelCase = createCompounder(function(result, word, index) {\n word = word.toLowerCase();\n return result + (index ? capitalize(word) : word);\n });\n\n /**\n * Converts the first character of `string` to upper case and the remaining\n * to lower case.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to capitalize.\n * @returns {string} Returns the capitalized string.\n * @example\n *\n * _.capitalize('FRED');\n * // => 'Fred'\n */\n function capitalize(string) {\n return upperFirst(toString(string).toLowerCase());\n }\n\n /**\n * Deburrs `string` by converting\n * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)\n * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)\n * letters to basic Latin letters and removing\n * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to deburr.\n * @returns {string} Returns the deburred string.\n * @example\n *\n * _.deburr('déjà vu');\n * // => 'deja vu'\n */\n function deburr(string) {\n string = toString(string);\n return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');\n }\n\n /**\n * Checks if `string` ends with the given target string.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {string} [target] The string to search for.\n * @param {number} [position=string.length] The position to search up to.\n * @returns {boolean} Returns `true` if `string` ends with `target`,\n * else `false`.\n * @example\n *\n * _.endsWith('abc', 'c');\n * // => true\n *\n * _.endsWith('abc', 'b');\n * // => false\n *\n * _.endsWith('abc', 'b', 2);\n * // => true\n */\n function endsWith(string, target, position) {\n string = toString(string);\n target = baseToString(target);\n\n var length = string.length;\n position = position === undefined\n ? length\n : baseClamp(toInteger(position), 0, length);\n\n var end = position;\n position -= target.length;\n return position >= 0 && string.slice(position, end) == target;\n }\n\n /**\n * Converts the characters \"&\", \"<\", \">\", '\"', and \"'\" in `string` to their\n * corresponding HTML entities.\n *\n * **Note:** No other characters are escaped. To escape additional\n * characters use a third-party library like [_he_](https://mths.be/he).\n *\n * Though the \">\" character is escaped for symmetry, characters like\n * \">\" and \"/\" don't need escaping in HTML and have no special meaning\n * unless they're part of a tag or unquoted attribute value. See\n * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)\n * (under \"semi-related fun fact\") for more details.\n *\n * When working with HTML you should always\n * [quote attribute values](http://wonko.com/post/html-escaping) to reduce\n * XSS vectors.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to escape.\n * @returns {string} Returns the escaped string.\n * @example\n *\n * _.escape('fred, barney, & pebbles');\n * // => 'fred, barney, & pebbles'\n */\n function escape(string) {\n string = toString(string);\n return (string && reHasUnescapedHtml.test(string))\n ? string.replace(reUnescapedHtml, escapeHtmlChar)\n : string;\n }\n\n /**\n * Escapes the `RegExp` special characters \"^\", \"$\", \"\\\", \".\", \"*\", \"+\",\n * \"?\", \"(\", \")\", \"[\", \"]\", \"{\", \"}\", and \"|\" in `string`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to escape.\n * @returns {string} Returns the escaped string.\n * @example\n *\n * _.escapeRegExp('[lodash](https://lodash.com/)');\n * // => '\\[lodash\\]\\(https://lodash\\.com/\\)'\n */\n function escapeRegExp(string) {\n string = toString(string);\n return (string && reHasRegExpChar.test(string))\n ? string.replace(reRegExpChar, '\\\\$&')\n : string;\n }\n\n /**\n * Converts `string` to\n * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the kebab cased string.\n * @example\n *\n * _.kebabCase('Foo Bar');\n * // => 'foo-bar'\n *\n * _.kebabCase('fooBar');\n * // => 'foo-bar'\n *\n * _.kebabCase('__FOO_BAR__');\n * // => 'foo-bar'\n */\n var kebabCase = createCompounder(function(result, word, index) {\n return result + (index ? '-' : '') + word.toLowerCase();\n });\n\n /**\n * Converts `string`, as space separated words, to lower case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the lower cased string.\n * @example\n *\n * _.lowerCase('--Foo-Bar--');\n * // => 'foo bar'\n *\n * _.lowerCase('fooBar');\n * // => 'foo bar'\n *\n * _.lowerCase('__FOO_BAR__');\n * // => 'foo bar'\n */\n var lowerCase = createCompounder(function(result, word, index) {\n return result + (index ? ' ' : '') + word.toLowerCase();\n });\n\n /**\n * Converts the first character of `string` to lower case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.lowerFirst('Fred');\n * // => 'fred'\n *\n * _.lowerFirst('FRED');\n * // => 'fRED'\n */\n var lowerFirst = createCaseFirst('toLowerCase');\n\n /**\n * Pads `string` on the left and right sides if it's shorter than `length`.\n * Padding characters are truncated if they can't be evenly divided by `length`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.pad('abc', 8);\n * // => ' abc '\n *\n * _.pad('abc', 8, '_-');\n * // => '_-abc_-_'\n *\n * _.pad('abc', 3);\n * // => 'abc'\n */\n function pad(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n if (!length || strLength >= length) {\n return string;\n }\n var mid = (length - strLength) / 2;\n return (\n createPadding(nativeFloor(mid), chars) +\n string +\n createPadding(nativeCeil(mid), chars)\n );\n }\n\n /**\n * Pads `string` on the right side if it's shorter than `length`. Padding\n * characters are truncated if they exceed `length`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.padEnd('abc', 6);\n * // => 'abc '\n *\n * _.padEnd('abc', 6, '_-');\n * // => 'abc_-_'\n *\n * _.padEnd('abc', 3);\n * // => 'abc'\n */\n function padEnd(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n return (length && strLength < length)\n ? (string + createPadding(length - strLength, chars))\n : string;\n }\n\n /**\n * Pads `string` on the left side if it's shorter than `length`. Padding\n * characters are truncated if they exceed `length`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.padStart('abc', 6);\n * // => ' abc'\n *\n * _.padStart('abc', 6, '_-');\n * // => '_-_abc'\n *\n * _.padStart('abc', 3);\n * // => 'abc'\n */\n function padStart(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n return (length && strLength < length)\n ? (createPadding(length - strLength, chars) + string)\n : string;\n }\n\n /**\n * Converts `string` to an integer of the specified radix. If `radix` is\n * `undefined` or `0`, a `radix` of `10` is used unless `value` is a\n * hexadecimal, in which case a `radix` of `16` is used.\n *\n * **Note:** This method aligns with the\n * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category String\n * @param {string} string The string to convert.\n * @param {number} [radix=10] The radix to interpret `value` by.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.parseInt('08');\n * // => 8\n *\n * _.map(['6', '08', '10'], _.parseInt);\n * // => [6, 8, 10]\n */\n function parseInt(string, radix, guard) {\n if (guard || radix == null) {\n radix = 0;\n } else if (radix) {\n radix = +radix;\n }\n return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);\n }\n\n /**\n * Repeats the given string `n` times.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to repeat.\n * @param {number} [n=1] The number of times to repeat the string.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {string} Returns the repeated string.\n * @example\n *\n * _.repeat('*', 3);\n * // => '***'\n *\n * _.repeat('abc', 2);\n * // => 'abcabc'\n *\n * _.repeat('abc', 0);\n * // => ''\n */\n function repeat(string, n, guard) {\n if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {\n n = 1;\n } else {\n n = toInteger(n);\n }\n return baseRepeat(toString(string), n);\n }\n\n /**\n * Replaces matches for `pattern` in `string` with `replacement`.\n *\n * **Note:** This method is based on\n * [`String#replace`](https://mdn.io/String/replace).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to modify.\n * @param {RegExp|string} pattern The pattern to replace.\n * @param {Function|string} replacement The match replacement.\n * @returns {string} Returns the modified string.\n * @example\n *\n * _.replace('Hi Fred', 'Fred', 'Barney');\n * // => 'Hi Barney'\n */\n function replace() {\n var args = arguments,\n string = toString(args[0]);\n\n return args.length < 3 ? string : string.replace(args[1], args[2]);\n }\n\n /**\n * Converts `string` to\n * [snake case](https://en.wikipedia.org/wiki/Snake_case).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the snake cased string.\n * @example\n *\n * _.snakeCase('Foo Bar');\n * // => 'foo_bar'\n *\n * _.snakeCase('fooBar');\n * // => 'foo_bar'\n *\n * _.snakeCase('--FOO-BAR--');\n * // => 'foo_bar'\n */\n var snakeCase = createCompounder(function(result, word, index) {\n return result + (index ? '_' : '') + word.toLowerCase();\n });\n\n /**\n * Splits `string` by `separator`.\n *\n * **Note:** This method is based on\n * [`String#split`](https://mdn.io/String/split).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to split.\n * @param {RegExp|string} separator The separator pattern to split by.\n * @param {number} [limit] The length to truncate results to.\n * @returns {Array} Returns the string segments.\n * @example\n *\n * _.split('a-b-c', '-', 2);\n * // => ['a', 'b']\n */\n function split(string, separator, limit) {\n if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {\n separator = limit = undefined;\n }\n limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;\n if (!limit) {\n return [];\n }\n string = toString(string);\n if (string && (\n typeof separator == 'string' ||\n (separator != null && !isRegExp(separator))\n )) {\n separator = baseToString(separator);\n if (!separator && hasUnicode(string)) {\n return castSlice(stringToArray(string), 0, limit);\n }\n }\n return string.split(separator, limit);\n }\n\n /**\n * Converts `string` to\n * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).\n *\n * @static\n * @memberOf _\n * @since 3.1.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the start cased string.\n * @example\n *\n * _.startCase('--foo-bar--');\n * // => 'Foo Bar'\n *\n * _.startCase('fooBar');\n * // => 'Foo Bar'\n *\n * _.startCase('__FOO_BAR__');\n * // => 'FOO BAR'\n */\n var startCase = createCompounder(function(result, word, index) {\n return result + (index ? ' ' : '') + upperFirst(word);\n });\n\n /**\n * Checks if `string` starts with the given target string.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {string} [target] The string to search for.\n * @param {number} [position=0] The position to search from.\n * @returns {boolean} Returns `true` if `string` starts with `target`,\n * else `false`.\n * @example\n *\n * _.startsWith('abc', 'a');\n * // => true\n *\n * _.startsWith('abc', 'b');\n * // => false\n *\n * _.startsWith('abc', 'b', 1);\n * // => true\n */\n function startsWith(string, target, position) {\n string = toString(string);\n position = position == null\n ? 0\n : baseClamp(toInteger(position), 0, string.length);\n\n target = baseToString(target);\n return string.slice(position, position + target.length) == target;\n }\n\n /**\n * Creates a compiled template function that can interpolate data properties\n * in \"interpolate\" delimiters, HTML-escape interpolated data properties in\n * \"escape\" delimiters, and execute JavaScript in \"evaluate\" delimiters. Data\n * properties may be accessed as free variables in the template. If a setting\n * object is given, it takes precedence over `_.templateSettings` values.\n *\n * **Note:** In the development build `_.template` utilizes\n * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)\n * for easier debugging.\n *\n * For more information on precompiling templates see\n * [lodash's custom builds documentation](https://lodash.com/custom-builds).\n *\n * For more information on Chrome extension sandboxes see\n * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category String\n * @param {string} [string=''] The template string.\n * @param {Object} [options={}] The options object.\n * @param {RegExp} [options.escape=_.templateSettings.escape]\n * The HTML \"escape\" delimiter.\n * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]\n * The \"evaluate\" delimiter.\n * @param {Object} [options.imports=_.templateSettings.imports]\n * An object to import into the template as free variables.\n * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]\n * The \"interpolate\" delimiter.\n * @param {string} [options.sourceURL='lodash.templateSources[n]']\n * The sourceURL of the compiled template.\n * @param {string} [options.variable='obj']\n * The data object variable name.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the compiled template function.\n * @example\n *\n * // Use the \"interpolate\" delimiter to create a compiled template.\n * var compiled = _.template('hello <%= user %>!');\n * compiled({ 'user': 'fred' });\n * // => 'hello fred!'\n *\n * // Use the HTML \"escape\" delimiter to escape data property values.\n * var compiled = _.template('<b><%- value %></b>');\n * compiled({ 'value': '<script>' });\n * // => '<b><script></b>'\n *\n * // Use the \"evaluate\" delimiter to execute JavaScript and generate HTML.\n * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');\n * compiled({ 'users': ['fred', 'barney'] });\n * // => '<li>fred</li><li>barney</li>'\n *\n * // Use the internal `print` function in \"evaluate\" delimiters.\n * var compiled = _.template('<% print(\"hello \" + user); %>!');\n * compiled({ 'user': 'barney' });\n * // => 'hello barney!'\n *\n * // Use the ES template literal delimiter as an \"interpolate\" delimiter.\n * // Disable support by replacing the \"interpolate\" delimiter.\n * var compiled = _.template('hello ${ user }!');\n * compiled({ 'user': 'pebbles' });\n * // => 'hello pebbles!'\n *\n * // Use backslashes to treat delimiters as plain text.\n * var compiled = _.template('<%= \"\\\\<%- value %\\\\>\" %>');\n * compiled({ 'value': 'ignored' });\n * // => '<%- value %>'\n *\n * // Use the `imports` option to import `jQuery` as `jq`.\n * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';\n * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });\n * compiled({ 'users': ['fred', 'barney'] });\n * // => '<li>fred</li><li>barney</li>'\n *\n * // Use the `sourceURL` option to specify a custom sourceURL for the template.\n * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });\n * compiled(data);\n * // => Find the source of \"greeting.jst\" under the Sources tab or Resources panel of the web inspector.\n *\n * // Use the `variable` option to ensure a with-statement isn't used in the compiled template.\n * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });\n * compiled.source;\n * // => function(data) {\n * // var __t, __p = '';\n * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';\n * // return __p;\n * // }\n *\n * // Use custom template delimiters.\n * _.templateSettings.interpolate = /{{([\\s\\S]+?)}}/g;\n * var compiled = _.template('hello {{ user }}!');\n * compiled({ 'user': 'mustache' });\n * // => 'hello mustache!'\n *\n * // Use the `source` property to inline compiled templates for meaningful\n * // line numbers in error messages and stack traces.\n * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\\\n * var JST = {\\\n * \"main\": ' + _.template(mainText).source + '\\\n * };\\\n * ');\n */\n function template(string, options, guard) {\n // Based on John Resig's `tmpl` implementation\n // (http://ejohn.org/blog/javascript-micro-templating/)\n // and Laura Doktorova's doT.js (https://github.com/olado/doT).\n var settings = lodash.templateSettings;\n\n if (guard && isIterateeCall(string, options, guard)) {\n options = undefined;\n }\n string = toString(string);\n options = assignInWith({}, options, settings, customDefaultsAssignIn);\n\n var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn),\n importsKeys = keys(imports),\n importsValues = baseValues(imports, importsKeys);\n\n var isEscaping,\n isEvaluating,\n index = 0,\n interpolate = options.interpolate || reNoMatch,\n source = \"__p += '\";\n\n // Compile the regexp to match each delimiter.\n var reDelimiters = RegExp(\n (options.escape || reNoMatch).source + '|' +\n interpolate.source + '|' +\n (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +\n (options.evaluate || reNoMatch).source + '|$'\n , 'g');\n\n // Use a sourceURL for easier debugging.\n // The sourceURL gets injected into the source that's eval-ed, so be careful\n // to normalize all kinds of whitespace, so e.g. newlines (and unicode versions of it) can't sneak in\n // and escape the comment, thus injecting code that gets evaled.\n var sourceURL = '//# sourceURL=' +\n (hasOwnProperty.call(options, 'sourceURL')\n ? (options.sourceURL + '').replace(/\\s/g, ' ')\n : ('lodash.templateSources[' + (++templateCounter) + ']')\n ) + '\\n';\n\n string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {\n interpolateValue || (interpolateValue = esTemplateValue);\n\n // Escape characters that can't be included in string literals.\n source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);\n\n // Replace delimiters with snippets.\n if (escapeValue) {\n isEscaping = true;\n source += \"' +\\n__e(\" + escapeValue + \") +\\n'\";\n }\n if (evaluateValue) {\n isEvaluating = true;\n source += \"';\\n\" + evaluateValue + \";\\n__p += '\";\n }\n if (interpolateValue) {\n source += \"' +\\n((__t = (\" + interpolateValue + \")) == null ? '' : __t) +\\n'\";\n }\n index = offset + match.length;\n\n // The JS engine embedded in Adobe products needs `match` returned in\n // order to produce the correct `offset` value.\n return match;\n });\n\n source += \"';\\n\";\n\n // If `variable` is not specified wrap a with-statement around the generated\n // code to add the data object to the top of the scope chain.\n var variable = hasOwnProperty.call(options, 'variable') && options.variable;\n if (!variable) {\n source = 'with (obj) {\\n' + source + '\\n}\\n';\n }\n // Throw an error if a forbidden character was found in `variable`, to prevent\n // potential command injection attacks.\n else if (reForbiddenIdentifierChars.test(variable)) {\n throw new Error(INVALID_TEMPL_VAR_ERROR_TEXT);\n }\n\n // Cleanup code by stripping empty strings.\n source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)\n .replace(reEmptyStringMiddle, '$1')\n .replace(reEmptyStringTrailing, '$1;');\n\n // Frame code as the function body.\n source = 'function(' + (variable || 'obj') + ') {\\n' +\n (variable\n ? ''\n : 'obj || (obj = {});\\n'\n ) +\n \"var __t, __p = ''\" +\n (isEscaping\n ? ', __e = _.escape'\n : ''\n ) +\n (isEvaluating\n ? ', __j = Array.prototype.join;\\n' +\n \"function print() { __p += __j.call(arguments, '') }\\n\"\n : ';\\n'\n ) +\n source +\n 'return __p\\n}';\n\n var result = attempt(function() {\n return Function(importsKeys, sourceURL + 'return ' + source)\n .apply(undefined, importsValues);\n });\n\n // Provide the compiled function's source by its `toString` method or\n // the `source` property as a convenience for inlining compiled templates.\n result.source = source;\n if (isError(result)) {\n throw result;\n }\n return result;\n }\n\n /**\n * Converts `string`, as a whole, to lower case just like\n * [String#toLowerCase](https://mdn.io/toLowerCase).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the lower cased string.\n * @example\n *\n * _.toLower('--Foo-Bar--');\n * // => '--foo-bar--'\n *\n * _.toLower('fooBar');\n * // => 'foobar'\n *\n * _.toLower('__FOO_BAR__');\n * // => '__foo_bar__'\n */\n function toLower(value) {\n return toString(value).toLowerCase();\n }\n\n /**\n * Converts `string`, as a whole, to upper case just like\n * [String#toUpperCase](https://mdn.io/toUpperCase).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the upper cased string.\n * @example\n *\n * _.toUpper('--foo-bar--');\n * // => '--FOO-BAR--'\n *\n * _.toUpper('fooBar');\n * // => 'FOOBAR'\n *\n * _.toUpper('__foo_bar__');\n * // => '__FOO_BAR__'\n */\n function toUpper(value) {\n return toString(value).toUpperCase();\n }\n\n /**\n * Removes leading and trailing whitespace or specified characters from `string`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to trim.\n * @param {string} [chars=whitespace] The characters to trim.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {string} Returns the trimmed string.\n * @example\n *\n * _.trim(' abc ');\n * // => 'abc'\n *\n * _.trim('-_-abc-_-', '_-');\n * // => 'abc'\n *\n * _.map([' foo ', ' bar '], _.trim);\n * // => ['foo', 'bar']\n */\n function trim(string, chars, guard) {\n string = toString(string);\n if (string && (guard || chars === undefined)) {\n return baseTrim(string);\n }\n if (!string || !(chars = baseToString(chars))) {\n return string;\n }\n var strSymbols = stringToArray(string),\n chrSymbols = stringToArray(chars),\n start = charsStartIndex(strSymbols, chrSymbols),\n end = charsEndIndex(strSymbols, chrSymbols) + 1;\n\n return castSlice(strSymbols, start, end).join('');\n }\n\n /**\n * Removes trailing whitespace or specified characters from `string`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to trim.\n * @param {string} [chars=whitespace] The characters to trim.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {string} Returns the trimmed string.\n * @example\n *\n * _.trimEnd(' abc ');\n * // => ' abc'\n *\n * _.trimEnd('-_-abc-_-', '_-');\n * // => '-_-abc'\n */\n function trimEnd(string, chars, guard) {\n string = toString(string);\n if (string && (guard || chars === undefined)) {\n return string.slice(0, trimmedEndIndex(string) + 1);\n }\n if (!string || !(chars = baseToString(chars))) {\n return string;\n }\n var strSymbols = stringToArray(string),\n end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;\n\n return castSlice(strSymbols, 0, end).join('');\n }\n\n /**\n * Removes leading whitespace or specified characters from `string`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to trim.\n * @param {string} [chars=whitespace] The characters to trim.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {string} Returns the trimmed string.\n * @example\n *\n * _.trimStart(' abc ');\n * // => 'abc '\n *\n * _.trimStart('-_-abc-_-', '_-');\n * // => 'abc-_-'\n */\n function trimStart(string, chars, guard) {\n string = toString(string);\n if (string && (guard || chars === undefined)) {\n return string.replace(reTrimStart, '');\n }\n if (!string || !(chars = baseToString(chars))) {\n return string;\n }\n var strSymbols = stringToArray(string),\n start = charsStartIndex(strSymbols, stringToArray(chars));\n\n return castSlice(strSymbols, start).join('');\n }\n\n /**\n * Truncates `string` if it's longer than the given maximum string length.\n * The last characters of the truncated string are replaced with the omission\n * string which defaults to \"...\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to truncate.\n * @param {Object} [options={}] The options object.\n * @param {number} [options.length=30] The maximum string length.\n * @param {string} [options.omission='...'] The string to indicate text is omitted.\n * @param {RegExp|string} [options.separator] The separator pattern to truncate to.\n * @returns {string} Returns the truncated string.\n * @example\n *\n * _.truncate('hi-diddly-ho there, neighborino');\n * // => 'hi-diddly-ho there, neighbo...'\n *\n * _.truncate('hi-diddly-ho there, neighborino', {\n * 'length': 24,\n * 'separator': ' '\n * });\n * // => 'hi-diddly-ho there,...'\n *\n * _.truncate('hi-diddly-ho there, neighborino', {\n * 'length': 24,\n * 'separator': /,? +/\n * });\n * // => 'hi-diddly-ho there...'\n *\n * _.truncate('hi-diddly-ho there, neighborino', {\n * 'omission': ' [...]'\n * });\n * // => 'hi-diddly-ho there, neig [...]'\n */\n function truncate(string, options) {\n var length = DEFAULT_TRUNC_LENGTH,\n omission = DEFAULT_TRUNC_OMISSION;\n\n if (isObject(options)) {\n var separator = 'separator' in options ? options.separator : separator;\n length = 'length' in options ? toInteger(options.length) : length;\n omission = 'omission' in options ? baseToString(options.omission) : omission;\n }\n string = toString(string);\n\n var strLength = string.length;\n if (hasUnicode(string)) {\n var strSymbols = stringToArray(string);\n strLength = strSymbols.length;\n }\n if (length >= strLength) {\n return string;\n }\n var end = length - stringSize(omission);\n if (end < 1) {\n return omission;\n }\n var result = strSymbols\n ? castSlice(strSymbols, 0, end).join('')\n : string.slice(0, end);\n\n if (separator === undefined) {\n return result + omission;\n }\n if (strSymbols) {\n end += (result.length - end);\n }\n if (isRegExp(separator)) {\n if (string.slice(end).search(separator)) {\n var match,\n substring = result;\n\n if (!separator.global) {\n separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g');\n }\n separator.lastIndex = 0;\n while ((match = separator.exec(substring))) {\n var newEnd = match.index;\n }\n result = result.slice(0, newEnd === undefined ? end : newEnd);\n }\n } else if (string.indexOf(baseToString(separator), end) != end) {\n var index = result.lastIndexOf(separator);\n if (index > -1) {\n result = result.slice(0, index);\n }\n }\n return result + omission;\n }\n\n /**\n * The inverse of `_.escape`; this method converts the HTML entities\n * `&`, `<`, `>`, `"`, and `'` in `string` to\n * their corresponding characters.\n *\n * **Note:** No other HTML entities are unescaped. To unescape additional\n * HTML entities use a third-party library like [_he_](https://mths.be/he).\n *\n * @static\n * @memberOf _\n * @since 0.6.0\n * @category String\n * @param {string} [string=''] The string to unescape.\n * @returns {string} Returns the unescaped string.\n * @example\n *\n * _.unescape('fred, barney, & pebbles');\n * // => 'fred, barney, & pebbles'\n */\n function unescape(string) {\n string = toString(string);\n return (string && reHasEscapedHtml.test(string))\n ? string.replace(reEscapedHtml, unescapeHtmlChar)\n : string;\n }\n\n /**\n * Converts `string`, as space separated words, to upper case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the upper cased string.\n * @example\n *\n * _.upperCase('--foo-bar');\n * // => 'FOO BAR'\n *\n * _.upperCase('fooBar');\n * // => 'FOO BAR'\n *\n * _.upperCase('__foo_bar__');\n * // => 'FOO BAR'\n */\n var upperCase = createCompounder(function(result, word, index) {\n return result + (index ? ' ' : '') + word.toUpperCase();\n });\n\n /**\n * Converts the first character of `string` to upper case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.upperFirst('fred');\n * // => 'Fred'\n *\n * _.upperFirst('FRED');\n * // => 'FRED'\n */\n var upperFirst = createCaseFirst('toUpperCase');\n\n /**\n * Splits `string` into an array of its words.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {RegExp|string} [pattern] The pattern to match words.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the words of `string`.\n * @example\n *\n * _.words('fred, barney, & pebbles');\n * // => ['fred', 'barney', 'pebbles']\n *\n * _.words('fred, barney, & pebbles', /[^, ]+/g);\n * // => ['fred', 'barney', '&', 'pebbles']\n */\n function words(string, pattern, guard) {\n string = toString(string);\n pattern = guard ? undefined : pattern;\n\n if (pattern === undefined) {\n return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);\n }\n return string.match(pattern) || [];\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Attempts to invoke `func`, returning either the result or the caught error\n * object. Any additional arguments are provided to `func` when it's invoked.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Util\n * @param {Function} func The function to attempt.\n * @param {...*} [args] The arguments to invoke `func` with.\n * @returns {*} Returns the `func` result or error object.\n * @example\n *\n * // Avoid throwing errors for invalid selectors.\n * var elements = _.attempt(function(selector) {\n * return document.querySelectorAll(selector);\n * }, '>_>');\n *\n * if (_.isError(elements)) {\n * elements = [];\n * }\n */\n var attempt = baseRest(function(func, args) {\n try {\n return apply(func, undefined, args);\n } catch (e) {\n return isError(e) ? e : new Error(e);\n }\n });\n\n /**\n * Binds methods of an object to the object itself, overwriting the existing\n * method.\n *\n * **Note:** This method doesn't set the \"length\" property of bound functions.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {Object} object The object to bind and assign the bound methods to.\n * @param {...(string|string[])} methodNames The object method names to bind.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var view = {\n * 'label': 'docs',\n * 'click': function() {\n * console.log('clicked ' + this.label);\n * }\n * };\n *\n * _.bindAll(view, ['click']);\n * jQuery(element).on('click', view.click);\n * // => Logs 'clicked docs' when clicked.\n */\n var bindAll = flatRest(function(object, methodNames) {\n arrayEach(methodNames, function(key) {\n key = toKey(key);\n baseAssignValue(object, key, bind(object[key], object));\n });\n return object;\n });\n\n /**\n * Creates a function that iterates over `pairs` and invokes the corresponding\n * function of the first predicate to return truthy. The predicate-function\n * pairs are invoked with the `this` binding and arguments of the created\n * function.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {Array} pairs The predicate-function pairs.\n * @returns {Function} Returns the new composite function.\n * @example\n *\n * var func = _.cond([\n * [_.matches({ 'a': 1 }), _.constant('matches A')],\n * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],\n * [_.stubTrue, _.constant('no match')]\n * ]);\n *\n * func({ 'a': 1, 'b': 2 });\n * // => 'matches A'\n *\n * func({ 'a': 0, 'b': 1 });\n * // => 'matches B'\n *\n * func({ 'a': '1', 'b': '2' });\n * // => 'no match'\n */\n function cond(pairs) {\n var length = pairs == null ? 0 : pairs.length,\n toIteratee = getIteratee();\n\n pairs = !length ? [] : arrayMap(pairs, function(pair) {\n if (typeof pair[1] != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return [toIteratee(pair[0]), pair[1]];\n });\n\n return baseRest(function(args) {\n var index = -1;\n while (++index < length) {\n var pair = pairs[index];\n if (apply(pair[0], this, args)) {\n return apply(pair[1], this, args);\n }\n }\n });\n }\n\n /**\n * Creates a function that invokes the predicate properties of `source` with\n * the corresponding property values of a given object, returning `true` if\n * all predicates return truthy, else `false`.\n *\n * **Note:** The created function is equivalent to `_.conformsTo` with\n * `source` partially applied.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {Object} source The object of property predicates to conform to.\n * @returns {Function} Returns the new spec function.\n * @example\n *\n * var objects = [\n * { 'a': 2, 'b': 1 },\n * { 'a': 1, 'b': 2 }\n * ];\n *\n * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } }));\n * // => [{ 'a': 1, 'b': 2 }]\n */\n function conforms(source) {\n return baseConforms(baseClone(source, CLONE_DEEP_FLAG));\n }\n\n /**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\n function constant(value) {\n return function() {\n return value;\n };\n }\n\n /**\n * Checks `value` to determine whether a default value should be returned in\n * its place. The `defaultValue` is returned if `value` is `NaN`, `null`,\n * or `undefined`.\n *\n * @static\n * @memberOf _\n * @since 4.14.0\n * @category Util\n * @param {*} value The value to check.\n * @param {*} defaultValue The default value.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * _.defaultTo(1, 10);\n * // => 1\n *\n * _.defaultTo(undefined, 10);\n * // => 10\n */\n function defaultTo(value, defaultValue) {\n return (value == null || value !== value) ? defaultValue : value;\n }\n\n /**\n * Creates a function that returns the result of invoking the given functions\n * with the `this` binding of the created function, where each successive\n * invocation is supplied the return value of the previous.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Util\n * @param {...(Function|Function[])} [funcs] The functions to invoke.\n * @returns {Function} Returns the new composite function.\n * @see _.flowRight\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var addSquare = _.flow([_.add, square]);\n * addSquare(1, 2);\n * // => 9\n */\n var flow = createFlow();\n\n /**\n * This method is like `_.flow` except that it creates a function that\n * invokes the given functions from right to left.\n *\n * @static\n * @since 3.0.0\n * @memberOf _\n * @category Util\n * @param {...(Function|Function[])} [funcs] The functions to invoke.\n * @returns {Function} Returns the new composite function.\n * @see _.flow\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var addSquare = _.flowRight([square, _.add]);\n * addSquare(1, 2);\n * // => 9\n */\n var flowRight = createFlow(true);\n\n /**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\n function identity(value) {\n return value;\n }\n\n /**\n * Creates a function that invokes `func` with the arguments of the created\n * function. If `func` is a property name, the created function returns the\n * property value for a given element. If `func` is an array or object, the\n * created function returns `true` for elements that contain the equivalent\n * source properties, otherwise it returns `false`.\n *\n * @static\n * @since 4.0.0\n * @memberOf _\n * @category Util\n * @param {*} [func=_.identity] The value to convert to a callback.\n * @returns {Function} Returns the callback.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));\n * // => [{ 'user': 'barney', 'age': 36, 'active': true }]\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.filter(users, _.iteratee(['user', 'fred']));\n * // => [{ 'user': 'fred', 'age': 40 }]\n *\n * // The `_.property` iteratee shorthand.\n * _.map(users, _.iteratee('user'));\n * // => ['barney', 'fred']\n *\n * // Create custom iteratee shorthands.\n * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {\n * return !_.isRegExp(func) ? iteratee(func) : function(string) {\n * return func.test(string);\n * };\n * });\n *\n * _.filter(['abc', 'def'], /ef/);\n * // => ['def']\n */\n function iteratee(func) {\n return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));\n }\n\n /**\n * Creates a function that performs a partial deep comparison between a given\n * object and `source`, returning `true` if the given object has equivalent\n * property values, else `false`.\n *\n * **Note:** The created function is equivalent to `_.isMatch` with `source`\n * partially applied.\n *\n * Partial comparisons will match empty array and empty object `source`\n * values against any array or object value, respectively. See `_.isEqual`\n * for a list of supported value comparisons.\n *\n * **Note:** Multiple values can be checked by combining several matchers\n * using `_.overSome`\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Util\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n * @example\n *\n * var objects = [\n * { 'a': 1, 'b': 2, 'c': 3 },\n * { 'a': 4, 'b': 5, 'c': 6 }\n * ];\n *\n * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));\n * // => [{ 'a': 4, 'b': 5, 'c': 6 }]\n *\n * // Checking for several possible values\n * _.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })]));\n * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]\n */\n function matches(source) {\n return baseMatches(baseClone(source, CLONE_DEEP_FLAG));\n }\n\n /**\n * Creates a function that performs a partial deep comparison between the\n * value at `path` of a given object to `srcValue`, returning `true` if the\n * object value is equivalent, else `false`.\n *\n * **Note:** Partial comparisons will match empty array and empty object\n * `srcValue` values against any array or object value, respectively. See\n * `_.isEqual` for a list of supported value comparisons.\n *\n * **Note:** Multiple values can be checked by combining several matchers\n * using `_.overSome`\n *\n * @static\n * @memberOf _\n * @since 3.2.0\n * @category Util\n * @param {Array|string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n * @example\n *\n * var objects = [\n * { 'a': 1, 'b': 2, 'c': 3 },\n * { 'a': 4, 'b': 5, 'c': 6 }\n * ];\n *\n * _.find(objects, _.matchesProperty('a', 4));\n * // => { 'a': 4, 'b': 5, 'c': 6 }\n *\n * // Checking for several possible values\n * _.filter(objects, _.overSome([_.matchesProperty('a', 1), _.matchesProperty('a', 4)]));\n * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]\n */\n function matchesProperty(path, srcValue) {\n return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));\n }\n\n /**\n * Creates a function that invokes the method at `path` of a given object.\n * Any additional arguments are provided to the invoked method.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Util\n * @param {Array|string} path The path of the method to invoke.\n * @param {...*} [args] The arguments to invoke the method with.\n * @returns {Function} Returns the new invoker function.\n * @example\n *\n * var objects = [\n * { 'a': { 'b': _.constant(2) } },\n * { 'a': { 'b': _.constant(1) } }\n * ];\n *\n * _.map(objects, _.method('a.b'));\n * // => [2, 1]\n *\n * _.map(objects, _.method(['a', 'b']));\n * // => [2, 1]\n */\n var method = baseRest(function(path, args) {\n return function(object) {\n return baseInvoke(object, path, args);\n };\n });\n\n /**\n * The opposite of `_.method`; this method creates a function that invokes\n * the method at a given path of `object`. Any additional arguments are\n * provided to the invoked method.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Util\n * @param {Object} object The object to query.\n * @param {...*} [args] The arguments to invoke the method with.\n * @returns {Function} Returns the new invoker function.\n * @example\n *\n * var array = _.times(3, _.constant),\n * object = { 'a': array, 'b': array, 'c': array };\n *\n * _.map(['a[2]', 'c[0]'], _.methodOf(object));\n * // => [2, 0]\n *\n * _.map([['a', '2'], ['c', '0']], _.methodOf(object));\n * // => [2, 0]\n */\n var methodOf = baseRest(function(object, args) {\n return function(path) {\n return baseInvoke(object, path, args);\n };\n });\n\n /**\n * Adds all own enumerable string keyed function properties of a source\n * object to the destination object. If `object` is a function, then methods\n * are added to its prototype as well.\n *\n * **Note:** Use `_.runInContext` to create a pristine `lodash` function to\n * avoid conflicts caused by modifying the original.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {Function|Object} [object=lodash] The destination object.\n * @param {Object} source The object of functions to add.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.chain=true] Specify whether mixins are chainable.\n * @returns {Function|Object} Returns `object`.\n * @example\n *\n * function vowels(string) {\n * return _.filter(string, function(v) {\n * return /[aeiou]/i.test(v);\n * });\n * }\n *\n * _.mixin({ 'vowels': vowels });\n * _.vowels('fred');\n * // => ['e']\n *\n * _('fred').vowels().value();\n * // => ['e']\n *\n * _.mixin({ 'vowels': vowels }, { 'chain': false });\n * _('fred').vowels();\n * // => ['e']\n */\n function mixin(object, source, options) {\n var props = keys(source),\n methodNames = baseFunctions(source, props);\n\n if (options == null &&\n !(isObject(source) && (methodNames.length || !props.length))) {\n options = source;\n source = object;\n object = this;\n methodNames = baseFunctions(source, keys(source));\n }\n var chain = !(isObject(options) && 'chain' in options) || !!options.chain,\n isFunc = isFunction(object);\n\n arrayEach(methodNames, function(methodName) {\n var func = source[methodName];\n object[methodName] = func;\n if (isFunc) {\n object.prototype[methodName] = function() {\n var chainAll = this.__chain__;\n if (chain || chainAll) {\n var result = object(this.__wrapped__),\n actions = result.__actions__ = copyArray(this.__actions__);\n\n actions.push({ 'func': func, 'args': arguments, 'thisArg': object });\n result.__chain__ = chainAll;\n return result;\n }\n return func.apply(object, arrayPush([this.value()], arguments));\n };\n }\n });\n\n return object;\n }\n\n /**\n * Reverts the `_` variable to its previous value and returns a reference to\n * the `lodash` function.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @returns {Function} Returns the `lodash` function.\n * @example\n *\n * var lodash = _.noConflict();\n */\n function noConflict() {\n if (root._ === this) {\n root._ = oldDash;\n }\n return this;\n }\n\n /**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\n function noop() {\n // No operation performed.\n }\n\n /**\n * Creates a function that gets the argument at index `n`. If `n` is negative,\n * the nth argument from the end is returned.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {number} [n=0] The index of the argument to return.\n * @returns {Function} Returns the new pass-thru function.\n * @example\n *\n * var func = _.nthArg(1);\n * func('a', 'b', 'c', 'd');\n * // => 'b'\n *\n * var func = _.nthArg(-2);\n * func('a', 'b', 'c', 'd');\n * // => 'c'\n */\n function nthArg(n) {\n n = toInteger(n);\n return baseRest(function(args) {\n return baseNth(args, n);\n });\n }\n\n /**\n * Creates a function that invokes `iteratees` with the arguments it receives\n * and returns their results.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {...(Function|Function[])} [iteratees=[_.identity]]\n * The iteratees to invoke.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var func = _.over([Math.max, Math.min]);\n *\n * func(1, 2, 3, 4);\n * // => [4, 1]\n */\n var over = createOver(arrayMap);\n\n /**\n * Creates a function that checks if **all** of the `predicates` return\n * truthy when invoked with the arguments it receives.\n *\n * Following shorthands are possible for providing predicates.\n * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.\n * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {...(Function|Function[])} [predicates=[_.identity]]\n * The predicates to check.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var func = _.overEvery([Boolean, isFinite]);\n *\n * func('1');\n * // => true\n *\n * func(null);\n * // => false\n *\n * func(NaN);\n * // => false\n */\n var overEvery = createOver(arrayEvery);\n\n /**\n * Creates a function that checks if **any** of the `predicates` return\n * truthy when invoked with the arguments it receives.\n *\n * Following shorthands are possible for providing predicates.\n * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.\n * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {...(Function|Function[])} [predicates=[_.identity]]\n * The predicates to check.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var func = _.overSome([Boolean, isFinite]);\n *\n * func('1');\n * // => true\n *\n * func(null);\n * // => true\n *\n * func(NaN);\n * // => false\n *\n * var matchesFunc = _.overSome([{ 'a': 1 }, { 'a': 2 }])\n * var matchesPropertyFunc = _.overSome([['a', 1], ['a', 2]])\n */\n var overSome = createOver(arraySome);\n\n /**\n * Creates a function that returns the value at `path` of a given object.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n * @example\n *\n * var objects = [\n * { 'a': { 'b': 2 } },\n * { 'a': { 'b': 1 } }\n * ];\n *\n * _.map(objects, _.property('a.b'));\n * // => [2, 1]\n *\n * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\n * // => [1, 2]\n */\n function property(path) {\n return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\n }\n\n /**\n * The opposite of `_.property`; this method creates a function that returns\n * the value at a given path of `object`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Util\n * @param {Object} object The object to query.\n * @returns {Function} Returns the new accessor function.\n * @example\n *\n * var array = [0, 1, 2],\n * object = { 'a': array, 'b': array, 'c': array };\n *\n * _.map(['a[2]', 'c[0]'], _.propertyOf(object));\n * // => [2, 0]\n *\n * _.map([['a', '2'], ['c', '0']], _.propertyOf(object));\n * // => [2, 0]\n */\n function propertyOf(object) {\n return function(path) {\n return object == null ? undefined : baseGet(object, path);\n };\n }\n\n /**\n * Creates an array of numbers (positive and/or negative) progressing from\n * `start` up to, but not including, `end`. A step of `-1` is used if a negative\n * `start` is specified without an `end` or `step`. If `end` is not specified,\n * it's set to `start` with `start` then set to `0`.\n *\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\n * floating-point values which can produce unexpected results.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {number} [start=0] The start of the range.\n * @param {number} end The end of the range.\n * @param {number} [step=1] The value to increment or decrement by.\n * @returns {Array} Returns the range of numbers.\n * @see _.inRange, _.rangeRight\n * @example\n *\n * _.range(4);\n * // => [0, 1, 2, 3]\n *\n * _.range(-4);\n * // => [0, -1, -2, -3]\n *\n * _.range(1, 5);\n * // => [1, 2, 3, 4]\n *\n * _.range(0, 20, 5);\n * // => [0, 5, 10, 15]\n *\n * _.range(0, -4, -1);\n * // => [0, -1, -2, -3]\n *\n * _.range(1, 4, 0);\n * // => [1, 1, 1]\n *\n * _.range(0);\n * // => []\n */\n var range = createRange();\n\n /**\n * This method is like `_.range` except that it populates values in\n * descending order.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {number} [start=0] The start of the range.\n * @param {number} end The end of the range.\n * @param {number} [step=1] The value to increment or decrement by.\n * @returns {Array} Returns the range of numbers.\n * @see _.inRange, _.range\n * @example\n *\n * _.rangeRight(4);\n * // => [3, 2, 1, 0]\n *\n * _.rangeRight(-4);\n * // => [-3, -2, -1, 0]\n *\n * _.rangeRight(1, 5);\n * // => [4, 3, 2, 1]\n *\n * _.rangeRight(0, 20, 5);\n * // => [15, 10, 5, 0]\n *\n * _.rangeRight(0, -4, -1);\n * // => [-3, -2, -1, 0]\n *\n * _.rangeRight(1, 4, 0);\n * // => [1, 1, 1]\n *\n * _.rangeRight(0);\n * // => []\n */\n var rangeRight = createRange(true);\n\n /**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\n function stubArray() {\n return [];\n }\n\n /**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\n function stubFalse() {\n return false;\n }\n\n /**\n * This method returns a new empty object.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Object} Returns the new empty object.\n * @example\n *\n * var objects = _.times(2, _.stubObject);\n *\n * console.log(objects);\n * // => [{}, {}]\n *\n * console.log(objects[0] === objects[1]);\n * // => false\n */\n function stubObject() {\n return {};\n }\n\n /**\n * This method returns an empty string.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {string} Returns the empty string.\n * @example\n *\n * _.times(2, _.stubString);\n * // => ['', '']\n */\n function stubString() {\n return '';\n }\n\n /**\n * This method returns `true`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `true`.\n * @example\n *\n * _.times(2, _.stubTrue);\n * // => [true, true]\n */\n function stubTrue() {\n return true;\n }\n\n /**\n * Invokes the iteratee `n` times, returning an array of the results of\n * each invocation. The iteratee is invoked with one argument; (index).\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n * @example\n *\n * _.times(3, String);\n * // => ['0', '1', '2']\n *\n * _.times(4, _.constant(0));\n * // => [0, 0, 0, 0]\n */\n function times(n, iteratee) {\n n = toInteger(n);\n if (n < 1 || n > MAX_SAFE_INTEGER) {\n return [];\n }\n var index = MAX_ARRAY_LENGTH,\n length = nativeMin(n, MAX_ARRAY_LENGTH);\n\n iteratee = getIteratee(iteratee);\n n -= MAX_ARRAY_LENGTH;\n\n var result = baseTimes(length, iteratee);\n while (++index < n) {\n iteratee(index);\n }\n return result;\n }\n\n /**\n * Converts `value` to a property path array.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {*} value The value to convert.\n * @returns {Array} Returns the new property path array.\n * @example\n *\n * _.toPath('a.b.c');\n * // => ['a', 'b', 'c']\n *\n * _.toPath('a[0].b.c');\n * // => ['a', '0', 'b', 'c']\n */\n function toPath(value) {\n if (isArray(value)) {\n return arrayMap(value, toKey);\n }\n return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));\n }\n\n /**\n * Generates a unique ID. If `prefix` is given, the ID is appended to it.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {string} [prefix=''] The value to prefix the ID with.\n * @returns {string} Returns the unique ID.\n * @example\n *\n * _.uniqueId('contact_');\n * // => 'contact_104'\n *\n * _.uniqueId();\n * // => '105'\n */\n function uniqueId(prefix) {\n var id = ++idCounter;\n return toString(prefix) + id;\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Adds two numbers.\n *\n * @static\n * @memberOf _\n * @since 3.4.0\n * @category Math\n * @param {number} augend The first number in an addition.\n * @param {number} addend The second number in an addition.\n * @returns {number} Returns the total.\n * @example\n *\n * _.add(6, 4);\n * // => 10\n */\n var add = createMathOperation(function(augend, addend) {\n return augend + addend;\n }, 0);\n\n /**\n * Computes `number` rounded up to `precision`.\n *\n * @static\n * @memberOf _\n * @since 3.10.0\n * @category Math\n * @param {number} number The number to round up.\n * @param {number} [precision=0] The precision to round up to.\n * @returns {number} Returns the rounded up number.\n * @example\n *\n * _.ceil(4.006);\n * // => 5\n *\n * _.ceil(6.004, 2);\n * // => 6.01\n *\n * _.ceil(6040, -2);\n * // => 6100\n */\n var ceil = createRound('ceil');\n\n /**\n * Divide two numbers.\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Math\n * @param {number} dividend The first number in a division.\n * @param {number} divisor The second number in a division.\n * @returns {number} Returns the quotient.\n * @example\n *\n * _.divide(6, 4);\n * // => 1.5\n */\n var divide = createMathOperation(function(dividend, divisor) {\n return dividend / divisor;\n }, 1);\n\n /**\n * Computes `number` rounded down to `precision`.\n *\n * @static\n * @memberOf _\n * @since 3.10.0\n * @category Math\n * @param {number} number The number to round down.\n * @param {number} [precision=0] The precision to round down to.\n * @returns {number} Returns the rounded down number.\n * @example\n *\n * _.floor(4.006);\n * // => 4\n *\n * _.floor(0.046, 2);\n * // => 0.04\n *\n * _.floor(4060, -2);\n * // => 4000\n */\n var floor = createRound('floor');\n\n /**\n * Computes the maximum value of `array`. If `array` is empty or falsey,\n * `undefined` is returned.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Math\n * @param {Array} array The array to iterate over.\n * @returns {*} Returns the maximum value.\n * @example\n *\n * _.max([4, 2, 8, 6]);\n * // => 8\n *\n * _.max([]);\n * // => undefined\n */\n function max(array) {\n return (array && array.length)\n ? baseExtremum(array, identity, baseGt)\n : undefined;\n }\n\n /**\n * This method is like `_.max` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the criterion by which\n * the value is ranked. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Math\n * @param {Array} array The array to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {*} Returns the maximum value.\n * @example\n *\n * var objects = [{ 'n': 1 }, { 'n': 2 }];\n *\n * _.maxBy(objects, function(o) { return o.n; });\n * // => { 'n': 2 }\n *\n * // The `_.property` iteratee shorthand.\n * _.maxBy(objects, 'n');\n * // => { 'n': 2 }\n */\n function maxBy(array, iteratee) {\n return (array && array.length)\n ? baseExtremum(array, getIteratee(iteratee, 2), baseGt)\n : undefined;\n }\n\n /**\n * Computes the mean of the values in `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Math\n * @param {Array} array The array to iterate over.\n * @returns {number} Returns the mean.\n * @example\n *\n * _.mean([4, 2, 8, 6]);\n * // => 5\n */\n function mean(array) {\n return baseMean(array, identity);\n }\n\n /**\n * This method is like `_.mean` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the value to be averaged.\n * The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Math\n * @param {Array} array The array to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the mean.\n * @example\n *\n * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];\n *\n * _.meanBy(objects, function(o) { return o.n; });\n * // => 5\n *\n * // The `_.property` iteratee shorthand.\n * _.meanBy(objects, 'n');\n * // => 5\n */\n function meanBy(array, iteratee) {\n return baseMean(array, getIteratee(iteratee, 2));\n }\n\n /**\n * Computes the minimum value of `array`. If `array` is empty or falsey,\n * `undefined` is returned.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Math\n * @param {Array} array The array to iterate over.\n * @returns {*} Returns the minimum value.\n * @example\n *\n * _.min([4, 2, 8, 6]);\n * // => 2\n *\n * _.min([]);\n * // => undefined\n */\n function min(array) {\n return (array && array.length)\n ? baseExtremum(array, identity, baseLt)\n : undefined;\n }\n\n /**\n * This method is like `_.min` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the criterion by which\n * the value is ranked. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Math\n * @param {Array} array The array to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {*} Returns the minimum value.\n * @example\n *\n * var objects = [{ 'n': 1 }, { 'n': 2 }];\n *\n * _.minBy(objects, function(o) { return o.n; });\n * // => { 'n': 1 }\n *\n * // The `_.property` iteratee shorthand.\n * _.minBy(objects, 'n');\n * // => { 'n': 1 }\n */\n function minBy(array, iteratee) {\n return (array && array.length)\n ? baseExtremum(array, getIteratee(iteratee, 2), baseLt)\n : undefined;\n }\n\n /**\n * Multiply two numbers.\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Math\n * @param {number} multiplier The first number in a multiplication.\n * @param {number} multiplicand The second number in a multiplication.\n * @returns {number} Returns the product.\n * @example\n *\n * _.multiply(6, 4);\n * // => 24\n */\n var multiply = createMathOperation(function(multiplier, multiplicand) {\n return multiplier * multiplicand;\n }, 1);\n\n /**\n * Computes `number` rounded to `precision`.\n *\n * @static\n * @memberOf _\n * @since 3.10.0\n * @category Math\n * @param {number} number The number to round.\n * @param {number} [precision=0] The precision to round to.\n * @returns {number} Returns the rounded number.\n * @example\n *\n * _.round(4.006);\n * // => 4\n *\n * _.round(4.006, 2);\n * // => 4.01\n *\n * _.round(4060, -2);\n * // => 4100\n */\n var round = createRound('round');\n\n /**\n * Subtract two numbers.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Math\n * @param {number} minuend The first number in a subtraction.\n * @param {number} subtrahend The second number in a subtraction.\n * @returns {number} Returns the difference.\n * @example\n *\n * _.subtract(6, 4);\n * // => 2\n */\n var subtract = createMathOperation(function(minuend, subtrahend) {\n return minuend - subtrahend;\n }, 0);\n\n /**\n * Computes the sum of the values in `array`.\n *\n * @static\n * @memberOf _\n * @since 3.4.0\n * @category Math\n * @param {Array} array The array to iterate over.\n * @returns {number} Returns the sum.\n * @example\n *\n * _.sum([4, 2, 8, 6]);\n * // => 20\n */\n function sum(array) {\n return (array && array.length)\n ? baseSum(array, identity)\n : 0;\n }\n\n /**\n * This method is like `_.sum` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the value to be summed.\n * The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Math\n * @param {Array} array The array to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the sum.\n * @example\n *\n * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];\n *\n * _.sumBy(objects, function(o) { return o.n; });\n * // => 20\n *\n * // The `_.property` iteratee shorthand.\n * _.sumBy(objects, 'n');\n * // => 20\n */\n function sumBy(array, iteratee) {\n return (array && array.length)\n ? baseSum(array, getIteratee(iteratee, 2))\n : 0;\n }\n\n /*------------------------------------------------------------------------*/\n\n // Add methods that return wrapped values in chain sequences.\n lodash.after = after;\n lodash.ary = ary;\n lodash.assign = assign;\n lodash.assignIn = assignIn;\n lodash.assignInWith = assignInWith;\n lodash.assignWith = assignWith;\n lodash.at = at;\n lodash.before = before;\n lodash.bind = bind;\n lodash.bindAll = bindAll;\n lodash.bindKey = bindKey;\n lodash.castArray = castArray;\n lodash.chain = chain;\n lodash.chunk = chunk;\n lodash.compact = compact;\n lodash.concat = concat;\n lodash.cond = cond;\n lodash.conforms = conforms;\n lodash.constant = constant;\n lodash.countBy = countBy;\n lodash.create = create;\n lodash.curry = curry;\n lodash.curryRight = curryRight;\n lodash.debounce = debounce;\n lodash.defaults = defaults;\n lodash.defaultsDeep = defaultsDeep;\n lodash.defer = defer;\n lodash.delay = delay;\n lodash.difference = difference;\n lodash.differenceBy = differenceBy;\n lodash.differenceWith = differenceWith;\n lodash.drop = drop;\n lodash.dropRight = dropRight;\n lodash.dropRightWhile = dropRightWhile;\n lodash.dropWhile = dropWhile;\n lodash.fill = fill;\n lodash.filter = filter;\n lodash.flatMap = flatMap;\n lodash.flatMapDeep = flatMapDeep;\n lodash.flatMapDepth = flatMapDepth;\n lodash.flatten = flatten;\n lodash.flattenDeep = flattenDeep;\n lodash.flattenDepth = flattenDepth;\n lodash.flip = flip;\n lodash.flow = flow;\n lodash.flowRight = flowRight;\n lodash.fromPairs = fromPairs;\n lodash.functions = functions;\n lodash.functionsIn = functionsIn;\n lodash.groupBy = groupBy;\n lodash.initial = initial;\n lodash.intersection = intersection;\n lodash.intersectionBy = intersectionBy;\n lodash.intersectionWith = intersectionWith;\n lodash.invert = invert;\n lodash.invertBy = invertBy;\n lodash.invokeMap = invokeMap;\n lodash.iteratee = iteratee;\n lodash.keyBy = keyBy;\n lodash.keys = keys;\n lodash.keysIn = keysIn;\n lodash.map = map;\n lodash.mapKeys = mapKeys;\n lodash.mapValues = mapValues;\n lodash.matches = matches;\n lodash.matchesProperty = matchesProperty;\n lodash.memoize = memoize;\n lodash.merge = merge;\n lodash.mergeWith = mergeWith;\n lodash.method = method;\n lodash.methodOf = methodOf;\n lodash.mixin = mixin;\n lodash.negate = negate;\n lodash.nthArg = nthArg;\n lodash.omit = omit;\n lodash.omitBy = omitBy;\n lodash.once = once;\n lodash.orderBy = orderBy;\n lodash.over = over;\n lodash.overArgs = overArgs;\n lodash.overEvery = overEvery;\n lodash.overSome = overSome;\n lodash.partial = partial;\n lodash.partialRight = partialRight;\n lodash.partition = partition;\n lodash.pick = pick;\n lodash.pickBy = pickBy;\n lodash.property = property;\n lodash.propertyOf = propertyOf;\n lodash.pull = pull;\n lodash.pullAll = pullAll;\n lodash.pullAllBy = pullAllBy;\n lodash.pullAllWith = pullAllWith;\n lodash.pullAt = pullAt;\n lodash.range = range;\n lodash.rangeRight = rangeRight;\n lodash.rearg = rearg;\n lodash.reject = reject;\n lodash.remove = remove;\n lodash.rest = rest;\n lodash.reverse = reverse;\n lodash.sampleSize = sampleSize;\n lodash.set = set;\n lodash.setWith = setWith;\n lodash.shuffle = shuffle;\n lodash.slice = slice;\n lodash.sortBy = sortBy;\n lodash.sortedUniq = sortedUniq;\n lodash.sortedUniqBy = sortedUniqBy;\n lodash.split = split;\n lodash.spread = spread;\n lodash.tail = tail;\n lodash.take = take;\n lodash.takeRight = takeRight;\n lodash.takeRightWhile = takeRightWhile;\n lodash.takeWhile = takeWhile;\n lodash.tap = tap;\n lodash.throttle = throttle;\n lodash.thru = thru;\n lodash.toArray = toArray;\n lodash.toPairs = toPairs;\n lodash.toPairsIn = toPairsIn;\n lodash.toPath = toPath;\n lodash.toPlainObject = toPlainObject;\n lodash.transform = transform;\n lodash.unary = unary;\n lodash.union = union;\n lodash.unionBy = unionBy;\n lodash.unionWith = unionWith;\n lodash.uniq = uniq;\n lodash.uniqBy = uniqBy;\n lodash.uniqWith = uniqWith;\n lodash.unset = unset;\n lodash.unzip = unzip;\n lodash.unzipWith = unzipWith;\n lodash.update = update;\n lodash.updateWith = updateWith;\n lodash.values = values;\n lodash.valuesIn = valuesIn;\n lodash.without = without;\n lodash.words = words;\n lodash.wrap = wrap;\n lodash.xor = xor;\n lodash.xorBy = xorBy;\n lodash.xorWith = xorWith;\n lodash.zip = zip;\n lodash.zipObject = zipObject;\n lodash.zipObjectDeep = zipObjectDeep;\n lodash.zipWith = zipWith;\n\n // Add aliases.\n lodash.entries = toPairs;\n lodash.entriesIn = toPairsIn;\n lodash.extend = assignIn;\n lodash.extendWith = assignInWith;\n\n // Add methods to `lodash.prototype`.\n mixin(lodash, lodash);\n\n /*------------------------------------------------------------------------*/\n\n // Add methods that return unwrapped values in chain sequences.\n lodash.add = add;\n lodash.attempt = attempt;\n lodash.camelCase = camelCase;\n lodash.capitalize = capitalize;\n lodash.ceil = ceil;\n lodash.clamp = clamp;\n lodash.clone = clone;\n lodash.cloneDeep = cloneDeep;\n lodash.cloneDeepWith = cloneDeepWith;\n lodash.cloneWith = cloneWith;\n lodash.conformsTo = conformsTo;\n lodash.deburr = deburr;\n lodash.defaultTo = defaultTo;\n lodash.divide = divide;\n lodash.endsWith = endsWith;\n lodash.eq = eq;\n lodash.escape = escape;\n lodash.escapeRegExp = escapeRegExp;\n lodash.every = every;\n lodash.find = find;\n lodash.findIndex = findIndex;\n lodash.findKey = findKey;\n lodash.findLast = findLast;\n lodash.findLastIndex = findLastIndex;\n lodash.findLastKey = findLastKey;\n lodash.floor = floor;\n lodash.forEach = forEach;\n lodash.forEachRight = forEachRight;\n lodash.forIn = forIn;\n lodash.forInRight = forInRight;\n lodash.forOwn = forOwn;\n lodash.forOwnRight = forOwnRight;\n lodash.get = get;\n lodash.gt = gt;\n lodash.gte = gte;\n lodash.has = has;\n lodash.hasIn = hasIn;\n lodash.head = head;\n lodash.identity = identity;\n lodash.includes = includes;\n lodash.indexOf = indexOf;\n lodash.inRange = inRange;\n lodash.invoke = invoke;\n lodash.isArguments = isArguments;\n lodash.isArray = isArray;\n lodash.isArrayBuffer = isArrayBuffer;\n lodash.isArrayLike = isArrayLike;\n lodash.isArrayLikeObject = isArrayLikeObject;\n lodash.isBoolean = isBoolean;\n lodash.isBuffer = isBuffer;\n lodash.isDate = isDate;\n lodash.isElement = isElement;\n lodash.isEmpty = isEmpty;\n lodash.isEqual = isEqual;\n lodash.isEqualWith = isEqualWith;\n lodash.isError = isError;\n lodash.isFinite = isFinite;\n lodash.isFunction = isFunction;\n lodash.isInteger = isInteger;\n lodash.isLength = isLength;\n lodash.isMap = isMap;\n lodash.isMatch = isMatch;\n lodash.isMatchWith = isMatchWith;\n lodash.isNaN = isNaN;\n lodash.isNative = isNative;\n lodash.isNil = isNil;\n lodash.isNull = isNull;\n lodash.isNumber = isNumber;\n lodash.isObject = isObject;\n lodash.isObjectLike = isObjectLike;\n lodash.isPlainObject = isPlainObject;\n lodash.isRegExp = isRegExp;\n lodash.isSafeInteger = isSafeInteger;\n lodash.isSet = isSet;\n lodash.isString = isString;\n lodash.isSymbol = isSymbol;\n lodash.isTypedArray = isTypedArray;\n lodash.isUndefined = isUndefined;\n lodash.isWeakMap = isWeakMap;\n lodash.isWeakSet = isWeakSet;\n lodash.join = join;\n lodash.kebabCase = kebabCase;\n lodash.last = last;\n lodash.lastIndexOf = lastIndexOf;\n lodash.lowerCase = lowerCase;\n lodash.lowerFirst = lowerFirst;\n lodash.lt = lt;\n lodash.lte = lte;\n lodash.max = max;\n lodash.maxBy = maxBy;\n lodash.mean = mean;\n lodash.meanBy = meanBy;\n lodash.min = min;\n lodash.minBy = minBy;\n lodash.stubArray = stubArray;\n lodash.stubFalse = stubFalse;\n lodash.stubObject = stubObject;\n lodash.stubString = stubString;\n lodash.stubTrue = stubTrue;\n lodash.multiply = multiply;\n lodash.nth = nth;\n lodash.noConflict = noConflict;\n lodash.noop = noop;\n lodash.now = now;\n lodash.pad = pad;\n lodash.padEnd = padEnd;\n lodash.padStart = padStart;\n lodash.parseInt = parseInt;\n lodash.random = random;\n lodash.reduce = reduce;\n lodash.reduceRight = reduceRight;\n lodash.repeat = repeat;\n lodash.replace = replace;\n lodash.result = result;\n lodash.round = round;\n lodash.runInContext = runInContext;\n lodash.sample = sample;\n lodash.size = size;\n lodash.snakeCase = snakeCase;\n lodash.some = some;\n lodash.sortedIndex = sortedIndex;\n lodash.sortedIndexBy = sortedIndexBy;\n lodash.sortedIndexOf = sortedIndexOf;\n lodash.sortedLastIndex = sortedLastIndex;\n lodash.sortedLastIndexBy = sortedLastIndexBy;\n lodash.sortedLastIndexOf = sortedLastIndexOf;\n lodash.startCase = startCase;\n lodash.startsWith = startsWith;\n lodash.subtract = subtract;\n lodash.sum = sum;\n lodash.sumBy = sumBy;\n lodash.template = template;\n lodash.times = times;\n lodash.toFinite = toFinite;\n lodash.toInteger = toInteger;\n lodash.toLength = toLength;\n lodash.toLower = toLower;\n lodash.toNumber = toNumber;\n lodash.toSafeInteger = toSafeInteger;\n lodash.toString = toString;\n lodash.toUpper = toUpper;\n lodash.trim = trim;\n lodash.trimEnd = trimEnd;\n lodash.trimStart = trimStart;\n lodash.truncate = truncate;\n lodash.unescape = unescape;\n lodash.uniqueId = uniqueId;\n lodash.upperCase = upperCase;\n lodash.upperFirst = upperFirst;\n\n // Add aliases.\n lodash.each = forEach;\n lodash.eachRight = forEachRight;\n lodash.first = head;\n\n mixin(lodash, (function() {\n var source = {};\n baseForOwn(lodash, function(func, methodName) {\n if (!hasOwnProperty.call(lodash.prototype, methodName)) {\n source[methodName] = func;\n }\n });\n return source;\n }()), { 'chain': false });\n\n /*------------------------------------------------------------------------*/\n\n /**\n * The semantic version number.\n *\n * @static\n * @memberOf _\n * @type {string}\n */\n lodash.VERSION = VERSION;\n\n // Assign default placeholders.\n arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) {\n lodash[methodName].placeholder = lodash;\n });\n\n // Add `LazyWrapper` methods for `_.drop` and `_.take` variants.\n arrayEach(['drop', 'take'], function(methodName, index) {\n LazyWrapper.prototype[methodName] = function(n) {\n n = n === undefined ? 1 : nativeMax(toInteger(n), 0);\n\n var result = (this.__filtered__ && !index)\n ? new LazyWrapper(this)\n : this.clone();\n\n if (result.__filtered__) {\n result.__takeCount__ = nativeMin(n, result.__takeCount__);\n } else {\n result.__views__.push({\n 'size': nativeMin(n, MAX_ARRAY_LENGTH),\n 'type': methodName + (result.__dir__ < 0 ? 'Right' : '')\n });\n }\n return result;\n };\n\n LazyWrapper.prototype[methodName + 'Right'] = function(n) {\n return this.reverse()[methodName](n).reverse();\n };\n });\n\n // Add `LazyWrapper` methods that accept an `iteratee` value.\n arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {\n var type = index + 1,\n isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;\n\n LazyWrapper.prototype[methodName] = function(iteratee) {\n var result = this.clone();\n result.__iteratees__.push({\n 'iteratee': getIteratee(iteratee, 3),\n 'type': type\n });\n result.__filtered__ = result.__filtered__ || isFilter;\n return result;\n };\n });\n\n // Add `LazyWrapper` methods for `_.head` and `_.last`.\n arrayEach(['head', 'last'], function(methodName, index) {\n var takeName = 'take' + (index ? 'Right' : '');\n\n LazyWrapper.prototype[methodName] = function() {\n return this[takeName](1).value()[0];\n };\n });\n\n // Add `LazyWrapper` methods for `_.initial` and `_.tail`.\n arrayEach(['initial', 'tail'], function(methodName, index) {\n var dropName = 'drop' + (index ? '' : 'Right');\n\n LazyWrapper.prototype[methodName] = function() {\n return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);\n };\n });\n\n LazyWrapper.prototype.compact = function() {\n return this.filter(identity);\n };\n\n LazyWrapper.prototype.find = function(predicate) {\n return this.filter(predicate).head();\n };\n\n LazyWrapper.prototype.findLast = function(predicate) {\n return this.reverse().find(predicate);\n };\n\n LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {\n if (typeof path == 'function') {\n return new LazyWrapper(this);\n }\n return this.map(function(value) {\n return baseInvoke(value, path, args);\n });\n });\n\n LazyWrapper.prototype.reject = function(predicate) {\n return this.filter(negate(getIteratee(predicate)));\n };\n\n LazyWrapper.prototype.slice = function(start, end) {\n start = toInteger(start);\n\n var result = this;\n if (result.__filtered__ && (start > 0 || end < 0)) {\n return new LazyWrapper(result);\n }\n if (start < 0) {\n result = result.takeRight(-start);\n } else if (start) {\n result = result.drop(start);\n }\n if (end !== undefined) {\n end = toInteger(end);\n result = end < 0 ? result.dropRight(-end) : result.take(end - start);\n }\n return result;\n };\n\n LazyWrapper.prototype.takeRightWhile = function(predicate) {\n return this.reverse().takeWhile(predicate).reverse();\n };\n\n LazyWrapper.prototype.toArray = function() {\n return this.take(MAX_ARRAY_LENGTH);\n };\n\n // Add `LazyWrapper` methods to `lodash.prototype`.\n baseForOwn(LazyWrapper.prototype, function(func, methodName) {\n var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),\n isTaker = /^(?:head|last)$/.test(methodName),\n lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName],\n retUnwrapped = isTaker || /^find/.test(methodName);\n\n if (!lodashFunc) {\n return;\n }\n lodash.prototype[methodName] = function() {\n var value = this.__wrapped__,\n args = isTaker ? [1] : arguments,\n isLazy = value instanceof LazyWrapper,\n iteratee = args[0],\n useLazy = isLazy || isArray(value);\n\n var interceptor = function(value) {\n var result = lodashFunc.apply(lodash, arrayPush([value], args));\n return (isTaker && chainAll) ? result[0] : result;\n };\n\n if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {\n // Avoid lazy use if the iteratee has a \"length\" value other than `1`.\n isLazy = useLazy = false;\n }\n var chainAll = this.__chain__,\n isHybrid = !!this.__actions__.length,\n isUnwrapped = retUnwrapped && !chainAll,\n onlyLazy = isLazy && !isHybrid;\n\n if (!retUnwrapped && useLazy) {\n value = onlyLazy ? value : new LazyWrapper(this);\n var result = func.apply(value, args);\n result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });\n return new LodashWrapper(result, chainAll);\n }\n if (isUnwrapped && onlyLazy) {\n return func.apply(this, args);\n }\n result = this.thru(interceptor);\n return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result;\n };\n });\n\n // Add `Array` methods to `lodash.prototype`.\n arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {\n var func = arrayProto[methodName],\n chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',\n retUnwrapped = /^(?:pop|shift)$/.test(methodName);\n\n lodash.prototype[methodName] = function() {\n var args = arguments;\n if (retUnwrapped && !this.__chain__) {\n var value = this.value();\n return func.apply(isArray(value) ? value : [], args);\n }\n return this[chainName](function(value) {\n return func.apply(isArray(value) ? value : [], args);\n });\n };\n });\n\n // Map minified method names to their real names.\n baseForOwn(LazyWrapper.prototype, function(func, methodName) {\n var lodashFunc = lodash[methodName];\n if (lodashFunc) {\n var key = lodashFunc.name + '';\n if (!hasOwnProperty.call(realNames, key)) {\n realNames[key] = [];\n }\n realNames[key].push({ 'name': methodName, 'func': lodashFunc });\n }\n });\n\n realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{\n 'name': 'wrapper',\n 'func': undefined\n }];\n\n // Add methods to `LazyWrapper`.\n LazyWrapper.prototype.clone = lazyClone;\n LazyWrapper.prototype.reverse = lazyReverse;\n LazyWrapper.prototype.value = lazyValue;\n\n // Add chain sequence methods to the `lodash` wrapper.\n lodash.prototype.at = wrapperAt;\n lodash.prototype.chain = wrapperChain;\n lodash.prototype.commit = wrapperCommit;\n lodash.prototype.next = wrapperNext;\n lodash.prototype.plant = wrapperPlant;\n lodash.prototype.reverse = wrapperReverse;\n lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;\n\n // Add lazy aliases.\n lodash.prototype.first = lodash.prototype.head;\n\n if (symIterator) {\n lodash.prototype[symIterator] = wrapperToIterator;\n }\n return lodash;\n });\n\n /*--------------------------------------------------------------------------*/\n\n // Export lodash.\n var _ = runInContext();\n\n // Some AMD build optimizers, like r.js, check for condition patterns like:\n if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {\n // Expose Lodash on the global object to prevent errors when Lodash is\n // loaded by a script tag in the presence of an AMD loader.\n // See http://requirejs.org/docs/errors.html#mismatch for more details.\n // Use `_.noConflict` to remove Lodash from the global object.\n root._ = _;\n\n // Define as an anonymous module so, through path mapping, it can be\n // referenced as the \"underscore\" module.\n define(function() {\n return _;\n });\n }\n // Check for `exports` after `define` in case a build optimizer adds it.\n else if (freeModule) {\n // Export for Node.js.\n (freeModule.exports = _)._ = _;\n // Export for CommonJS support.\n freeExports._ = _;\n }\n else {\n // Export to the global object.\n root._ = _;\n }\n}.call(this));\n","//! moment.js locale configuration\n//! locale : Afrikaans [af]\n//! author : Werner Mollentze : https://github.com/wernerm\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var af = moment.defineLocale('af', {\n months: 'Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des'.split('_'),\n weekdays: 'Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag'.split(\n '_'\n ),\n weekdaysShort: 'Son_Maa_Din_Woe_Don_Vry_Sat'.split('_'),\n weekdaysMin: 'So_Ma_Di_Wo_Do_Vr_Sa'.split('_'),\n meridiemParse: /vm|nm/i,\n isPM: function (input) {\n return /^nm$/i.test(input);\n },\n meridiem: function (hours, minutes, isLower) {\n if (hours < 12) {\n return isLower ? 'vm' : 'VM';\n } else {\n return isLower ? 'nm' : 'NM';\n }\n },\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Vandag om] LT',\n nextDay: '[Môre om] LT',\n nextWeek: 'dddd [om] LT',\n lastDay: '[Gister om] LT',\n lastWeek: '[Laas] dddd [om] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'oor %s',\n past: '%s gelede',\n s: \"'n paar sekondes\",\n ss: '%d sekondes',\n m: \"'n minuut\",\n mm: '%d minute',\n h: \"'n uur\",\n hh: '%d ure',\n d: \"'n dag\",\n dd: '%d dae',\n M: \"'n maand\",\n MM: '%d maande',\n y: \"'n jaar\",\n yy: '%d jaar',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(ste|de)/,\n ordinal: function (number) {\n return (\n number +\n (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')\n ); // Thanks to Joris Röling : https://github.com/jjupiter\n },\n week: {\n dow: 1, // Maandag is die eerste dag van die week.\n doy: 4, // Die week wat die 4de Januarie bevat is die eerste week van die jaar.\n },\n });\n\n return af;\n\n})));\n","//! moment.js locale configuration\n//! locale : Arabic (Algeria) [ar-dz]\n//! author : Amine Roukh: https://github.com/Amine27\n//! author : Abdel Said: https://github.com/abdelsaid\n//! author : Ahmed Elkhatib\n//! author : forabi https://github.com/forabi\n//! author : Noureddine LOUAHEDJ : https://github.com/noureddinem\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var pluralForm = function (n) {\n return n === 0\n ? 0\n : n === 1\n ? 1\n : n === 2\n ? 2\n : n % 100 >= 3 && n % 100 <= 10\n ? 3\n : n % 100 >= 11\n ? 4\n : 5;\n },\n plurals = {\n s: [\n 'أقل من ثانية',\n 'ثانية واحدة',\n ['ثانيتان', 'ثانيتين'],\n '%d ثوان',\n '%d ثانية',\n '%d ثانية',\n ],\n m: [\n 'أقل من دقيقة',\n 'دقيقة واحدة',\n ['دقيقتان', 'دقيقتين'],\n '%d دقائق',\n '%d دقيقة',\n '%d دقيقة',\n ],\n h: [\n 'أقل من ساعة',\n 'ساعة واحدة',\n ['ساعتان', 'ساعتين'],\n '%d ساعات',\n '%d ساعة',\n '%d ساعة',\n ],\n d: [\n 'أقل من يوم',\n 'يوم واحد',\n ['يومان', 'يومين'],\n '%d أيام',\n '%d يومًا',\n '%d يوم',\n ],\n M: [\n 'أقل من شهر',\n 'شهر واحد',\n ['شهران', 'شهرين'],\n '%d أشهر',\n '%d شهرا',\n '%d شهر',\n ],\n y: [\n 'أقل من عام',\n 'عام واحد',\n ['عامان', 'عامين'],\n '%d أعوام',\n '%d عامًا',\n '%d عام',\n ],\n },\n pluralize = function (u) {\n return function (number, withoutSuffix, string, isFuture) {\n var f = pluralForm(number),\n str = plurals[u][pluralForm(number)];\n if (f === 2) {\n str = str[withoutSuffix ? 0 : 1];\n }\n return str.replace(/%d/i, number);\n };\n },\n months = [\n 'جانفي',\n 'فيفري',\n 'مارس',\n 'أفريل',\n 'ماي',\n 'جوان',\n 'جويلية',\n 'أوت',\n 'سبتمبر',\n 'أكتوبر',\n 'نوفمبر',\n 'ديسمبر',\n ];\n\n var arDz = moment.defineLocale('ar-dz', {\n months: months,\n monthsShort: months,\n weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'D/\\u200FM/\\u200FYYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n meridiemParse: /ص|م/,\n isPM: function (input) {\n return 'م' === input;\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'ص';\n } else {\n return 'م';\n }\n },\n calendar: {\n sameDay: '[اليوم عند الساعة] LT',\n nextDay: '[غدًا عند الساعة] LT',\n nextWeek: 'dddd [عند الساعة] LT',\n lastDay: '[أمس عند الساعة] LT',\n lastWeek: 'dddd [عند الساعة] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'بعد %s',\n past: 'منذ %s',\n s: pluralize('s'),\n ss: pluralize('s'),\n m: pluralize('m'),\n mm: pluralize('m'),\n h: pluralize('h'),\n hh: pluralize('h'),\n d: pluralize('d'),\n dd: pluralize('d'),\n M: pluralize('M'),\n MM: pluralize('M'),\n y: pluralize('y'),\n yy: pluralize('y'),\n },\n postformat: function (string) {\n return string.replace(/,/g, '،');\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return arDz;\n\n})));\n","//! moment.js locale configuration\n//! locale : Arabic (Kuwait) [ar-kw]\n//! author : Nusret Parlak: https://github.com/nusretparlak\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var arKw = moment.defineLocale('ar-kw', {\n months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(\n '_'\n ),\n monthsShort:\n 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(\n '_'\n ),\n weekdays: 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[اليوم على الساعة] LT',\n nextDay: '[غدا على الساعة] LT',\n nextWeek: 'dddd [على الساعة] LT',\n lastDay: '[أمس على الساعة] LT',\n lastWeek: 'dddd [على الساعة] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'في %s',\n past: 'منذ %s',\n s: 'ثوان',\n ss: '%d ثانية',\n m: 'دقيقة',\n mm: '%d دقائق',\n h: 'ساعة',\n hh: '%d ساعات',\n d: 'يوم',\n dd: '%d أيام',\n M: 'شهر',\n MM: '%d أشهر',\n y: 'سنة',\n yy: '%d سنوات',\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 12, // The week that contains Jan 12th is the first week of the year.\n },\n });\n\n return arKw;\n\n})));\n","//! moment.js locale configuration\n//! locale : Arabic (Libya) [ar-ly]\n//! author : Ali Hmer: https://github.com/kikoanis\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '1',\n 2: '2',\n 3: '3',\n 4: '4',\n 5: '5',\n 6: '6',\n 7: '7',\n 8: '8',\n 9: '9',\n 0: '0',\n },\n pluralForm = function (n) {\n return n === 0\n ? 0\n : n === 1\n ? 1\n : n === 2\n ? 2\n : n % 100 >= 3 && n % 100 <= 10\n ? 3\n : n % 100 >= 11\n ? 4\n : 5;\n },\n plurals = {\n s: [\n 'أقل من ثانية',\n 'ثانية واحدة',\n ['ثانيتان', 'ثانيتين'],\n '%d ثوان',\n '%d ثانية',\n '%d ثانية',\n ],\n m: [\n 'أقل من دقيقة',\n 'دقيقة واحدة',\n ['دقيقتان', 'دقيقتين'],\n '%d دقائق',\n '%d دقيقة',\n '%d دقيقة',\n ],\n h: [\n 'أقل من ساعة',\n 'ساعة واحدة',\n ['ساعتان', 'ساعتين'],\n '%d ساعات',\n '%d ساعة',\n '%d ساعة',\n ],\n d: [\n 'أقل من يوم',\n 'يوم واحد',\n ['يومان', 'يومين'],\n '%d أيام',\n '%d يومًا',\n '%d يوم',\n ],\n M: [\n 'أقل من شهر',\n 'شهر واحد',\n ['شهران', 'شهرين'],\n '%d أشهر',\n '%d شهرا',\n '%d شهر',\n ],\n y: [\n 'أقل من عام',\n 'عام واحد',\n ['عامان', 'عامين'],\n '%d أعوام',\n '%d عامًا',\n '%d عام',\n ],\n },\n pluralize = function (u) {\n return function (number, withoutSuffix, string, isFuture) {\n var f = pluralForm(number),\n str = plurals[u][pluralForm(number)];\n if (f === 2) {\n str = str[withoutSuffix ? 0 : 1];\n }\n return str.replace(/%d/i, number);\n };\n },\n months = [\n 'يناير',\n 'فبراير',\n 'مارس',\n 'أبريل',\n 'مايو',\n 'يونيو',\n 'يوليو',\n 'أغسطس',\n 'سبتمبر',\n 'أكتوبر',\n 'نوفمبر',\n 'ديسمبر',\n ];\n\n var arLy = moment.defineLocale('ar-ly', {\n months: months,\n monthsShort: months,\n weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'D/\\u200FM/\\u200FYYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n meridiemParse: /ص|م/,\n isPM: function (input) {\n return 'م' === input;\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'ص';\n } else {\n return 'م';\n }\n },\n calendar: {\n sameDay: '[اليوم عند الساعة] LT',\n nextDay: '[غدًا عند الساعة] LT',\n nextWeek: 'dddd [عند الساعة] LT',\n lastDay: '[أمس عند الساعة] LT',\n lastWeek: 'dddd [عند الساعة] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'بعد %s',\n past: 'منذ %s',\n s: pluralize('s'),\n ss: pluralize('s'),\n m: pluralize('m'),\n mm: pluralize('m'),\n h: pluralize('h'),\n hh: pluralize('h'),\n d: pluralize('d'),\n dd: pluralize('d'),\n M: pluralize('M'),\n MM: pluralize('M'),\n y: pluralize('y'),\n yy: pluralize('y'),\n },\n preparse: function (string) {\n return string.replace(/،/g, ',');\n },\n postformat: function (string) {\n return string\n .replace(/\\d/g, function (match) {\n return symbolMap[match];\n })\n .replace(/,/g, '،');\n },\n week: {\n dow: 6, // Saturday is the first day of the week.\n doy: 12, // The week that contains Jan 12th is the first week of the year.\n },\n });\n\n return arLy;\n\n})));\n","//! moment.js locale configuration\n//! locale : Arabic (Morocco) [ar-ma]\n//! author : ElFadili Yassine : https://github.com/ElFadiliY\n//! author : Abdel Said : https://github.com/abdelsaid\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var arMa = moment.defineLocale('ar-ma', {\n months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(\n '_'\n ),\n monthsShort:\n 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(\n '_'\n ),\n weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[اليوم على الساعة] LT',\n nextDay: '[غدا على الساعة] LT',\n nextWeek: 'dddd [على الساعة] LT',\n lastDay: '[أمس على الساعة] LT',\n lastWeek: 'dddd [على الساعة] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'في %s',\n past: 'منذ %s',\n s: 'ثوان',\n ss: '%d ثانية',\n m: 'دقيقة',\n mm: '%d دقائق',\n h: 'ساعة',\n hh: '%d ساعات',\n d: 'يوم',\n dd: '%d أيام',\n M: 'شهر',\n MM: '%d أشهر',\n y: 'سنة',\n yy: '%d سنوات',\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return arMa;\n\n})));\n","//! moment.js locale configuration\n//! locale : Arabic (Saudi Arabia) [ar-sa]\n//! author : Suhail Alkowaileet : https://github.com/xsoh\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '١',\n 2: '٢',\n 3: '٣',\n 4: '٤',\n 5: '٥',\n 6: '٦',\n 7: '٧',\n 8: '٨',\n 9: '٩',\n 0: '٠',\n },\n numberMap = {\n '١': '1',\n '٢': '2',\n '٣': '3',\n '٤': '4',\n '٥': '5',\n '٦': '6',\n '٧': '7',\n '٨': '8',\n '٩': '9',\n '٠': '0',\n };\n\n var arSa = moment.defineLocale('ar-sa', {\n months: 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(\n '_'\n ),\n monthsShort:\n 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(\n '_'\n ),\n weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n meridiemParse: /ص|م/,\n isPM: function (input) {\n return 'م' === input;\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'ص';\n } else {\n return 'م';\n }\n },\n calendar: {\n sameDay: '[اليوم على الساعة] LT',\n nextDay: '[غدا على الساعة] LT',\n nextWeek: 'dddd [على الساعة] LT',\n lastDay: '[أمس على الساعة] LT',\n lastWeek: 'dddd [على الساعة] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'في %s',\n past: 'منذ %s',\n s: 'ثوان',\n ss: '%d ثانية',\n m: 'دقيقة',\n mm: '%d دقائق',\n h: 'ساعة',\n hh: '%d ساعات',\n d: 'يوم',\n dd: '%d أيام',\n M: 'شهر',\n MM: '%d أشهر',\n y: 'سنة',\n yy: '%d سنوات',\n },\n preparse: function (string) {\n return string\n .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {\n return numberMap[match];\n })\n .replace(/،/g, ',');\n },\n postformat: function (string) {\n return string\n .replace(/\\d/g, function (match) {\n return symbolMap[match];\n })\n .replace(/,/g, '،');\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n },\n });\n\n return arSa;\n\n})));\n","//! moment.js locale configuration\n//! locale : Arabic (Tunisia) [ar-tn]\n//! author : Nader Toukabri : https://github.com/naderio\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var arTn = moment.defineLocale('ar-tn', {\n months: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(\n '_'\n ),\n monthsShort:\n 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(\n '_'\n ),\n weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[اليوم على الساعة] LT',\n nextDay: '[غدا على الساعة] LT',\n nextWeek: 'dddd [على الساعة] LT',\n lastDay: '[أمس على الساعة] LT',\n lastWeek: 'dddd [على الساعة] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'في %s',\n past: 'منذ %s',\n s: 'ثوان',\n ss: '%d ثانية',\n m: 'دقيقة',\n mm: '%d دقائق',\n h: 'ساعة',\n hh: '%d ساعات',\n d: 'يوم',\n dd: '%d أيام',\n M: 'شهر',\n MM: '%d أشهر',\n y: 'سنة',\n yy: '%d سنوات',\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return arTn;\n\n})));\n","//! moment.js locale configuration\n//! locale : Arabic [ar]\n//! author : Abdel Said: https://github.com/abdelsaid\n//! author : Ahmed Elkhatib\n//! author : forabi https://github.com/forabi\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '١',\n 2: '٢',\n 3: '٣',\n 4: '٤',\n 5: '٥',\n 6: '٦',\n 7: '٧',\n 8: '٨',\n 9: '٩',\n 0: '٠',\n },\n numberMap = {\n '١': '1',\n '٢': '2',\n '٣': '3',\n '٤': '4',\n '٥': '5',\n '٦': '6',\n '٧': '7',\n '٨': '8',\n '٩': '9',\n '٠': '0',\n },\n pluralForm = function (n) {\n return n === 0\n ? 0\n : n === 1\n ? 1\n : n === 2\n ? 2\n : n % 100 >= 3 && n % 100 <= 10\n ? 3\n : n % 100 >= 11\n ? 4\n : 5;\n },\n plurals = {\n s: [\n 'أقل من ثانية',\n 'ثانية واحدة',\n ['ثانيتان', 'ثانيتين'],\n '%d ثوان',\n '%d ثانية',\n '%d ثانية',\n ],\n m: [\n 'أقل من دقيقة',\n 'دقيقة واحدة',\n ['دقيقتان', 'دقيقتين'],\n '%d دقائق',\n '%d دقيقة',\n '%d دقيقة',\n ],\n h: [\n 'أقل من ساعة',\n 'ساعة واحدة',\n ['ساعتان', 'ساعتين'],\n '%d ساعات',\n '%d ساعة',\n '%d ساعة',\n ],\n d: [\n 'أقل من يوم',\n 'يوم واحد',\n ['يومان', 'يومين'],\n '%d أيام',\n '%d يومًا',\n '%d يوم',\n ],\n M: [\n 'أقل من شهر',\n 'شهر واحد',\n ['شهران', 'شهرين'],\n '%d أشهر',\n '%d شهرا',\n '%d شهر',\n ],\n y: [\n 'أقل من عام',\n 'عام واحد',\n ['عامان', 'عامين'],\n '%d أعوام',\n '%d عامًا',\n '%d عام',\n ],\n },\n pluralize = function (u) {\n return function (number, withoutSuffix, string, isFuture) {\n var f = pluralForm(number),\n str = plurals[u][pluralForm(number)];\n if (f === 2) {\n str = str[withoutSuffix ? 0 : 1];\n }\n return str.replace(/%d/i, number);\n };\n },\n months = [\n 'يناير',\n 'فبراير',\n 'مارس',\n 'أبريل',\n 'مايو',\n 'يونيو',\n 'يوليو',\n 'أغسطس',\n 'سبتمبر',\n 'أكتوبر',\n 'نوفمبر',\n 'ديسمبر',\n ];\n\n var ar = moment.defineLocale('ar', {\n months: months,\n monthsShort: months,\n weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'D/\\u200FM/\\u200FYYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n meridiemParse: /ص|م/,\n isPM: function (input) {\n return 'م' === input;\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'ص';\n } else {\n return 'م';\n }\n },\n calendar: {\n sameDay: '[اليوم عند الساعة] LT',\n nextDay: '[غدًا عند الساعة] LT',\n nextWeek: 'dddd [عند الساعة] LT',\n lastDay: '[أمس عند الساعة] LT',\n lastWeek: 'dddd [عند الساعة] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'بعد %s',\n past: 'منذ %s',\n s: pluralize('s'),\n ss: pluralize('s'),\n m: pluralize('m'),\n mm: pluralize('m'),\n h: pluralize('h'),\n hh: pluralize('h'),\n d: pluralize('d'),\n dd: pluralize('d'),\n M: pluralize('M'),\n MM: pluralize('M'),\n y: pluralize('y'),\n yy: pluralize('y'),\n },\n preparse: function (string) {\n return string\n .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {\n return numberMap[match];\n })\n .replace(/،/g, ',');\n },\n postformat: function (string) {\n return string\n .replace(/\\d/g, function (match) {\n return symbolMap[match];\n })\n .replace(/,/g, '،');\n },\n week: {\n dow: 6, // Saturday is the first day of the week.\n doy: 12, // The week that contains Jan 12th is the first week of the year.\n },\n });\n\n return ar;\n\n})));\n","//! moment.js locale configuration\n//! locale : Azerbaijani [az]\n//! author : topchiyev : https://github.com/topchiyev\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var suffixes = {\n 1: '-inci',\n 5: '-inci',\n 8: '-inci',\n 70: '-inci',\n 80: '-inci',\n 2: '-nci',\n 7: '-nci',\n 20: '-nci',\n 50: '-nci',\n 3: '-üncü',\n 4: '-üncü',\n 100: '-üncü',\n 6: '-ncı',\n 9: '-uncu',\n 10: '-uncu',\n 30: '-uncu',\n 60: '-ıncı',\n 90: '-ıncı',\n };\n\n var az = moment.defineLocale('az', {\n months: 'yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr'.split(\n '_'\n ),\n monthsShort: 'yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek'.split('_'),\n weekdays:\n 'Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə'.split(\n '_'\n ),\n weekdaysShort: 'Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən'.split('_'),\n weekdaysMin: 'Bz_BE_ÇA_Çə_CA_Cü_Şə'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[bugün saat] LT',\n nextDay: '[sabah saat] LT',\n nextWeek: '[gələn həftə] dddd [saat] LT',\n lastDay: '[dünən] LT',\n lastWeek: '[keçən həftə] dddd [saat] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s sonra',\n past: '%s əvvəl',\n s: 'bir neçə saniyə',\n ss: '%d saniyə',\n m: 'bir dəqiqə',\n mm: '%d dəqiqə',\n h: 'bir saat',\n hh: '%d saat',\n d: 'bir gün',\n dd: '%d gün',\n M: 'bir ay',\n MM: '%d ay',\n y: 'bir il',\n yy: '%d il',\n },\n meridiemParse: /gecə|səhər|gündüz|axşam/,\n isPM: function (input) {\n return /^(gündüz|axşam)$/.test(input);\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'gecə';\n } else if (hour < 12) {\n return 'səhər';\n } else if (hour < 17) {\n return 'gündüz';\n } else {\n return 'axşam';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,\n ordinal: function (number) {\n if (number === 0) {\n // special case for zero\n return number + '-ıncı';\n }\n var a = number % 10,\n b = (number % 100) - a,\n c = number >= 100 ? 100 : null;\n return number + (suffixes[a] || suffixes[b] || suffixes[c]);\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return az;\n\n})));\n","//! moment.js locale configuration\n//! locale : Belarusian [be]\n//! author : Dmitry Demidov : https://github.com/demidov91\n//! author: Praleska: http://praleska.pro/\n//! Author : Menelion Elensúle : https://github.com/Oire\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function plural(word, num) {\n var forms = word.split('_');\n return num % 10 === 1 && num % 100 !== 11\n ? forms[0]\n : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)\n ? forms[1]\n : forms[2];\n }\n function relativeTimeWithPlural(number, withoutSuffix, key) {\n var format = {\n ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд',\n mm: withoutSuffix ? 'хвіліна_хвіліны_хвілін' : 'хвіліну_хвіліны_хвілін',\n hh: withoutSuffix ? 'гадзіна_гадзіны_гадзін' : 'гадзіну_гадзіны_гадзін',\n dd: 'дзень_дні_дзён',\n MM: 'месяц_месяцы_месяцаў',\n yy: 'год_гады_гадоў',\n };\n if (key === 'm') {\n return withoutSuffix ? 'хвіліна' : 'хвіліну';\n } else if (key === 'h') {\n return withoutSuffix ? 'гадзіна' : 'гадзіну';\n } else {\n return number + ' ' + plural(format[key], +number);\n }\n }\n\n var be = moment.defineLocale('be', {\n months: {\n format: 'студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня'.split(\n '_'\n ),\n standalone:\n 'студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань'.split(\n '_'\n ),\n },\n monthsShort:\n 'студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж'.split('_'),\n weekdays: {\n format: 'нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу'.split(\n '_'\n ),\n standalone:\n 'нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота'.split(\n '_'\n ),\n isFormat: /\\[ ?[Ууў] ?(?:мінулую|наступную)? ?\\] ?dddd/,\n },\n weekdaysShort: 'нд_пн_ат_ср_чц_пт_сб'.split('_'),\n weekdaysMin: 'нд_пн_ат_ср_чц_пт_сб'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY г.',\n LLL: 'D MMMM YYYY г., HH:mm',\n LLLL: 'dddd, D MMMM YYYY г., HH:mm',\n },\n calendar: {\n sameDay: '[Сёння ў] LT',\n nextDay: '[Заўтра ў] LT',\n lastDay: '[Учора ў] LT',\n nextWeek: function () {\n return '[У] dddd [ў] LT';\n },\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n case 3:\n case 5:\n case 6:\n return '[У мінулую] dddd [ў] LT';\n case 1:\n case 2:\n case 4:\n return '[У мінулы] dddd [ў] LT';\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'праз %s',\n past: '%s таму',\n s: 'некалькі секунд',\n m: relativeTimeWithPlural,\n mm: relativeTimeWithPlural,\n h: relativeTimeWithPlural,\n hh: relativeTimeWithPlural,\n d: 'дзень',\n dd: relativeTimeWithPlural,\n M: 'месяц',\n MM: relativeTimeWithPlural,\n y: 'год',\n yy: relativeTimeWithPlural,\n },\n meridiemParse: /ночы|раніцы|дня|вечара/,\n isPM: function (input) {\n return /^(дня|вечара)$/.test(input);\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'ночы';\n } else if (hour < 12) {\n return 'раніцы';\n } else if (hour < 17) {\n return 'дня';\n } else {\n return 'вечара';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(і|ы|га)/,\n ordinal: function (number, period) {\n switch (period) {\n case 'M':\n case 'd':\n case 'DDD':\n case 'w':\n case 'W':\n return (number % 10 === 2 || number % 10 === 3) &&\n number % 100 !== 12 &&\n number % 100 !== 13\n ? number + '-і'\n : number + '-ы';\n case 'D':\n return number + '-га';\n default:\n return number;\n }\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return be;\n\n})));\n","//! moment.js locale configuration\n//! locale : Bulgarian [bg]\n//! author : Krasen Borisov : https://github.com/kraz\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var bg = moment.defineLocale('bg', {\n months: 'януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември'.split(\n '_'\n ),\n monthsShort: 'яну_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек'.split('_'),\n weekdays: 'неделя_понеделник_вторник_сряда_четвъртък_петък_събота'.split(\n '_'\n ),\n weekdaysShort: 'нед_пон_вто_сря_чет_пет_съб'.split('_'),\n weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'D.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY H:mm',\n LLLL: 'dddd, D MMMM YYYY H:mm',\n },\n calendar: {\n sameDay: '[Днес в] LT',\n nextDay: '[Утре в] LT',\n nextWeek: 'dddd [в] LT',\n lastDay: '[Вчера в] LT',\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n case 3:\n case 6:\n return '[Миналата] dddd [в] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[Миналия] dddd [в] LT';\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'след %s',\n past: 'преди %s',\n s: 'няколко секунди',\n ss: '%d секунди',\n m: 'минута',\n mm: '%d минути',\n h: 'час',\n hh: '%d часа',\n d: 'ден',\n dd: '%d дена',\n w: 'седмица',\n ww: '%d седмици',\n M: 'месец',\n MM: '%d месеца',\n y: 'година',\n yy: '%d години',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(ев|ен|ти|ви|ри|ми)/,\n ordinal: function (number) {\n var lastDigit = number % 10,\n last2Digits = number % 100;\n if (number === 0) {\n return number + '-ев';\n } else if (last2Digits === 0) {\n return number + '-ен';\n } else if (last2Digits > 10 && last2Digits < 20) {\n return number + '-ти';\n } else if (lastDigit === 1) {\n return number + '-ви';\n } else if (lastDigit === 2) {\n return number + '-ри';\n } else if (lastDigit === 7 || lastDigit === 8) {\n return number + '-ми';\n } else {\n return number + '-ти';\n }\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return bg;\n\n})));\n","//! moment.js locale configuration\n//! locale : Bambara [bm]\n//! author : Estelle Comment : https://github.com/estellecomment\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var bm = moment.defineLocale('bm', {\n months: 'Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo'.split(\n '_'\n ),\n monthsShort: 'Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des'.split('_'),\n weekdays: 'Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri'.split('_'),\n weekdaysShort: 'Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib'.split('_'),\n weekdaysMin: 'Ka_Nt_Ta_Ar_Al_Ju_Si'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'MMMM [tile] D [san] YYYY',\n LLL: 'MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm',\n LLLL: 'dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm',\n },\n calendar: {\n sameDay: '[Bi lɛrɛ] LT',\n nextDay: '[Sini lɛrɛ] LT',\n nextWeek: 'dddd [don lɛrɛ] LT',\n lastDay: '[Kunu lɛrɛ] LT',\n lastWeek: 'dddd [tɛmɛnen lɛrɛ] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s kɔnɔ',\n past: 'a bɛ %s bɔ',\n s: 'sanga dama dama',\n ss: 'sekondi %d',\n m: 'miniti kelen',\n mm: 'miniti %d',\n h: 'lɛrɛ kelen',\n hh: 'lɛrɛ %d',\n d: 'tile kelen',\n dd: 'tile %d',\n M: 'kalo kelen',\n MM: 'kalo %d',\n y: 'san kelen',\n yy: 'san %d',\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return bm;\n\n})));\n","//! moment.js locale configuration\n//! locale : Bengali (Bangladesh) [bn-bd]\n//! author : Asraf Hossain Patoary : https://github.com/ashwoolford\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '১',\n 2: '২',\n 3: '৩',\n 4: '৪',\n 5: '৫',\n 6: '৬',\n 7: '৭',\n 8: '৮',\n 9: '৯',\n 0: '০',\n },\n numberMap = {\n '১': '1',\n '২': '2',\n '৩': '3',\n '৪': '4',\n '৫': '5',\n '৬': '6',\n '৭': '7',\n '৮': '8',\n '৯': '9',\n '০': '0',\n };\n\n var bnBd = moment.defineLocale('bn-bd', {\n months: 'জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split(\n '_'\n ),\n monthsShort:\n 'জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে'.split(\n '_'\n ),\n weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split(\n '_'\n ),\n weekdaysShort: 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'),\n weekdaysMin: 'রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি'.split('_'),\n longDateFormat: {\n LT: 'A h:mm সময়',\n LTS: 'A h:mm:ss সময়',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm সময়',\n LLLL: 'dddd, D MMMM YYYY, A h:mm সময়',\n },\n calendar: {\n sameDay: '[আজ] LT',\n nextDay: '[আগামীকাল] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[গতকাল] LT',\n lastWeek: '[গত] dddd, LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s পরে',\n past: '%s আগে',\n s: 'কয়েক সেকেন্ড',\n ss: '%d সেকেন্ড',\n m: 'এক মিনিট',\n mm: '%d মিনিট',\n h: 'এক ঘন্টা',\n hh: '%d ঘন্টা',\n d: 'এক দিন',\n dd: '%d দিন',\n M: 'এক মাস',\n MM: '%d মাস',\n y: 'এক বছর',\n yy: '%d বছর',\n },\n preparse: function (string) {\n return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n\n meridiemParse: /রাত|ভোর|সকাল|দুপুর|বিকাল|সন্ধ্যা|রাত/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'রাত') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'ভোর') {\n return hour;\n } else if (meridiem === 'সকাল') {\n return hour;\n } else if (meridiem === 'দুপুর') {\n return hour >= 3 ? hour : hour + 12;\n } else if (meridiem === 'বিকাল') {\n return hour + 12;\n } else if (meridiem === 'সন্ধ্যা') {\n return hour + 12;\n }\n },\n\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'রাত';\n } else if (hour < 6) {\n return 'ভোর';\n } else if (hour < 12) {\n return 'সকাল';\n } else if (hour < 15) {\n return 'দুপুর';\n } else if (hour < 18) {\n return 'বিকাল';\n } else if (hour < 20) {\n return 'সন্ধ্যা';\n } else {\n return 'রাত';\n }\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n },\n });\n\n return bnBd;\n\n})));\n","//! moment.js locale configuration\n//! locale : Bengali [bn]\n//! author : Kaushik Gandhi : https://github.com/kaushikgandhi\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '১',\n 2: '২',\n 3: '৩',\n 4: '৪',\n 5: '৫',\n 6: '৬',\n 7: '৭',\n 8: '৮',\n 9: '৯',\n 0: '০',\n },\n numberMap = {\n '১': '1',\n '২': '2',\n '৩': '3',\n '৪': '4',\n '৫': '5',\n '৬': '6',\n '৭': '7',\n '৮': '8',\n '৯': '9',\n '০': '0',\n };\n\n var bn = moment.defineLocale('bn', {\n months: 'জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split(\n '_'\n ),\n monthsShort:\n 'জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে'.split(\n '_'\n ),\n weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split(\n '_'\n ),\n weekdaysShort: 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'),\n weekdaysMin: 'রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি'.split('_'),\n longDateFormat: {\n LT: 'A h:mm সময়',\n LTS: 'A h:mm:ss সময়',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm সময়',\n LLLL: 'dddd, D MMMM YYYY, A h:mm সময়',\n },\n calendar: {\n sameDay: '[আজ] LT',\n nextDay: '[আগামীকাল] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[গতকাল] LT',\n lastWeek: '[গত] dddd, LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s পরে',\n past: '%s আগে',\n s: 'কয়েক সেকেন্ড',\n ss: '%d সেকেন্ড',\n m: 'এক মিনিট',\n mm: '%d মিনিট',\n h: 'এক ঘন্টা',\n hh: '%d ঘন্টা',\n d: 'এক দিন',\n dd: '%d দিন',\n M: 'এক মাস',\n MM: '%d মাস',\n y: 'এক বছর',\n yy: '%d বছর',\n },\n preparse: function (string) {\n return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n meridiemParse: /রাত|সকাল|দুপুর|বিকাল|রাত/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (\n (meridiem === 'রাত' && hour >= 4) ||\n (meridiem === 'দুপুর' && hour < 5) ||\n meridiem === 'বিকাল'\n ) {\n return hour + 12;\n } else {\n return hour;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'রাত';\n } else if (hour < 10) {\n return 'সকাল';\n } else if (hour < 17) {\n return 'দুপুর';\n } else if (hour < 20) {\n return 'বিকাল';\n } else {\n return 'রাত';\n }\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n },\n });\n\n return bn;\n\n})));\n","//! moment.js locale configuration\n//! locale : Tibetan [bo]\n//! author : Thupten N. Chakrishar : https://github.com/vajradog\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '༡',\n 2: '༢',\n 3: '༣',\n 4: '༤',\n 5: '༥',\n 6: '༦',\n 7: '༧',\n 8: '༨',\n 9: '༩',\n 0: '༠',\n },\n numberMap = {\n '༡': '1',\n '༢': '2',\n '༣': '3',\n '༤': '4',\n '༥': '5',\n '༦': '6',\n '༧': '7',\n '༨': '8',\n '༩': '9',\n '༠': '0',\n };\n\n var bo = moment.defineLocale('bo', {\n months: 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split(\n '_'\n ),\n monthsShort:\n 'ཟླ་1_ཟླ་2_ཟླ་3_ཟླ་4_ཟླ་5_ཟླ་6_ཟླ་7_ཟླ་8_ཟླ་9_ཟླ་10_ཟླ་11_ཟླ་12'.split(\n '_'\n ),\n monthsShortRegex: /^(ཟླ་\\d{1,2})/,\n monthsParseExact: true,\n weekdays:\n 'གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་'.split(\n '_'\n ),\n weekdaysShort: 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split(\n '_'\n ),\n weekdaysMin: 'ཉི_ཟླ_མིག_ལྷག_ཕུར_སངས_སྤེན'.split('_'),\n longDateFormat: {\n LT: 'A h:mm',\n LTS: 'A h:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm',\n LLLL: 'dddd, D MMMM YYYY, A h:mm',\n },\n calendar: {\n sameDay: '[དི་རིང] LT',\n nextDay: '[སང་ཉིན] LT',\n nextWeek: '[བདུན་ཕྲག་རྗེས་མ], LT',\n lastDay: '[ཁ་སང] LT',\n lastWeek: '[བདུན་ཕྲག་མཐའ་མ] dddd, LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s ལ་',\n past: '%s སྔན་ལ',\n s: 'ལམ་སང',\n ss: '%d སྐར་ཆ།',\n m: 'སྐར་མ་གཅིག',\n mm: '%d སྐར་མ',\n h: 'ཆུ་ཚོད་གཅིག',\n hh: '%d ཆུ་ཚོད',\n d: 'ཉིན་གཅིག',\n dd: '%d ཉིན་',\n M: 'ཟླ་བ་གཅིག',\n MM: '%d ཟླ་བ',\n y: 'ལོ་གཅིག',\n yy: '%d ལོ',\n },\n preparse: function (string) {\n return string.replace(/[༡༢༣༤༥༦༧༨༩༠]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n meridiemParse: /མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (\n (meridiem === 'མཚན་མོ' && hour >= 4) ||\n (meridiem === 'ཉིན་གུང' && hour < 5) ||\n meridiem === 'དགོང་དག'\n ) {\n return hour + 12;\n } else {\n return hour;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'མཚན་མོ';\n } else if (hour < 10) {\n return 'ཞོགས་ཀས';\n } else if (hour < 17) {\n return 'ཉིན་གུང';\n } else if (hour < 20) {\n return 'དགོང་དག';\n } else {\n return 'མཚན་མོ';\n }\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n },\n });\n\n return bo;\n\n})));\n","//! moment.js locale configuration\n//! locale : Breton [br]\n//! author : Jean-Baptiste Le Duigou : https://github.com/jbleduigou\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function relativeTimeWithMutation(number, withoutSuffix, key) {\n var format = {\n mm: 'munutenn',\n MM: 'miz',\n dd: 'devezh',\n };\n return number + ' ' + mutation(format[key], number);\n }\n function specialMutationForYears(number) {\n switch (lastNumber(number)) {\n case 1:\n case 3:\n case 4:\n case 5:\n case 9:\n return number + ' bloaz';\n default:\n return number + ' vloaz';\n }\n }\n function lastNumber(number) {\n if (number > 9) {\n return lastNumber(number % 10);\n }\n return number;\n }\n function mutation(text, number) {\n if (number === 2) {\n return softMutation(text);\n }\n return text;\n }\n function softMutation(text) {\n var mutationTable = {\n m: 'v',\n b: 'v',\n d: 'z',\n };\n if (mutationTable[text.charAt(0)] === undefined) {\n return text;\n }\n return mutationTable[text.charAt(0)] + text.substring(1);\n }\n\n var monthsParse = [\n /^gen/i,\n /^c[ʼ\\']hwe/i,\n /^meu/i,\n /^ebr/i,\n /^mae/i,\n /^(mez|eve)/i,\n /^gou/i,\n /^eos/i,\n /^gwe/i,\n /^her/i,\n /^du/i,\n /^ker/i,\n ],\n monthsRegex =\n /^(genver|c[ʼ\\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu|gen|c[ʼ\\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,\n monthsStrictRegex =\n /^(genver|c[ʼ\\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu)/i,\n monthsShortStrictRegex =\n /^(gen|c[ʼ\\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,\n fullWeekdaysParse = [\n /^sul/i,\n /^lun/i,\n /^meurzh/i,\n /^merc[ʼ\\']her/i,\n /^yaou/i,\n /^gwener/i,\n /^sadorn/i,\n ],\n shortWeekdaysParse = [\n /^Sul/i,\n /^Lun/i,\n /^Meu/i,\n /^Mer/i,\n /^Yao/i,\n /^Gwe/i,\n /^Sad/i,\n ],\n minWeekdaysParse = [\n /^Su/i,\n /^Lu/i,\n /^Me([^r]|$)/i,\n /^Mer/i,\n /^Ya/i,\n /^Gw/i,\n /^Sa/i,\n ];\n\n var br = moment.defineLocale('br', {\n months: 'Genver_Cʼhwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu'.split(\n '_'\n ),\n monthsShort: 'Gen_Cʼhwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker'.split('_'),\n weekdays: 'Sul_Lun_Meurzh_Mercʼher_Yaou_Gwener_Sadorn'.split('_'),\n weekdaysShort: 'Sul_Lun_Meu_Mer_Yao_Gwe_Sad'.split('_'),\n weekdaysMin: 'Su_Lu_Me_Mer_Ya_Gw_Sa'.split('_'),\n weekdaysParse: minWeekdaysParse,\n fullWeekdaysParse: fullWeekdaysParse,\n shortWeekdaysParse: shortWeekdaysParse,\n minWeekdaysParse: minWeekdaysParse,\n\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex: monthsStrictRegex,\n monthsShortStrictRegex: monthsShortStrictRegex,\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D [a viz] MMMM YYYY',\n LLL: 'D [a viz] MMMM YYYY HH:mm',\n LLLL: 'dddd, D [a viz] MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Hiziv da] LT',\n nextDay: '[Warcʼhoazh da] LT',\n nextWeek: 'dddd [da] LT',\n lastDay: '[Decʼh da] LT',\n lastWeek: 'dddd [paset da] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'a-benn %s',\n past: '%s ʼzo',\n s: 'un nebeud segondennoù',\n ss: '%d eilenn',\n m: 'ur vunutenn',\n mm: relativeTimeWithMutation,\n h: 'un eur',\n hh: '%d eur',\n d: 'un devezh',\n dd: relativeTimeWithMutation,\n M: 'ur miz',\n MM: relativeTimeWithMutation,\n y: 'ur bloaz',\n yy: specialMutationForYears,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(añ|vet)/,\n ordinal: function (number) {\n var output = number === 1 ? 'añ' : 'vet';\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n meridiemParse: /a.m.|g.m./, // goude merenn | a-raok merenn\n isPM: function (token) {\n return token === 'g.m.';\n },\n meridiem: function (hour, minute, isLower) {\n return hour < 12 ? 'a.m.' : 'g.m.';\n },\n });\n\n return br;\n\n})));\n","//! moment.js locale configuration\n//! locale : Bosnian [bs]\n//! author : Nedim Cholich : https://github.com/frontyard\n//! based on (hr) translation by Bojan Marković\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function translate(number, withoutSuffix, key) {\n var result = number + ' ';\n switch (key) {\n case 'ss':\n if (number === 1) {\n result += 'sekunda';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'sekunde';\n } else {\n result += 'sekundi';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'jedna minuta' : 'jedne minute';\n case 'mm':\n if (number === 1) {\n result += 'minuta';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'minute';\n } else {\n result += 'minuta';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'jedan sat' : 'jednog sata';\n case 'hh':\n if (number === 1) {\n result += 'sat';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'sata';\n } else {\n result += 'sati';\n }\n return result;\n case 'dd':\n if (number === 1) {\n result += 'dan';\n } else {\n result += 'dana';\n }\n return result;\n case 'MM':\n if (number === 1) {\n result += 'mjesec';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'mjeseca';\n } else {\n result += 'mjeseci';\n }\n return result;\n case 'yy':\n if (number === 1) {\n result += 'godina';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'godine';\n } else {\n result += 'godina';\n }\n return result;\n }\n }\n\n var bs = moment.defineLocale('bs', {\n months: 'januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar'.split(\n '_'\n ),\n monthsShort:\n 'jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(\n '_'\n ),\n weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),\n weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm',\n LLLL: 'dddd, D. MMMM YYYY H:mm',\n },\n calendar: {\n sameDay: '[danas u] LT',\n nextDay: '[sutra u] LT',\n nextWeek: function () {\n switch (this.day()) {\n case 0:\n return '[u] [nedjelju] [u] LT';\n case 3:\n return '[u] [srijedu] [u] LT';\n case 6:\n return '[u] [subotu] [u] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[u] dddd [u] LT';\n }\n },\n lastDay: '[jučer u] LT',\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n case 3:\n return '[prošlu] dddd [u] LT';\n case 6:\n return '[prošle] [subote] [u] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[prošli] dddd [u] LT';\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'za %s',\n past: 'prije %s',\n s: 'par sekundi',\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: 'dan',\n dd: translate,\n M: 'mjesec',\n MM: translate,\n y: 'godinu',\n yy: translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return bs;\n\n})));\n","//! moment.js locale configuration\n//! locale : Catalan [ca]\n//! author : Juan G. Hurtado : https://github.com/juanghurtado\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var ca = moment.defineLocale('ca', {\n months: {\n standalone:\n 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split(\n '_'\n ),\n format: \"de gener_de febrer_de març_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre\".split(\n '_'\n ),\n isFormat: /D[oD]?(\\s)+MMMM/,\n },\n monthsShort:\n 'gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays:\n 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split(\n '_'\n ),\n weekdaysShort: 'dg._dl._dt._dc._dj._dv._ds.'.split('_'),\n weekdaysMin: 'dg_dl_dt_dc_dj_dv_ds'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM [de] YYYY',\n ll: 'D MMM YYYY',\n LLL: 'D MMMM [de] YYYY [a les] H:mm',\n lll: 'D MMM YYYY, H:mm',\n LLLL: 'dddd D MMMM [de] YYYY [a les] H:mm',\n llll: 'ddd D MMM YYYY, H:mm',\n },\n calendar: {\n sameDay: function () {\n return '[avui a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';\n },\n nextDay: function () {\n return '[demà a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';\n },\n nextWeek: function () {\n return 'dddd [a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';\n },\n lastDay: function () {\n return '[ahir a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';\n },\n lastWeek: function () {\n return (\n '[el] dddd [passat a ' +\n (this.hours() !== 1 ? 'les' : 'la') +\n '] LT'\n );\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: \"d'aquí %s\",\n past: 'fa %s',\n s: 'uns segons',\n ss: '%d segons',\n m: 'un minut',\n mm: '%d minuts',\n h: 'una hora',\n hh: '%d hores',\n d: 'un dia',\n dd: '%d dies',\n M: 'un mes',\n MM: '%d mesos',\n y: 'un any',\n yy: '%d anys',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(r|n|t|è|a)/,\n ordinal: function (number, period) {\n var output =\n number === 1\n ? 'r'\n : number === 2\n ? 'n'\n : number === 3\n ? 'r'\n : number === 4\n ? 't'\n : 'è';\n if (period === 'w' || period === 'W') {\n output = 'a';\n }\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return ca;\n\n})));\n","//! moment.js locale configuration\n//! locale : Czech [cs]\n//! author : petrbela : https://github.com/petrbela\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var months = {\n format: 'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.split(\n '_'\n ),\n standalone:\n 'ledna_února_března_dubna_května_června_července_srpna_září_října_listopadu_prosince'.split(\n '_'\n ),\n },\n monthsShort = 'led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro'.split('_'),\n monthsParse = [\n /^led/i,\n /^úno/i,\n /^bře/i,\n /^dub/i,\n /^kvě/i,\n /^(čvn|červen$|června)/i,\n /^(čvc|červenec|července)/i,\n /^srp/i,\n /^zář/i,\n /^říj/i,\n /^lis/i,\n /^pro/i,\n ],\n // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched.\n // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'.\n monthsRegex =\n /^(leden|únor|březen|duben|květen|červenec|července|červen|června|srpen|září|říjen|listopad|prosinec|led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i;\n\n function plural(n) {\n return n > 1 && n < 5 && ~~(n / 10) !== 1;\n }\n function translate(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's': // a few seconds / in a few seconds / a few seconds ago\n return withoutSuffix || isFuture ? 'pár sekund' : 'pár sekundami';\n case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'sekundy' : 'sekund');\n } else {\n return result + 'sekundami';\n }\n case 'm': // a minute / in a minute / a minute ago\n return withoutSuffix ? 'minuta' : isFuture ? 'minutu' : 'minutou';\n case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'minuty' : 'minut');\n } else {\n return result + 'minutami';\n }\n case 'h': // an hour / in an hour / an hour ago\n return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou';\n case 'hh': // 9 hours / in 9 hours / 9 hours ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'hodiny' : 'hodin');\n } else {\n return result + 'hodinami';\n }\n case 'd': // a day / in a day / a day ago\n return withoutSuffix || isFuture ? 'den' : 'dnem';\n case 'dd': // 9 days / in 9 days / 9 days ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'dny' : 'dní');\n } else {\n return result + 'dny';\n }\n case 'M': // a month / in a month / a month ago\n return withoutSuffix || isFuture ? 'měsíc' : 'měsícem';\n case 'MM': // 9 months / in 9 months / 9 months ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'měsíce' : 'měsíců');\n } else {\n return result + 'měsíci';\n }\n case 'y': // a year / in a year / a year ago\n return withoutSuffix || isFuture ? 'rok' : 'rokem';\n case 'yy': // 9 years / in 9 years / 9 years ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'roky' : 'let');\n } else {\n return result + 'lety';\n }\n }\n }\n\n var cs = moment.defineLocale('cs', {\n months: months,\n monthsShort: monthsShort,\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched.\n // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'.\n monthsStrictRegex:\n /^(leden|ledna|února|únor|březen|března|duben|dubna|květen|května|červenec|července|červen|června|srpen|srpna|září|říjen|října|listopadu|listopad|prosinec|prosince)/i,\n monthsShortStrictRegex:\n /^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i,\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n weekdays: 'neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota'.split('_'),\n weekdaysShort: 'ne_po_út_st_čt_pá_so'.split('_'),\n weekdaysMin: 'ne_po_út_st_čt_pá_so'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm',\n LLLL: 'dddd D. MMMM YYYY H:mm',\n l: 'D. M. YYYY',\n },\n calendar: {\n sameDay: '[dnes v] LT',\n nextDay: '[zítra v] LT',\n nextWeek: function () {\n switch (this.day()) {\n case 0:\n return '[v neděli v] LT';\n case 1:\n case 2:\n return '[v] dddd [v] LT';\n case 3:\n return '[ve středu v] LT';\n case 4:\n return '[ve čtvrtek v] LT';\n case 5:\n return '[v pátek v] LT';\n case 6:\n return '[v sobotu v] LT';\n }\n },\n lastDay: '[včera v] LT',\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n return '[minulou neděli v] LT';\n case 1:\n case 2:\n return '[minulé] dddd [v] LT';\n case 3:\n return '[minulou středu v] LT';\n case 4:\n case 5:\n return '[minulý] dddd [v] LT';\n case 6:\n return '[minulou sobotu v] LT';\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'za %s',\n past: 'před %s',\n s: translate,\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: translate,\n dd: translate,\n M: translate,\n MM: translate,\n y: translate,\n yy: translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return cs;\n\n})));\n","//! moment.js locale configuration\n//! locale : Chuvash [cv]\n//! author : Anatoly Mironov : https://github.com/mirontoli\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var cv = moment.defineLocale('cv', {\n months: 'кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав'.split(\n '_'\n ),\n monthsShort: 'кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш'.split('_'),\n weekdays:\n 'вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун'.split(\n '_'\n ),\n weekdaysShort: 'выр_тун_ытл_юн_кӗҫ_эрн_шӑм'.split('_'),\n weekdaysMin: 'вр_тн_ыт_юн_кҫ_эр_шм'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD-MM-YYYY',\n LL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]',\n LLL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm',\n LLLL: 'dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm',\n },\n calendar: {\n sameDay: '[Паян] LT [сехетре]',\n nextDay: '[Ыран] LT [сехетре]',\n lastDay: '[Ӗнер] LT [сехетре]',\n nextWeek: '[Ҫитес] dddd LT [сехетре]',\n lastWeek: '[Иртнӗ] dddd LT [сехетре]',\n sameElse: 'L',\n },\n relativeTime: {\n future: function (output) {\n var affix = /сехет$/i.exec(output)\n ? 'рен'\n : /ҫул$/i.exec(output)\n ? 'тан'\n : 'ран';\n return output + affix;\n },\n past: '%s каялла',\n s: 'пӗр-ик ҫеккунт',\n ss: '%d ҫеккунт',\n m: 'пӗр минут',\n mm: '%d минут',\n h: 'пӗр сехет',\n hh: '%d сехет',\n d: 'пӗр кун',\n dd: '%d кун',\n M: 'пӗр уйӑх',\n MM: '%d уйӑх',\n y: 'пӗр ҫул',\n yy: '%d ҫул',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-мӗш/,\n ordinal: '%d-мӗш',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return cv;\n\n})));\n","//! moment.js locale configuration\n//! locale : Welsh [cy]\n//! author : Robert Allen : https://github.com/robgallen\n//! author : https://github.com/ryangreaves\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var cy = moment.defineLocale('cy', {\n months: 'Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr'.split(\n '_'\n ),\n monthsShort: 'Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag'.split(\n '_'\n ),\n weekdays:\n 'Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn'.split(\n '_'\n ),\n weekdaysShort: 'Sul_Llun_Maw_Mer_Iau_Gwe_Sad'.split('_'),\n weekdaysMin: 'Su_Ll_Ma_Me_Ia_Gw_Sa'.split('_'),\n weekdaysParseExact: true,\n // time formats are the same as en-gb\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Heddiw am] LT',\n nextDay: '[Yfory am] LT',\n nextWeek: 'dddd [am] LT',\n lastDay: '[Ddoe am] LT',\n lastWeek: 'dddd [diwethaf am] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'mewn %s',\n past: '%s yn ôl',\n s: 'ychydig eiliadau',\n ss: '%d eiliad',\n m: 'munud',\n mm: '%d munud',\n h: 'awr',\n hh: '%d awr',\n d: 'diwrnod',\n dd: '%d diwrnod',\n M: 'mis',\n MM: '%d mis',\n y: 'blwyddyn',\n yy: '%d flynedd',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,\n // traditional ordinal numbers above 31 are not commonly used in colloquial Welsh\n ordinal: function (number) {\n var b = number,\n output = '',\n lookup = [\n '',\n 'af',\n 'il',\n 'ydd',\n 'ydd',\n 'ed',\n 'ed',\n 'ed',\n 'fed',\n 'fed',\n 'fed', // 1af to 10fed\n 'eg',\n 'fed',\n 'eg',\n 'eg',\n 'fed',\n 'eg',\n 'eg',\n 'fed',\n 'eg',\n 'fed', // 11eg to 20fed\n ];\n if (b > 20) {\n if (b === 40 || b === 50 || b === 60 || b === 80 || b === 100) {\n output = 'fed'; // not 30ain, 70ain or 90ain\n } else {\n output = 'ain';\n }\n } else if (b > 0) {\n output = lookup[b];\n }\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return cy;\n\n})));\n","//! moment.js locale configuration\n//! locale : Danish [da]\n//! author : Ulrik Nielsen : https://github.com/mrbase\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var da = moment.defineLocale('da', {\n months: 'januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december'.split(\n '_'\n ),\n monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),\n weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),\n weekdaysShort: 'søn_man_tir_ons_tor_fre_lør'.split('_'),\n weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY HH:mm',\n LLLL: 'dddd [d.] D. MMMM YYYY [kl.] HH:mm',\n },\n calendar: {\n sameDay: '[i dag kl.] LT',\n nextDay: '[i morgen kl.] LT',\n nextWeek: 'på dddd [kl.] LT',\n lastDay: '[i går kl.] LT',\n lastWeek: '[i] dddd[s kl.] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'om %s',\n past: '%s siden',\n s: 'få sekunder',\n ss: '%d sekunder',\n m: 'et minut',\n mm: '%d minutter',\n h: 'en time',\n hh: '%d timer',\n d: 'en dag',\n dd: '%d dage',\n M: 'en måned',\n MM: '%d måneder',\n y: 'et år',\n yy: '%d år',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return da;\n\n})));\n","//! moment.js locale configuration\n//! locale : German (Austria) [de-at]\n//! author : lluchs : https://github.com/lluchs\n//! author: Menelion Elensúle: https://github.com/Oire\n//! author : Martin Groller : https://github.com/MadMG\n//! author : Mikolaj Dadela : https://github.com/mik01aj\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n m: ['eine Minute', 'einer Minute'],\n h: ['eine Stunde', 'einer Stunde'],\n d: ['ein Tag', 'einem Tag'],\n dd: [number + ' Tage', number + ' Tagen'],\n w: ['eine Woche', 'einer Woche'],\n M: ['ein Monat', 'einem Monat'],\n MM: [number + ' Monate', number + ' Monaten'],\n y: ['ein Jahr', 'einem Jahr'],\n yy: [number + ' Jahre', number + ' Jahren'],\n };\n return withoutSuffix ? format[key][0] : format[key][1];\n }\n\n var deAt = moment.defineLocale('de-at', {\n months: 'Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(\n '_'\n ),\n monthsShort:\n 'Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),\n monthsParseExact: true,\n weekdays:\n 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(\n '_'\n ),\n weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),\n weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY HH:mm',\n LLLL: 'dddd, D. MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[heute um] LT [Uhr]',\n sameElse: 'L',\n nextDay: '[morgen um] LT [Uhr]',\n nextWeek: 'dddd [um] LT [Uhr]',\n lastDay: '[gestern um] LT [Uhr]',\n lastWeek: '[letzten] dddd [um] LT [Uhr]',\n },\n relativeTime: {\n future: 'in %s',\n past: 'vor %s',\n s: 'ein paar Sekunden',\n ss: '%d Sekunden',\n m: processRelativeTime,\n mm: '%d Minuten',\n h: processRelativeTime,\n hh: '%d Stunden',\n d: processRelativeTime,\n dd: processRelativeTime,\n w: processRelativeTime,\n ww: '%d Wochen',\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return deAt;\n\n})));\n","//! moment.js locale configuration\n//! locale : German (Switzerland) [de-ch]\n//! author : sschueller : https://github.com/sschueller\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n m: ['eine Minute', 'einer Minute'],\n h: ['eine Stunde', 'einer Stunde'],\n d: ['ein Tag', 'einem Tag'],\n dd: [number + ' Tage', number + ' Tagen'],\n w: ['eine Woche', 'einer Woche'],\n M: ['ein Monat', 'einem Monat'],\n MM: [number + ' Monate', number + ' Monaten'],\n y: ['ein Jahr', 'einem Jahr'],\n yy: [number + ' Jahre', number + ' Jahren'],\n };\n return withoutSuffix ? format[key][0] : format[key][1];\n }\n\n var deCh = moment.defineLocale('de-ch', {\n months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(\n '_'\n ),\n monthsShort:\n 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),\n monthsParseExact: true,\n weekdays:\n 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(\n '_'\n ),\n weekdaysShort: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),\n weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY HH:mm',\n LLLL: 'dddd, D. MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[heute um] LT [Uhr]',\n sameElse: 'L',\n nextDay: '[morgen um] LT [Uhr]',\n nextWeek: 'dddd [um] LT [Uhr]',\n lastDay: '[gestern um] LT [Uhr]',\n lastWeek: '[letzten] dddd [um] LT [Uhr]',\n },\n relativeTime: {\n future: 'in %s',\n past: 'vor %s',\n s: 'ein paar Sekunden',\n ss: '%d Sekunden',\n m: processRelativeTime,\n mm: '%d Minuten',\n h: processRelativeTime,\n hh: '%d Stunden',\n d: processRelativeTime,\n dd: processRelativeTime,\n w: processRelativeTime,\n ww: '%d Wochen',\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return deCh;\n\n})));\n","//! moment.js locale configuration\n//! locale : German [de]\n//! author : lluchs : https://github.com/lluchs\n//! author: Menelion Elensúle: https://github.com/Oire\n//! author : Mikolaj Dadela : https://github.com/mik01aj\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n m: ['eine Minute', 'einer Minute'],\n h: ['eine Stunde', 'einer Stunde'],\n d: ['ein Tag', 'einem Tag'],\n dd: [number + ' Tage', number + ' Tagen'],\n w: ['eine Woche', 'einer Woche'],\n M: ['ein Monat', 'einem Monat'],\n MM: [number + ' Monate', number + ' Monaten'],\n y: ['ein Jahr', 'einem Jahr'],\n yy: [number + ' Jahre', number + ' Jahren'],\n };\n return withoutSuffix ? format[key][0] : format[key][1];\n }\n\n var de = moment.defineLocale('de', {\n months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(\n '_'\n ),\n monthsShort:\n 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),\n monthsParseExact: true,\n weekdays:\n 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(\n '_'\n ),\n weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),\n weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY HH:mm',\n LLLL: 'dddd, D. MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[heute um] LT [Uhr]',\n sameElse: 'L',\n nextDay: '[morgen um] LT [Uhr]',\n nextWeek: 'dddd [um] LT [Uhr]',\n lastDay: '[gestern um] LT [Uhr]',\n lastWeek: '[letzten] dddd [um] LT [Uhr]',\n },\n relativeTime: {\n future: 'in %s',\n past: 'vor %s',\n s: 'ein paar Sekunden',\n ss: '%d Sekunden',\n m: processRelativeTime,\n mm: '%d Minuten',\n h: processRelativeTime,\n hh: '%d Stunden',\n d: processRelativeTime,\n dd: processRelativeTime,\n w: processRelativeTime,\n ww: '%d Wochen',\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return de;\n\n})));\n","//! moment.js locale configuration\n//! locale : Maldivian [dv]\n//! author : Jawish Hameed : https://github.com/jawish\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var months = [\n 'ޖެނުއަރީ',\n 'ފެބްރުއަރީ',\n 'މާރިޗު',\n 'އޭޕްރީލު',\n 'މޭ',\n 'ޖޫން',\n 'ޖުލައި',\n 'އޯގަސްޓު',\n 'ސެޕްޓެމްބަރު',\n 'އޮކްޓޯބަރު',\n 'ނޮވެމްބަރު',\n 'ޑިސެމްބަރު',\n ],\n weekdays = [\n 'އާދިއްތަ',\n 'ހޯމަ',\n 'އަންގާރަ',\n 'ބުދަ',\n 'ބުރާސްފަތި',\n 'ހުކުރު',\n 'ހޮނިހިރު',\n ];\n\n var dv = moment.defineLocale('dv', {\n months: months,\n monthsShort: months,\n weekdays: weekdays,\n weekdaysShort: weekdays,\n weekdaysMin: 'އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'D/M/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n meridiemParse: /މކ|މފ/,\n isPM: function (input) {\n return 'މފ' === input;\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'މކ';\n } else {\n return 'މފ';\n }\n },\n calendar: {\n sameDay: '[މިއަދު] LT',\n nextDay: '[މާދަމާ] LT',\n nextWeek: 'dddd LT',\n lastDay: '[އިއްޔެ] LT',\n lastWeek: '[ފާއިތުވި] dddd LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'ތެރޭގައި %s',\n past: 'ކުރިން %s',\n s: 'ސިކުންތުކޮޅެއް',\n ss: 'd% ސިކުންތު',\n m: 'މިނިޓެއް',\n mm: 'މިނިޓު %d',\n h: 'ގަޑިއިރެއް',\n hh: 'ގަޑިއިރު %d',\n d: 'ދުވަހެއް',\n dd: 'ދުވަސް %d',\n M: 'މަހެއް',\n MM: 'މަސް %d',\n y: 'އަހަރެއް',\n yy: 'އަހަރު %d',\n },\n preparse: function (string) {\n return string.replace(/،/g, ',');\n },\n postformat: function (string) {\n return string.replace(/,/g, '،');\n },\n week: {\n dow: 7, // Sunday is the first day of the week.\n doy: 12, // The week that contains Jan 12th is the first week of the year.\n },\n });\n\n return dv;\n\n})));\n","//! moment.js locale configuration\n//! locale : Greek [el]\n//! author : Aggelos Karalias : https://github.com/mehiel\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function isFunction(input) {\n return (\n (typeof Function !== 'undefined' && input instanceof Function) ||\n Object.prototype.toString.call(input) === '[object Function]'\n );\n }\n\n var el = moment.defineLocale('el', {\n monthsNominativeEl:\n 'Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος'.split(\n '_'\n ),\n monthsGenitiveEl:\n 'Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου'.split(\n '_'\n ),\n months: function (momentToFormat, format) {\n if (!momentToFormat) {\n return this._monthsNominativeEl;\n } else if (\n typeof format === 'string' &&\n /D/.test(format.substring(0, format.indexOf('MMMM')))\n ) {\n // if there is a day number before 'MMMM'\n return this._monthsGenitiveEl[momentToFormat.month()];\n } else {\n return this._monthsNominativeEl[momentToFormat.month()];\n }\n },\n monthsShort: 'Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ'.split('_'),\n weekdays: 'Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο'.split(\n '_'\n ),\n weekdaysShort: 'Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ'.split('_'),\n weekdaysMin: 'Κυ_Δε_Τρ_Τε_Πε_Πα_Σα'.split('_'),\n meridiem: function (hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'μμ' : 'ΜΜ';\n } else {\n return isLower ? 'πμ' : 'ΠΜ';\n }\n },\n isPM: function (input) {\n return (input + '').toLowerCase()[0] === 'μ';\n },\n meridiemParse: /[ΠΜ]\\.?Μ?\\.?/i,\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY h:mm A',\n LLLL: 'dddd, D MMMM YYYY h:mm A',\n },\n calendarEl: {\n sameDay: '[Σήμερα {}] LT',\n nextDay: '[Αύριο {}] LT',\n nextWeek: 'dddd [{}] LT',\n lastDay: '[Χθες {}] LT',\n lastWeek: function () {\n switch (this.day()) {\n case 6:\n return '[το προηγούμενο] dddd [{}] LT';\n default:\n return '[την προηγούμενη] dddd [{}] LT';\n }\n },\n sameElse: 'L',\n },\n calendar: function (key, mom) {\n var output = this._calendarEl[key],\n hours = mom && mom.hours();\n if (isFunction(output)) {\n output = output.apply(mom);\n }\n return output.replace('{}', hours % 12 === 1 ? 'στη' : 'στις');\n },\n relativeTime: {\n future: 'σε %s',\n past: '%s πριν',\n s: 'λίγα δευτερόλεπτα',\n ss: '%d δευτερόλεπτα',\n m: 'ένα λεπτό',\n mm: '%d λεπτά',\n h: 'μία ώρα',\n hh: '%d ώρες',\n d: 'μία μέρα',\n dd: '%d μέρες',\n M: 'ένας μήνας',\n MM: '%d μήνες',\n y: 'ένας χρόνος',\n yy: '%d χρόνια',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}η/,\n ordinal: '%dη',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4st is the first week of the year.\n },\n });\n\n return el;\n\n})));\n","//! moment.js locale configuration\n//! locale : English (Australia) [en-au]\n//! author : Jared Morse : https://github.com/jarcoal\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var enAu = moment.defineLocale('en-au', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n '_'\n ),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY h:mm A',\n LLLL: 'dddd, D MMMM YYYY h:mm A',\n },\n calendar: {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n ~~((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return enAu;\n\n})));\n","//! moment.js locale configuration\n//! locale : English (Canada) [en-ca]\n//! author : Jonathan Abourbih : https://github.com/jonbca\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var enCa = moment.defineLocale('en-ca', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n '_'\n ),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'YYYY-MM-DD',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A',\n },\n calendar: {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n ~~((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n });\n\n return enCa;\n\n})));\n","//! moment.js locale configuration\n//! locale : English (United Kingdom) [en-gb]\n//! author : Chris Gedrim : https://github.com/chrisgedrim\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var enGb = moment.defineLocale('en-gb', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n '_'\n ),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n ~~((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return enGb;\n\n})));\n","//! moment.js locale configuration\n//! locale : English (Ireland) [en-ie]\n//! author : Chris Cartlidge : https://github.com/chriscartlidge\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var enIe = moment.defineLocale('en-ie', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n '_'\n ),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n ~~((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return enIe;\n\n})));\n","//! moment.js locale configuration\n//! locale : English (Israel) [en-il]\n//! author : Chris Gedrim : https://github.com/chrisgedrim\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var enIl = moment.defineLocale('en-il', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n '_'\n ),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n ~~((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n });\n\n return enIl;\n\n})));\n","//! moment.js locale configuration\n//! locale : English (India) [en-in]\n//! author : Jatin Agrawal : https://github.com/jatinag22\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var enIn = moment.defineLocale('en-in', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n '_'\n ),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY h:mm A',\n LLLL: 'dddd, D MMMM YYYY h:mm A',\n },\n calendar: {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n ~~((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 1st is the first week of the year.\n },\n });\n\n return enIn;\n\n})));\n","//! moment.js locale configuration\n//! locale : English (New Zealand) [en-nz]\n//! author : Luke McGregor : https://github.com/lukemcgregor\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var enNz = moment.defineLocale('en-nz', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n '_'\n ),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY h:mm A',\n LLLL: 'dddd, D MMMM YYYY h:mm A',\n },\n calendar: {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n ~~((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return enNz;\n\n})));\n","//! moment.js locale configuration\n//! locale : English (Singapore) [en-sg]\n//! author : Matthew Castrillon-Madrigal : https://github.com/techdimension\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var enSg = moment.defineLocale('en-sg', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n '_'\n ),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n ~~((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return enSg;\n\n})));\n","//! moment.js locale configuration\n//! locale : Esperanto [eo]\n//! author : Colin Dean : https://github.com/colindean\n//! author : Mia Nordentoft Imperatori : https://github.com/miestasmia\n//! comment : miestasmia corrected the translation by colindean\n//! comment : Vivakvo corrected the translation by colindean and miestasmia\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var eo = moment.defineLocale('eo', {\n months: 'januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro'.split(\n '_'\n ),\n monthsShort: 'jan_feb_mart_apr_maj_jun_jul_aŭg_sept_okt_nov_dec'.split('_'),\n weekdays: 'dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato'.split('_'),\n weekdaysShort: 'dim_lun_mard_merk_ĵaŭ_ven_sab'.split('_'),\n weekdaysMin: 'di_lu_ma_me_ĵa_ve_sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY-MM-DD',\n LL: '[la] D[-an de] MMMM, YYYY',\n LLL: '[la] D[-an de] MMMM, YYYY HH:mm',\n LLLL: 'dddd[n], [la] D[-an de] MMMM, YYYY HH:mm',\n llll: 'ddd, [la] D[-an de] MMM, YYYY HH:mm',\n },\n meridiemParse: /[ap]\\.t\\.m/i,\n isPM: function (input) {\n return input.charAt(0).toLowerCase() === 'p';\n },\n meridiem: function (hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'p.t.m.' : 'P.T.M.';\n } else {\n return isLower ? 'a.t.m.' : 'A.T.M.';\n }\n },\n calendar: {\n sameDay: '[Hodiaŭ je] LT',\n nextDay: '[Morgaŭ je] LT',\n nextWeek: 'dddd[n je] LT',\n lastDay: '[Hieraŭ je] LT',\n lastWeek: '[pasintan] dddd[n je] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'post %s',\n past: 'antaŭ %s',\n s: 'kelkaj sekundoj',\n ss: '%d sekundoj',\n m: 'unu minuto',\n mm: '%d minutoj',\n h: 'unu horo',\n hh: '%d horoj',\n d: 'unu tago', //ne 'diurno', ĉar estas uzita por proksimumo\n dd: '%d tagoj',\n M: 'unu monato',\n MM: '%d monatoj',\n y: 'unu jaro',\n yy: '%d jaroj',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}a/,\n ordinal: '%da',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return eo;\n\n})));\n","//! moment.js locale configuration\n//! locale : Spanish (Dominican Republic) [es-do]\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var monthsShortDot =\n 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(\n '_'\n ),\n monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),\n monthsParse = [\n /^ene/i,\n /^feb/i,\n /^mar/i,\n /^abr/i,\n /^may/i,\n /^jun/i,\n /^jul/i,\n /^ago/i,\n /^sep/i,\n /^oct/i,\n /^nov/i,\n /^dic/i,\n ],\n monthsRegex =\n /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i;\n\n var esDo = moment.defineLocale('es-do', {\n months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(\n '_'\n ),\n monthsShort: function (m, format) {\n if (!m) {\n return monthsShortDot;\n } else if (/-MMM-/.test(format)) {\n return monthsShort[m.month()];\n } else {\n return monthsShortDot[m.month()];\n }\n },\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex:\n /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,\n monthsShortStrictRegex:\n /^(ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i,\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),\n weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),\n weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'DD/MM/YYYY',\n LL: 'D [de] MMMM [de] YYYY',\n LLL: 'D [de] MMMM [de] YYYY h:mm A',\n LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A',\n },\n calendar: {\n sameDay: function () {\n return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextDay: function () {\n return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextWeek: function () {\n return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastDay: function () {\n return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastWeek: function () {\n return (\n '[el] dddd [pasado a la' +\n (this.hours() !== 1 ? 's' : '') +\n '] LT'\n );\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'en %s',\n past: 'hace %s',\n s: 'unos segundos',\n ss: '%d segundos',\n m: 'un minuto',\n mm: '%d minutos',\n h: 'una hora',\n hh: '%d horas',\n d: 'un día',\n dd: '%d días',\n w: 'una semana',\n ww: '%d semanas',\n M: 'un mes',\n MM: '%d meses',\n y: 'un año',\n yy: '%d años',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return esDo;\n\n})));\n","//! moment.js locale configuration\n//! locale : Spanish (Mexico) [es-mx]\n//! author : JC Franco : https://github.com/jcfranco\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var monthsShortDot =\n 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(\n '_'\n ),\n monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),\n monthsParse = [\n /^ene/i,\n /^feb/i,\n /^mar/i,\n /^abr/i,\n /^may/i,\n /^jun/i,\n /^jul/i,\n /^ago/i,\n /^sep/i,\n /^oct/i,\n /^nov/i,\n /^dic/i,\n ],\n monthsRegex =\n /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i;\n\n var esMx = moment.defineLocale('es-mx', {\n months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(\n '_'\n ),\n monthsShort: function (m, format) {\n if (!m) {\n return monthsShortDot;\n } else if (/-MMM-/.test(format)) {\n return monthsShort[m.month()];\n } else {\n return monthsShortDot[m.month()];\n }\n },\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex:\n /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,\n monthsShortStrictRegex:\n /^(ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i,\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),\n weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),\n weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D [de] MMMM [de] YYYY',\n LLL: 'D [de] MMMM [de] YYYY H:mm',\n LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',\n },\n calendar: {\n sameDay: function () {\n return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextDay: function () {\n return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextWeek: function () {\n return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastDay: function () {\n return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastWeek: function () {\n return (\n '[el] dddd [pasado a la' +\n (this.hours() !== 1 ? 's' : '') +\n '] LT'\n );\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'en %s',\n past: 'hace %s',\n s: 'unos segundos',\n ss: '%d segundos',\n m: 'un minuto',\n mm: '%d minutos',\n h: 'una hora',\n hh: '%d horas',\n d: 'un día',\n dd: '%d días',\n w: 'una semana',\n ww: '%d semanas',\n M: 'un mes',\n MM: '%d meses',\n y: 'un año',\n yy: '%d años',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n invalidDate: 'Fecha inválida',\n });\n\n return esMx;\n\n})));\n","//! moment.js locale configuration\n//! locale : Spanish (United States) [es-us]\n//! author : bustta : https://github.com/bustta\n//! author : chrisrodz : https://github.com/chrisrodz\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var monthsShortDot =\n 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(\n '_'\n ),\n monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),\n monthsParse = [\n /^ene/i,\n /^feb/i,\n /^mar/i,\n /^abr/i,\n /^may/i,\n /^jun/i,\n /^jul/i,\n /^ago/i,\n /^sep/i,\n /^oct/i,\n /^nov/i,\n /^dic/i,\n ],\n monthsRegex =\n /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i;\n\n var esUs = moment.defineLocale('es-us', {\n months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(\n '_'\n ),\n monthsShort: function (m, format) {\n if (!m) {\n return monthsShortDot;\n } else if (/-MMM-/.test(format)) {\n return monthsShort[m.month()];\n } else {\n return monthsShortDot[m.month()];\n }\n },\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex:\n /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,\n monthsShortStrictRegex:\n /^(ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i,\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),\n weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),\n weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'MM/DD/YYYY',\n LL: 'D [de] MMMM [de] YYYY',\n LLL: 'D [de] MMMM [de] YYYY h:mm A',\n LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A',\n },\n calendar: {\n sameDay: function () {\n return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextDay: function () {\n return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextWeek: function () {\n return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastDay: function () {\n return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastWeek: function () {\n return (\n '[el] dddd [pasado a la' +\n (this.hours() !== 1 ? 's' : '') +\n '] LT'\n );\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'en %s',\n past: 'hace %s',\n s: 'unos segundos',\n ss: '%d segundos',\n m: 'un minuto',\n mm: '%d minutos',\n h: 'una hora',\n hh: '%d horas',\n d: 'un día',\n dd: '%d días',\n w: 'una semana',\n ww: '%d semanas',\n M: 'un mes',\n MM: '%d meses',\n y: 'un año',\n yy: '%d años',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n },\n });\n\n return esUs;\n\n})));\n","//! moment.js locale configuration\n//! locale : Spanish [es]\n//! author : Julio Napurí : https://github.com/julionc\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var monthsShortDot =\n 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(\n '_'\n ),\n monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),\n monthsParse = [\n /^ene/i,\n /^feb/i,\n /^mar/i,\n /^abr/i,\n /^may/i,\n /^jun/i,\n /^jul/i,\n /^ago/i,\n /^sep/i,\n /^oct/i,\n /^nov/i,\n /^dic/i,\n ],\n monthsRegex =\n /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i;\n\n var es = moment.defineLocale('es', {\n months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(\n '_'\n ),\n monthsShort: function (m, format) {\n if (!m) {\n return monthsShortDot;\n } else if (/-MMM-/.test(format)) {\n return monthsShort[m.month()];\n } else {\n return monthsShortDot[m.month()];\n }\n },\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex:\n /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,\n monthsShortStrictRegex:\n /^(ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i,\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),\n weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),\n weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D [de] MMMM [de] YYYY',\n LLL: 'D [de] MMMM [de] YYYY H:mm',\n LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',\n },\n calendar: {\n sameDay: function () {\n return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextDay: function () {\n return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextWeek: function () {\n return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastDay: function () {\n return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastWeek: function () {\n return (\n '[el] dddd [pasado a la' +\n (this.hours() !== 1 ? 's' : '') +\n '] LT'\n );\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'en %s',\n past: 'hace %s',\n s: 'unos segundos',\n ss: '%d segundos',\n m: 'un minuto',\n mm: '%d minutos',\n h: 'una hora',\n hh: '%d horas',\n d: 'un día',\n dd: '%d días',\n w: 'una semana',\n ww: '%d semanas',\n M: 'un mes',\n MM: '%d meses',\n y: 'un año',\n yy: '%d años',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n invalidDate: 'Fecha inválida',\n });\n\n return es;\n\n})));\n","//! moment.js locale configuration\n//! locale : Estonian [et]\n//! author : Henry Kehlmann : https://github.com/madhenry\n//! improvements : Illimar Tambek : https://github.com/ragulka\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n s: ['mõne sekundi', 'mõni sekund', 'paar sekundit'],\n ss: [number + 'sekundi', number + 'sekundit'],\n m: ['ühe minuti', 'üks minut'],\n mm: [number + ' minuti', number + ' minutit'],\n h: ['ühe tunni', 'tund aega', 'üks tund'],\n hh: [number + ' tunni', number + ' tundi'],\n d: ['ühe päeva', 'üks päev'],\n M: ['kuu aja', 'kuu aega', 'üks kuu'],\n MM: [number + ' kuu', number + ' kuud'],\n y: ['ühe aasta', 'aasta', 'üks aasta'],\n yy: [number + ' aasta', number + ' aastat'],\n };\n if (withoutSuffix) {\n return format[key][2] ? format[key][2] : format[key][1];\n }\n return isFuture ? format[key][0] : format[key][1];\n }\n\n var et = moment.defineLocale('et', {\n months: 'jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember'.split(\n '_'\n ),\n monthsShort:\n 'jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets'.split('_'),\n weekdays:\n 'pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev'.split(\n '_'\n ),\n weekdaysShort: 'P_E_T_K_N_R_L'.split('_'),\n weekdaysMin: 'P_E_T_K_N_R_L'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm',\n LLLL: 'dddd, D. MMMM YYYY H:mm',\n },\n calendar: {\n sameDay: '[Täna,] LT',\n nextDay: '[Homme,] LT',\n nextWeek: '[Järgmine] dddd LT',\n lastDay: '[Eile,] LT',\n lastWeek: '[Eelmine] dddd LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s pärast',\n past: '%s tagasi',\n s: processRelativeTime,\n ss: processRelativeTime,\n m: processRelativeTime,\n mm: processRelativeTime,\n h: processRelativeTime,\n hh: processRelativeTime,\n d: processRelativeTime,\n dd: '%d päeva',\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return et;\n\n})));\n","//! moment.js locale configuration\n//! locale : Basque [eu]\n//! author : Eneko Illarramendi : https://github.com/eillarra\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var eu = moment.defineLocale('eu', {\n months: 'urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua'.split(\n '_'\n ),\n monthsShort:\n 'urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays:\n 'igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata'.split(\n '_'\n ),\n weekdaysShort: 'ig._al._ar._az._og._ol._lr.'.split('_'),\n weekdaysMin: 'ig_al_ar_az_og_ol_lr'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY-MM-DD',\n LL: 'YYYY[ko] MMMM[ren] D[a]',\n LLL: 'YYYY[ko] MMMM[ren] D[a] HH:mm',\n LLLL: 'dddd, YYYY[ko] MMMM[ren] D[a] HH:mm',\n l: 'YYYY-M-D',\n ll: 'YYYY[ko] MMM D[a]',\n lll: 'YYYY[ko] MMM D[a] HH:mm',\n llll: 'ddd, YYYY[ko] MMM D[a] HH:mm',\n },\n calendar: {\n sameDay: '[gaur] LT[etan]',\n nextDay: '[bihar] LT[etan]',\n nextWeek: 'dddd LT[etan]',\n lastDay: '[atzo] LT[etan]',\n lastWeek: '[aurreko] dddd LT[etan]',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s barru',\n past: 'duela %s',\n s: 'segundo batzuk',\n ss: '%d segundo',\n m: 'minutu bat',\n mm: '%d minutu',\n h: 'ordu bat',\n hh: '%d ordu',\n d: 'egun bat',\n dd: '%d egun',\n M: 'hilabete bat',\n MM: '%d hilabete',\n y: 'urte bat',\n yy: '%d urte',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return eu;\n\n})));\n","//! moment.js locale configuration\n//! locale : Persian [fa]\n//! author : Ebrahim Byagowi : https://github.com/ebraminio\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '۱',\n 2: '۲',\n 3: '۳',\n 4: '۴',\n 5: '۵',\n 6: '۶',\n 7: '۷',\n 8: '۸',\n 9: '۹',\n 0: '۰',\n },\n numberMap = {\n '۱': '1',\n '۲': '2',\n '۳': '3',\n '۴': '4',\n '۵': '5',\n '۶': '6',\n '۷': '7',\n '۸': '8',\n '۹': '9',\n '۰': '0',\n };\n\n var fa = moment.defineLocale('fa', {\n months: 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split(\n '_'\n ),\n monthsShort:\n 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split(\n '_'\n ),\n weekdays:\n 'یک\\u200cشنبه_دوشنبه_سه\\u200cشنبه_چهارشنبه_پنج\\u200cشنبه_جمعه_شنبه'.split(\n '_'\n ),\n weekdaysShort:\n 'یک\\u200cشنبه_دوشنبه_سه\\u200cشنبه_چهارشنبه_پنج\\u200cشنبه_جمعه_شنبه'.split(\n '_'\n ),\n weekdaysMin: 'ی_د_س_چ_پ_ج_ش'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n meridiemParse: /قبل از ظهر|بعد از ظهر/,\n isPM: function (input) {\n return /بعد از ظهر/.test(input);\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'قبل از ظهر';\n } else {\n return 'بعد از ظهر';\n }\n },\n calendar: {\n sameDay: '[امروز ساعت] LT',\n nextDay: '[فردا ساعت] LT',\n nextWeek: 'dddd [ساعت] LT',\n lastDay: '[دیروز ساعت] LT',\n lastWeek: 'dddd [پیش] [ساعت] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'در %s',\n past: '%s پیش',\n s: 'چند ثانیه',\n ss: '%d ثانیه',\n m: 'یک دقیقه',\n mm: '%d دقیقه',\n h: 'یک ساعت',\n hh: '%d ساعت',\n d: 'یک روز',\n dd: '%d روز',\n M: 'یک ماه',\n MM: '%d ماه',\n y: 'یک سال',\n yy: '%d سال',\n },\n preparse: function (string) {\n return string\n .replace(/[۰-۹]/g, function (match) {\n return numberMap[match];\n })\n .replace(/،/g, ',');\n },\n postformat: function (string) {\n return string\n .replace(/\\d/g, function (match) {\n return symbolMap[match];\n })\n .replace(/,/g, '،');\n },\n dayOfMonthOrdinalParse: /\\d{1,2}م/,\n ordinal: '%dم',\n week: {\n dow: 6, // Saturday is the first day of the week.\n doy: 12, // The week that contains Jan 12th is the first week of the year.\n },\n });\n\n return fa;\n\n})));\n","//! moment.js locale configuration\n//! locale : Finnish [fi]\n//! author : Tarmo Aidantausta : https://github.com/bleadof\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var numbersPast =\n 'nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän'.split(\n ' '\n ),\n numbersFuture = [\n 'nolla',\n 'yhden',\n 'kahden',\n 'kolmen',\n 'neljän',\n 'viiden',\n 'kuuden',\n numbersPast[7],\n numbersPast[8],\n numbersPast[9],\n ];\n function translate(number, withoutSuffix, key, isFuture) {\n var result = '';\n switch (key) {\n case 's':\n return isFuture ? 'muutaman sekunnin' : 'muutama sekunti';\n case 'ss':\n result = isFuture ? 'sekunnin' : 'sekuntia';\n break;\n case 'm':\n return isFuture ? 'minuutin' : 'minuutti';\n case 'mm':\n result = isFuture ? 'minuutin' : 'minuuttia';\n break;\n case 'h':\n return isFuture ? 'tunnin' : 'tunti';\n case 'hh':\n result = isFuture ? 'tunnin' : 'tuntia';\n break;\n case 'd':\n return isFuture ? 'päivän' : 'päivä';\n case 'dd':\n result = isFuture ? 'päivän' : 'päivää';\n break;\n case 'M':\n return isFuture ? 'kuukauden' : 'kuukausi';\n case 'MM':\n result = isFuture ? 'kuukauden' : 'kuukautta';\n break;\n case 'y':\n return isFuture ? 'vuoden' : 'vuosi';\n case 'yy':\n result = isFuture ? 'vuoden' : 'vuotta';\n break;\n }\n result = verbalNumber(number, isFuture) + ' ' + result;\n return result;\n }\n function verbalNumber(number, isFuture) {\n return number < 10\n ? isFuture\n ? numbersFuture[number]\n : numbersPast[number]\n : number;\n }\n\n var fi = moment.defineLocale('fi', {\n months: 'tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu'.split(\n '_'\n ),\n monthsShort:\n 'tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu'.split(\n '_'\n ),\n weekdays:\n 'sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai'.split(\n '_'\n ),\n weekdaysShort: 'su_ma_ti_ke_to_pe_la'.split('_'),\n weekdaysMin: 'su_ma_ti_ke_to_pe_la'.split('_'),\n longDateFormat: {\n LT: 'HH.mm',\n LTS: 'HH.mm.ss',\n L: 'DD.MM.YYYY',\n LL: 'Do MMMM[ta] YYYY',\n LLL: 'Do MMMM[ta] YYYY, [klo] HH.mm',\n LLLL: 'dddd, Do MMMM[ta] YYYY, [klo] HH.mm',\n l: 'D.M.YYYY',\n ll: 'Do MMM YYYY',\n lll: 'Do MMM YYYY, [klo] HH.mm',\n llll: 'ddd, Do MMM YYYY, [klo] HH.mm',\n },\n calendar: {\n sameDay: '[tänään] [klo] LT',\n nextDay: '[huomenna] [klo] LT',\n nextWeek: 'dddd [klo] LT',\n lastDay: '[eilen] [klo] LT',\n lastWeek: '[viime] dddd[na] [klo] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s päästä',\n past: '%s sitten',\n s: translate,\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: translate,\n dd: translate,\n M: translate,\n MM: translate,\n y: translate,\n yy: translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return fi;\n\n})));\n","//! moment.js locale configuration\n//! locale : Filipino [fil]\n//! author : Dan Hagman : https://github.com/hagmandan\n//! author : Matthew Co : https://github.com/matthewdeeco\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var fil = moment.defineLocale('fil', {\n months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split(\n '_'\n ),\n monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'),\n weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split(\n '_'\n ),\n weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'),\n weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'MM/D/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY HH:mm',\n LLLL: 'dddd, MMMM DD, YYYY HH:mm',\n },\n calendar: {\n sameDay: 'LT [ngayong araw]',\n nextDay: '[Bukas ng] LT',\n nextWeek: 'LT [sa susunod na] dddd',\n lastDay: 'LT [kahapon]',\n lastWeek: 'LT [noong nakaraang] dddd',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'sa loob ng %s',\n past: '%s ang nakalipas',\n s: 'ilang segundo',\n ss: '%d segundo',\n m: 'isang minuto',\n mm: '%d minuto',\n h: 'isang oras',\n hh: '%d oras',\n d: 'isang araw',\n dd: '%d araw',\n M: 'isang buwan',\n MM: '%d buwan',\n y: 'isang taon',\n yy: '%d taon',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}/,\n ordinal: function (number) {\n return number;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return fil;\n\n})));\n","//! moment.js locale configuration\n//! locale : Faroese [fo]\n//! author : Ragnar Johannesen : https://github.com/ragnar123\n//! author : Kristian Sakarisson : https://github.com/sakarisson\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var fo = moment.defineLocale('fo', {\n months: 'januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember'.split(\n '_'\n ),\n monthsShort: 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'),\n weekdays:\n 'sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur'.split(\n '_'\n ),\n weekdaysShort: 'sun_mán_týs_mik_hós_frí_ley'.split('_'),\n weekdaysMin: 'su_má_tý_mi_hó_fr_le'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D. MMMM, YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Í dag kl.] LT',\n nextDay: '[Í morgin kl.] LT',\n nextWeek: 'dddd [kl.] LT',\n lastDay: '[Í gjár kl.] LT',\n lastWeek: '[síðstu] dddd [kl] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'um %s',\n past: '%s síðani',\n s: 'fá sekund',\n ss: '%d sekundir',\n m: 'ein minuttur',\n mm: '%d minuttir',\n h: 'ein tími',\n hh: '%d tímar',\n d: 'ein dagur',\n dd: '%d dagar',\n M: 'ein mánaður',\n MM: '%d mánaðir',\n y: 'eitt ár',\n yy: '%d ár',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return fo;\n\n})));\n","//! moment.js locale configuration\n//! locale : French (Canada) [fr-ca]\n//! author : Jonathan Abourbih : https://github.com/jonbca\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var frCa = moment.defineLocale('fr-ca', {\n months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(\n '_'\n ),\n monthsShort:\n 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),\n weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),\n weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY-MM-DD',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Aujourd’hui à] LT',\n nextDay: '[Demain à] LT',\n nextWeek: 'dddd [à] LT',\n lastDay: '[Hier à] LT',\n lastWeek: 'dddd [dernier à] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'dans %s',\n past: 'il y a %s',\n s: 'quelques secondes',\n ss: '%d secondes',\n m: 'une minute',\n mm: '%d minutes',\n h: 'une heure',\n hh: '%d heures',\n d: 'un jour',\n dd: '%d jours',\n M: 'un mois',\n MM: '%d mois',\n y: 'un an',\n yy: '%d ans',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(er|e)/,\n ordinal: function (number, period) {\n switch (period) {\n // Words with masculine grammatical gender: mois, trimestre, jour\n default:\n case 'M':\n case 'Q':\n case 'D':\n case 'DDD':\n case 'd':\n return number + (number === 1 ? 'er' : 'e');\n\n // Words with feminine grammatical gender: semaine\n case 'w':\n case 'W':\n return number + (number === 1 ? 're' : 'e');\n }\n },\n });\n\n return frCa;\n\n})));\n","//! moment.js locale configuration\n//! locale : French (Switzerland) [fr-ch]\n//! author : Gaspard Bucher : https://github.com/gaspard\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var frCh = moment.defineLocale('fr-ch', {\n months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(\n '_'\n ),\n monthsShort:\n 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),\n weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),\n weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Aujourd’hui à] LT',\n nextDay: '[Demain à] LT',\n nextWeek: 'dddd [à] LT',\n lastDay: '[Hier à] LT',\n lastWeek: 'dddd [dernier à] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'dans %s',\n past: 'il y a %s',\n s: 'quelques secondes',\n ss: '%d secondes',\n m: 'une minute',\n mm: '%d minutes',\n h: 'une heure',\n hh: '%d heures',\n d: 'un jour',\n dd: '%d jours',\n M: 'un mois',\n MM: '%d mois',\n y: 'un an',\n yy: '%d ans',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(er|e)/,\n ordinal: function (number, period) {\n switch (period) {\n // Words with masculine grammatical gender: mois, trimestre, jour\n default:\n case 'M':\n case 'Q':\n case 'D':\n case 'DDD':\n case 'd':\n return number + (number === 1 ? 'er' : 'e');\n\n // Words with feminine grammatical gender: semaine\n case 'w':\n case 'W':\n return number + (number === 1 ? 're' : 'e');\n }\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return frCh;\n\n})));\n","//! moment.js locale configuration\n//! locale : French [fr]\n//! author : John Fischer : https://github.com/jfroffice\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var monthsStrictRegex =\n /^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,\n monthsShortStrictRegex =\n /(janv\\.?|févr\\.?|mars|avr\\.?|mai|juin|juil\\.?|août|sept\\.?|oct\\.?|nov\\.?|déc\\.?)/i,\n monthsRegex =\n /(janv\\.?|févr\\.?|mars|avr\\.?|mai|juin|juil\\.?|août|sept\\.?|oct\\.?|nov\\.?|déc\\.?|janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,\n monthsParse = [\n /^janv/i,\n /^févr/i,\n /^mars/i,\n /^avr/i,\n /^mai/i,\n /^juin/i,\n /^juil/i,\n /^août/i,\n /^sept/i,\n /^oct/i,\n /^nov/i,\n /^déc/i,\n ];\n\n var fr = moment.defineLocale('fr', {\n months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(\n '_'\n ),\n monthsShort:\n 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(\n '_'\n ),\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex: monthsStrictRegex,\n monthsShortStrictRegex: monthsShortStrictRegex,\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),\n weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),\n weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Aujourd’hui à] LT',\n nextDay: '[Demain à] LT',\n nextWeek: 'dddd [à] LT',\n lastDay: '[Hier à] LT',\n lastWeek: 'dddd [dernier à] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'dans %s',\n past: 'il y a %s',\n s: 'quelques secondes',\n ss: '%d secondes',\n m: 'une minute',\n mm: '%d minutes',\n h: 'une heure',\n hh: '%d heures',\n d: 'un jour',\n dd: '%d jours',\n w: 'une semaine',\n ww: '%d semaines',\n M: 'un mois',\n MM: '%d mois',\n y: 'un an',\n yy: '%d ans',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(er|)/,\n ordinal: function (number, period) {\n switch (period) {\n // TODO: Return 'e' when day of month > 1. Move this case inside\n // block for masculine words below.\n // See https://github.com/moment/moment/issues/3375\n case 'D':\n return number + (number === 1 ? 'er' : '');\n\n // Words with masculine grammatical gender: mois, trimestre, jour\n default:\n case 'M':\n case 'Q':\n case 'DDD':\n case 'd':\n return number + (number === 1 ? 'er' : 'e');\n\n // Words with feminine grammatical gender: semaine\n case 'w':\n case 'W':\n return number + (number === 1 ? 're' : 'e');\n }\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return fr;\n\n})));\n","//! moment.js locale configuration\n//! locale : Frisian [fy]\n//! author : Robin van der Vliet : https://github.com/robin0van0der0v\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var monthsShortWithDots =\n 'jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.'.split('_'),\n monthsShortWithoutDots =\n 'jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_');\n\n var fy = moment.defineLocale('fy', {\n months: 'jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber'.split(\n '_'\n ),\n monthsShort: function (m, format) {\n if (!m) {\n return monthsShortWithDots;\n } else if (/-MMM-/.test(format)) {\n return monthsShortWithoutDots[m.month()];\n } else {\n return monthsShortWithDots[m.month()];\n }\n },\n monthsParseExact: true,\n weekdays: 'snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon'.split(\n '_'\n ),\n weekdaysShort: 'si._mo._ti._wo._to._fr._so.'.split('_'),\n weekdaysMin: 'Si_Mo_Ti_Wo_To_Fr_So'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD-MM-YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[hjoed om] LT',\n nextDay: '[moarn om] LT',\n nextWeek: 'dddd [om] LT',\n lastDay: '[juster om] LT',\n lastWeek: '[ôfrûne] dddd [om] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'oer %s',\n past: '%s lyn',\n s: 'in pear sekonden',\n ss: '%d sekonden',\n m: 'ien minút',\n mm: '%d minuten',\n h: 'ien oere',\n hh: '%d oeren',\n d: 'ien dei',\n dd: '%d dagen',\n M: 'ien moanne',\n MM: '%d moannen',\n y: 'ien jier',\n yy: '%d jierren',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(ste|de)/,\n ordinal: function (number) {\n return (\n number +\n (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')\n );\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return fy;\n\n})));\n","//! moment.js locale configuration\n//! locale : Irish or Irish Gaelic [ga]\n//! author : André Silva : https://github.com/askpt\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var months = [\n 'Eanáir',\n 'Feabhra',\n 'Márta',\n 'Aibreán',\n 'Bealtaine',\n 'Meitheamh',\n 'Iúil',\n 'Lúnasa',\n 'Meán Fómhair',\n 'Deireadh Fómhair',\n 'Samhain',\n 'Nollaig',\n ],\n monthsShort = [\n 'Ean',\n 'Feabh',\n 'Márt',\n 'Aib',\n 'Beal',\n 'Meith',\n 'Iúil',\n 'Lún',\n 'M.F.',\n 'D.F.',\n 'Samh',\n 'Noll',\n ],\n weekdays = [\n 'Dé Domhnaigh',\n 'Dé Luain',\n 'Dé Máirt',\n 'Dé Céadaoin',\n 'Déardaoin',\n 'Dé hAoine',\n 'Dé Sathairn',\n ],\n weekdaysShort = ['Domh', 'Luan', 'Máirt', 'Céad', 'Déar', 'Aoine', 'Sath'],\n weekdaysMin = ['Do', 'Lu', 'Má', 'Cé', 'Dé', 'A', 'Sa'];\n\n var ga = moment.defineLocale('ga', {\n months: months,\n monthsShort: monthsShort,\n monthsParseExact: true,\n weekdays: weekdays,\n weekdaysShort: weekdaysShort,\n weekdaysMin: weekdaysMin,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Inniu ag] LT',\n nextDay: '[Amárach ag] LT',\n nextWeek: 'dddd [ag] LT',\n lastDay: '[Inné ag] LT',\n lastWeek: 'dddd [seo caite] [ag] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'i %s',\n past: '%s ó shin',\n s: 'cúpla soicind',\n ss: '%d soicind',\n m: 'nóiméad',\n mm: '%d nóiméad',\n h: 'uair an chloig',\n hh: '%d uair an chloig',\n d: 'lá',\n dd: '%d lá',\n M: 'mí',\n MM: '%d míonna',\n y: 'bliain',\n yy: '%d bliain',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(d|na|mh)/,\n ordinal: function (number) {\n var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return ga;\n\n})));\n","//! moment.js locale configuration\n//! locale : Scottish Gaelic [gd]\n//! author : Jon Ashdown : https://github.com/jonashdown\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var months = [\n 'Am Faoilleach',\n 'An Gearran',\n 'Am Màrt',\n 'An Giblean',\n 'An Cèitean',\n 'An t-Ògmhios',\n 'An t-Iuchar',\n 'An Lùnastal',\n 'An t-Sultain',\n 'An Dàmhair',\n 'An t-Samhain',\n 'An Dùbhlachd',\n ],\n monthsShort = [\n 'Faoi',\n 'Gear',\n 'Màrt',\n 'Gibl',\n 'Cèit',\n 'Ògmh',\n 'Iuch',\n 'Lùn',\n 'Sult',\n 'Dàmh',\n 'Samh',\n 'Dùbh',\n ],\n weekdays = [\n 'Didòmhnaich',\n 'Diluain',\n 'Dimàirt',\n 'Diciadain',\n 'Diardaoin',\n 'Dihaoine',\n 'Disathairne',\n ],\n weekdaysShort = ['Did', 'Dil', 'Dim', 'Dic', 'Dia', 'Dih', 'Dis'],\n weekdaysMin = ['Dò', 'Lu', 'Mà', 'Ci', 'Ar', 'Ha', 'Sa'];\n\n var gd = moment.defineLocale('gd', {\n months: months,\n monthsShort: monthsShort,\n monthsParseExact: true,\n weekdays: weekdays,\n weekdaysShort: weekdaysShort,\n weekdaysMin: weekdaysMin,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[An-diugh aig] LT',\n nextDay: '[A-màireach aig] LT',\n nextWeek: 'dddd [aig] LT',\n lastDay: '[An-dè aig] LT',\n lastWeek: 'dddd [seo chaidh] [aig] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'ann an %s',\n past: 'bho chionn %s',\n s: 'beagan diogan',\n ss: '%d diogan',\n m: 'mionaid',\n mm: '%d mionaidean',\n h: 'uair',\n hh: '%d uairean',\n d: 'latha',\n dd: '%d latha',\n M: 'mìos',\n MM: '%d mìosan',\n y: 'bliadhna',\n yy: '%d bliadhna',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(d|na|mh)/,\n ordinal: function (number) {\n var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return gd;\n\n})));\n","//! moment.js locale configuration\n//! locale : Galician [gl]\n//! author : Juan G. Hurtado : https://github.com/juanghurtado\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var gl = moment.defineLocale('gl', {\n months: 'xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro'.split(\n '_'\n ),\n monthsShort:\n 'xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'domingo_luns_martes_mércores_xoves_venres_sábado'.split('_'),\n weekdaysShort: 'dom._lun._mar._mér._xov._ven._sáb.'.split('_'),\n weekdaysMin: 'do_lu_ma_mé_xo_ve_sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D [de] MMMM [de] YYYY',\n LLL: 'D [de] MMMM [de] YYYY H:mm',\n LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',\n },\n calendar: {\n sameDay: function () {\n return '[hoxe ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT';\n },\n nextDay: function () {\n return '[mañá ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT';\n },\n nextWeek: function () {\n return 'dddd [' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT';\n },\n lastDay: function () {\n return '[onte ' + (this.hours() !== 1 ? 'á' : 'a') + '] LT';\n },\n lastWeek: function () {\n return (\n '[o] dddd [pasado ' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT'\n );\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: function (str) {\n if (str.indexOf('un') === 0) {\n return 'n' + str;\n }\n return 'en ' + str;\n },\n past: 'hai %s',\n s: 'uns segundos',\n ss: '%d segundos',\n m: 'un minuto',\n mm: '%d minutos',\n h: 'unha hora',\n hh: '%d horas',\n d: 'un día',\n dd: '%d días',\n M: 'un mes',\n MM: '%d meses',\n y: 'un ano',\n yy: '%d anos',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return gl;\n\n})));\n","//! moment.js locale configuration\n//! locale : Konkani Devanagari script [gom-deva]\n//! author : The Discoverer : https://github.com/WikiDiscoverer\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n s: ['थोडया सॅकंडांनी', 'थोडे सॅकंड'],\n ss: [number + ' सॅकंडांनी', number + ' सॅकंड'],\n m: ['एका मिणटान', 'एक मिनूट'],\n mm: [number + ' मिणटांनी', number + ' मिणटां'],\n h: ['एका वरान', 'एक वर'],\n hh: [number + ' वरांनी', number + ' वरां'],\n d: ['एका दिसान', 'एक दीस'],\n dd: [number + ' दिसांनी', number + ' दीस'],\n M: ['एका म्हयन्यान', 'एक म्हयनो'],\n MM: [number + ' म्हयन्यानी', number + ' म्हयने'],\n y: ['एका वर्सान', 'एक वर्स'],\n yy: [number + ' वर्सांनी', number + ' वर्सां'],\n };\n return isFuture ? format[key][0] : format[key][1];\n }\n\n var gomDeva = moment.defineLocale('gom-deva', {\n months: {\n standalone:\n 'जानेवारी_फेब्रुवारी_मार्च_एप्रील_मे_जून_जुलय_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split(\n '_'\n ),\n format: 'जानेवारीच्या_फेब्रुवारीच्या_मार्चाच्या_एप्रीलाच्या_मेयाच्या_जूनाच्या_जुलयाच्या_ऑगस्टाच्या_सप्टेंबराच्या_ऑक्टोबराच्या_नोव्हेंबराच्या_डिसेंबराच्या'.split(\n '_'\n ),\n isFormat: /MMMM(\\s)+D[oD]?/,\n },\n monthsShort:\n 'जाने._फेब्रु._मार्च_एप्री._मे_जून_जुल._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'आयतार_सोमार_मंगळार_बुधवार_बिरेस्तार_सुक्रार_शेनवार'.split('_'),\n weekdaysShort: 'आयत._सोम._मंगळ._बुध._ब्रेस्त._सुक्र._शेन.'.split('_'),\n weekdaysMin: 'आ_सो_मं_बु_ब्रे_सु_शे'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'A h:mm [वाजतां]',\n LTS: 'A h:mm:ss [वाजतां]',\n L: 'DD-MM-YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY A h:mm [वाजतां]',\n LLLL: 'dddd, MMMM Do, YYYY, A h:mm [वाजतां]',\n llll: 'ddd, D MMM YYYY, A h:mm [वाजतां]',\n },\n calendar: {\n sameDay: '[आयज] LT',\n nextDay: '[फाल्यां] LT',\n nextWeek: '[फुडलो] dddd[,] LT',\n lastDay: '[काल] LT',\n lastWeek: '[फाटलो] dddd[,] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s',\n past: '%s आदीं',\n s: processRelativeTime,\n ss: processRelativeTime,\n m: processRelativeTime,\n mm: processRelativeTime,\n h: processRelativeTime,\n hh: processRelativeTime,\n d: processRelativeTime,\n dd: processRelativeTime,\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(वेर)/,\n ordinal: function (number, period) {\n switch (period) {\n // the ordinal 'वेर' only applies to day of the month\n case 'D':\n return number + 'वेर';\n default:\n case 'M':\n case 'Q':\n case 'DDD':\n case 'd':\n case 'w':\n case 'W':\n return number;\n }\n },\n week: {\n dow: 0, // Sunday is the first day of the week\n doy: 3, // The week that contains Jan 4th is the first week of the year (7 + 0 - 4)\n },\n meridiemParse: /राती|सकाळीं|दनपारां|सांजे/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'राती') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'सकाळीं') {\n return hour;\n } else if (meridiem === 'दनपारां') {\n return hour > 12 ? hour : hour + 12;\n } else if (meridiem === 'सांजे') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'राती';\n } else if (hour < 12) {\n return 'सकाळीं';\n } else if (hour < 16) {\n return 'दनपारां';\n } else if (hour < 20) {\n return 'सांजे';\n } else {\n return 'राती';\n }\n },\n });\n\n return gomDeva;\n\n})));\n","//! moment.js locale configuration\n//! locale : Konkani Latin script [gom-latn]\n//! author : The Discoverer : https://github.com/WikiDiscoverer\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n s: ['thoddea sekondamni', 'thodde sekond'],\n ss: [number + ' sekondamni', number + ' sekond'],\n m: ['eka mintan', 'ek minut'],\n mm: [number + ' mintamni', number + ' mintam'],\n h: ['eka voran', 'ek vor'],\n hh: [number + ' voramni', number + ' voram'],\n d: ['eka disan', 'ek dis'],\n dd: [number + ' disamni', number + ' dis'],\n M: ['eka mhoinean', 'ek mhoino'],\n MM: [number + ' mhoineamni', number + ' mhoine'],\n y: ['eka vorsan', 'ek voros'],\n yy: [number + ' vorsamni', number + ' vorsam'],\n };\n return isFuture ? format[key][0] : format[key][1];\n }\n\n var gomLatn = moment.defineLocale('gom-latn', {\n months: {\n standalone:\n 'Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr'.split(\n '_'\n ),\n format: 'Janerachea_Febrerachea_Marsachea_Abrilachea_Maiachea_Junachea_Julaiachea_Agostachea_Setembrachea_Otubrachea_Novembrachea_Dezembrachea'.split(\n '_'\n ),\n isFormat: /MMMM(\\s)+D[oD]?/,\n },\n monthsShort:\n 'Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.'.split('_'),\n monthsParseExact: true,\n weekdays: \"Aitar_Somar_Mongllar_Budhvar_Birestar_Sukrar_Son'var\".split('_'),\n weekdaysShort: 'Ait._Som._Mon._Bud._Bre._Suk._Son.'.split('_'),\n weekdaysMin: 'Ai_Sm_Mo_Bu_Br_Su_Sn'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'A h:mm [vazta]',\n LTS: 'A h:mm:ss [vazta]',\n L: 'DD-MM-YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY A h:mm [vazta]',\n LLLL: 'dddd, MMMM Do, YYYY, A h:mm [vazta]',\n llll: 'ddd, D MMM YYYY, A h:mm [vazta]',\n },\n calendar: {\n sameDay: '[Aiz] LT',\n nextDay: '[Faleam] LT',\n nextWeek: '[Fuddlo] dddd[,] LT',\n lastDay: '[Kal] LT',\n lastWeek: '[Fattlo] dddd[,] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s',\n past: '%s adim',\n s: processRelativeTime,\n ss: processRelativeTime,\n m: processRelativeTime,\n mm: processRelativeTime,\n h: processRelativeTime,\n hh: processRelativeTime,\n d: processRelativeTime,\n dd: processRelativeTime,\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(er)/,\n ordinal: function (number, period) {\n switch (period) {\n // the ordinal 'er' only applies to day of the month\n case 'D':\n return number + 'er';\n default:\n case 'M':\n case 'Q':\n case 'DDD':\n case 'd':\n case 'w':\n case 'W':\n return number;\n }\n },\n week: {\n dow: 0, // Sunday is the first day of the week\n doy: 3, // The week that contains Jan 4th is the first week of the year (7 + 0 - 4)\n },\n meridiemParse: /rati|sokallim|donparam|sanje/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'rati') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'sokallim') {\n return hour;\n } else if (meridiem === 'donparam') {\n return hour > 12 ? hour : hour + 12;\n } else if (meridiem === 'sanje') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'rati';\n } else if (hour < 12) {\n return 'sokallim';\n } else if (hour < 16) {\n return 'donparam';\n } else if (hour < 20) {\n return 'sanje';\n } else {\n return 'rati';\n }\n },\n });\n\n return gomLatn;\n\n})));\n","//! moment.js locale configuration\n//! locale : Gujarati [gu]\n//! author : Kaushik Thanki : https://github.com/Kaushik1987\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '૧',\n 2: '૨',\n 3: '૩',\n 4: '૪',\n 5: '૫',\n 6: '૬',\n 7: '૭',\n 8: '૮',\n 9: '૯',\n 0: '૦',\n },\n numberMap = {\n '૧': '1',\n '૨': '2',\n '૩': '3',\n '૪': '4',\n '૫': '5',\n '૬': '6',\n '૭': '7',\n '૮': '8',\n '૯': '9',\n '૦': '0',\n };\n\n var gu = moment.defineLocale('gu', {\n months: 'જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર'.split(\n '_'\n ),\n monthsShort:\n 'જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર'.split(\n '_'\n ),\n weekdaysShort: 'રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ'.split('_'),\n weekdaysMin: 'ર_સો_મં_બુ_ગુ_શુ_શ'.split('_'),\n longDateFormat: {\n LT: 'A h:mm વાગ્યે',\n LTS: 'A h:mm:ss વાગ્યે',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm વાગ્યે',\n LLLL: 'dddd, D MMMM YYYY, A h:mm વાગ્યે',\n },\n calendar: {\n sameDay: '[આજ] LT',\n nextDay: '[કાલે] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[ગઇકાલે] LT',\n lastWeek: '[પાછલા] dddd, LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s મા',\n past: '%s પહેલા',\n s: 'અમુક પળો',\n ss: '%d સેકંડ',\n m: 'એક મિનિટ',\n mm: '%d મિનિટ',\n h: 'એક કલાક',\n hh: '%d કલાક',\n d: 'એક દિવસ',\n dd: '%d દિવસ',\n M: 'એક મહિનો',\n MM: '%d મહિનો',\n y: 'એક વર્ષ',\n yy: '%d વર્ષ',\n },\n preparse: function (string) {\n return string.replace(/[૧૨૩૪૫૬૭૮૯૦]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n // Gujarati notation for meridiems are quite fuzzy in practice. While there exists\n // a rigid notion of a 'Pahar' it is not used as rigidly in modern Gujarati.\n meridiemParse: /રાત|બપોર|સવાર|સાંજ/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'રાત') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'સવાર') {\n return hour;\n } else if (meridiem === 'બપોર') {\n return hour >= 10 ? hour : hour + 12;\n } else if (meridiem === 'સાંજ') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'રાત';\n } else if (hour < 10) {\n return 'સવાર';\n } else if (hour < 17) {\n return 'બપોર';\n } else if (hour < 20) {\n return 'સાંજ';\n } else {\n return 'રાત';\n }\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n },\n });\n\n return gu;\n\n})));\n","//! moment.js locale configuration\n//! locale : Hebrew [he]\n//! author : Tomer Cohen : https://github.com/tomer\n//! author : Moshe Simantov : https://github.com/DevelopmentIL\n//! author : Tal Ater : https://github.com/TalAter\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var he = moment.defineLocale('he', {\n months: 'ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר'.split(\n '_'\n ),\n monthsShort:\n 'ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳'.split('_'),\n weekdays: 'ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת'.split('_'),\n weekdaysShort: 'א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳'.split('_'),\n weekdaysMin: 'א_ב_ג_ד_ה_ו_ש'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D [ב]MMMM YYYY',\n LLL: 'D [ב]MMMM YYYY HH:mm',\n LLLL: 'dddd, D [ב]MMMM YYYY HH:mm',\n l: 'D/M/YYYY',\n ll: 'D MMM YYYY',\n lll: 'D MMM YYYY HH:mm',\n llll: 'ddd, D MMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[היום ב־]LT',\n nextDay: '[מחר ב־]LT',\n nextWeek: 'dddd [בשעה] LT',\n lastDay: '[אתמול ב־]LT',\n lastWeek: '[ביום] dddd [האחרון בשעה] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'בעוד %s',\n past: 'לפני %s',\n s: 'מספר שניות',\n ss: '%d שניות',\n m: 'דקה',\n mm: '%d דקות',\n h: 'שעה',\n hh: function (number) {\n if (number === 2) {\n return 'שעתיים';\n }\n return number + ' שעות';\n },\n d: 'יום',\n dd: function (number) {\n if (number === 2) {\n return 'יומיים';\n }\n return number + ' ימים';\n },\n M: 'חודש',\n MM: function (number) {\n if (number === 2) {\n return 'חודשיים';\n }\n return number + ' חודשים';\n },\n y: 'שנה',\n yy: function (number) {\n if (number === 2) {\n return 'שנתיים';\n } else if (number % 10 === 0 && number !== 10) {\n return number + ' שנה';\n }\n return number + ' שנים';\n },\n },\n meridiemParse:\n /אחה\"צ|לפנה\"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,\n isPM: function (input) {\n return /^(אחה\"צ|אחרי הצהריים|בערב)$/.test(input);\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 5) {\n return 'לפנות בוקר';\n } else if (hour < 10) {\n return 'בבוקר';\n } else if (hour < 12) {\n return isLower ? 'לפנה\"צ' : 'לפני הצהריים';\n } else if (hour < 18) {\n return isLower ? 'אחה\"צ' : 'אחרי הצהריים';\n } else {\n return 'בערב';\n }\n },\n });\n\n return he;\n\n})));\n","//! moment.js locale configuration\n//! locale : Hindi [hi]\n//! author : Mayank Singhal : https://github.com/mayanksinghal\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '१',\n 2: '२',\n 3: '३',\n 4: '४',\n 5: '५',\n 6: '६',\n 7: '७',\n 8: '८',\n 9: '९',\n 0: '०',\n },\n numberMap = {\n '१': '1',\n '२': '2',\n '३': '3',\n '४': '4',\n '५': '5',\n '६': '6',\n '७': '7',\n '८': '8',\n '९': '9',\n '०': '0',\n },\n monthsParse = [\n /^जन/i,\n /^फ़र|फर/i,\n /^मार्च/i,\n /^अप्रै/i,\n /^मई/i,\n /^जून/i,\n /^जुल/i,\n /^अग/i,\n /^सितं|सित/i,\n /^अक्टू/i,\n /^नव|नवं/i,\n /^दिसं|दिस/i,\n ],\n shortMonthsParse = [\n /^जन/i,\n /^फ़र/i,\n /^मार्च/i,\n /^अप्रै/i,\n /^मई/i,\n /^जून/i,\n /^जुल/i,\n /^अग/i,\n /^सित/i,\n /^अक्टू/i,\n /^नव/i,\n /^दिस/i,\n ];\n\n var hi = moment.defineLocale('hi', {\n months: {\n format: 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split(\n '_'\n ),\n standalone:\n 'जनवरी_फरवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितंबर_अक्टूबर_नवंबर_दिसंबर'.split(\n '_'\n ),\n },\n monthsShort:\n 'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split('_'),\n weekdays: 'रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),\n weekdaysShort: 'रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि'.split('_'),\n weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'),\n longDateFormat: {\n LT: 'A h:mm बजे',\n LTS: 'A h:mm:ss बजे',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm बजे',\n LLLL: 'dddd, D MMMM YYYY, A h:mm बजे',\n },\n\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: shortMonthsParse,\n\n monthsRegex:\n /^(जनवरी|जन\\.?|फ़रवरी|फरवरी|फ़र\\.?|मार्च?|अप्रैल|अप्रै\\.?|मई?|जून?|जुलाई|जुल\\.?|अगस्त|अग\\.?|सितम्बर|सितंबर|सित\\.?|अक्टूबर|अक्टू\\.?|नवम्बर|नवंबर|नव\\.?|दिसम्बर|दिसंबर|दिस\\.?)/i,\n\n monthsShortRegex:\n /^(जनवरी|जन\\.?|फ़रवरी|फरवरी|फ़र\\.?|मार्च?|अप्रैल|अप्रै\\.?|मई?|जून?|जुलाई|जुल\\.?|अगस्त|अग\\.?|सितम्बर|सितंबर|सित\\.?|अक्टूबर|अक्टू\\.?|नवम्बर|नवंबर|नव\\.?|दिसम्बर|दिसंबर|दिस\\.?)/i,\n\n monthsStrictRegex:\n /^(जनवरी?|फ़रवरी|फरवरी?|मार्च?|अप्रैल?|मई?|जून?|जुलाई?|अगस्त?|सितम्बर|सितंबर|सित?\\.?|अक्टूबर|अक्टू\\.?|नवम्बर|नवंबर?|दिसम्बर|दिसंबर?)/i,\n\n monthsShortStrictRegex:\n /^(जन\\.?|फ़र\\.?|मार्च?|अप्रै\\.?|मई?|जून?|जुल\\.?|अग\\.?|सित\\.?|अक्टू\\.?|नव\\.?|दिस\\.?)/i,\n\n calendar: {\n sameDay: '[आज] LT',\n nextDay: '[कल] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[कल] LT',\n lastWeek: '[पिछले] dddd, LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s में',\n past: '%s पहले',\n s: 'कुछ ही क्षण',\n ss: '%d सेकंड',\n m: 'एक मिनट',\n mm: '%d मिनट',\n h: 'एक घंटा',\n hh: '%d घंटे',\n d: 'एक दिन',\n dd: '%d दिन',\n M: 'एक महीने',\n MM: '%d महीने',\n y: 'एक वर्ष',\n yy: '%d वर्ष',\n },\n preparse: function (string) {\n return string.replace(/[१२३४५६७८९०]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n // Hindi notation for meridiems are quite fuzzy in practice. While there exists\n // a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi.\n meridiemParse: /रात|सुबह|दोपहर|शाम/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'रात') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'सुबह') {\n return hour;\n } else if (meridiem === 'दोपहर') {\n return hour >= 10 ? hour : hour + 12;\n } else if (meridiem === 'शाम') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'रात';\n } else if (hour < 10) {\n return 'सुबह';\n } else if (hour < 17) {\n return 'दोपहर';\n } else if (hour < 20) {\n return 'शाम';\n } else {\n return 'रात';\n }\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n },\n });\n\n return hi;\n\n})));\n","//! moment.js locale configuration\n//! locale : Croatian [hr]\n//! author : Bojan Marković : https://github.com/bmarkovic\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function translate(number, withoutSuffix, key) {\n var result = number + ' ';\n switch (key) {\n case 'ss':\n if (number === 1) {\n result += 'sekunda';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'sekunde';\n } else {\n result += 'sekundi';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'jedna minuta' : 'jedne minute';\n case 'mm':\n if (number === 1) {\n result += 'minuta';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'minute';\n } else {\n result += 'minuta';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'jedan sat' : 'jednog sata';\n case 'hh':\n if (number === 1) {\n result += 'sat';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'sata';\n } else {\n result += 'sati';\n }\n return result;\n case 'dd':\n if (number === 1) {\n result += 'dan';\n } else {\n result += 'dana';\n }\n return result;\n case 'MM':\n if (number === 1) {\n result += 'mjesec';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'mjeseca';\n } else {\n result += 'mjeseci';\n }\n return result;\n case 'yy':\n if (number === 1) {\n result += 'godina';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'godine';\n } else {\n result += 'godina';\n }\n return result;\n }\n }\n\n var hr = moment.defineLocale('hr', {\n months: {\n format: 'siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca'.split(\n '_'\n ),\n standalone:\n 'siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac'.split(\n '_'\n ),\n },\n monthsShort:\n 'sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(\n '_'\n ),\n weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),\n weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'Do MMMM YYYY',\n LLL: 'Do MMMM YYYY H:mm',\n LLLL: 'dddd, Do MMMM YYYY H:mm',\n },\n calendar: {\n sameDay: '[danas u] LT',\n nextDay: '[sutra u] LT',\n nextWeek: function () {\n switch (this.day()) {\n case 0:\n return '[u] [nedjelju] [u] LT';\n case 3:\n return '[u] [srijedu] [u] LT';\n case 6:\n return '[u] [subotu] [u] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[u] dddd [u] LT';\n }\n },\n lastDay: '[jučer u] LT',\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n return '[prošlu] [nedjelju] [u] LT';\n case 3:\n return '[prošlu] [srijedu] [u] LT';\n case 6:\n return '[prošle] [subote] [u] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[prošli] dddd [u] LT';\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'za %s',\n past: 'prije %s',\n s: 'par sekundi',\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: 'dan',\n dd: translate,\n M: 'mjesec',\n MM: translate,\n y: 'godinu',\n yy: translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return hr;\n\n})));\n","//! moment.js locale configuration\n//! locale : Hungarian [hu]\n//! author : Adam Brunner : https://github.com/adambrunner\n//! author : Peter Viszt : https://github.com/passatgt\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var weekEndings =\n 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(' ');\n function translate(number, withoutSuffix, key, isFuture) {\n var num = number;\n switch (key) {\n case 's':\n return isFuture || withoutSuffix\n ? 'néhány másodperc'\n : 'néhány másodperce';\n case 'ss':\n return num + (isFuture || withoutSuffix)\n ? ' másodperc'\n : ' másodperce';\n case 'm':\n return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce');\n case 'mm':\n return num + (isFuture || withoutSuffix ? ' perc' : ' perce');\n case 'h':\n return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája');\n case 'hh':\n return num + (isFuture || withoutSuffix ? ' óra' : ' órája');\n case 'd':\n return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja');\n case 'dd':\n return num + (isFuture || withoutSuffix ? ' nap' : ' napja');\n case 'M':\n return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');\n case 'MM':\n return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');\n case 'y':\n return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve');\n case 'yy':\n return num + (isFuture || withoutSuffix ? ' év' : ' éve');\n }\n return '';\n }\n function week(isFuture) {\n return (\n (isFuture ? '' : '[múlt] ') +\n '[' +\n weekEndings[this.day()] +\n '] LT[-kor]'\n );\n }\n\n var hu = moment.defineLocale('hu', {\n months: 'január_február_március_április_május_június_július_augusztus_szeptember_október_november_december'.split(\n '_'\n ),\n monthsShort:\n 'jan._feb._márc._ápr._máj._jún._júl._aug._szept._okt._nov._dec.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat'.split('_'),\n weekdaysShort: 'vas_hét_kedd_sze_csüt_pén_szo'.split('_'),\n weekdaysMin: 'v_h_k_sze_cs_p_szo'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'YYYY.MM.DD.',\n LL: 'YYYY. MMMM D.',\n LLL: 'YYYY. MMMM D. H:mm',\n LLLL: 'YYYY. MMMM D., dddd H:mm',\n },\n meridiemParse: /de|du/i,\n isPM: function (input) {\n return input.charAt(1).toLowerCase() === 'u';\n },\n meridiem: function (hours, minutes, isLower) {\n if (hours < 12) {\n return isLower === true ? 'de' : 'DE';\n } else {\n return isLower === true ? 'du' : 'DU';\n }\n },\n calendar: {\n sameDay: '[ma] LT[-kor]',\n nextDay: '[holnap] LT[-kor]',\n nextWeek: function () {\n return week.call(this, true);\n },\n lastDay: '[tegnap] LT[-kor]',\n lastWeek: function () {\n return week.call(this, false);\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s múlva',\n past: '%s',\n s: translate,\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: translate,\n dd: translate,\n M: translate,\n MM: translate,\n y: translate,\n yy: translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return hu;\n\n})));\n","//! moment.js locale configuration\n//! locale : Armenian [hy-am]\n//! author : Armendarabyan : https://github.com/armendarabyan\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var hyAm = moment.defineLocale('hy-am', {\n months: {\n format: 'հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի'.split(\n '_'\n ),\n standalone:\n 'հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր'.split(\n '_'\n ),\n },\n monthsShort: 'հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ'.split('_'),\n weekdays:\n 'կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ'.split(\n '_'\n ),\n weekdaysShort: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),\n weekdaysMin: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY թ.',\n LLL: 'D MMMM YYYY թ., HH:mm',\n LLLL: 'dddd, D MMMM YYYY թ., HH:mm',\n },\n calendar: {\n sameDay: '[այսօր] LT',\n nextDay: '[վաղը] LT',\n lastDay: '[երեկ] LT',\n nextWeek: function () {\n return 'dddd [օրը ժամը] LT';\n },\n lastWeek: function () {\n return '[անցած] dddd [օրը ժամը] LT';\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s հետո',\n past: '%s առաջ',\n s: 'մի քանի վայրկյան',\n ss: '%d վայրկյան',\n m: 'րոպե',\n mm: '%d րոպե',\n h: 'ժամ',\n hh: '%d ժամ',\n d: 'օր',\n dd: '%d օր',\n M: 'ամիս',\n MM: '%d ամիս',\n y: 'տարի',\n yy: '%d տարի',\n },\n meridiemParse: /գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,\n isPM: function (input) {\n return /^(ցերեկվա|երեկոյան)$/.test(input);\n },\n meridiem: function (hour) {\n if (hour < 4) {\n return 'գիշերվա';\n } else if (hour < 12) {\n return 'առավոտվա';\n } else if (hour < 17) {\n return 'ցերեկվա';\n } else {\n return 'երեկոյան';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}|\\d{1,2}-(ին|րդ)/,\n ordinal: function (number, period) {\n switch (period) {\n case 'DDD':\n case 'w':\n case 'W':\n case 'DDDo':\n if (number === 1) {\n return number + '-ին';\n }\n return number + '-րդ';\n default:\n return number;\n }\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return hyAm;\n\n})));\n","//! moment.js locale configuration\n//! locale : Indonesian [id]\n//! author : Mohammad Satrio Utomo : https://github.com/tyok\n//! reference: http://id.wikisource.org/wiki/Pedoman_Umum_Ejaan_Bahasa_Indonesia_yang_Disempurnakan\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var id = moment.defineLocale('id', {\n months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des'.split('_'),\n weekdays: 'Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu'.split('_'),\n weekdaysShort: 'Min_Sen_Sel_Rab_Kam_Jum_Sab'.split('_'),\n weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sb'.split('_'),\n longDateFormat: {\n LT: 'HH.mm',\n LTS: 'HH.mm.ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY [pukul] HH.mm',\n LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',\n },\n meridiemParse: /pagi|siang|sore|malam/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'pagi') {\n return hour;\n } else if (meridiem === 'siang') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === 'sore' || meridiem === 'malam') {\n return hour + 12;\n }\n },\n meridiem: function (hours, minutes, isLower) {\n if (hours < 11) {\n return 'pagi';\n } else if (hours < 15) {\n return 'siang';\n } else if (hours < 19) {\n return 'sore';\n } else {\n return 'malam';\n }\n },\n calendar: {\n sameDay: '[Hari ini pukul] LT',\n nextDay: '[Besok pukul] LT',\n nextWeek: 'dddd [pukul] LT',\n lastDay: '[Kemarin pukul] LT',\n lastWeek: 'dddd [lalu pukul] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'dalam %s',\n past: '%s yang lalu',\n s: 'beberapa detik',\n ss: '%d detik',\n m: 'semenit',\n mm: '%d menit',\n h: 'sejam',\n hh: '%d jam',\n d: 'sehari',\n dd: '%d hari',\n M: 'sebulan',\n MM: '%d bulan',\n y: 'setahun',\n yy: '%d tahun',\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n },\n });\n\n return id;\n\n})));\n","//! moment.js locale configuration\n//! locale : Icelandic [is]\n//! author : Hinrik Örn Sigurðsson : https://github.com/hinrik\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function plural(n) {\n if (n % 100 === 11) {\n return true;\n } else if (n % 10 === 1) {\n return false;\n }\n return true;\n }\n function translate(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nokkrar sekúndur'\n : 'nokkrum sekúndum';\n case 'ss':\n if (plural(number)) {\n return (\n result +\n (withoutSuffix || isFuture ? 'sekúndur' : 'sekúndum')\n );\n }\n return result + 'sekúnda';\n case 'm':\n return withoutSuffix ? 'mínúta' : 'mínútu';\n case 'mm':\n if (plural(number)) {\n return (\n result + (withoutSuffix || isFuture ? 'mínútur' : 'mínútum')\n );\n } else if (withoutSuffix) {\n return result + 'mínúta';\n }\n return result + 'mínútu';\n case 'hh':\n if (plural(number)) {\n return (\n result +\n (withoutSuffix || isFuture\n ? 'klukkustundir'\n : 'klukkustundum')\n );\n }\n return result + 'klukkustund';\n case 'd':\n if (withoutSuffix) {\n return 'dagur';\n }\n return isFuture ? 'dag' : 'degi';\n case 'dd':\n if (plural(number)) {\n if (withoutSuffix) {\n return result + 'dagar';\n }\n return result + (isFuture ? 'daga' : 'dögum');\n } else if (withoutSuffix) {\n return result + 'dagur';\n }\n return result + (isFuture ? 'dag' : 'degi');\n case 'M':\n if (withoutSuffix) {\n return 'mánuður';\n }\n return isFuture ? 'mánuð' : 'mánuði';\n case 'MM':\n if (plural(number)) {\n if (withoutSuffix) {\n return result + 'mánuðir';\n }\n return result + (isFuture ? 'mánuði' : 'mánuðum');\n } else if (withoutSuffix) {\n return result + 'mánuður';\n }\n return result + (isFuture ? 'mánuð' : 'mánuði');\n case 'y':\n return withoutSuffix || isFuture ? 'ár' : 'ári';\n case 'yy':\n if (plural(number)) {\n return result + (withoutSuffix || isFuture ? 'ár' : 'árum');\n }\n return result + (withoutSuffix || isFuture ? 'ár' : 'ári');\n }\n }\n\n var is = moment.defineLocale('is', {\n months: 'janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember'.split(\n '_'\n ),\n monthsShort: 'jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des'.split('_'),\n weekdays:\n 'sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur'.split(\n '_'\n ),\n weekdaysShort: 'sun_mán_þri_mið_fim_fös_lau'.split('_'),\n weekdaysMin: 'Su_Má_Þr_Mi_Fi_Fö_La'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY [kl.] H:mm',\n LLLL: 'dddd, D. MMMM YYYY [kl.] H:mm',\n },\n calendar: {\n sameDay: '[í dag kl.] LT',\n nextDay: '[á morgun kl.] LT',\n nextWeek: 'dddd [kl.] LT',\n lastDay: '[í gær kl.] LT',\n lastWeek: '[síðasta] dddd [kl.] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'eftir %s',\n past: 'fyrir %s síðan',\n s: translate,\n ss: translate,\n m: translate,\n mm: translate,\n h: 'klukkustund',\n hh: translate,\n d: translate,\n dd: translate,\n M: translate,\n MM: translate,\n y: translate,\n yy: translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return is;\n\n})));\n","//! moment.js locale configuration\n//! locale : Italian (Switzerland) [it-ch]\n//! author : xfh : https://github.com/xfh\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var itCh = moment.defineLocale('it-ch', {\n months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split(\n '_'\n ),\n monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),\n weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split(\n '_'\n ),\n weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),\n weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Oggi alle] LT',\n nextDay: '[Domani alle] LT',\n nextWeek: 'dddd [alle] LT',\n lastDay: '[Ieri alle] LT',\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n return '[la scorsa] dddd [alle] LT';\n default:\n return '[lo scorso] dddd [alle] LT';\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: function (s) {\n return (/^[0-9].+$/.test(s) ? 'tra' : 'in') + ' ' + s;\n },\n past: '%s fa',\n s: 'alcuni secondi',\n ss: '%d secondi',\n m: 'un minuto',\n mm: '%d minuti',\n h: \"un'ora\",\n hh: '%d ore',\n d: 'un giorno',\n dd: '%d giorni',\n M: 'un mese',\n MM: '%d mesi',\n y: 'un anno',\n yy: '%d anni',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return itCh;\n\n})));\n","//! moment.js locale configuration\n//! locale : Italian [it]\n//! author : Lorenzo : https://github.com/aliem\n//! author: Mattia Larentis: https://github.com/nostalgiaz\n//! author: Marco : https://github.com/Manfre98\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var it = moment.defineLocale('it', {\n months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split(\n '_'\n ),\n monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),\n weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split(\n '_'\n ),\n weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),\n weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: function () {\n return (\n '[Oggi a' +\n (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : \"ll'\") +\n ']LT'\n );\n },\n nextDay: function () {\n return (\n '[Domani a' +\n (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : \"ll'\") +\n ']LT'\n );\n },\n nextWeek: function () {\n return (\n 'dddd [a' +\n (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : \"ll'\") +\n ']LT'\n );\n },\n lastDay: function () {\n return (\n '[Ieri a' +\n (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : \"ll'\") +\n ']LT'\n );\n },\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n return (\n '[La scorsa] dddd [a' +\n (this.hours() > 1\n ? 'lle '\n : this.hours() === 0\n ? ' '\n : \"ll'\") +\n ']LT'\n );\n default:\n return (\n '[Lo scorso] dddd [a' +\n (this.hours() > 1\n ? 'lle '\n : this.hours() === 0\n ? ' '\n : \"ll'\") +\n ']LT'\n );\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'tra %s',\n past: '%s fa',\n s: 'alcuni secondi',\n ss: '%d secondi',\n m: 'un minuto',\n mm: '%d minuti',\n h: \"un'ora\",\n hh: '%d ore',\n d: 'un giorno',\n dd: '%d giorni',\n w: 'una settimana',\n ww: '%d settimane',\n M: 'un mese',\n MM: '%d mesi',\n y: 'un anno',\n yy: '%d anni',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return it;\n\n})));\n","//! moment.js locale configuration\n//! locale : Japanese [ja]\n//! author : LI Long : https://github.com/baryon\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var ja = moment.defineLocale('ja', {\n eras: [\n {\n since: '2019-05-01',\n offset: 1,\n name: '令和',\n narrow: '㋿',\n abbr: 'R',\n },\n {\n since: '1989-01-08',\n until: '2019-04-30',\n offset: 1,\n name: '平成',\n narrow: '㍻',\n abbr: 'H',\n },\n {\n since: '1926-12-25',\n until: '1989-01-07',\n offset: 1,\n name: '昭和',\n narrow: '㍼',\n abbr: 'S',\n },\n {\n since: '1912-07-30',\n until: '1926-12-24',\n offset: 1,\n name: '大正',\n narrow: '㍽',\n abbr: 'T',\n },\n {\n since: '1873-01-01',\n until: '1912-07-29',\n offset: 6,\n name: '明治',\n narrow: '㍾',\n abbr: 'M',\n },\n {\n since: '0001-01-01',\n until: '1873-12-31',\n offset: 1,\n name: '西暦',\n narrow: 'AD',\n abbr: 'AD',\n },\n {\n since: '0000-12-31',\n until: -Infinity,\n offset: 1,\n name: '紀元前',\n narrow: 'BC',\n abbr: 'BC',\n },\n ],\n eraYearOrdinalRegex: /(元|\\d+)年/,\n eraYearOrdinalParse: function (input, match) {\n return match[1] === '元' ? 1 : parseInt(match[1] || input, 10);\n },\n months: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),\n monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(\n '_'\n ),\n weekdays: '日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日'.split('_'),\n weekdaysShort: '日_月_火_水_木_金_土'.split('_'),\n weekdaysMin: '日_月_火_水_木_金_土'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY/MM/DD',\n LL: 'YYYY年M月D日',\n LLL: 'YYYY年M月D日 HH:mm',\n LLLL: 'YYYY年M月D日 dddd HH:mm',\n l: 'YYYY/MM/DD',\n ll: 'YYYY年M月D日',\n lll: 'YYYY年M月D日 HH:mm',\n llll: 'YYYY年M月D日(ddd) HH:mm',\n },\n meridiemParse: /午前|午後/i,\n isPM: function (input) {\n return input === '午後';\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return '午前';\n } else {\n return '午後';\n }\n },\n calendar: {\n sameDay: '[今日] LT',\n nextDay: '[明日] LT',\n nextWeek: function (now) {\n if (now.week() !== this.week()) {\n return '[来週]dddd LT';\n } else {\n return 'dddd LT';\n }\n },\n lastDay: '[昨日] LT',\n lastWeek: function (now) {\n if (this.week() !== now.week()) {\n return '[先週]dddd LT';\n } else {\n return 'dddd LT';\n }\n },\n sameElse: 'L',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}日/,\n ordinal: function (number, period) {\n switch (period) {\n case 'y':\n return number === 1 ? '元年' : number + '年';\n case 'd':\n case 'D':\n case 'DDD':\n return number + '日';\n default:\n return number;\n }\n },\n relativeTime: {\n future: '%s後',\n past: '%s前',\n s: '数秒',\n ss: '%d秒',\n m: '1分',\n mm: '%d分',\n h: '1時間',\n hh: '%d時間',\n d: '1日',\n dd: '%d日',\n M: '1ヶ月',\n MM: '%dヶ月',\n y: '1年',\n yy: '%d年',\n },\n });\n\n return ja;\n\n})));\n","//! moment.js locale configuration\n//! locale : Javanese [jv]\n//! author : Rony Lantip : https://github.com/lantip\n//! reference: http://jv.wikipedia.org/wiki/Basa_Jawa\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var jv = moment.defineLocale('jv', {\n months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des'.split('_'),\n weekdays: 'Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu'.split('_'),\n weekdaysShort: 'Min_Sen_Sel_Reb_Kem_Jem_Sep'.split('_'),\n weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sp'.split('_'),\n longDateFormat: {\n LT: 'HH.mm',\n LTS: 'HH.mm.ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY [pukul] HH.mm',\n LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',\n },\n meridiemParse: /enjing|siyang|sonten|ndalu/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'enjing') {\n return hour;\n } else if (meridiem === 'siyang') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === 'sonten' || meridiem === 'ndalu') {\n return hour + 12;\n }\n },\n meridiem: function (hours, minutes, isLower) {\n if (hours < 11) {\n return 'enjing';\n } else if (hours < 15) {\n return 'siyang';\n } else if (hours < 19) {\n return 'sonten';\n } else {\n return 'ndalu';\n }\n },\n calendar: {\n sameDay: '[Dinten puniko pukul] LT',\n nextDay: '[Mbenjang pukul] LT',\n nextWeek: 'dddd [pukul] LT',\n lastDay: '[Kala wingi pukul] LT',\n lastWeek: 'dddd [kepengker pukul] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'wonten ing %s',\n past: '%s ingkang kepengker',\n s: 'sawetawis detik',\n ss: '%d detik',\n m: 'setunggal menit',\n mm: '%d menit',\n h: 'setunggal jam',\n hh: '%d jam',\n d: 'sedinten',\n dd: '%d dinten',\n M: 'sewulan',\n MM: '%d wulan',\n y: 'setaun',\n yy: '%d taun',\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return jv;\n\n})));\n","//! moment.js locale configuration\n//! locale : Georgian [ka]\n//! author : Irakli Janiashvili : https://github.com/IrakliJani\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var ka = moment.defineLocale('ka', {\n months: 'იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი'.split(\n '_'\n ),\n monthsShort: 'იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ'.split('_'),\n weekdays: {\n standalone:\n 'კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი'.split(\n '_'\n ),\n format: 'კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს'.split(\n '_'\n ),\n isFormat: /(წინა|შემდეგ)/,\n },\n weekdaysShort: 'კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ'.split('_'),\n weekdaysMin: 'კვ_ორ_სა_ოთ_ხუ_პა_შა'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[დღეს] LT[-ზე]',\n nextDay: '[ხვალ] LT[-ზე]',\n lastDay: '[გუშინ] LT[-ზე]',\n nextWeek: '[შემდეგ] dddd LT[-ზე]',\n lastWeek: '[წინა] dddd LT-ზე',\n sameElse: 'L',\n },\n relativeTime: {\n future: function (s) {\n return s.replace(\n /(წამ|წუთ|საათ|წელ|დღ|თვ)(ი|ე)/,\n function ($0, $1, $2) {\n return $2 === 'ი' ? $1 + 'ში' : $1 + $2 + 'ში';\n }\n );\n },\n past: function (s) {\n if (/(წამი|წუთი|საათი|დღე|თვე)/.test(s)) {\n return s.replace(/(ი|ე)$/, 'ის წინ');\n }\n if (/წელი/.test(s)) {\n return s.replace(/წელი$/, 'წლის წინ');\n }\n return s;\n },\n s: 'რამდენიმე წამი',\n ss: '%d წამი',\n m: 'წუთი',\n mm: '%d წუთი',\n h: 'საათი',\n hh: '%d საათი',\n d: 'დღე',\n dd: '%d დღე',\n M: 'თვე',\n MM: '%d თვე',\n y: 'წელი',\n yy: '%d წელი',\n },\n dayOfMonthOrdinalParse: /0|1-ლი|მე-\\d{1,2}|\\d{1,2}-ე/,\n ordinal: function (number) {\n if (number === 0) {\n return number;\n }\n if (number === 1) {\n return number + '-ლი';\n }\n if (\n number < 20 ||\n (number <= 100 && number % 20 === 0) ||\n number % 100 === 0\n ) {\n return 'მე-' + number;\n }\n return number + '-ე';\n },\n week: {\n dow: 1,\n doy: 7,\n },\n });\n\n return ka;\n\n})));\n","//! moment.js locale configuration\n//! locale : Kazakh [kk]\n//! authors : Nurlan Rakhimzhanov : https://github.com/nurlan\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var suffixes = {\n 0: '-ші',\n 1: '-ші',\n 2: '-ші',\n 3: '-ші',\n 4: '-ші',\n 5: '-ші',\n 6: '-шы',\n 7: '-ші',\n 8: '-ші',\n 9: '-шы',\n 10: '-шы',\n 20: '-шы',\n 30: '-шы',\n 40: '-шы',\n 50: '-ші',\n 60: '-шы',\n 70: '-ші',\n 80: '-ші',\n 90: '-шы',\n 100: '-ші',\n };\n\n var kk = moment.defineLocale('kk', {\n months: 'қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан'.split(\n '_'\n ),\n monthsShort: 'қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел'.split('_'),\n weekdays: 'жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі'.split(\n '_'\n ),\n weekdaysShort: 'жек_дүй_сей_сәр_бей_жұм_сен'.split('_'),\n weekdaysMin: 'жк_дй_сй_ср_бй_жм_сн'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Бүгін сағат] LT',\n nextDay: '[Ертең сағат] LT',\n nextWeek: 'dddd [сағат] LT',\n lastDay: '[Кеше сағат] LT',\n lastWeek: '[Өткен аптаның] dddd [сағат] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s ішінде',\n past: '%s бұрын',\n s: 'бірнеше секунд',\n ss: '%d секунд',\n m: 'бір минут',\n mm: '%d минут',\n h: 'бір сағат',\n hh: '%d сағат',\n d: 'бір күн',\n dd: '%d күн',\n M: 'бір ай',\n MM: '%d ай',\n y: 'бір жыл',\n yy: '%d жыл',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(ші|шы)/,\n ordinal: function (number) {\n var a = number % 10,\n b = number >= 100 ? 100 : null;\n return number + (suffixes[number] || suffixes[a] || suffixes[b]);\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return kk;\n\n})));\n","//! moment.js locale configuration\n//! locale : Cambodian [km]\n//! author : Kruy Vanna : https://github.com/kruyvanna\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '១',\n 2: '២',\n 3: '៣',\n 4: '៤',\n 5: '៥',\n 6: '៦',\n 7: '៧',\n 8: '៨',\n 9: '៩',\n 0: '០',\n },\n numberMap = {\n '១': '1',\n '២': '2',\n '៣': '3',\n '៤': '4',\n '៥': '5',\n '៦': '6',\n '៧': '7',\n '៨': '8',\n '៩': '9',\n '០': '0',\n };\n\n var km = moment.defineLocale('km', {\n months: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split(\n '_'\n ),\n monthsShort:\n 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split(\n '_'\n ),\n weekdays: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'),\n weekdaysShort: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'),\n weekdaysMin: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n meridiemParse: /ព្រឹក|ល្ងាច/,\n isPM: function (input) {\n return input === 'ល្ងាច';\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'ព្រឹក';\n } else {\n return 'ល្ងាច';\n }\n },\n calendar: {\n sameDay: '[ថ្ងៃនេះ ម៉ោង] LT',\n nextDay: '[ស្អែក ម៉ោង] LT',\n nextWeek: 'dddd [ម៉ោង] LT',\n lastDay: '[ម្សិលមិញ ម៉ោង] LT',\n lastWeek: 'dddd [សប្តាហ៍មុន] [ម៉ោង] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%sទៀត',\n past: '%sមុន',\n s: 'ប៉ុន្មានវិនាទី',\n ss: '%d វិនាទី',\n m: 'មួយនាទី',\n mm: '%d នាទី',\n h: 'មួយម៉ោង',\n hh: '%d ម៉ោង',\n d: 'មួយថ្ងៃ',\n dd: '%d ថ្ងៃ',\n M: 'មួយខែ',\n MM: '%d ខែ',\n y: 'មួយឆ្នាំ',\n yy: '%d ឆ្នាំ',\n },\n dayOfMonthOrdinalParse: /ទី\\d{1,2}/,\n ordinal: 'ទី%d',\n preparse: function (string) {\n return string.replace(/[១២៣៤៥៦៧៨៩០]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return km;\n\n})));\n","//! moment.js locale configuration\n//! locale : Kannada [kn]\n//! author : Rajeev Naik : https://github.com/rajeevnaikte\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '೧',\n 2: '೨',\n 3: '೩',\n 4: '೪',\n 5: '೫',\n 6: '೬',\n 7: '೭',\n 8: '೮',\n 9: '೯',\n 0: '೦',\n },\n numberMap = {\n '೧': '1',\n '೨': '2',\n '೩': '3',\n '೪': '4',\n '೫': '5',\n '೬': '6',\n '೭': '7',\n '೮': '8',\n '೯': '9',\n '೦': '0',\n };\n\n var kn = moment.defineLocale('kn', {\n months: 'ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್'.split(\n '_'\n ),\n monthsShort:\n 'ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂ_ಅಕ್ಟೋ_ನವೆಂ_ಡಿಸೆಂ'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ'.split(\n '_'\n ),\n weekdaysShort: 'ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ'.split('_'),\n weekdaysMin: 'ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ'.split('_'),\n longDateFormat: {\n LT: 'A h:mm',\n LTS: 'A h:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm',\n LLLL: 'dddd, D MMMM YYYY, A h:mm',\n },\n calendar: {\n sameDay: '[ಇಂದು] LT',\n nextDay: '[ನಾಳೆ] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[ನಿನ್ನೆ] LT',\n lastWeek: '[ಕೊನೆಯ] dddd, LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s ನಂತರ',\n past: '%s ಹಿಂದೆ',\n s: 'ಕೆಲವು ಕ್ಷಣಗಳು',\n ss: '%d ಸೆಕೆಂಡುಗಳು',\n m: 'ಒಂದು ನಿಮಿಷ',\n mm: '%d ನಿಮಿಷ',\n h: 'ಒಂದು ಗಂಟೆ',\n hh: '%d ಗಂಟೆ',\n d: 'ಒಂದು ದಿನ',\n dd: '%d ದಿನ',\n M: 'ಒಂದು ತಿಂಗಳು',\n MM: '%d ತಿಂಗಳು',\n y: 'ಒಂದು ವರ್ಷ',\n yy: '%d ವರ್ಷ',\n },\n preparse: function (string) {\n return string.replace(/[೧೨೩೪೫೬೭೮೯೦]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n meridiemParse: /ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'ರಾತ್ರಿ') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'ಬೆಳಿಗ್ಗೆ') {\n return hour;\n } else if (meridiem === 'ಮಧ್ಯಾಹ್ನ') {\n return hour >= 10 ? hour : hour + 12;\n } else if (meridiem === 'ಸಂಜೆ') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'ರಾತ್ರಿ';\n } else if (hour < 10) {\n return 'ಬೆಳಿಗ್ಗೆ';\n } else if (hour < 17) {\n return 'ಮಧ್ಯಾಹ್ನ';\n } else if (hour < 20) {\n return 'ಸಂಜೆ';\n } else {\n return 'ರಾತ್ರಿ';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(ನೇ)/,\n ordinal: function (number) {\n return number + 'ನೇ';\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n },\n });\n\n return kn;\n\n})));\n","//! moment.js locale configuration\n//! locale : Korean [ko]\n//! author : Kyungwook, Park : https://github.com/kyungw00k\n//! author : Jeeeyul Lee <jeeeyul@gmail.com>\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var ko = moment.defineLocale('ko', {\n months: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'),\n monthsShort: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split(\n '_'\n ),\n weekdays: '일요일_월요일_화요일_수요일_목요일_금요일_토요일'.split('_'),\n weekdaysShort: '일_월_화_수_목_금_토'.split('_'),\n weekdaysMin: '일_월_화_수_목_금_토'.split('_'),\n longDateFormat: {\n LT: 'A h:mm',\n LTS: 'A h:mm:ss',\n L: 'YYYY.MM.DD.',\n LL: 'YYYY년 MMMM D일',\n LLL: 'YYYY년 MMMM D일 A h:mm',\n LLLL: 'YYYY년 MMMM D일 dddd A h:mm',\n l: 'YYYY.MM.DD.',\n ll: 'YYYY년 MMMM D일',\n lll: 'YYYY년 MMMM D일 A h:mm',\n llll: 'YYYY년 MMMM D일 dddd A h:mm',\n },\n calendar: {\n sameDay: '오늘 LT',\n nextDay: '내일 LT',\n nextWeek: 'dddd LT',\n lastDay: '어제 LT',\n lastWeek: '지난주 dddd LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s 후',\n past: '%s 전',\n s: '몇 초',\n ss: '%d초',\n m: '1분',\n mm: '%d분',\n h: '한 시간',\n hh: '%d시간',\n d: '하루',\n dd: '%d일',\n M: '한 달',\n MM: '%d달',\n y: '일 년',\n yy: '%d년',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(일|월|주)/,\n ordinal: function (number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + '일';\n case 'M':\n return number + '월';\n case 'w':\n case 'W':\n return number + '주';\n default:\n return number;\n }\n },\n meridiemParse: /오전|오후/,\n isPM: function (token) {\n return token === '오후';\n },\n meridiem: function (hour, minute, isUpper) {\n return hour < 12 ? '오전' : '오후';\n },\n });\n\n return ko;\n\n})));\n","//! moment.js locale configuration\n//! locale : Kurdish [ku]\n//! author : Shahram Mebashar : https://github.com/ShahramMebashar\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '١',\n 2: '٢',\n 3: '٣',\n 4: '٤',\n 5: '٥',\n 6: '٦',\n 7: '٧',\n 8: '٨',\n 9: '٩',\n 0: '٠',\n },\n numberMap = {\n '١': '1',\n '٢': '2',\n '٣': '3',\n '٤': '4',\n '٥': '5',\n '٦': '6',\n '٧': '7',\n '٨': '8',\n '٩': '9',\n '٠': '0',\n },\n months = [\n 'کانونی دووەم',\n 'شوبات',\n 'ئازار',\n 'نیسان',\n 'ئایار',\n 'حوزەیران',\n 'تەمموز',\n 'ئاب',\n 'ئەیلوول',\n 'تشرینی یەكەم',\n 'تشرینی دووەم',\n 'كانونی یەکەم',\n ];\n\n var ku = moment.defineLocale('ku', {\n months: months,\n monthsShort: months,\n weekdays:\n 'یه‌كشه‌ممه‌_دووشه‌ممه‌_سێشه‌ممه‌_چوارشه‌ممه‌_پێنجشه‌ممه‌_هه‌ینی_شه‌ممه‌'.split(\n '_'\n ),\n weekdaysShort:\n 'یه‌كشه‌م_دووشه‌م_سێشه‌م_چوارشه‌م_پێنجشه‌م_هه‌ینی_شه‌ممه‌'.split('_'),\n weekdaysMin: 'ی_د_س_چ_پ_ه_ش'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n meridiemParse: /ئێواره‌|به‌یانی/,\n isPM: function (input) {\n return /ئێواره‌/.test(input);\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'به‌یانی';\n } else {\n return 'ئێواره‌';\n }\n },\n calendar: {\n sameDay: '[ئه‌مرۆ كاتژمێر] LT',\n nextDay: '[به‌یانی كاتژمێر] LT',\n nextWeek: 'dddd [كاتژمێر] LT',\n lastDay: '[دوێنێ كاتژمێر] LT',\n lastWeek: 'dddd [كاتژمێر] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'له‌ %s',\n past: '%s',\n s: 'چه‌ند چركه‌یه‌ك',\n ss: 'چركه‌ %d',\n m: 'یه‌ك خوله‌ك',\n mm: '%d خوله‌ك',\n h: 'یه‌ك كاتژمێر',\n hh: '%d كاتژمێر',\n d: 'یه‌ك ڕۆژ',\n dd: '%d ڕۆژ',\n M: 'یه‌ك مانگ',\n MM: '%d مانگ',\n y: 'یه‌ك ساڵ',\n yy: '%d ساڵ',\n },\n preparse: function (string) {\n return string\n .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {\n return numberMap[match];\n })\n .replace(/،/g, ',');\n },\n postformat: function (string) {\n return string\n .replace(/\\d/g, function (match) {\n return symbolMap[match];\n })\n .replace(/,/g, '،');\n },\n week: {\n dow: 6, // Saturday is the first day of the week.\n doy: 12, // The week that contains Jan 12th is the first week of the year.\n },\n });\n\n return ku;\n\n})));\n","//! moment.js locale configuration\n//! locale : Kyrgyz [ky]\n//! author : Chyngyz Arystan uulu : https://github.com/chyngyz\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var suffixes = {\n 0: '-чү',\n 1: '-чи',\n 2: '-чи',\n 3: '-чү',\n 4: '-чү',\n 5: '-чи',\n 6: '-чы',\n 7: '-чи',\n 8: '-чи',\n 9: '-чу',\n 10: '-чу',\n 20: '-чы',\n 30: '-чу',\n 40: '-чы',\n 50: '-чү',\n 60: '-чы',\n 70: '-чи',\n 80: '-чи',\n 90: '-чу',\n 100: '-чү',\n };\n\n var ky = moment.defineLocale('ky', {\n months: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split(\n '_'\n ),\n monthsShort: 'янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек'.split(\n '_'\n ),\n weekdays: 'Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби'.split(\n '_'\n ),\n weekdaysShort: 'Жек_Дүй_Шей_Шар_Бей_Жум_Ише'.split('_'),\n weekdaysMin: 'Жк_Дй_Шй_Шр_Бй_Жм_Иш'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Бүгүн саат] LT',\n nextDay: '[Эртең саат] LT',\n nextWeek: 'dddd [саат] LT',\n lastDay: '[Кечээ саат] LT',\n lastWeek: '[Өткөн аптанын] dddd [күнү] [саат] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s ичинде',\n past: '%s мурун',\n s: 'бирнече секунд',\n ss: '%d секунд',\n m: 'бир мүнөт',\n mm: '%d мүнөт',\n h: 'бир саат',\n hh: '%d саат',\n d: 'бир күн',\n dd: '%d күн',\n M: 'бир ай',\n MM: '%d ай',\n y: 'бир жыл',\n yy: '%d жыл',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(чи|чы|чү|чу)/,\n ordinal: function (number) {\n var a = number % 10,\n b = number >= 100 ? 100 : null;\n return number + (suffixes[number] || suffixes[a] || suffixes[b]);\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return ky;\n\n})));\n","//! moment.js locale configuration\n//! locale : Luxembourgish [lb]\n//! author : mweimerskirch : https://github.com/mweimerskirch\n//! author : David Raison : https://github.com/kwisatz\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n m: ['eng Minutt', 'enger Minutt'],\n h: ['eng Stonn', 'enger Stonn'],\n d: ['een Dag', 'engem Dag'],\n M: ['ee Mount', 'engem Mount'],\n y: ['ee Joer', 'engem Joer'],\n };\n return withoutSuffix ? format[key][0] : format[key][1];\n }\n function processFutureTime(string) {\n var number = string.substr(0, string.indexOf(' '));\n if (eifelerRegelAppliesToNumber(number)) {\n return 'a ' + string;\n }\n return 'an ' + string;\n }\n function processPastTime(string) {\n var number = string.substr(0, string.indexOf(' '));\n if (eifelerRegelAppliesToNumber(number)) {\n return 'viru ' + string;\n }\n return 'virun ' + string;\n }\n /**\n * Returns true if the word before the given number loses the '-n' ending.\n * e.g. 'an 10 Deeg' but 'a 5 Deeg'\n *\n * @param number {integer}\n * @returns {boolean}\n */\n function eifelerRegelAppliesToNumber(number) {\n number = parseInt(number, 10);\n if (isNaN(number)) {\n return false;\n }\n if (number < 0) {\n // Negative Number --> always true\n return true;\n } else if (number < 10) {\n // Only 1 digit\n if (4 <= number && number <= 7) {\n return true;\n }\n return false;\n } else if (number < 100) {\n // 2 digits\n var lastDigit = number % 10,\n firstDigit = number / 10;\n if (lastDigit === 0) {\n return eifelerRegelAppliesToNumber(firstDigit);\n }\n return eifelerRegelAppliesToNumber(lastDigit);\n } else if (number < 10000) {\n // 3 or 4 digits --> recursively check first digit\n while (number >= 10) {\n number = number / 10;\n }\n return eifelerRegelAppliesToNumber(number);\n } else {\n // Anything larger than 4 digits: recursively check first n-3 digits\n number = number / 1000;\n return eifelerRegelAppliesToNumber(number);\n }\n }\n\n var lb = moment.defineLocale('lb', {\n months: 'Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember'.split(\n '_'\n ),\n monthsShort:\n 'Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays:\n 'Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg'.split(\n '_'\n ),\n weekdaysShort: 'So._Mé._Dë._Më._Do._Fr._Sa.'.split('_'),\n weekdaysMin: 'So_Mé_Dë_Më_Do_Fr_Sa'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm [Auer]',\n LTS: 'H:mm:ss [Auer]',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm [Auer]',\n LLLL: 'dddd, D. MMMM YYYY H:mm [Auer]',\n },\n calendar: {\n sameDay: '[Haut um] LT',\n sameElse: 'L',\n nextDay: '[Muer um] LT',\n nextWeek: 'dddd [um] LT',\n lastDay: '[Gëschter um] LT',\n lastWeek: function () {\n // Different date string for 'Dënschdeg' (Tuesday) and 'Donneschdeg' (Thursday) due to phonological rule\n switch (this.day()) {\n case 2:\n case 4:\n return '[Leschten] dddd [um] LT';\n default:\n return '[Leschte] dddd [um] LT';\n }\n },\n },\n relativeTime: {\n future: processFutureTime,\n past: processPastTime,\n s: 'e puer Sekonnen',\n ss: '%d Sekonnen',\n m: processRelativeTime,\n mm: '%d Minutten',\n h: processRelativeTime,\n hh: '%d Stonnen',\n d: processRelativeTime,\n dd: '%d Deeg',\n M: processRelativeTime,\n MM: '%d Méint',\n y: processRelativeTime,\n yy: '%d Joer',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return lb;\n\n})));\n","//! moment.js locale configuration\n//! locale : Lao [lo]\n//! author : Ryan Hart : https://github.com/ryanhart2\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var lo = moment.defineLocale('lo', {\n months: 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split(\n '_'\n ),\n monthsShort:\n 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split(\n '_'\n ),\n weekdays: 'ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),\n weekdaysShort: 'ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),\n weekdaysMin: 'ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'ວັນdddd D MMMM YYYY HH:mm',\n },\n meridiemParse: /ຕອນເຊົ້າ|ຕອນແລງ/,\n isPM: function (input) {\n return input === 'ຕອນແລງ';\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'ຕອນເຊົ້າ';\n } else {\n return 'ຕອນແລງ';\n }\n },\n calendar: {\n sameDay: '[ມື້ນີ້ເວລາ] LT',\n nextDay: '[ມື້ອື່ນເວລາ] LT',\n nextWeek: '[ວັນ]dddd[ໜ້າເວລາ] LT',\n lastDay: '[ມື້ວານນີ້ເວລາ] LT',\n lastWeek: '[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'ອີກ %s',\n past: '%sຜ່ານມາ',\n s: 'ບໍ່ເທົ່າໃດວິນາທີ',\n ss: '%d ວິນາທີ',\n m: '1 ນາທີ',\n mm: '%d ນາທີ',\n h: '1 ຊົ່ວໂມງ',\n hh: '%d ຊົ່ວໂມງ',\n d: '1 ມື້',\n dd: '%d ມື້',\n M: '1 ເດືອນ',\n MM: '%d ເດືອນ',\n y: '1 ປີ',\n yy: '%d ປີ',\n },\n dayOfMonthOrdinalParse: /(ທີ່)\\d{1,2}/,\n ordinal: function (number) {\n return 'ທີ່' + number;\n },\n });\n\n return lo;\n\n})));\n","//! moment.js locale configuration\n//! locale : Lithuanian [lt]\n//! author : Mindaugas Mozūras : https://github.com/mmozuras\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var units = {\n ss: 'sekundė_sekundžių_sekundes',\n m: 'minutė_minutės_minutę',\n mm: 'minutės_minučių_minutes',\n h: 'valanda_valandos_valandą',\n hh: 'valandos_valandų_valandas',\n d: 'diena_dienos_dieną',\n dd: 'dienos_dienų_dienas',\n M: 'mėnuo_mėnesio_mėnesį',\n MM: 'mėnesiai_mėnesių_mėnesius',\n y: 'metai_metų_metus',\n yy: 'metai_metų_metus',\n };\n function translateSeconds(number, withoutSuffix, key, isFuture) {\n if (withoutSuffix) {\n return 'kelios sekundės';\n } else {\n return isFuture ? 'kelių sekundžių' : 'kelias sekundes';\n }\n }\n function translateSingular(number, withoutSuffix, key, isFuture) {\n return withoutSuffix\n ? forms(key)[0]\n : isFuture\n ? forms(key)[1]\n : forms(key)[2];\n }\n function special(number) {\n return number % 10 === 0 || (number > 10 && number < 20);\n }\n function forms(key) {\n return units[key].split('_');\n }\n function translate(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n if (number === 1) {\n return (\n result + translateSingular(number, withoutSuffix, key[0], isFuture)\n );\n } else if (withoutSuffix) {\n return result + (special(number) ? forms(key)[1] : forms(key)[0]);\n } else {\n if (isFuture) {\n return result + forms(key)[1];\n } else {\n return result + (special(number) ? forms(key)[1] : forms(key)[2]);\n }\n }\n }\n var lt = moment.defineLocale('lt', {\n months: {\n format: 'sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio'.split(\n '_'\n ),\n standalone:\n 'sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis'.split(\n '_'\n ),\n isFormat: /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?|MMMM?(\\[[^\\[\\]]*\\]|\\s)+D[oD]?/,\n },\n monthsShort: 'sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd'.split('_'),\n weekdays: {\n format: 'sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį'.split(\n '_'\n ),\n standalone:\n 'sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis'.split(\n '_'\n ),\n isFormat: /dddd HH:mm/,\n },\n weekdaysShort: 'Sek_Pir_Ant_Tre_Ket_Pen_Šeš'.split('_'),\n weekdaysMin: 'S_P_A_T_K_Pn_Š'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY-MM-DD',\n LL: 'YYYY [m.] MMMM D [d.]',\n LLL: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',\n LLLL: 'YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]',\n l: 'YYYY-MM-DD',\n ll: 'YYYY [m.] MMMM D [d.]',\n lll: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',\n llll: 'YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]',\n },\n calendar: {\n sameDay: '[Šiandien] LT',\n nextDay: '[Rytoj] LT',\n nextWeek: 'dddd LT',\n lastDay: '[Vakar] LT',\n lastWeek: '[Praėjusį] dddd LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'po %s',\n past: 'prieš %s',\n s: translateSeconds,\n ss: translate,\n m: translateSingular,\n mm: translate,\n h: translateSingular,\n hh: translate,\n d: translateSingular,\n dd: translate,\n M: translateSingular,\n MM: translate,\n y: translateSingular,\n yy: translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-oji/,\n ordinal: function (number) {\n return number + '-oji';\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return lt;\n\n})));\n","//! moment.js locale configuration\n//! locale : Latvian [lv]\n//! author : Kristaps Karlsons : https://github.com/skakri\n//! author : Jānis Elmeris : https://github.com/JanisE\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var units = {\n ss: 'sekundes_sekundēm_sekunde_sekundes'.split('_'),\n m: 'minūtes_minūtēm_minūte_minūtes'.split('_'),\n mm: 'minūtes_minūtēm_minūte_minūtes'.split('_'),\n h: 'stundas_stundām_stunda_stundas'.split('_'),\n hh: 'stundas_stundām_stunda_stundas'.split('_'),\n d: 'dienas_dienām_diena_dienas'.split('_'),\n dd: 'dienas_dienām_diena_dienas'.split('_'),\n M: 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),\n MM: 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),\n y: 'gada_gadiem_gads_gadi'.split('_'),\n yy: 'gada_gadiem_gads_gadi'.split('_'),\n };\n /**\n * @param withoutSuffix boolean true = a length of time; false = before/after a period of time.\n */\n function format(forms, number, withoutSuffix) {\n if (withoutSuffix) {\n // E.g. \"21 minūte\", \"3 minūtes\".\n return number % 10 === 1 && number % 100 !== 11 ? forms[2] : forms[3];\n } else {\n // E.g. \"21 minūtes\" as in \"pēc 21 minūtes\".\n // E.g. \"3 minūtēm\" as in \"pēc 3 minūtēm\".\n return number % 10 === 1 && number % 100 !== 11 ? forms[0] : forms[1];\n }\n }\n function relativeTimeWithPlural(number, withoutSuffix, key) {\n return number + ' ' + format(units[key], number, withoutSuffix);\n }\n function relativeTimeWithSingular(number, withoutSuffix, key) {\n return format(units[key], number, withoutSuffix);\n }\n function relativeSeconds(number, withoutSuffix) {\n return withoutSuffix ? 'dažas sekundes' : 'dažām sekundēm';\n }\n\n var lv = moment.defineLocale('lv', {\n months: 'janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris'.split(\n '_'\n ),\n monthsShort: 'jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec'.split('_'),\n weekdays:\n 'svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena'.split(\n '_'\n ),\n weekdaysShort: 'Sv_P_O_T_C_Pk_S'.split('_'),\n weekdaysMin: 'Sv_P_O_T_C_Pk_S'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY.',\n LL: 'YYYY. [gada] D. MMMM',\n LLL: 'YYYY. [gada] D. MMMM, HH:mm',\n LLLL: 'YYYY. [gada] D. MMMM, dddd, HH:mm',\n },\n calendar: {\n sameDay: '[Šodien pulksten] LT',\n nextDay: '[Rīt pulksten] LT',\n nextWeek: 'dddd [pulksten] LT',\n lastDay: '[Vakar pulksten] LT',\n lastWeek: '[Pagājušā] dddd [pulksten] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'pēc %s',\n past: 'pirms %s',\n s: relativeSeconds,\n ss: relativeTimeWithPlural,\n m: relativeTimeWithSingular,\n mm: relativeTimeWithPlural,\n h: relativeTimeWithSingular,\n hh: relativeTimeWithPlural,\n d: relativeTimeWithSingular,\n dd: relativeTimeWithPlural,\n M: relativeTimeWithSingular,\n MM: relativeTimeWithPlural,\n y: relativeTimeWithSingular,\n yy: relativeTimeWithPlural,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return lv;\n\n})));\n","//! moment.js locale configuration\n//! locale : Montenegrin [me]\n//! author : Miodrag Nikač <miodrag@restartit.me> : https://github.com/miodragnikac\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var translator = {\n words: {\n //Different grammatical cases\n ss: ['sekund', 'sekunda', 'sekundi'],\n m: ['jedan minut', 'jednog minuta'],\n mm: ['minut', 'minuta', 'minuta'],\n h: ['jedan sat', 'jednog sata'],\n hh: ['sat', 'sata', 'sati'],\n dd: ['dan', 'dana', 'dana'],\n MM: ['mjesec', 'mjeseca', 'mjeseci'],\n yy: ['godina', 'godine', 'godina'],\n },\n correctGrammaticalCase: function (number, wordKey) {\n return number === 1\n ? wordKey[0]\n : number >= 2 && number <= 4\n ? wordKey[1]\n : wordKey[2];\n },\n translate: function (number, withoutSuffix, key) {\n var wordKey = translator.words[key];\n if (key.length === 1) {\n return withoutSuffix ? wordKey[0] : wordKey[1];\n } else {\n return (\n number +\n ' ' +\n translator.correctGrammaticalCase(number, wordKey)\n );\n }\n },\n };\n\n var me = moment.defineLocale('me', {\n months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split(\n '_'\n ),\n monthsShort:\n 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),\n monthsParseExact: true,\n weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(\n '_'\n ),\n weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),\n weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm',\n LLLL: 'dddd, D. MMMM YYYY H:mm',\n },\n calendar: {\n sameDay: '[danas u] LT',\n nextDay: '[sjutra u] LT',\n\n nextWeek: function () {\n switch (this.day()) {\n case 0:\n return '[u] [nedjelju] [u] LT';\n case 3:\n return '[u] [srijedu] [u] LT';\n case 6:\n return '[u] [subotu] [u] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[u] dddd [u] LT';\n }\n },\n lastDay: '[juče u] LT',\n lastWeek: function () {\n var lastWeekDays = [\n '[prošle] [nedjelje] [u] LT',\n '[prošlog] [ponedjeljka] [u] LT',\n '[prošlog] [utorka] [u] LT',\n '[prošle] [srijede] [u] LT',\n '[prošlog] [četvrtka] [u] LT',\n '[prošlog] [petka] [u] LT',\n '[prošle] [subote] [u] LT',\n ];\n return lastWeekDays[this.day()];\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'za %s',\n past: 'prije %s',\n s: 'nekoliko sekundi',\n ss: translator.translate,\n m: translator.translate,\n mm: translator.translate,\n h: translator.translate,\n hh: translator.translate,\n d: 'dan',\n dd: translator.translate,\n M: 'mjesec',\n MM: translator.translate,\n y: 'godinu',\n yy: translator.translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return me;\n\n})));\n","//! moment.js locale configuration\n//! locale : Maori [mi]\n//! author : John Corrigan <robbiecloset@gmail.com> : https://github.com/johnideal\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var mi = moment.defineLocale('mi', {\n months: 'Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea'.split(\n '_'\n ),\n monthsShort:\n 'Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki'.split(\n '_'\n ),\n monthsRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,3}/i,\n monthsStrictRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,3}/i,\n monthsShortRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,3}/i,\n monthsShortStrictRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,2}/i,\n weekdays: 'Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei'.split('_'),\n weekdaysShort: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),\n weekdaysMin: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY [i] HH:mm',\n LLLL: 'dddd, D MMMM YYYY [i] HH:mm',\n },\n calendar: {\n sameDay: '[i teie mahana, i] LT',\n nextDay: '[apopo i] LT',\n nextWeek: 'dddd [i] LT',\n lastDay: '[inanahi i] LT',\n lastWeek: 'dddd [whakamutunga i] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'i roto i %s',\n past: '%s i mua',\n s: 'te hēkona ruarua',\n ss: '%d hēkona',\n m: 'he meneti',\n mm: '%d meneti',\n h: 'te haora',\n hh: '%d haora',\n d: 'he ra',\n dd: '%d ra',\n M: 'he marama',\n MM: '%d marama',\n y: 'he tau',\n yy: '%d tau',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return mi;\n\n})));\n","//! moment.js locale configuration\n//! locale : Macedonian [mk]\n//! author : Borislav Mickov : https://github.com/B0k0\n//! author : Sashko Todorov : https://github.com/bkyceh\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var mk = moment.defineLocale('mk', {\n months: 'јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември'.split(\n '_'\n ),\n monthsShort: 'јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек'.split('_'),\n weekdays: 'недела_понеделник_вторник_среда_четврток_петок_сабота'.split(\n '_'\n ),\n weekdaysShort: 'нед_пон_вто_сре_чет_пет_саб'.split('_'),\n weekdaysMin: 'нe_пo_вт_ср_че_пе_сa'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'D.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY H:mm',\n LLLL: 'dddd, D MMMM YYYY H:mm',\n },\n calendar: {\n sameDay: '[Денес во] LT',\n nextDay: '[Утре во] LT',\n nextWeek: '[Во] dddd [во] LT',\n lastDay: '[Вчера во] LT',\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n case 3:\n case 6:\n return '[Изминатата] dddd [во] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[Изминатиот] dddd [во] LT';\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'за %s',\n past: 'пред %s',\n s: 'неколку секунди',\n ss: '%d секунди',\n m: 'една минута',\n mm: '%d минути',\n h: 'еден час',\n hh: '%d часа',\n d: 'еден ден',\n dd: '%d дена',\n M: 'еден месец',\n MM: '%d месеци',\n y: 'една година',\n yy: '%d години',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(ев|ен|ти|ви|ри|ми)/,\n ordinal: function (number) {\n var lastDigit = number % 10,\n last2Digits = number % 100;\n if (number === 0) {\n return number + '-ев';\n } else if (last2Digits === 0) {\n return number + '-ен';\n } else if (last2Digits > 10 && last2Digits < 20) {\n return number + '-ти';\n } else if (lastDigit === 1) {\n return number + '-ви';\n } else if (lastDigit === 2) {\n return number + '-ри';\n } else if (lastDigit === 7 || lastDigit === 8) {\n return number + '-ми';\n } else {\n return number + '-ти';\n }\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return mk;\n\n})));\n","//! moment.js locale configuration\n//! locale : Malayalam [ml]\n//! author : Floyd Pink : https://github.com/floydpink\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var ml = moment.defineLocale('ml', {\n months: 'ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ'.split(\n '_'\n ),\n monthsShort:\n 'ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays:\n 'ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച'.split(\n '_'\n ),\n weekdaysShort: 'ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി'.split('_'),\n weekdaysMin: 'ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ'.split('_'),\n longDateFormat: {\n LT: 'A h:mm -നു',\n LTS: 'A h:mm:ss -നു',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm -നു',\n LLLL: 'dddd, D MMMM YYYY, A h:mm -നു',\n },\n calendar: {\n sameDay: '[ഇന്ന്] LT',\n nextDay: '[നാളെ] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[ഇന്നലെ] LT',\n lastWeek: '[കഴിഞ്ഞ] dddd, LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s കഴിഞ്ഞ്',\n past: '%s മുൻപ്',\n s: 'അൽപ നിമിഷങ്ങൾ',\n ss: '%d സെക്കൻഡ്',\n m: 'ഒരു മിനിറ്റ്',\n mm: '%d മിനിറ്റ്',\n h: 'ഒരു മണിക്കൂർ',\n hh: '%d മണിക്കൂർ',\n d: 'ഒരു ദിവസം',\n dd: '%d ദിവസം',\n M: 'ഒരു മാസം',\n MM: '%d മാസം',\n y: 'ഒരു വർഷം',\n yy: '%d വർഷം',\n },\n meridiemParse: /രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (\n (meridiem === 'രാത്രി' && hour >= 4) ||\n meridiem === 'ഉച്ച കഴിഞ്ഞ്' ||\n meridiem === 'വൈകുന്നേരം'\n ) {\n return hour + 12;\n } else {\n return hour;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'രാത്രി';\n } else if (hour < 12) {\n return 'രാവിലെ';\n } else if (hour < 17) {\n return 'ഉച്ച കഴിഞ്ഞ്';\n } else if (hour < 20) {\n return 'വൈകുന്നേരം';\n } else {\n return 'രാത്രി';\n }\n },\n });\n\n return ml;\n\n})));\n","//! moment.js locale configuration\n//! locale : Mongolian [mn]\n//! author : Javkhlantugs Nyamdorj : https://github.com/javkhaanj7\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function translate(number, withoutSuffix, key, isFuture) {\n switch (key) {\n case 's':\n return withoutSuffix ? 'хэдхэн секунд' : 'хэдхэн секундын';\n case 'ss':\n return number + (withoutSuffix ? ' секунд' : ' секундын');\n case 'm':\n case 'mm':\n return number + (withoutSuffix ? ' минут' : ' минутын');\n case 'h':\n case 'hh':\n return number + (withoutSuffix ? ' цаг' : ' цагийн');\n case 'd':\n case 'dd':\n return number + (withoutSuffix ? ' өдөр' : ' өдрийн');\n case 'M':\n case 'MM':\n return number + (withoutSuffix ? ' сар' : ' сарын');\n case 'y':\n case 'yy':\n return number + (withoutSuffix ? ' жил' : ' жилийн');\n default:\n return number;\n }\n }\n\n var mn = moment.defineLocale('mn', {\n months: 'Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар'.split(\n '_'\n ),\n monthsShort:\n '1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба'.split('_'),\n weekdaysShort: 'Ням_Дав_Мяг_Лха_Пүр_Баа_Бям'.split('_'),\n weekdaysMin: 'Ня_Да_Мя_Лх_Пү_Ба_Бя'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY-MM-DD',\n LL: 'YYYY оны MMMMын D',\n LLL: 'YYYY оны MMMMын D HH:mm',\n LLLL: 'dddd, YYYY оны MMMMын D HH:mm',\n },\n meridiemParse: /ҮӨ|ҮХ/i,\n isPM: function (input) {\n return input === 'ҮХ';\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'ҮӨ';\n } else {\n return 'ҮХ';\n }\n },\n calendar: {\n sameDay: '[Өнөөдөр] LT',\n nextDay: '[Маргааш] LT',\n nextWeek: '[Ирэх] dddd LT',\n lastDay: '[Өчигдөр] LT',\n lastWeek: '[Өнгөрсөн] dddd LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s дараа',\n past: '%s өмнө',\n s: translate,\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: translate,\n dd: translate,\n M: translate,\n MM: translate,\n y: translate,\n yy: translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2} өдөр/,\n ordinal: function (number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + ' өдөр';\n default:\n return number;\n }\n },\n });\n\n return mn;\n\n})));\n","//! moment.js locale configuration\n//! locale : Marathi [mr]\n//! author : Harshad Kale : https://github.com/kalehv\n//! author : Vivek Athalye : https://github.com/vnathalye\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '१',\n 2: '२',\n 3: '३',\n 4: '४',\n 5: '५',\n 6: '६',\n 7: '७',\n 8: '८',\n 9: '९',\n 0: '०',\n },\n numberMap = {\n '१': '1',\n '२': '2',\n '३': '3',\n '४': '4',\n '५': '5',\n '६': '6',\n '७': '7',\n '८': '8',\n '९': '9',\n '०': '0',\n };\n\n function relativeTimeMr(number, withoutSuffix, string, isFuture) {\n var output = '';\n if (withoutSuffix) {\n switch (string) {\n case 's':\n output = 'काही सेकंद';\n break;\n case 'ss':\n output = '%d सेकंद';\n break;\n case 'm':\n output = 'एक मिनिट';\n break;\n case 'mm':\n output = '%d मिनिटे';\n break;\n case 'h':\n output = 'एक तास';\n break;\n case 'hh':\n output = '%d तास';\n break;\n case 'd':\n output = 'एक दिवस';\n break;\n case 'dd':\n output = '%d दिवस';\n break;\n case 'M':\n output = 'एक महिना';\n break;\n case 'MM':\n output = '%d महिने';\n break;\n case 'y':\n output = 'एक वर्ष';\n break;\n case 'yy':\n output = '%d वर्षे';\n break;\n }\n } else {\n switch (string) {\n case 's':\n output = 'काही सेकंदां';\n break;\n case 'ss':\n output = '%d सेकंदां';\n break;\n case 'm':\n output = 'एका मिनिटा';\n break;\n case 'mm':\n output = '%d मिनिटां';\n break;\n case 'h':\n output = 'एका तासा';\n break;\n case 'hh':\n output = '%d तासां';\n break;\n case 'd':\n output = 'एका दिवसा';\n break;\n case 'dd':\n output = '%d दिवसां';\n break;\n case 'M':\n output = 'एका महिन्या';\n break;\n case 'MM':\n output = '%d महिन्यां';\n break;\n case 'y':\n output = 'एका वर्षा';\n break;\n case 'yy':\n output = '%d वर्षां';\n break;\n }\n }\n return output.replace(/%d/i, number);\n }\n\n var mr = moment.defineLocale('mr', {\n months: 'जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split(\n '_'\n ),\n monthsShort:\n 'जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),\n weekdaysShort: 'रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि'.split('_'),\n weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'),\n longDateFormat: {\n LT: 'A h:mm वाजता',\n LTS: 'A h:mm:ss वाजता',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm वाजता',\n LLLL: 'dddd, D MMMM YYYY, A h:mm वाजता',\n },\n calendar: {\n sameDay: '[आज] LT',\n nextDay: '[उद्या] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[काल] LT',\n lastWeek: '[मागील] dddd, LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%sमध्ये',\n past: '%sपूर्वी',\n s: relativeTimeMr,\n ss: relativeTimeMr,\n m: relativeTimeMr,\n mm: relativeTimeMr,\n h: relativeTimeMr,\n hh: relativeTimeMr,\n d: relativeTimeMr,\n dd: relativeTimeMr,\n M: relativeTimeMr,\n MM: relativeTimeMr,\n y: relativeTimeMr,\n yy: relativeTimeMr,\n },\n preparse: function (string) {\n return string.replace(/[१२३४५६७८९०]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n meridiemParse: /पहाटे|सकाळी|दुपारी|सायंकाळी|रात्री/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'पहाटे' || meridiem === 'सकाळी') {\n return hour;\n } else if (\n meridiem === 'दुपारी' ||\n meridiem === 'सायंकाळी' ||\n meridiem === 'रात्री'\n ) {\n return hour >= 12 ? hour : hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour >= 0 && hour < 6) {\n return 'पहाटे';\n } else if (hour < 12) {\n return 'सकाळी';\n } else if (hour < 17) {\n return 'दुपारी';\n } else if (hour < 20) {\n return 'सायंकाळी';\n } else {\n return 'रात्री';\n }\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n },\n });\n\n return mr;\n\n})));\n","//! moment.js locale configuration\n//! locale : Malay [ms-my]\n//! note : DEPRECATED, the correct one is [ms]\n//! author : Weldan Jamili : https://github.com/weldan\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var msMy = moment.defineLocale('ms-my', {\n months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),\n weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),\n weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),\n weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),\n longDateFormat: {\n LT: 'HH.mm',\n LTS: 'HH.mm.ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY [pukul] HH.mm',\n LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',\n },\n meridiemParse: /pagi|tengahari|petang|malam/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'pagi') {\n return hour;\n } else if (meridiem === 'tengahari') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === 'petang' || meridiem === 'malam') {\n return hour + 12;\n }\n },\n meridiem: function (hours, minutes, isLower) {\n if (hours < 11) {\n return 'pagi';\n } else if (hours < 15) {\n return 'tengahari';\n } else if (hours < 19) {\n return 'petang';\n } else {\n return 'malam';\n }\n },\n calendar: {\n sameDay: '[Hari ini pukul] LT',\n nextDay: '[Esok pukul] LT',\n nextWeek: 'dddd [pukul] LT',\n lastDay: '[Kelmarin pukul] LT',\n lastWeek: 'dddd [lepas pukul] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'dalam %s',\n past: '%s yang lepas',\n s: 'beberapa saat',\n ss: '%d saat',\n m: 'seminit',\n mm: '%d minit',\n h: 'sejam',\n hh: '%d jam',\n d: 'sehari',\n dd: '%d hari',\n M: 'sebulan',\n MM: '%d bulan',\n y: 'setahun',\n yy: '%d tahun',\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return msMy;\n\n})));\n","//! moment.js locale configuration\n//! locale : Malay [ms]\n//! author : Weldan Jamili : https://github.com/weldan\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var ms = moment.defineLocale('ms', {\n months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),\n weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),\n weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),\n weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),\n longDateFormat: {\n LT: 'HH.mm',\n LTS: 'HH.mm.ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY [pukul] HH.mm',\n LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',\n },\n meridiemParse: /pagi|tengahari|petang|malam/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'pagi') {\n return hour;\n } else if (meridiem === 'tengahari') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === 'petang' || meridiem === 'malam') {\n return hour + 12;\n }\n },\n meridiem: function (hours, minutes, isLower) {\n if (hours < 11) {\n return 'pagi';\n } else if (hours < 15) {\n return 'tengahari';\n } else if (hours < 19) {\n return 'petang';\n } else {\n return 'malam';\n }\n },\n calendar: {\n sameDay: '[Hari ini pukul] LT',\n nextDay: '[Esok pukul] LT',\n nextWeek: 'dddd [pukul] LT',\n lastDay: '[Kelmarin pukul] LT',\n lastWeek: 'dddd [lepas pukul] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'dalam %s',\n past: '%s yang lepas',\n s: 'beberapa saat',\n ss: '%d saat',\n m: 'seminit',\n mm: '%d minit',\n h: 'sejam',\n hh: '%d jam',\n d: 'sehari',\n dd: '%d hari',\n M: 'sebulan',\n MM: '%d bulan',\n y: 'setahun',\n yy: '%d tahun',\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return ms;\n\n})));\n","//! moment.js locale configuration\n//! locale : Maltese (Malta) [mt]\n//! author : Alessandro Maruccia : https://github.com/alesma\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var mt = moment.defineLocale('mt', {\n months: 'Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru'.split(\n '_'\n ),\n monthsShort: 'Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ'.split('_'),\n weekdays:\n 'Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt'.split(\n '_'\n ),\n weekdaysShort: 'Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib'.split('_'),\n weekdaysMin: 'Ħa_Tn_Tl_Er_Ħa_Ġi_Si'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Illum fil-]LT',\n nextDay: '[Għada fil-]LT',\n nextWeek: 'dddd [fil-]LT',\n lastDay: '[Il-bieraħ fil-]LT',\n lastWeek: 'dddd [li għadda] [fil-]LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'f’ %s',\n past: '%s ilu',\n s: 'ftit sekondi',\n ss: '%d sekondi',\n m: 'minuta',\n mm: '%d minuti',\n h: 'siegħa',\n hh: '%d siegħat',\n d: 'ġurnata',\n dd: '%d ġranet',\n M: 'xahar',\n MM: '%d xhur',\n y: 'sena',\n yy: '%d sni',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return mt;\n\n})));\n","//! moment.js locale configuration\n//! locale : Burmese [my]\n//! author : Squar team, mysquar.com\n//! author : David Rossellat : https://github.com/gholadr\n//! author : Tin Aung Lin : https://github.com/thanyawzinmin\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '၁',\n 2: '၂',\n 3: '၃',\n 4: '၄',\n 5: '၅',\n 6: '၆',\n 7: '၇',\n 8: '၈',\n 9: '၉',\n 0: '၀',\n },\n numberMap = {\n '၁': '1',\n '၂': '2',\n '၃': '3',\n '၄': '4',\n '၅': '5',\n '၆': '6',\n '၇': '7',\n '၈': '8',\n '၉': '9',\n '၀': '0',\n };\n\n var my = moment.defineLocale('my', {\n months: 'ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ'.split(\n '_'\n ),\n monthsShort: 'ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ'.split('_'),\n weekdays: 'တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ'.split(\n '_'\n ),\n weekdaysShort: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),\n weekdaysMin: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),\n\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[ယနေ.] LT [မှာ]',\n nextDay: '[မနက်ဖြန်] LT [မှာ]',\n nextWeek: 'dddd LT [မှာ]',\n lastDay: '[မနေ.က] LT [မှာ]',\n lastWeek: '[ပြီးခဲ့သော] dddd LT [မှာ]',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'လာမည့် %s မှာ',\n past: 'လွန်ခဲ့သော %s က',\n s: 'စက္ကန်.အနည်းငယ်',\n ss: '%d စက္ကန့်',\n m: 'တစ်မိနစ်',\n mm: '%d မိနစ်',\n h: 'တစ်နာရီ',\n hh: '%d နာရီ',\n d: 'တစ်ရက်',\n dd: '%d ရက်',\n M: 'တစ်လ',\n MM: '%d လ',\n y: 'တစ်နှစ်',\n yy: '%d နှစ်',\n },\n preparse: function (string) {\n return string.replace(/[၁၂၃၄၅၆၇၈၉၀]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return my;\n\n})));\n","//! moment.js locale configuration\n//! locale : Norwegian Bokmål [nb]\n//! authors : Espen Hovlandsdal : https://github.com/rexxars\n//! Sigurd Gartmann : https://github.com/sigurdga\n//! Stephen Ramthun : https://github.com/stephenramthun\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var nb = moment.defineLocale('nb', {\n months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split(\n '_'\n ),\n monthsShort:\n 'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split('_'),\n monthsParseExact: true,\n weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),\n weekdaysShort: 'sø._ma._ti._on._to._fr._lø.'.split('_'),\n weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY [kl.] HH:mm',\n LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm',\n },\n calendar: {\n sameDay: '[i dag kl.] LT',\n nextDay: '[i morgen kl.] LT',\n nextWeek: 'dddd [kl.] LT',\n lastDay: '[i går kl.] LT',\n lastWeek: '[forrige] dddd [kl.] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'om %s',\n past: '%s siden',\n s: 'noen sekunder',\n ss: '%d sekunder',\n m: 'ett minutt',\n mm: '%d minutter',\n h: 'en time',\n hh: '%d timer',\n d: 'en dag',\n dd: '%d dager',\n w: 'en uke',\n ww: '%d uker',\n M: 'en måned',\n MM: '%d måneder',\n y: 'ett år',\n yy: '%d år',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return nb;\n\n})));\n","//! moment.js locale configuration\n//! locale : Nepalese [ne]\n//! author : suvash : https://github.com/suvash\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '१',\n 2: '२',\n 3: '३',\n 4: '४',\n 5: '५',\n 6: '६',\n 7: '७',\n 8: '८',\n 9: '९',\n 0: '०',\n },\n numberMap = {\n '१': '1',\n '२': '2',\n '३': '3',\n '४': '4',\n '५': '5',\n '६': '6',\n '७': '7',\n '८': '8',\n '९': '9',\n '०': '0',\n };\n\n var ne = moment.defineLocale('ne', {\n months: 'जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर'.split(\n '_'\n ),\n monthsShort:\n 'जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार'.split(\n '_'\n ),\n weekdaysShort: 'आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.'.split('_'),\n weekdaysMin: 'आ._सो._मं._बु._बि._शु._श.'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'Aको h:mm बजे',\n LTS: 'Aको h:mm:ss बजे',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, Aको h:mm बजे',\n LLLL: 'dddd, D MMMM YYYY, Aको h:mm बजे',\n },\n preparse: function (string) {\n return string.replace(/[१२३४५६७८९०]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n meridiemParse: /राति|बिहान|दिउँसो|साँझ/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'राति') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'बिहान') {\n return hour;\n } else if (meridiem === 'दिउँसो') {\n return hour >= 10 ? hour : hour + 12;\n } else if (meridiem === 'साँझ') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 3) {\n return 'राति';\n } else if (hour < 12) {\n return 'बिहान';\n } else if (hour < 16) {\n return 'दिउँसो';\n } else if (hour < 20) {\n return 'साँझ';\n } else {\n return 'राति';\n }\n },\n calendar: {\n sameDay: '[आज] LT',\n nextDay: '[भोलि] LT',\n nextWeek: '[आउँदो] dddd[,] LT',\n lastDay: '[हिजो] LT',\n lastWeek: '[गएको] dddd[,] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%sमा',\n past: '%s अगाडि',\n s: 'केही क्षण',\n ss: '%d सेकेण्ड',\n m: 'एक मिनेट',\n mm: '%d मिनेट',\n h: 'एक घण्टा',\n hh: '%d घण्टा',\n d: 'एक दिन',\n dd: '%d दिन',\n M: 'एक महिना',\n MM: '%d महिना',\n y: 'एक बर्ष',\n yy: '%d बर्ष',\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n },\n });\n\n return ne;\n\n})));\n","//! moment.js locale configuration\n//! locale : Dutch (Belgium) [nl-be]\n//! author : Joris Röling : https://github.com/jorisroling\n//! author : Jacob Middag : https://github.com/middagj\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var monthsShortWithDots =\n 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'),\n monthsShortWithoutDots =\n 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_'),\n monthsParse = [\n /^jan/i,\n /^feb/i,\n /^maart|mrt.?$/i,\n /^apr/i,\n /^mei$/i,\n /^jun[i.]?$/i,\n /^jul[i.]?$/i,\n /^aug/i,\n /^sep/i,\n /^okt/i,\n /^nov/i,\n /^dec/i,\n ],\n monthsRegex =\n /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\\.?|feb\\.?|mrt\\.?|apr\\.?|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i;\n\n var nlBe = moment.defineLocale('nl-be', {\n months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split(\n '_'\n ),\n monthsShort: function (m, format) {\n if (!m) {\n return monthsShortWithDots;\n } else if (/-MMM-/.test(format)) {\n return monthsShortWithoutDots[m.month()];\n } else {\n return monthsShortWithDots[m.month()];\n }\n },\n\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex:\n /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,\n monthsShortStrictRegex:\n /^(jan\\.?|feb\\.?|mrt\\.?|apr\\.?|mei|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i,\n\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n\n weekdays:\n 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),\n weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),\n weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[vandaag om] LT',\n nextDay: '[morgen om] LT',\n nextWeek: 'dddd [om] LT',\n lastDay: '[gisteren om] LT',\n lastWeek: '[afgelopen] dddd [om] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'over %s',\n past: '%s geleden',\n s: 'een paar seconden',\n ss: '%d seconden',\n m: 'één minuut',\n mm: '%d minuten',\n h: 'één uur',\n hh: '%d uur',\n d: 'één dag',\n dd: '%d dagen',\n M: 'één maand',\n MM: '%d maanden',\n y: 'één jaar',\n yy: '%d jaar',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(ste|de)/,\n ordinal: function (number) {\n return (\n number +\n (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')\n );\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return nlBe;\n\n})));\n","//! moment.js locale configuration\n//! locale : Dutch [nl]\n//! author : Joris Röling : https://github.com/jorisroling\n//! author : Jacob Middag : https://github.com/middagj\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var monthsShortWithDots =\n 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'),\n monthsShortWithoutDots =\n 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_'),\n monthsParse = [\n /^jan/i,\n /^feb/i,\n /^maart|mrt.?$/i,\n /^apr/i,\n /^mei$/i,\n /^jun[i.]?$/i,\n /^jul[i.]?$/i,\n /^aug/i,\n /^sep/i,\n /^okt/i,\n /^nov/i,\n /^dec/i,\n ],\n monthsRegex =\n /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\\.?|feb\\.?|mrt\\.?|apr\\.?|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i;\n\n var nl = moment.defineLocale('nl', {\n months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split(\n '_'\n ),\n monthsShort: function (m, format) {\n if (!m) {\n return monthsShortWithDots;\n } else if (/-MMM-/.test(format)) {\n return monthsShortWithoutDots[m.month()];\n } else {\n return monthsShortWithDots[m.month()];\n }\n },\n\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex:\n /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,\n monthsShortStrictRegex:\n /^(jan\\.?|feb\\.?|mrt\\.?|apr\\.?|mei|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i,\n\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n\n weekdays:\n 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),\n weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),\n weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD-MM-YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[vandaag om] LT',\n nextDay: '[morgen om] LT',\n nextWeek: 'dddd [om] LT',\n lastDay: '[gisteren om] LT',\n lastWeek: '[afgelopen] dddd [om] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'over %s',\n past: '%s geleden',\n s: 'een paar seconden',\n ss: '%d seconden',\n m: 'één minuut',\n mm: '%d minuten',\n h: 'één uur',\n hh: '%d uur',\n d: 'één dag',\n dd: '%d dagen',\n w: 'één week',\n ww: '%d weken',\n M: 'één maand',\n MM: '%d maanden',\n y: 'één jaar',\n yy: '%d jaar',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(ste|de)/,\n ordinal: function (number) {\n return (\n number +\n (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')\n );\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return nl;\n\n})));\n","//! moment.js locale configuration\n//! locale : Nynorsk [nn]\n//! authors : https://github.com/mechuwind\n//! Stephen Ramthun : https://github.com/stephenramthun\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var nn = moment.defineLocale('nn', {\n months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split(\n '_'\n ),\n monthsShort:\n 'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split('_'),\n monthsParseExact: true,\n weekdays: 'sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag'.split('_'),\n weekdaysShort: 'su._må._ty._on._to._fr._lau.'.split('_'),\n weekdaysMin: 'su_må_ty_on_to_fr_la'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY [kl.] H:mm',\n LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm',\n },\n calendar: {\n sameDay: '[I dag klokka] LT',\n nextDay: '[I morgon klokka] LT',\n nextWeek: 'dddd [klokka] LT',\n lastDay: '[I går klokka] LT',\n lastWeek: '[Føregåande] dddd [klokka] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'om %s',\n past: '%s sidan',\n s: 'nokre sekund',\n ss: '%d sekund',\n m: 'eit minutt',\n mm: '%d minutt',\n h: 'ein time',\n hh: '%d timar',\n d: 'ein dag',\n dd: '%d dagar',\n w: 'ei veke',\n ww: '%d veker',\n M: 'ein månad',\n MM: '%d månader',\n y: 'eit år',\n yy: '%d år',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return nn;\n\n})));\n","//! moment.js locale configuration\n//! locale : Occitan, lengadocian dialecte [oc-lnc]\n//! author : Quentin PAGÈS : https://github.com/Quenty31\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var ocLnc = moment.defineLocale('oc-lnc', {\n months: {\n standalone:\n 'genièr_febrièr_març_abril_mai_junh_julhet_agost_setembre_octòbre_novembre_decembre'.split(\n '_'\n ),\n format: \"de genièr_de febrièr_de març_d'abril_de mai_de junh_de julhet_d'agost_de setembre_d'octòbre_de novembre_de decembre\".split(\n '_'\n ),\n isFormat: /D[oD]?(\\s)+MMMM/,\n },\n monthsShort:\n 'gen._febr._març_abr._mai_junh_julh._ago._set._oct._nov._dec.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'dimenge_diluns_dimars_dimècres_dijòus_divendres_dissabte'.split(\n '_'\n ),\n weekdaysShort: 'dg._dl._dm._dc._dj._dv._ds.'.split('_'),\n weekdaysMin: 'dg_dl_dm_dc_dj_dv_ds'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM [de] YYYY',\n ll: 'D MMM YYYY',\n LLL: 'D MMMM [de] YYYY [a] H:mm',\n lll: 'D MMM YYYY, H:mm',\n LLLL: 'dddd D MMMM [de] YYYY [a] H:mm',\n llll: 'ddd D MMM YYYY, H:mm',\n },\n calendar: {\n sameDay: '[uèi a] LT',\n nextDay: '[deman a] LT',\n nextWeek: 'dddd [a] LT',\n lastDay: '[ièr a] LT',\n lastWeek: 'dddd [passat a] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: \"d'aquí %s\",\n past: 'fa %s',\n s: 'unas segondas',\n ss: '%d segondas',\n m: 'una minuta',\n mm: '%d minutas',\n h: 'una ora',\n hh: '%d oras',\n d: 'un jorn',\n dd: '%d jorns',\n M: 'un mes',\n MM: '%d meses',\n y: 'un an',\n yy: '%d ans',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(r|n|t|è|a)/,\n ordinal: function (number, period) {\n var output =\n number === 1\n ? 'r'\n : number === 2\n ? 'n'\n : number === 3\n ? 'r'\n : number === 4\n ? 't'\n : 'è';\n if (period === 'w' || period === 'W') {\n output = 'a';\n }\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4,\n },\n });\n\n return ocLnc;\n\n})));\n","//! moment.js locale configuration\n//! locale : Punjabi (India) [pa-in]\n//! author : Harpreet Singh : https://github.com/harpreetkhalsagtbit\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '੧',\n 2: '੨',\n 3: '੩',\n 4: '੪',\n 5: '੫',\n 6: '੬',\n 7: '੭',\n 8: '੮',\n 9: '੯',\n 0: '੦',\n },\n numberMap = {\n '੧': '1',\n '੨': '2',\n '੩': '3',\n '੪': '4',\n '੫': '5',\n '੬': '6',\n '੭': '7',\n '੮': '8',\n '੯': '9',\n '੦': '0',\n };\n\n var paIn = moment.defineLocale('pa-in', {\n // There are months name as per Nanakshahi Calendar but they are not used as rigidly in modern Punjabi.\n months: 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split(\n '_'\n ),\n monthsShort:\n 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split(\n '_'\n ),\n weekdays: 'ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ'.split(\n '_'\n ),\n weekdaysShort: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),\n weekdaysMin: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),\n longDateFormat: {\n LT: 'A h:mm ਵਜੇ',\n LTS: 'A h:mm:ss ਵਜੇ',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm ਵਜੇ',\n LLLL: 'dddd, D MMMM YYYY, A h:mm ਵਜੇ',\n },\n calendar: {\n sameDay: '[ਅਜ] LT',\n nextDay: '[ਕਲ] LT',\n nextWeek: '[ਅਗਲਾ] dddd, LT',\n lastDay: '[ਕਲ] LT',\n lastWeek: '[ਪਿਛਲੇ] dddd, LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s ਵਿੱਚ',\n past: '%s ਪਿਛਲੇ',\n s: 'ਕੁਝ ਸਕਿੰਟ',\n ss: '%d ਸਕਿੰਟ',\n m: 'ਇਕ ਮਿੰਟ',\n mm: '%d ਮਿੰਟ',\n h: 'ਇੱਕ ਘੰਟਾ',\n hh: '%d ਘੰਟੇ',\n d: 'ਇੱਕ ਦਿਨ',\n dd: '%d ਦਿਨ',\n M: 'ਇੱਕ ਮਹੀਨਾ',\n MM: '%d ਮਹੀਨੇ',\n y: 'ਇੱਕ ਸਾਲ',\n yy: '%d ਸਾਲ',\n },\n preparse: function (string) {\n return string.replace(/[੧੨੩੪੫੬੭੮੯੦]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n // Punjabi notation for meridiems are quite fuzzy in practice. While there exists\n // a rigid notion of a 'Pahar' it is not used as rigidly in modern Punjabi.\n meridiemParse: /ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'ਰਾਤ') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'ਸਵੇਰ') {\n return hour;\n } else if (meridiem === 'ਦੁਪਹਿਰ') {\n return hour >= 10 ? hour : hour + 12;\n } else if (meridiem === 'ਸ਼ਾਮ') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'ਰਾਤ';\n } else if (hour < 10) {\n return 'ਸਵੇਰ';\n } else if (hour < 17) {\n return 'ਦੁਪਹਿਰ';\n } else if (hour < 20) {\n return 'ਸ਼ਾਮ';\n } else {\n return 'ਰਾਤ';\n }\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n },\n });\n\n return paIn;\n\n})));\n","//! moment.js locale configuration\n//! locale : Polish [pl]\n//! author : Rafal Hirsz : https://github.com/evoL\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var monthsNominative =\n 'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split(\n '_'\n ),\n monthsSubjective =\n 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split(\n '_'\n ),\n monthsParse = [\n /^sty/i,\n /^lut/i,\n /^mar/i,\n /^kwi/i,\n /^maj/i,\n /^cze/i,\n /^lip/i,\n /^sie/i,\n /^wrz/i,\n /^paź/i,\n /^lis/i,\n /^gru/i,\n ];\n function plural(n) {\n return n % 10 < 5 && n % 10 > 1 && ~~(n / 10) % 10 !== 1;\n }\n function translate(number, withoutSuffix, key) {\n var result = number + ' ';\n switch (key) {\n case 'ss':\n return result + (plural(number) ? 'sekundy' : 'sekund');\n case 'm':\n return withoutSuffix ? 'minuta' : 'minutę';\n case 'mm':\n return result + (plural(number) ? 'minuty' : 'minut');\n case 'h':\n return withoutSuffix ? 'godzina' : 'godzinę';\n case 'hh':\n return result + (plural(number) ? 'godziny' : 'godzin');\n case 'ww':\n return result + (plural(number) ? 'tygodnie' : 'tygodni');\n case 'MM':\n return result + (plural(number) ? 'miesiące' : 'miesięcy');\n case 'yy':\n return result + (plural(number) ? 'lata' : 'lat');\n }\n }\n\n var pl = moment.defineLocale('pl', {\n months: function (momentToFormat, format) {\n if (!momentToFormat) {\n return monthsNominative;\n } else if (/D MMMM/.test(format)) {\n return monthsSubjective[momentToFormat.month()];\n } else {\n return monthsNominative[momentToFormat.month()];\n }\n },\n monthsShort: 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'),\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n weekdays:\n 'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split('_'),\n weekdaysShort: 'ndz_pon_wt_śr_czw_pt_sob'.split('_'),\n weekdaysMin: 'Nd_Pn_Wt_Śr_Cz_Pt_So'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Dziś o] LT',\n nextDay: '[Jutro o] LT',\n nextWeek: function () {\n switch (this.day()) {\n case 0:\n return '[W niedzielę o] LT';\n\n case 2:\n return '[We wtorek o] LT';\n\n case 3:\n return '[W środę o] LT';\n\n case 6:\n return '[W sobotę o] LT';\n\n default:\n return '[W] dddd [o] LT';\n }\n },\n lastDay: '[Wczoraj o] LT',\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n return '[W zeszłą niedzielę o] LT';\n case 3:\n return '[W zeszłą środę o] LT';\n case 6:\n return '[W zeszłą sobotę o] LT';\n default:\n return '[W zeszły] dddd [o] LT';\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'za %s',\n past: '%s temu',\n s: 'kilka sekund',\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: '1 dzień',\n dd: '%d dni',\n w: 'tydzień',\n ww: translate,\n M: 'miesiąc',\n MM: translate,\n y: 'rok',\n yy: translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return pl;\n\n})));\n","//! moment.js locale configuration\n//! locale : Portuguese (Brazil) [pt-br]\n//! author : Caio Ribeiro Pereira : https://github.com/caio-ribeiro-pereira\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var ptBr = moment.defineLocale('pt-br', {\n months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split(\n '_'\n ),\n monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),\n weekdays:\n 'domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado'.split(\n '_'\n ),\n weekdaysShort: 'dom_seg_ter_qua_qui_sex_sáb'.split('_'),\n weekdaysMin: 'do_2ª_3ª_4ª_5ª_6ª_sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D [de] MMMM [de] YYYY',\n LLL: 'D [de] MMMM [de] YYYY [às] HH:mm',\n LLLL: 'dddd, D [de] MMMM [de] YYYY [às] HH:mm',\n },\n calendar: {\n sameDay: '[Hoje às] LT',\n nextDay: '[Amanhã às] LT',\n nextWeek: 'dddd [às] LT',\n lastDay: '[Ontem às] LT',\n lastWeek: function () {\n return this.day() === 0 || this.day() === 6\n ? '[Último] dddd [às] LT' // Saturday + Sunday\n : '[Última] dddd [às] LT'; // Monday - Friday\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'em %s',\n past: 'há %s',\n s: 'poucos segundos',\n ss: '%d segundos',\n m: 'um minuto',\n mm: '%d minutos',\n h: 'uma hora',\n hh: '%d horas',\n d: 'um dia',\n dd: '%d dias',\n M: 'um mês',\n MM: '%d meses',\n y: 'um ano',\n yy: '%d anos',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n invalidDate: 'Data inválida',\n });\n\n return ptBr;\n\n})));\n","//! moment.js locale configuration\n//! locale : Portuguese [pt]\n//! author : Jefferson : https://github.com/jalex79\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var pt = moment.defineLocale('pt', {\n months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split(\n '_'\n ),\n monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),\n weekdays:\n 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split(\n '_'\n ),\n weekdaysShort: 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),\n weekdaysMin: 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D [de] MMMM [de] YYYY',\n LLL: 'D [de] MMMM [de] YYYY HH:mm',\n LLLL: 'dddd, D [de] MMMM [de] YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Hoje às] LT',\n nextDay: '[Amanhã às] LT',\n nextWeek: 'dddd [às] LT',\n lastDay: '[Ontem às] LT',\n lastWeek: function () {\n return this.day() === 0 || this.day() === 6\n ? '[Último] dddd [às] LT' // Saturday + Sunday\n : '[Última] dddd [às] LT'; // Monday - Friday\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'em %s',\n past: 'há %s',\n s: 'segundos',\n ss: '%d segundos',\n m: 'um minuto',\n mm: '%d minutos',\n h: 'uma hora',\n hh: '%d horas',\n d: 'um dia',\n dd: '%d dias',\n w: 'uma semana',\n ww: '%d semanas',\n M: 'um mês',\n MM: '%d meses',\n y: 'um ano',\n yy: '%d anos',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return pt;\n\n})));\n","//! moment.js locale configuration\n//! locale : Romanian [ro]\n//! author : Vlad Gurdiga : https://github.com/gurdiga\n//! author : Valentin Agachi : https://github.com/avaly\n//! author : Emanuel Cepoi : https://github.com/cepem\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function relativeTimeWithPlural(number, withoutSuffix, key) {\n var format = {\n ss: 'secunde',\n mm: 'minute',\n hh: 'ore',\n dd: 'zile',\n ww: 'săptămâni',\n MM: 'luni',\n yy: 'ani',\n },\n separator = ' ';\n if (number % 100 >= 20 || (number >= 100 && number % 100 === 0)) {\n separator = ' de ';\n }\n return number + separator + format[key];\n }\n\n var ro = moment.defineLocale('ro', {\n months: 'ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie'.split(\n '_'\n ),\n monthsShort:\n 'ian._feb._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'duminică_luni_marți_miercuri_joi_vineri_sâmbătă'.split('_'),\n weekdaysShort: 'Dum_Lun_Mar_Mie_Joi_Vin_Sâm'.split('_'),\n weekdaysMin: 'Du_Lu_Ma_Mi_Jo_Vi_Sâ'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY H:mm',\n LLLL: 'dddd, D MMMM YYYY H:mm',\n },\n calendar: {\n sameDay: '[azi la] LT',\n nextDay: '[mâine la] LT',\n nextWeek: 'dddd [la] LT',\n lastDay: '[ieri la] LT',\n lastWeek: '[fosta] dddd [la] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'peste %s',\n past: '%s în urmă',\n s: 'câteva secunde',\n ss: relativeTimeWithPlural,\n m: 'un minut',\n mm: relativeTimeWithPlural,\n h: 'o oră',\n hh: relativeTimeWithPlural,\n d: 'o zi',\n dd: relativeTimeWithPlural,\n w: 'o săptămână',\n ww: relativeTimeWithPlural,\n M: 'o lună',\n MM: relativeTimeWithPlural,\n y: 'un an',\n yy: relativeTimeWithPlural,\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return ro;\n\n})));\n","//! moment.js locale configuration\n//! locale : Russian [ru]\n//! author : Viktorminator : https://github.com/Viktorminator\n//! author : Menelion Elensúle : https://github.com/Oire\n//! author : Коренберг Марк : https://github.com/socketpair\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function plural(word, num) {\n var forms = word.split('_');\n return num % 10 === 1 && num % 100 !== 11\n ? forms[0]\n : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)\n ? forms[1]\n : forms[2];\n }\n function relativeTimeWithPlural(number, withoutSuffix, key) {\n var format = {\n ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд',\n mm: withoutSuffix ? 'минута_минуты_минут' : 'минуту_минуты_минут',\n hh: 'час_часа_часов',\n dd: 'день_дня_дней',\n ww: 'неделя_недели_недель',\n MM: 'месяц_месяца_месяцев',\n yy: 'год_года_лет',\n };\n if (key === 'm') {\n return withoutSuffix ? 'минута' : 'минуту';\n } else {\n return number + ' ' + plural(format[key], +number);\n }\n }\n var monthsParse = [\n /^янв/i,\n /^фев/i,\n /^мар/i,\n /^апр/i,\n /^ма[йя]/i,\n /^июн/i,\n /^июл/i,\n /^авг/i,\n /^сен/i,\n /^окт/i,\n /^ноя/i,\n /^дек/i,\n ];\n\n // http://new.gramota.ru/spravka/rules/139-prop : § 103\n // Сокращения месяцев: http://new.gramota.ru/spravka/buro/search-answer?s=242637\n // CLDR data: http://www.unicode.org/cldr/charts/28/summary/ru.html#1753\n var ru = moment.defineLocale('ru', {\n months: {\n format: 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split(\n '_'\n ),\n standalone:\n 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split(\n '_'\n ),\n },\n monthsShort: {\n // по CLDR именно \"июл.\" и \"июн.\", но какой смысл менять букву на точку?\n format: 'янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.'.split(\n '_'\n ),\n standalone:\n 'янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.'.split(\n '_'\n ),\n },\n weekdays: {\n standalone:\n 'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split(\n '_'\n ),\n format: 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split(\n '_'\n ),\n isFormat: /\\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?] ?dddd/,\n },\n weekdaysShort: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),\n weekdaysMin: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n\n // полные названия с падежами, по три буквы, для некоторых, по 4 буквы, сокращения с точкой и без точки\n monthsRegex:\n /^(январ[ья]|янв\\.?|феврал[ья]|февр?\\.?|марта?|мар\\.?|апрел[ья]|апр\\.?|ма[йя]|июн[ья]|июн\\.?|июл[ья]|июл\\.?|августа?|авг\\.?|сентябр[ья]|сент?\\.?|октябр[ья]|окт\\.?|ноябр[ья]|нояб?\\.?|декабр[ья]|дек\\.?)/i,\n\n // копия предыдущего\n monthsShortRegex:\n /^(январ[ья]|янв\\.?|феврал[ья]|февр?\\.?|марта?|мар\\.?|апрел[ья]|апр\\.?|ма[йя]|июн[ья]|июн\\.?|июл[ья]|июл\\.?|августа?|авг\\.?|сентябр[ья]|сент?\\.?|октябр[ья]|окт\\.?|ноябр[ья]|нояб?\\.?|декабр[ья]|дек\\.?)/i,\n\n // полные названия с падежами\n monthsStrictRegex:\n /^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,\n\n // Выражение, которое соответствует только сокращённым формам\n monthsShortStrictRegex:\n /^(янв\\.|февр?\\.|мар[т.]|апр\\.|ма[яй]|июн[ья.]|июл[ья.]|авг\\.|сент?\\.|окт\\.|нояб?\\.|дек\\.)/i,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY г.',\n LLL: 'D MMMM YYYY г., H:mm',\n LLLL: 'dddd, D MMMM YYYY г., H:mm',\n },\n calendar: {\n sameDay: '[Сегодня, в] LT',\n nextDay: '[Завтра, в] LT',\n lastDay: '[Вчера, в] LT',\n nextWeek: function (now) {\n if (now.week() !== this.week()) {\n switch (this.day()) {\n case 0:\n return '[В следующее] dddd, [в] LT';\n case 1:\n case 2:\n case 4:\n return '[В следующий] dddd, [в] LT';\n case 3:\n case 5:\n case 6:\n return '[В следующую] dddd, [в] LT';\n }\n } else {\n if (this.day() === 2) {\n return '[Во] dddd, [в] LT';\n } else {\n return '[В] dddd, [в] LT';\n }\n }\n },\n lastWeek: function (now) {\n if (now.week() !== this.week()) {\n switch (this.day()) {\n case 0:\n return '[В прошлое] dddd, [в] LT';\n case 1:\n case 2:\n case 4:\n return '[В прошлый] dddd, [в] LT';\n case 3:\n case 5:\n case 6:\n return '[В прошлую] dddd, [в] LT';\n }\n } else {\n if (this.day() === 2) {\n return '[Во] dddd, [в] LT';\n } else {\n return '[В] dddd, [в] LT';\n }\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'через %s',\n past: '%s назад',\n s: 'несколько секунд',\n ss: relativeTimeWithPlural,\n m: relativeTimeWithPlural,\n mm: relativeTimeWithPlural,\n h: 'час',\n hh: relativeTimeWithPlural,\n d: 'день',\n dd: relativeTimeWithPlural,\n w: 'неделя',\n ww: relativeTimeWithPlural,\n M: 'месяц',\n MM: relativeTimeWithPlural,\n y: 'год',\n yy: relativeTimeWithPlural,\n },\n meridiemParse: /ночи|утра|дня|вечера/i,\n isPM: function (input) {\n return /^(дня|вечера)$/.test(input);\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'ночи';\n } else if (hour < 12) {\n return 'утра';\n } else if (hour < 17) {\n return 'дня';\n } else {\n return 'вечера';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(й|го|я)/,\n ordinal: function (number, period) {\n switch (period) {\n case 'M':\n case 'd':\n case 'DDD':\n return number + '-й';\n case 'D':\n return number + '-го';\n case 'w':\n case 'W':\n return number + '-я';\n default:\n return number;\n }\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return ru;\n\n})));\n","//! moment.js locale configuration\n//! locale : Sindhi [sd]\n//! author : Narain Sagar : https://github.com/narainsagar\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var months = [\n 'جنوري',\n 'فيبروري',\n 'مارچ',\n 'اپريل',\n 'مئي',\n 'جون',\n 'جولاءِ',\n 'آگسٽ',\n 'سيپٽمبر',\n 'آڪٽوبر',\n 'نومبر',\n 'ڊسمبر',\n ],\n days = ['آچر', 'سومر', 'اڱارو', 'اربع', 'خميس', 'جمع', 'ڇنڇر'];\n\n var sd = moment.defineLocale('sd', {\n months: months,\n monthsShort: months,\n weekdays: days,\n weekdaysShort: days,\n weekdaysMin: days,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd، D MMMM YYYY HH:mm',\n },\n meridiemParse: /صبح|شام/,\n isPM: function (input) {\n return 'شام' === input;\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'صبح';\n }\n return 'شام';\n },\n calendar: {\n sameDay: '[اڄ] LT',\n nextDay: '[سڀاڻي] LT',\n nextWeek: 'dddd [اڳين هفتي تي] LT',\n lastDay: '[ڪالهه] LT',\n lastWeek: '[گزريل هفتي] dddd [تي] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s پوء',\n past: '%s اڳ',\n s: 'چند سيڪنڊ',\n ss: '%d سيڪنڊ',\n m: 'هڪ منٽ',\n mm: '%d منٽ',\n h: 'هڪ ڪلاڪ',\n hh: '%d ڪلاڪ',\n d: 'هڪ ڏينهن',\n dd: '%d ڏينهن',\n M: 'هڪ مهينو',\n MM: '%d مهينا',\n y: 'هڪ سال',\n yy: '%d سال',\n },\n preparse: function (string) {\n return string.replace(/،/g, ',');\n },\n postformat: function (string) {\n return string.replace(/,/g, '،');\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return sd;\n\n})));\n","//! moment.js locale configuration\n//! locale : Northern Sami [se]\n//! authors : Bård Rolstad Henriksen : https://github.com/karamell\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var se = moment.defineLocale('se', {\n months: 'ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu'.split(\n '_'\n ),\n monthsShort:\n 'ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov'.split('_'),\n weekdays:\n 'sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat'.split(\n '_'\n ),\n weekdaysShort: 'sotn_vuos_maŋ_gask_duor_bear_láv'.split('_'),\n weekdaysMin: 's_v_m_g_d_b_L'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'MMMM D. [b.] YYYY',\n LLL: 'MMMM D. [b.] YYYY [ti.] HH:mm',\n LLLL: 'dddd, MMMM D. [b.] YYYY [ti.] HH:mm',\n },\n calendar: {\n sameDay: '[otne ti] LT',\n nextDay: '[ihttin ti] LT',\n nextWeek: 'dddd [ti] LT',\n lastDay: '[ikte ti] LT',\n lastWeek: '[ovddit] dddd [ti] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s geažes',\n past: 'maŋit %s',\n s: 'moadde sekunddat',\n ss: '%d sekunddat',\n m: 'okta minuhta',\n mm: '%d minuhtat',\n h: 'okta diimmu',\n hh: '%d diimmut',\n d: 'okta beaivi',\n dd: '%d beaivvit',\n M: 'okta mánnu',\n MM: '%d mánut',\n y: 'okta jahki',\n yy: '%d jagit',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return se;\n\n})));\n","//! moment.js locale configuration\n//! locale : Sinhalese [si]\n//! author : Sampath Sitinamaluwa : https://github.com/sampathsris\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n /*jshint -W100*/\n var si = moment.defineLocale('si', {\n months: 'ජනවාරි_පෙබරවාරි_මාර්තු_අප්‍රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්'.split(\n '_'\n ),\n monthsShort: 'ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ'.split(\n '_'\n ),\n weekdays:\n 'ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා'.split(\n '_'\n ),\n weekdaysShort: 'ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන'.split('_'),\n weekdaysMin: 'ඉ_ස_අ_බ_බ්‍ර_සි_සෙ'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'a h:mm',\n LTS: 'a h:mm:ss',\n L: 'YYYY/MM/DD',\n LL: 'YYYY MMMM D',\n LLL: 'YYYY MMMM D, a h:mm',\n LLLL: 'YYYY MMMM D [වැනි] dddd, a h:mm:ss',\n },\n calendar: {\n sameDay: '[අද] LT[ට]',\n nextDay: '[හෙට] LT[ට]',\n nextWeek: 'dddd LT[ට]',\n lastDay: '[ඊයේ] LT[ට]',\n lastWeek: '[පසුගිය] dddd LT[ට]',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%sකින්',\n past: '%sකට පෙර',\n s: 'තත්පර කිහිපය',\n ss: 'තත්පර %d',\n m: 'මිනිත්තුව',\n mm: 'මිනිත්තු %d',\n h: 'පැය',\n hh: 'පැය %d',\n d: 'දිනය',\n dd: 'දින %d',\n M: 'මාසය',\n MM: 'මාස %d',\n y: 'වසර',\n yy: 'වසර %d',\n },\n dayOfMonthOrdinalParse: /\\d{1,2} වැනි/,\n ordinal: function (number) {\n return number + ' වැනි';\n },\n meridiemParse: /පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,\n isPM: function (input) {\n return input === 'ප.ව.' || input === 'පස් වරු';\n },\n meridiem: function (hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'ප.ව.' : 'පස් වරු';\n } else {\n return isLower ? 'පෙ.ව.' : 'පෙර වරු';\n }\n },\n });\n\n return si;\n\n})));\n","//! moment.js locale configuration\n//! locale : Slovak [sk]\n//! author : Martin Minka : https://github.com/k2s\n//! based on work of petrbela : https://github.com/petrbela\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var months =\n 'január_február_marec_apríl_máj_jún_júl_august_september_október_november_december'.split(\n '_'\n ),\n monthsShort = 'jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec'.split('_');\n function plural(n) {\n return n > 1 && n < 5;\n }\n function translate(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's': // a few seconds / in a few seconds / a few seconds ago\n return withoutSuffix || isFuture ? 'pár sekúnd' : 'pár sekundami';\n case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'sekundy' : 'sekúnd');\n } else {\n return result + 'sekundami';\n }\n case 'm': // a minute / in a minute / a minute ago\n return withoutSuffix ? 'minúta' : isFuture ? 'minútu' : 'minútou';\n case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'minúty' : 'minút');\n } else {\n return result + 'minútami';\n }\n case 'h': // an hour / in an hour / an hour ago\n return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou';\n case 'hh': // 9 hours / in 9 hours / 9 hours ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'hodiny' : 'hodín');\n } else {\n return result + 'hodinami';\n }\n case 'd': // a day / in a day / a day ago\n return withoutSuffix || isFuture ? 'deň' : 'dňom';\n case 'dd': // 9 days / in 9 days / 9 days ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'dni' : 'dní');\n } else {\n return result + 'dňami';\n }\n case 'M': // a month / in a month / a month ago\n return withoutSuffix || isFuture ? 'mesiac' : 'mesiacom';\n case 'MM': // 9 months / in 9 months / 9 months ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'mesiace' : 'mesiacov');\n } else {\n return result + 'mesiacmi';\n }\n case 'y': // a year / in a year / a year ago\n return withoutSuffix || isFuture ? 'rok' : 'rokom';\n case 'yy': // 9 years / in 9 years / 9 years ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'roky' : 'rokov');\n } else {\n return result + 'rokmi';\n }\n }\n }\n\n var sk = moment.defineLocale('sk', {\n months: months,\n monthsShort: monthsShort,\n weekdays: 'nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota'.split('_'),\n weekdaysShort: 'ne_po_ut_st_št_pi_so'.split('_'),\n weekdaysMin: 'ne_po_ut_st_št_pi_so'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm',\n LLLL: 'dddd D. MMMM YYYY H:mm',\n },\n calendar: {\n sameDay: '[dnes o] LT',\n nextDay: '[zajtra o] LT',\n nextWeek: function () {\n switch (this.day()) {\n case 0:\n return '[v nedeľu o] LT';\n case 1:\n case 2:\n return '[v] dddd [o] LT';\n case 3:\n return '[v stredu o] LT';\n case 4:\n return '[vo štvrtok o] LT';\n case 5:\n return '[v piatok o] LT';\n case 6:\n return '[v sobotu o] LT';\n }\n },\n lastDay: '[včera o] LT',\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n return '[minulú nedeľu o] LT';\n case 1:\n case 2:\n return '[minulý] dddd [o] LT';\n case 3:\n return '[minulú stredu o] LT';\n case 4:\n case 5:\n return '[minulý] dddd [o] LT';\n case 6:\n return '[minulú sobotu o] LT';\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'za %s',\n past: 'pred %s',\n s: translate,\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: translate,\n dd: translate,\n M: translate,\n MM: translate,\n y: translate,\n yy: translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return sk;\n\n})));\n","//! moment.js locale configuration\n//! locale : Slovenian [sl]\n//! author : Robert Sedovšek : https://github.com/sedovsek\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }\n\n var sl = moment.defineLocale('sl', {\n months: 'januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december'.split(\n '_'\n ),\n monthsShort:\n 'jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota'.split('_'),\n weekdaysShort: 'ned._pon._tor._sre._čet._pet._sob.'.split('_'),\n weekdaysMin: 'ne_po_to_sr_če_pe_so'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD. MM. YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm',\n LLLL: 'dddd, D. MMMM YYYY H:mm',\n },\n calendar: {\n sameDay: '[danes ob] LT',\n nextDay: '[jutri ob] LT',\n\n nextWeek: function () {\n switch (this.day()) {\n case 0:\n return '[v] [nedeljo] [ob] LT';\n case 3:\n return '[v] [sredo] [ob] LT';\n case 6:\n return '[v] [soboto] [ob] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[v] dddd [ob] LT';\n }\n },\n lastDay: '[včeraj ob] LT',\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n return '[prejšnjo] [nedeljo] [ob] LT';\n case 3:\n return '[prejšnjo] [sredo] [ob] LT';\n case 6:\n return '[prejšnjo] [soboto] [ob] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[prejšnji] dddd [ob] LT';\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'čez %s',\n past: 'pred %s',\n s: processRelativeTime,\n ss: processRelativeTime,\n m: processRelativeTime,\n mm: processRelativeTime,\n h: processRelativeTime,\n hh: processRelativeTime,\n d: processRelativeTime,\n dd: processRelativeTime,\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return sl;\n\n})));\n","//! moment.js locale configuration\n//! locale : Albanian [sq]\n//! author : Flakërim Ismani : https://github.com/flakerimi\n//! author : Menelion Elensúle : https://github.com/Oire\n//! author : Oerd Cukalla : https://github.com/oerd\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var sq = moment.defineLocale('sq', {\n months: 'Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor'.split(\n '_'\n ),\n monthsShort: 'Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj'.split('_'),\n weekdays: 'E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë'.split(\n '_'\n ),\n weekdaysShort: 'Die_Hën_Mar_Mër_Enj_Pre_Sht'.split('_'),\n weekdaysMin: 'D_H_Ma_Më_E_P_Sh'.split('_'),\n weekdaysParseExact: true,\n meridiemParse: /PD|MD/,\n isPM: function (input) {\n return input.charAt(0) === 'M';\n },\n meridiem: function (hours, minutes, isLower) {\n return hours < 12 ? 'PD' : 'MD';\n },\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Sot në] LT',\n nextDay: '[Nesër në] LT',\n nextWeek: 'dddd [në] LT',\n lastDay: '[Dje në] LT',\n lastWeek: 'dddd [e kaluar në] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'në %s',\n past: '%s më parë',\n s: 'disa sekonda',\n ss: '%d sekonda',\n m: 'një minutë',\n mm: '%d minuta',\n h: 'një orë',\n hh: '%d orë',\n d: 'një ditë',\n dd: '%d ditë',\n M: 'një muaj',\n MM: '%d muaj',\n y: 'një vit',\n yy: '%d vite',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return sq;\n\n})));\n","//! moment.js locale configuration\n//! locale : Serbian Cyrillic [sr-cyrl]\n//! author : Milan Janačković<milanjanackovic@gmail.com> : https://github.com/milan-j\n//! author : Stefan Crnjaković <stefan@hotmail.rs> : https://github.com/crnjakovic\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var translator = {\n words: {\n //Different grammatical cases\n ss: ['секунда', 'секунде', 'секунди'],\n m: ['један минут', 'једног минута'],\n mm: ['минут', 'минута', 'минута'],\n h: ['један сат', 'једног сата'],\n hh: ['сат', 'сата', 'сати'],\n d: ['један дан', 'једног дана'],\n dd: ['дан', 'дана', 'дана'],\n M: ['један месец', 'једног месеца'],\n MM: ['месец', 'месеца', 'месеци'],\n y: ['једну годину', 'једне године'],\n yy: ['годину', 'године', 'година'],\n },\n correctGrammaticalCase: function (number, wordKey) {\n if (\n number % 10 >= 1 &&\n number % 10 <= 4 &&\n (number % 100 < 10 || number % 100 >= 20)\n ) {\n return number % 10 === 1 ? wordKey[0] : wordKey[1];\n }\n return wordKey[2];\n },\n translate: function (number, withoutSuffix, key, isFuture) {\n var wordKey = translator.words[key],\n word;\n\n if (key.length === 1) {\n // Nominativ\n if (key === 'y' && withoutSuffix) return 'једна година';\n return isFuture || withoutSuffix ? wordKey[0] : wordKey[1];\n }\n\n word = translator.correctGrammaticalCase(number, wordKey);\n // Nominativ\n if (key === 'yy' && withoutSuffix && word === 'годину') {\n return number + ' година';\n }\n\n return number + ' ' + word;\n },\n };\n\n var srCyrl = moment.defineLocale('sr-cyrl', {\n months: 'јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар'.split(\n '_'\n ),\n monthsShort:\n 'јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.'.split('_'),\n monthsParseExact: true,\n weekdays: 'недеља_понедељак_уторак_среда_четвртак_петак_субота'.split('_'),\n weekdaysShort: 'нед._пон._уто._сре._чет._пет._суб.'.split('_'),\n weekdaysMin: 'не_по_ут_ср_че_пе_су'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'D. M. YYYY.',\n LL: 'D. MMMM YYYY.',\n LLL: 'D. MMMM YYYY. H:mm',\n LLLL: 'dddd, D. MMMM YYYY. H:mm',\n },\n calendar: {\n sameDay: '[данас у] LT',\n nextDay: '[сутра у] LT',\n nextWeek: function () {\n switch (this.day()) {\n case 0:\n return '[у] [недељу] [у] LT';\n case 3:\n return '[у] [среду] [у] LT';\n case 6:\n return '[у] [суботу] [у] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[у] dddd [у] LT';\n }\n },\n lastDay: '[јуче у] LT',\n lastWeek: function () {\n var lastWeekDays = [\n '[прошле] [недеље] [у] LT',\n '[прошлог] [понедељка] [у] LT',\n '[прошлог] [уторка] [у] LT',\n '[прошле] [среде] [у] LT',\n '[прошлог] [четвртка] [у] LT',\n '[прошлог] [петка] [у] LT',\n '[прошле] [суботе] [у] LT',\n ];\n return lastWeekDays[this.day()];\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'за %s',\n past: 'пре %s',\n s: 'неколико секунди',\n ss: translator.translate,\n m: translator.translate,\n mm: translator.translate,\n h: translator.translate,\n hh: translator.translate,\n d: translator.translate,\n dd: translator.translate,\n M: translator.translate,\n MM: translator.translate,\n y: translator.translate,\n yy: translator.translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 1st is the first week of the year.\n },\n });\n\n return srCyrl;\n\n})));\n","//! moment.js locale configuration\n//! locale : Serbian [sr]\n//! author : Milan Janačković<milanjanackovic@gmail.com> : https://github.com/milan-j\n//! author : Stefan Crnjaković <stefan@hotmail.rs> : https://github.com/crnjakovic\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var translator = {\n words: {\n //Different grammatical cases\n ss: ['sekunda', 'sekunde', 'sekundi'],\n m: ['jedan minut', 'jednog minuta'],\n mm: ['minut', 'minuta', 'minuta'],\n h: ['jedan sat', 'jednog sata'],\n hh: ['sat', 'sata', 'sati'],\n d: ['jedan dan', 'jednog dana'],\n dd: ['dan', 'dana', 'dana'],\n M: ['jedan mesec', 'jednog meseca'],\n MM: ['mesec', 'meseca', 'meseci'],\n y: ['jednu godinu', 'jedne godine'],\n yy: ['godinu', 'godine', 'godina'],\n },\n correctGrammaticalCase: function (number, wordKey) {\n if (\n number % 10 >= 1 &&\n number % 10 <= 4 &&\n (number % 100 < 10 || number % 100 >= 20)\n ) {\n return number % 10 === 1 ? wordKey[0] : wordKey[1];\n }\n return wordKey[2];\n },\n translate: function (number, withoutSuffix, key, isFuture) {\n var wordKey = translator.words[key],\n word;\n\n if (key.length === 1) {\n // Nominativ\n if (key === 'y' && withoutSuffix) return 'jedna godina';\n return isFuture || withoutSuffix ? wordKey[0] : wordKey[1];\n }\n\n word = translator.correctGrammaticalCase(number, wordKey);\n // Nominativ\n if (key === 'yy' && withoutSuffix && word === 'godinu') {\n return number + ' godina';\n }\n\n return number + ' ' + word;\n },\n };\n\n var sr = moment.defineLocale('sr', {\n months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split(\n '_'\n ),\n monthsShort:\n 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),\n monthsParseExact: true,\n weekdays: 'nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota'.split(\n '_'\n ),\n weekdaysShort: 'ned._pon._uto._sre._čet._pet._sub.'.split('_'),\n weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'D. M. YYYY.',\n LL: 'D. MMMM YYYY.',\n LLL: 'D. MMMM YYYY. H:mm',\n LLLL: 'dddd, D. MMMM YYYY. H:mm',\n },\n calendar: {\n sameDay: '[danas u] LT',\n nextDay: '[sutra u] LT',\n nextWeek: function () {\n switch (this.day()) {\n case 0:\n return '[u] [nedelju] [u] LT';\n case 3:\n return '[u] [sredu] [u] LT';\n case 6:\n return '[u] [subotu] [u] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[u] dddd [u] LT';\n }\n },\n lastDay: '[juče u] LT',\n lastWeek: function () {\n var lastWeekDays = [\n '[prošle] [nedelje] [u] LT',\n '[prošlog] [ponedeljka] [u] LT',\n '[prošlog] [utorka] [u] LT',\n '[prošle] [srede] [u] LT',\n '[prošlog] [četvrtka] [u] LT',\n '[prošlog] [petka] [u] LT',\n '[prošle] [subote] [u] LT',\n ];\n return lastWeekDays[this.day()];\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'za %s',\n past: 'pre %s',\n s: 'nekoliko sekundi',\n ss: translator.translate,\n m: translator.translate,\n mm: translator.translate,\n h: translator.translate,\n hh: translator.translate,\n d: translator.translate,\n dd: translator.translate,\n M: translator.translate,\n MM: translator.translate,\n y: translator.translate,\n yy: translator.translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return sr;\n\n})));\n","//! moment.js locale configuration\n//! locale : siSwati [ss]\n//! author : Nicolai Davies<mail@nicolai.io> : https://github.com/nicolaidavies\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var ss = moment.defineLocale('ss', {\n months: \"Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni\".split(\n '_'\n ),\n monthsShort: 'Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo'.split('_'),\n weekdays:\n 'Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo'.split(\n '_'\n ),\n weekdaysShort: 'Lis_Umb_Lsb_Les_Lsi_Lsh_Umg'.split('_'),\n weekdaysMin: 'Li_Us_Lb_Lt_Ls_Lh_Ug'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY h:mm A',\n LLLL: 'dddd, D MMMM YYYY h:mm A',\n },\n calendar: {\n sameDay: '[Namuhla nga] LT',\n nextDay: '[Kusasa nga] LT',\n nextWeek: 'dddd [nga] LT',\n lastDay: '[Itolo nga] LT',\n lastWeek: 'dddd [leliphelile] [nga] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'nga %s',\n past: 'wenteka nga %s',\n s: 'emizuzwana lomcane',\n ss: '%d mzuzwana',\n m: 'umzuzu',\n mm: '%d emizuzu',\n h: 'lihora',\n hh: '%d emahora',\n d: 'lilanga',\n dd: '%d emalanga',\n M: 'inyanga',\n MM: '%d tinyanga',\n y: 'umnyaka',\n yy: '%d iminyaka',\n },\n meridiemParse: /ekuseni|emini|entsambama|ebusuku/,\n meridiem: function (hours, minutes, isLower) {\n if (hours < 11) {\n return 'ekuseni';\n } else if (hours < 15) {\n return 'emini';\n } else if (hours < 19) {\n return 'entsambama';\n } else {\n return 'ebusuku';\n }\n },\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'ekuseni') {\n return hour;\n } else if (meridiem === 'emini') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === 'entsambama' || meridiem === 'ebusuku') {\n if (hour === 0) {\n return 0;\n }\n return hour + 12;\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}/,\n ordinal: '%d',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return ss;\n\n})));\n","//! moment.js locale configuration\n//! locale : Swedish [sv]\n//! author : Jens Alm : https://github.com/ulmus\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var sv = moment.defineLocale('sv', {\n months: 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split(\n '_'\n ),\n monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),\n weekdays: 'söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'),\n weekdaysShort: 'sön_mån_tis_ons_tor_fre_lör'.split('_'),\n weekdaysMin: 'sö_må_ti_on_to_fr_lö'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY-MM-DD',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY [kl.] HH:mm',\n LLLL: 'dddd D MMMM YYYY [kl.] HH:mm',\n lll: 'D MMM YYYY HH:mm',\n llll: 'ddd D MMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Idag] LT',\n nextDay: '[Imorgon] LT',\n lastDay: '[Igår] LT',\n nextWeek: '[På] dddd LT',\n lastWeek: '[I] dddd[s] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'om %s',\n past: 'för %s sedan',\n s: 'några sekunder',\n ss: '%d sekunder',\n m: 'en minut',\n mm: '%d minuter',\n h: 'en timme',\n hh: '%d timmar',\n d: 'en dag',\n dd: '%d dagar',\n M: 'en månad',\n MM: '%d månader',\n y: 'ett år',\n yy: '%d år',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(\\:e|\\:a)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n ~~((number % 100) / 10) === 1\n ? ':e'\n : b === 1\n ? ':a'\n : b === 2\n ? ':a'\n : b === 3\n ? ':e'\n : ':e';\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return sv;\n\n})));\n","//! moment.js locale configuration\n//! locale : Swahili [sw]\n//! author : Fahad Kassim : https://github.com/fadsel\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var sw = moment.defineLocale('sw', {\n months: 'Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des'.split('_'),\n weekdays:\n 'Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi'.split(\n '_'\n ),\n weekdaysShort: 'Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos'.split('_'),\n weekdaysMin: 'J2_J3_J4_J5_Al_Ij_J1'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'hh:mm A',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[leo saa] LT',\n nextDay: '[kesho saa] LT',\n nextWeek: '[wiki ijayo] dddd [saat] LT',\n lastDay: '[jana] LT',\n lastWeek: '[wiki iliyopita] dddd [saat] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s baadaye',\n past: 'tokea %s',\n s: 'hivi punde',\n ss: 'sekunde %d',\n m: 'dakika moja',\n mm: 'dakika %d',\n h: 'saa limoja',\n hh: 'masaa %d',\n d: 'siku moja',\n dd: 'siku %d',\n M: 'mwezi mmoja',\n MM: 'miezi %d',\n y: 'mwaka mmoja',\n yy: 'miaka %d',\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return sw;\n\n})));\n","//! moment.js locale configuration\n//! locale : Tamil [ta]\n//! author : Arjunkumar Krishnamoorthy : https://github.com/tk120404\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '௧',\n 2: '௨',\n 3: '௩',\n 4: '௪',\n 5: '௫',\n 6: '௬',\n 7: '௭',\n 8: '௮',\n 9: '௯',\n 0: '௦',\n },\n numberMap = {\n '௧': '1',\n '௨': '2',\n '௩': '3',\n '௪': '4',\n '௫': '5',\n '௬': '6',\n '௭': '7',\n '௮': '8',\n '௯': '9',\n '௦': '0',\n };\n\n var ta = moment.defineLocale('ta', {\n months: 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split(\n '_'\n ),\n monthsShort:\n 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split(\n '_'\n ),\n weekdays:\n 'ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை'.split(\n '_'\n ),\n weekdaysShort: 'ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி'.split(\n '_'\n ),\n weekdaysMin: 'ஞா_தி_செ_பு_வி_வெ_ச'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, HH:mm',\n LLLL: 'dddd, D MMMM YYYY, HH:mm',\n },\n calendar: {\n sameDay: '[இன்று] LT',\n nextDay: '[நாளை] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[நேற்று] LT',\n lastWeek: '[கடந்த வாரம்] dddd, LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s இல்',\n past: '%s முன்',\n s: 'ஒரு சில விநாடிகள்',\n ss: '%d விநாடிகள்',\n m: 'ஒரு நிமிடம்',\n mm: '%d நிமிடங்கள்',\n h: 'ஒரு மணி நேரம்',\n hh: '%d மணி நேரம்',\n d: 'ஒரு நாள்',\n dd: '%d நாட்கள்',\n M: 'ஒரு மாதம்',\n MM: '%d மாதங்கள்',\n y: 'ஒரு வருடம்',\n yy: '%d ஆண்டுகள்',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}வது/,\n ordinal: function (number) {\n return number + 'வது';\n },\n preparse: function (string) {\n return string.replace(/[௧௨௩௪௫௬௭௮௯௦]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n // refer http://ta.wikipedia.org/s/1er1\n meridiemParse: /யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,\n meridiem: function (hour, minute, isLower) {\n if (hour < 2) {\n return ' யாமம்';\n } else if (hour < 6) {\n return ' வைகறை'; // வைகறை\n } else if (hour < 10) {\n return ' காலை'; // காலை\n } else if (hour < 14) {\n return ' நண்பகல்'; // நண்பகல்\n } else if (hour < 18) {\n return ' எற்பாடு'; // எற்பாடு\n } else if (hour < 22) {\n return ' மாலை'; // மாலை\n } else {\n return ' யாமம்';\n }\n },\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'யாமம்') {\n return hour < 2 ? hour : hour + 12;\n } else if (meridiem === 'வைகறை' || meridiem === 'காலை') {\n return hour;\n } else if (meridiem === 'நண்பகல்') {\n return hour >= 10 ? hour : hour + 12;\n } else {\n return hour + 12;\n }\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n },\n });\n\n return ta;\n\n})));\n","//! moment.js locale configuration\n//! locale : Telugu [te]\n//! author : Krishna Chaitanya Thota : https://github.com/kcthota\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var te = moment.defineLocale('te', {\n months: 'జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్'.split(\n '_'\n ),\n monthsShort:\n 'జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays:\n 'ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం'.split(\n '_'\n ),\n weekdaysShort: 'ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని'.split('_'),\n weekdaysMin: 'ఆ_సో_మం_బు_గు_శు_శ'.split('_'),\n longDateFormat: {\n LT: 'A h:mm',\n LTS: 'A h:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm',\n LLLL: 'dddd, D MMMM YYYY, A h:mm',\n },\n calendar: {\n sameDay: '[నేడు] LT',\n nextDay: '[రేపు] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[నిన్న] LT',\n lastWeek: '[గత] dddd, LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s లో',\n past: '%s క్రితం',\n s: 'కొన్ని క్షణాలు',\n ss: '%d సెకన్లు',\n m: 'ఒక నిమిషం',\n mm: '%d నిమిషాలు',\n h: 'ఒక గంట',\n hh: '%d గంటలు',\n d: 'ఒక రోజు',\n dd: '%d రోజులు',\n M: 'ఒక నెల',\n MM: '%d నెలలు',\n y: 'ఒక సంవత్సరం',\n yy: '%d సంవత్సరాలు',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}వ/,\n ordinal: '%dవ',\n meridiemParse: /రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'రాత్రి') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'ఉదయం') {\n return hour;\n } else if (meridiem === 'మధ్యాహ్నం') {\n return hour >= 10 ? hour : hour + 12;\n } else if (meridiem === 'సాయంత్రం') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'రాత్రి';\n } else if (hour < 10) {\n return 'ఉదయం';\n } else if (hour < 17) {\n return 'మధ్యాహ్నం';\n } else if (hour < 20) {\n return 'సాయంత్రం';\n } else {\n return 'రాత్రి';\n }\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n },\n });\n\n return te;\n\n})));\n","//! moment.js locale configuration\n//! locale : Tetun Dili (East Timor) [tet]\n//! author : Joshua Brooks : https://github.com/joshbrooks\n//! author : Onorio De J. Afonso : https://github.com/marobo\n//! author : Sonia Simoes : https://github.com/soniasimoes\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var tet = moment.defineLocale('tet', {\n months: 'Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru'.split(\n '_'\n ),\n monthsShort: 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'),\n weekdays: 'Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu'.split('_'),\n weekdaysShort: 'Dom_Seg_Ters_Kua_Kint_Sest_Sab'.split('_'),\n weekdaysMin: 'Do_Seg_Te_Ku_Ki_Ses_Sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Ohin iha] LT',\n nextDay: '[Aban iha] LT',\n nextWeek: 'dddd [iha] LT',\n lastDay: '[Horiseik iha] LT',\n lastWeek: 'dddd [semana kotuk] [iha] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'iha %s',\n past: '%s liuba',\n s: 'segundu balun',\n ss: 'segundu %d',\n m: 'minutu ida',\n mm: 'minutu %d',\n h: 'oras ida',\n hh: 'oras %d',\n d: 'loron ida',\n dd: 'loron %d',\n M: 'fulan ida',\n MM: 'fulan %d',\n y: 'tinan ida',\n yy: 'tinan %d',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n ~~((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return tet;\n\n})));\n","//! moment.js locale configuration\n//! locale : Tajik [tg]\n//! author : Orif N. Jr. : https://github.com/orif-jr\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var suffixes = {\n 0: '-ум',\n 1: '-ум',\n 2: '-юм',\n 3: '-юм',\n 4: '-ум',\n 5: '-ум',\n 6: '-ум',\n 7: '-ум',\n 8: '-ум',\n 9: '-ум',\n 10: '-ум',\n 12: '-ум',\n 13: '-ум',\n 20: '-ум',\n 30: '-юм',\n 40: '-ум',\n 50: '-ум',\n 60: '-ум',\n 70: '-ум',\n 80: '-ум',\n 90: '-ум',\n 100: '-ум',\n };\n\n var tg = moment.defineLocale('tg', {\n months: {\n format: 'январи_феврали_марти_апрели_майи_июни_июли_августи_сентябри_октябри_ноябри_декабри'.split(\n '_'\n ),\n standalone:\n 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split(\n '_'\n ),\n },\n monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'),\n weekdays: 'якшанбе_душанбе_сешанбе_чоршанбе_панҷшанбе_ҷумъа_шанбе'.split(\n '_'\n ),\n weekdaysShort: 'яшб_дшб_сшб_чшб_пшб_ҷум_шнб'.split('_'),\n weekdaysMin: 'яш_дш_сш_чш_пш_ҷм_шб'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Имрӯз соати] LT',\n nextDay: '[Фардо соати] LT',\n lastDay: '[Дирӯз соати] LT',\n nextWeek: 'dddd[и] [ҳафтаи оянда соати] LT',\n lastWeek: 'dddd[и] [ҳафтаи гузашта соати] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'баъди %s',\n past: '%s пеш',\n s: 'якчанд сония',\n m: 'як дақиқа',\n mm: '%d дақиқа',\n h: 'як соат',\n hh: '%d соат',\n d: 'як рӯз',\n dd: '%d рӯз',\n M: 'як моҳ',\n MM: '%d моҳ',\n y: 'як сол',\n yy: '%d сол',\n },\n meridiemParse: /шаб|субҳ|рӯз|бегоҳ/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'шаб') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'субҳ') {\n return hour;\n } else if (meridiem === 'рӯз') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === 'бегоҳ') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'шаб';\n } else if (hour < 11) {\n return 'субҳ';\n } else if (hour < 16) {\n return 'рӯз';\n } else if (hour < 19) {\n return 'бегоҳ';\n } else {\n return 'шаб';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(ум|юм)/,\n ordinal: function (number) {\n var a = number % 10,\n b = number >= 100 ? 100 : null;\n return number + (suffixes[number] || suffixes[a] || suffixes[b]);\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 1th is the first week of the year.\n },\n });\n\n return tg;\n\n})));\n","//! moment.js locale configuration\n//! locale : Thai [th]\n//! author : Kridsada Thanabulpong : https://github.com/sirn\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var th = moment.defineLocale('th', {\n months: 'มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม'.split(\n '_'\n ),\n monthsShort:\n 'ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์'.split('_'),\n weekdaysShort: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์'.split('_'), // yes, three characters difference\n weekdaysMin: 'อา._จ._อ._พ._พฤ._ศ._ส.'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY เวลา H:mm',\n LLLL: 'วันddddที่ D MMMM YYYY เวลา H:mm',\n },\n meridiemParse: /ก่อนเที่ยง|หลังเที่ยง/,\n isPM: function (input) {\n return input === 'หลังเที่ยง';\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'ก่อนเที่ยง';\n } else {\n return 'หลังเที่ยง';\n }\n },\n calendar: {\n sameDay: '[วันนี้ เวลา] LT',\n nextDay: '[พรุ่งนี้ เวลา] LT',\n nextWeek: 'dddd[หน้า เวลา] LT',\n lastDay: '[เมื่อวานนี้ เวลา] LT',\n lastWeek: '[วัน]dddd[ที่แล้ว เวลา] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'อีก %s',\n past: '%sที่แล้ว',\n s: 'ไม่กี่วินาที',\n ss: '%d วินาที',\n m: '1 นาที',\n mm: '%d นาที',\n h: '1 ชั่วโมง',\n hh: '%d ชั่วโมง',\n d: '1 วัน',\n dd: '%d วัน',\n w: '1 สัปดาห์',\n ww: '%d สัปดาห์',\n M: '1 เดือน',\n MM: '%d เดือน',\n y: '1 ปี',\n yy: '%d ปี',\n },\n });\n\n return th;\n\n})));\n","//! moment.js locale configuration\n//! locale : Turkmen [tk]\n//! author : Atamyrat Abdyrahmanov : https://github.com/atamyratabdy\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var suffixes = {\n 1: \"'inji\",\n 5: \"'inji\",\n 8: \"'inji\",\n 70: \"'inji\",\n 80: \"'inji\",\n 2: \"'nji\",\n 7: \"'nji\",\n 20: \"'nji\",\n 50: \"'nji\",\n 3: \"'ünji\",\n 4: \"'ünji\",\n 100: \"'ünji\",\n 6: \"'njy\",\n 9: \"'unjy\",\n 10: \"'unjy\",\n 30: \"'unjy\",\n 60: \"'ynjy\",\n 90: \"'ynjy\",\n };\n\n var tk = moment.defineLocale('tk', {\n months: 'Ýanwar_Fewral_Mart_Aprel_Maý_Iýun_Iýul_Awgust_Sentýabr_Oktýabr_Noýabr_Dekabr'.split(\n '_'\n ),\n monthsShort: 'Ýan_Few_Mar_Apr_Maý_Iýn_Iýl_Awg_Sen_Okt_Noý_Dek'.split('_'),\n weekdays: 'Ýekşenbe_Duşenbe_Sişenbe_Çarşenbe_Penşenbe_Anna_Şenbe'.split(\n '_'\n ),\n weekdaysShort: 'Ýek_Duş_Siş_Çar_Pen_Ann_Şen'.split('_'),\n weekdaysMin: 'Ýk_Dş_Sş_Çr_Pn_An_Şn'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[bugün sagat] LT',\n nextDay: '[ertir sagat] LT',\n nextWeek: '[indiki] dddd [sagat] LT',\n lastDay: '[düýn] LT',\n lastWeek: '[geçen] dddd [sagat] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s soň',\n past: '%s öň',\n s: 'birnäçe sekunt',\n m: 'bir minut',\n mm: '%d minut',\n h: 'bir sagat',\n hh: '%d sagat',\n d: 'bir gün',\n dd: '%d gün',\n M: 'bir aý',\n MM: '%d aý',\n y: 'bir ýyl',\n yy: '%d ýyl',\n },\n ordinal: function (number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'Do':\n case 'DD':\n return number;\n default:\n if (number === 0) {\n // special case for zero\n return number + \"'unjy\";\n }\n var a = number % 10,\n b = (number % 100) - a,\n c = number >= 100 ? 100 : null;\n return number + (suffixes[a] || suffixes[b] || suffixes[c]);\n }\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return tk;\n\n})));\n","//! moment.js locale configuration\n//! locale : Tagalog (Philippines) [tl-ph]\n//! author : Dan Hagman : https://github.com/hagmandan\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var tlPh = moment.defineLocale('tl-ph', {\n months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split(\n '_'\n ),\n monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'),\n weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split(\n '_'\n ),\n weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'),\n weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'MM/D/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY HH:mm',\n LLLL: 'dddd, MMMM DD, YYYY HH:mm',\n },\n calendar: {\n sameDay: 'LT [ngayong araw]',\n nextDay: '[Bukas ng] LT',\n nextWeek: 'LT [sa susunod na] dddd',\n lastDay: 'LT [kahapon]',\n lastWeek: 'LT [noong nakaraang] dddd',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'sa loob ng %s',\n past: '%s ang nakalipas',\n s: 'ilang segundo',\n ss: '%d segundo',\n m: 'isang minuto',\n mm: '%d minuto',\n h: 'isang oras',\n hh: '%d oras',\n d: 'isang araw',\n dd: '%d araw',\n M: 'isang buwan',\n MM: '%d buwan',\n y: 'isang taon',\n yy: '%d taon',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}/,\n ordinal: function (number) {\n return number;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return tlPh;\n\n})));\n","//! moment.js locale configuration\n//! locale : Klingon [tlh]\n//! author : Dominika Kruk : https://github.com/amaranthrose\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var numbersNouns = 'pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut'.split('_');\n\n function translateFuture(output) {\n var time = output;\n time =\n output.indexOf('jaj') !== -1\n ? time.slice(0, -3) + 'leS'\n : output.indexOf('jar') !== -1\n ? time.slice(0, -3) + 'waQ'\n : output.indexOf('DIS') !== -1\n ? time.slice(0, -3) + 'nem'\n : time + ' pIq';\n return time;\n }\n\n function translatePast(output) {\n var time = output;\n time =\n output.indexOf('jaj') !== -1\n ? time.slice(0, -3) + 'Hu’'\n : output.indexOf('jar') !== -1\n ? time.slice(0, -3) + 'wen'\n : output.indexOf('DIS') !== -1\n ? time.slice(0, -3) + 'ben'\n : time + ' ret';\n return time;\n }\n\n function translate(number, withoutSuffix, string, isFuture) {\n var numberNoun = numberAsNoun(number);\n switch (string) {\n case 'ss':\n return numberNoun + ' lup';\n case 'mm':\n return numberNoun + ' tup';\n case 'hh':\n return numberNoun + ' rep';\n case 'dd':\n return numberNoun + ' jaj';\n case 'MM':\n return numberNoun + ' jar';\n case 'yy':\n return numberNoun + ' DIS';\n }\n }\n\n function numberAsNoun(number) {\n var hundred = Math.floor((number % 1000) / 100),\n ten = Math.floor((number % 100) / 10),\n one = number % 10,\n word = '';\n if (hundred > 0) {\n word += numbersNouns[hundred] + 'vatlh';\n }\n if (ten > 0) {\n word += (word !== '' ? ' ' : '') + numbersNouns[ten] + 'maH';\n }\n if (one > 0) {\n word += (word !== '' ? ' ' : '') + numbersNouns[one];\n }\n return word === '' ? 'pagh' : word;\n }\n\n var tlh = moment.defineLocale('tlh', {\n months: 'tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’'.split(\n '_'\n ),\n monthsShort:\n 'jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split(\n '_'\n ),\n weekdaysShort:\n 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),\n weekdaysMin:\n 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[DaHjaj] LT',\n nextDay: '[wa’leS] LT',\n nextWeek: 'LLL',\n lastDay: '[wa’Hu’] LT',\n lastWeek: 'LLL',\n sameElse: 'L',\n },\n relativeTime: {\n future: translateFuture,\n past: translatePast,\n s: 'puS lup',\n ss: translate,\n m: 'wa’ tup',\n mm: translate,\n h: 'wa’ rep',\n hh: translate,\n d: 'wa’ jaj',\n dd: translate,\n M: 'wa’ jar',\n MM: translate,\n y: 'wa’ DIS',\n yy: translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return tlh;\n\n})));\n","//! moment.js locale configuration\n//! locale : Turkish [tr]\n//! authors : Erhan Gundogan : https://github.com/erhangundogan,\n//! Burak Yiğit Kaya: https://github.com/BYK\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var suffixes = {\n 1: \"'inci\",\n 5: \"'inci\",\n 8: \"'inci\",\n 70: \"'inci\",\n 80: \"'inci\",\n 2: \"'nci\",\n 7: \"'nci\",\n 20: \"'nci\",\n 50: \"'nci\",\n 3: \"'üncü\",\n 4: \"'üncü\",\n 100: \"'üncü\",\n 6: \"'ncı\",\n 9: \"'uncu\",\n 10: \"'uncu\",\n 30: \"'uncu\",\n 60: \"'ıncı\",\n 90: \"'ıncı\",\n };\n\n var tr = moment.defineLocale('tr', {\n months: 'Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık'.split(\n '_'\n ),\n monthsShort: 'Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara'.split('_'),\n weekdays: 'Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi'.split(\n '_'\n ),\n weekdaysShort: 'Paz_Pzt_Sal_Çar_Per_Cum_Cmt'.split('_'),\n weekdaysMin: 'Pz_Pt_Sa_Ça_Pe_Cu_Ct'.split('_'),\n meridiem: function (hours, minutes, isLower) {\n if (hours < 12) {\n return isLower ? 'öö' : 'ÖÖ';\n } else {\n return isLower ? 'ös' : 'ÖS';\n }\n },\n meridiemParse: /öö|ÖÖ|ös|ÖS/,\n isPM: function (input) {\n return input === 'ös' || input === 'ÖS';\n },\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[bugün saat] LT',\n nextDay: '[yarın saat] LT',\n nextWeek: '[gelecek] dddd [saat] LT',\n lastDay: '[dün] LT',\n lastWeek: '[geçen] dddd [saat] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s sonra',\n past: '%s önce',\n s: 'birkaç saniye',\n ss: '%d saniye',\n m: 'bir dakika',\n mm: '%d dakika',\n h: 'bir saat',\n hh: '%d saat',\n d: 'bir gün',\n dd: '%d gün',\n w: 'bir hafta',\n ww: '%d hafta',\n M: 'bir ay',\n MM: '%d ay',\n y: 'bir yıl',\n yy: '%d yıl',\n },\n ordinal: function (number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'Do':\n case 'DD':\n return number;\n default:\n if (number === 0) {\n // special case for zero\n return number + \"'ıncı\";\n }\n var a = number % 10,\n b = (number % 100) - a,\n c = number >= 100 ? 100 : null;\n return number + (suffixes[a] || suffixes[b] || suffixes[c]);\n }\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return tr;\n\n})));\n","//! moment.js locale configuration\n//! locale : Talossan [tzl]\n//! author : Robin van der Vliet : https://github.com/robin0van0der0v\n//! author : Iustì Canun\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n // After the year there should be a slash and the amount of years since December 26, 1979 in Roman numerals.\n // This is currently too difficult (maybe even impossible) to add.\n var tzl = moment.defineLocale('tzl', {\n months: 'Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar'.split(\n '_'\n ),\n monthsShort: 'Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec'.split('_'),\n weekdays: 'Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi'.split('_'),\n weekdaysShort: 'Súl_Lún_Mai_Már_Xhú_Vié_Sát'.split('_'),\n weekdaysMin: 'Sú_Lú_Ma_Má_Xh_Vi_Sá'.split('_'),\n longDateFormat: {\n LT: 'HH.mm',\n LTS: 'HH.mm.ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM [dallas] YYYY',\n LLL: 'D. MMMM [dallas] YYYY HH.mm',\n LLLL: 'dddd, [li] D. MMMM [dallas] YYYY HH.mm',\n },\n meridiemParse: /d\\'o|d\\'a/i,\n isPM: function (input) {\n return \"d'o\" === input.toLowerCase();\n },\n meridiem: function (hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? \"d'o\" : \"D'O\";\n } else {\n return isLower ? \"d'a\" : \"D'A\";\n }\n },\n calendar: {\n sameDay: '[oxhi à] LT',\n nextDay: '[demà à] LT',\n nextWeek: 'dddd [à] LT',\n lastDay: '[ieiri à] LT',\n lastWeek: '[sür el] dddd [lasteu à] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'osprei %s',\n past: 'ja%s',\n s: processRelativeTime,\n ss: processRelativeTime,\n m: processRelativeTime,\n mm: processRelativeTime,\n h: processRelativeTime,\n hh: processRelativeTime,\n d: processRelativeTime,\n dd: processRelativeTime,\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n s: ['viensas secunds', \"'iensas secunds\"],\n ss: [number + ' secunds', '' + number + ' secunds'],\n m: [\"'n míut\", \"'iens míut\"],\n mm: [number + ' míuts', '' + number + ' míuts'],\n h: [\"'n þora\", \"'iensa þora\"],\n hh: [number + ' þoras', '' + number + ' þoras'],\n d: [\"'n ziua\", \"'iensa ziua\"],\n dd: [number + ' ziuas', '' + number + ' ziuas'],\n M: [\"'n mes\", \"'iens mes\"],\n MM: [number + ' mesen', '' + number + ' mesen'],\n y: [\"'n ar\", \"'iens ar\"],\n yy: [number + ' ars', '' + number + ' ars'],\n };\n return isFuture\n ? format[key][0]\n : withoutSuffix\n ? format[key][0]\n : format[key][1];\n }\n\n return tzl;\n\n})));\n","//! moment.js locale configuration\n//! locale : Central Atlas Tamazight Latin [tzm-latn]\n//! author : Abdel Said : https://github.com/abdelsaid\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var tzmLatn = moment.defineLocale('tzm-latn', {\n months: 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split(\n '_'\n ),\n monthsShort:\n 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split(\n '_'\n ),\n weekdays: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),\n weekdaysShort: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),\n weekdaysMin: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[asdkh g] LT',\n nextDay: '[aska g] LT',\n nextWeek: 'dddd [g] LT',\n lastDay: '[assant g] LT',\n lastWeek: 'dddd [g] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'dadkh s yan %s',\n past: 'yan %s',\n s: 'imik',\n ss: '%d imik',\n m: 'minuḍ',\n mm: '%d minuḍ',\n h: 'saɛa',\n hh: '%d tassaɛin',\n d: 'ass',\n dd: '%d ossan',\n M: 'ayowr',\n MM: '%d iyyirn',\n y: 'asgas',\n yy: '%d isgasn',\n },\n week: {\n dow: 6, // Saturday is the first day of the week.\n doy: 12, // The week that contains Jan 12th is the first week of the year.\n },\n });\n\n return tzmLatn;\n\n})));\n","//! moment.js locale configuration\n//! locale : Central Atlas Tamazight [tzm]\n//! author : Abdel Said : https://github.com/abdelsaid\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var tzm = moment.defineLocale('tzm', {\n months: 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split(\n '_'\n ),\n monthsShort:\n 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split(\n '_'\n ),\n weekdays: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),\n weekdaysShort: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),\n weekdaysMin: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[ⴰⵙⴷⵅ ⴴ] LT',\n nextDay: '[ⴰⵙⴽⴰ ⴴ] LT',\n nextWeek: 'dddd [ⴴ] LT',\n lastDay: '[ⴰⵚⴰⵏⵜ ⴴ] LT',\n lastWeek: 'dddd [ⴴ] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s',\n past: 'ⵢⴰⵏ %s',\n s: 'ⵉⵎⵉⴽ',\n ss: '%d ⵉⵎⵉⴽ',\n m: 'ⵎⵉⵏⵓⴺ',\n mm: '%d ⵎⵉⵏⵓⴺ',\n h: 'ⵙⴰⵄⴰ',\n hh: '%d ⵜⴰⵙⵙⴰⵄⵉⵏ',\n d: 'ⴰⵙⵙ',\n dd: '%d oⵙⵙⴰⵏ',\n M: 'ⴰⵢoⵓⵔ',\n MM: '%d ⵉⵢⵢⵉⵔⵏ',\n y: 'ⴰⵙⴳⴰⵙ',\n yy: '%d ⵉⵙⴳⴰⵙⵏ',\n },\n week: {\n dow: 6, // Saturday is the first day of the week.\n doy: 12, // The week that contains Jan 12th is the first week of the year.\n },\n });\n\n return tzm;\n\n})));\n","//! moment.js locale configuration\n//! locale : Uyghur (China) [ug-cn]\n//! author: boyaq : https://github.com/boyaq\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var ugCn = moment.defineLocale('ug-cn', {\n months: 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split(\n '_'\n ),\n monthsShort:\n 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split(\n '_'\n ),\n weekdays: 'يەكشەنبە_دۈشەنبە_سەيشەنبە_چارشەنبە_پەيشەنبە_جۈمە_شەنبە'.split(\n '_'\n ),\n weekdaysShort: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'),\n weekdaysMin: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY-MM-DD',\n LL: 'YYYY-يىلىM-ئاينىڭD-كۈنى',\n LLL: 'YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm',\n LLLL: 'dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm',\n },\n meridiemParse: /يېرىم كېچە|سەھەر|چۈشتىن بۇرۇن|چۈش|چۈشتىن كېيىن|كەچ/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (\n meridiem === 'يېرىم كېچە' ||\n meridiem === 'سەھەر' ||\n meridiem === 'چۈشتىن بۇرۇن'\n ) {\n return hour;\n } else if (meridiem === 'چۈشتىن كېيىن' || meridiem === 'كەچ') {\n return hour + 12;\n } else {\n return hour >= 11 ? hour : hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n var hm = hour * 100 + minute;\n if (hm < 600) {\n return 'يېرىم كېچە';\n } else if (hm < 900) {\n return 'سەھەر';\n } else if (hm < 1130) {\n return 'چۈشتىن بۇرۇن';\n } else if (hm < 1230) {\n return 'چۈش';\n } else if (hm < 1800) {\n return 'چۈشتىن كېيىن';\n } else {\n return 'كەچ';\n }\n },\n calendar: {\n sameDay: '[بۈگۈن سائەت] LT',\n nextDay: '[ئەتە سائەت] LT',\n nextWeek: '[كېلەركى] dddd [سائەت] LT',\n lastDay: '[تۆنۈگۈن] LT',\n lastWeek: '[ئالدىنقى] dddd [سائەت] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s كېيىن',\n past: '%s بۇرۇن',\n s: 'نەچچە سېكونت',\n ss: '%d سېكونت',\n m: 'بىر مىنۇت',\n mm: '%d مىنۇت',\n h: 'بىر سائەت',\n hh: '%d سائەت',\n d: 'بىر كۈن',\n dd: '%d كۈن',\n M: 'بىر ئاي',\n MM: '%d ئاي',\n y: 'بىر يىل',\n yy: '%d يىل',\n },\n\n dayOfMonthOrdinalParse: /\\d{1,2}(-كۈنى|-ئاي|-ھەپتە)/,\n ordinal: function (number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + '-كۈنى';\n case 'w':\n case 'W':\n return number + '-ھەپتە';\n default:\n return number;\n }\n },\n preparse: function (string) {\n return string.replace(/،/g, ',');\n },\n postformat: function (string) {\n return string.replace(/,/g, '،');\n },\n week: {\n // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 1st is the first week of the year.\n },\n });\n\n return ugCn;\n\n})));\n","//! moment.js locale configuration\n//! locale : Ukrainian [uk]\n//! author : zemlanin : https://github.com/zemlanin\n//! Author : Menelion Elensúle : https://github.com/Oire\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function plural(word, num) {\n var forms = word.split('_');\n return num % 10 === 1 && num % 100 !== 11\n ? forms[0]\n : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)\n ? forms[1]\n : forms[2];\n }\n function relativeTimeWithPlural(number, withoutSuffix, key) {\n var format = {\n ss: withoutSuffix ? 'секунда_секунди_секунд' : 'секунду_секунди_секунд',\n mm: withoutSuffix ? 'хвилина_хвилини_хвилин' : 'хвилину_хвилини_хвилин',\n hh: withoutSuffix ? 'година_години_годин' : 'годину_години_годин',\n dd: 'день_дні_днів',\n MM: 'місяць_місяці_місяців',\n yy: 'рік_роки_років',\n };\n if (key === 'm') {\n return withoutSuffix ? 'хвилина' : 'хвилину';\n } else if (key === 'h') {\n return withoutSuffix ? 'година' : 'годину';\n } else {\n return number + ' ' + plural(format[key], +number);\n }\n }\n function weekdaysCaseReplace(m, format) {\n var weekdays = {\n nominative:\n 'неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота'.split(\n '_'\n ),\n accusative:\n 'неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу'.split(\n '_'\n ),\n genitive:\n 'неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи'.split(\n '_'\n ),\n },\n nounCase;\n\n if (m === true) {\n return weekdays['nominative']\n .slice(1, 7)\n .concat(weekdays['nominative'].slice(0, 1));\n }\n if (!m) {\n return weekdays['nominative'];\n }\n\n nounCase = /(\\[[ВвУу]\\]) ?dddd/.test(format)\n ? 'accusative'\n : /\\[?(?:минулої|наступної)? ?\\] ?dddd/.test(format)\n ? 'genitive'\n : 'nominative';\n return weekdays[nounCase][m.day()];\n }\n function processHoursFunction(str) {\n return function () {\n return str + 'о' + (this.hours() === 11 ? 'б' : '') + '] LT';\n };\n }\n\n var uk = moment.defineLocale('uk', {\n months: {\n format: 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split(\n '_'\n ),\n standalone:\n 'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень'.split(\n '_'\n ),\n },\n monthsShort: 'січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд'.split(\n '_'\n ),\n weekdays: weekdaysCaseReplace,\n weekdaysShort: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),\n weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY р.',\n LLL: 'D MMMM YYYY р., HH:mm',\n LLLL: 'dddd, D MMMM YYYY р., HH:mm',\n },\n calendar: {\n sameDay: processHoursFunction('[Сьогодні '),\n nextDay: processHoursFunction('[Завтра '),\n lastDay: processHoursFunction('[Вчора '),\n nextWeek: processHoursFunction('[У] dddd ['),\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n case 3:\n case 5:\n case 6:\n return processHoursFunction('[Минулої] dddd [').call(this);\n case 1:\n case 2:\n case 4:\n return processHoursFunction('[Минулого] dddd [').call(this);\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'за %s',\n past: '%s тому',\n s: 'декілька секунд',\n ss: relativeTimeWithPlural,\n m: relativeTimeWithPlural,\n mm: relativeTimeWithPlural,\n h: 'годину',\n hh: relativeTimeWithPlural,\n d: 'день',\n dd: relativeTimeWithPlural,\n M: 'місяць',\n MM: relativeTimeWithPlural,\n y: 'рік',\n yy: relativeTimeWithPlural,\n },\n // M. E.: those two are virtually unused but a user might want to implement them for his/her website for some reason\n meridiemParse: /ночі|ранку|дня|вечора/,\n isPM: function (input) {\n return /^(дня|вечора)$/.test(input);\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'ночі';\n } else if (hour < 12) {\n return 'ранку';\n } else if (hour < 17) {\n return 'дня';\n } else {\n return 'вечора';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(й|го)/,\n ordinal: function (number, period) {\n switch (period) {\n case 'M':\n case 'd':\n case 'DDD':\n case 'w':\n case 'W':\n return number + '-й';\n case 'D':\n return number + '-го';\n default:\n return number;\n }\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return uk;\n\n})));\n","//! moment.js locale configuration\n//! locale : Urdu [ur]\n//! author : Sawood Alam : https://github.com/ibnesayeed\n//! author : Zack : https://github.com/ZackVision\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var months = [\n 'جنوری',\n 'فروری',\n 'مارچ',\n 'اپریل',\n 'مئی',\n 'جون',\n 'جولائی',\n 'اگست',\n 'ستمبر',\n 'اکتوبر',\n 'نومبر',\n 'دسمبر',\n ],\n days = ['اتوار', 'پیر', 'منگل', 'بدھ', 'جمعرات', 'جمعہ', 'ہفتہ'];\n\n var ur = moment.defineLocale('ur', {\n months: months,\n monthsShort: months,\n weekdays: days,\n weekdaysShort: days,\n weekdaysMin: days,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd، D MMMM YYYY HH:mm',\n },\n meridiemParse: /صبح|شام/,\n isPM: function (input) {\n return 'شام' === input;\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'صبح';\n }\n return 'شام';\n },\n calendar: {\n sameDay: '[آج بوقت] LT',\n nextDay: '[کل بوقت] LT',\n nextWeek: 'dddd [بوقت] LT',\n lastDay: '[گذشتہ روز بوقت] LT',\n lastWeek: '[گذشتہ] dddd [بوقت] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s بعد',\n past: '%s قبل',\n s: 'چند سیکنڈ',\n ss: '%d سیکنڈ',\n m: 'ایک منٹ',\n mm: '%d منٹ',\n h: 'ایک گھنٹہ',\n hh: '%d گھنٹے',\n d: 'ایک دن',\n dd: '%d دن',\n M: 'ایک ماہ',\n MM: '%d ماہ',\n y: 'ایک سال',\n yy: '%d سال',\n },\n preparse: function (string) {\n return string.replace(/،/g, ',');\n },\n postformat: function (string) {\n return string.replace(/,/g, '،');\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return ur;\n\n})));\n","//! moment.js locale configuration\n//! locale : Uzbek Latin [uz-latn]\n//! author : Rasulbek Mirzayev : github.com/Rasulbeeek\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var uzLatn = moment.defineLocale('uz-latn', {\n months: 'Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr'.split(\n '_'\n ),\n monthsShort: 'Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek'.split('_'),\n weekdays:\n 'Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba'.split(\n '_'\n ),\n weekdaysShort: 'Yak_Dush_Sesh_Chor_Pay_Jum_Shan'.split('_'),\n weekdaysMin: 'Ya_Du_Se_Cho_Pa_Ju_Sha'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'D MMMM YYYY, dddd HH:mm',\n },\n calendar: {\n sameDay: '[Bugun soat] LT [da]',\n nextDay: '[Ertaga] LT [da]',\n nextWeek: 'dddd [kuni soat] LT [da]',\n lastDay: '[Kecha soat] LT [da]',\n lastWeek: \"[O'tgan] dddd [kuni soat] LT [da]\",\n sameElse: 'L',\n },\n relativeTime: {\n future: 'Yaqin %s ichida',\n past: 'Bir necha %s oldin',\n s: 'soniya',\n ss: '%d soniya',\n m: 'bir daqiqa',\n mm: '%d daqiqa',\n h: 'bir soat',\n hh: '%d soat',\n d: 'bir kun',\n dd: '%d kun',\n M: 'bir oy',\n MM: '%d oy',\n y: 'bir yil',\n yy: '%d yil',\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return uzLatn;\n\n})));\n","//! moment.js locale configuration\n//! locale : Uzbek [uz]\n//! author : Sardor Muminov : https://github.com/muminoff\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var uz = moment.defineLocale('uz', {\n months: 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split(\n '_'\n ),\n monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'),\n weekdays: 'Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба'.split('_'),\n weekdaysShort: 'Якш_Душ_Сеш_Чор_Пай_Жум_Шан'.split('_'),\n weekdaysMin: 'Як_Ду_Се_Чо_Па_Жу_Ша'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'D MMMM YYYY, dddd HH:mm',\n },\n calendar: {\n sameDay: '[Бугун соат] LT [да]',\n nextDay: '[Эртага] LT [да]',\n nextWeek: 'dddd [куни соат] LT [да]',\n lastDay: '[Кеча соат] LT [да]',\n lastWeek: '[Утган] dddd [куни соат] LT [да]',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'Якин %s ичида',\n past: 'Бир неча %s олдин',\n s: 'фурсат',\n ss: '%d фурсат',\n m: 'бир дакика',\n mm: '%d дакика',\n h: 'бир соат',\n hh: '%d соат',\n d: 'бир кун',\n dd: '%d кун',\n M: 'бир ой',\n MM: '%d ой',\n y: 'бир йил',\n yy: '%d йил',\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return uz;\n\n})));\n","//! moment.js locale configuration\n//! locale : Vietnamese [vi]\n//! author : Bang Nguyen : https://github.com/bangnk\n//! author : Chien Kira : https://github.com/chienkira\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var vi = moment.defineLocale('vi', {\n months: 'tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12'.split(\n '_'\n ),\n monthsShort:\n 'Thg 01_Thg 02_Thg 03_Thg 04_Thg 05_Thg 06_Thg 07_Thg 08_Thg 09_Thg 10_Thg 11_Thg 12'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy'.split(\n '_'\n ),\n weekdaysShort: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),\n weekdaysMin: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),\n weekdaysParseExact: true,\n meridiemParse: /sa|ch/i,\n isPM: function (input) {\n return /^ch$/i.test(input);\n },\n meridiem: function (hours, minutes, isLower) {\n if (hours < 12) {\n return isLower ? 'sa' : 'SA';\n } else {\n return isLower ? 'ch' : 'CH';\n }\n },\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM [năm] YYYY',\n LLL: 'D MMMM [năm] YYYY HH:mm',\n LLLL: 'dddd, D MMMM [năm] YYYY HH:mm',\n l: 'DD/M/YYYY',\n ll: 'D MMM YYYY',\n lll: 'D MMM YYYY HH:mm',\n llll: 'ddd, D MMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Hôm nay lúc] LT',\n nextDay: '[Ngày mai lúc] LT',\n nextWeek: 'dddd [tuần tới lúc] LT',\n lastDay: '[Hôm qua lúc] LT',\n lastWeek: 'dddd [tuần trước lúc] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s tới',\n past: '%s trước',\n s: 'vài giây',\n ss: '%d giây',\n m: 'một phút',\n mm: '%d phút',\n h: 'một giờ',\n hh: '%d giờ',\n d: 'một ngày',\n dd: '%d ngày',\n w: 'một tuần',\n ww: '%d tuần',\n M: 'một tháng',\n MM: '%d tháng',\n y: 'một năm',\n yy: '%d năm',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}/,\n ordinal: function (number) {\n return number;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return vi;\n\n})));\n","//! moment.js locale configuration\n//! locale : Pseudo [x-pseudo]\n//! author : Andrew Hood : https://github.com/andrewhood125\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var xPseudo = moment.defineLocale('x-pseudo', {\n months: 'J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér'.split(\n '_'\n ),\n monthsShort:\n 'J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays:\n 'S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý'.split(\n '_'\n ),\n weekdaysShort: 'S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát'.split('_'),\n weekdaysMin: 'S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[T~ódá~ý át] LT',\n nextDay: '[T~ómó~rró~w át] LT',\n nextWeek: 'dddd [át] LT',\n lastDay: '[Ý~ést~érdá~ý át] LT',\n lastWeek: '[L~ást] dddd [át] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'í~ñ %s',\n past: '%s á~gó',\n s: 'á ~féw ~sécó~ñds',\n ss: '%d s~écóñ~ds',\n m: 'á ~míñ~úté',\n mm: '%d m~íñú~tés',\n h: 'á~ñ hó~úr',\n hh: '%d h~óúrs',\n d: 'á ~dáý',\n dd: '%d d~áýs',\n M: 'á ~móñ~th',\n MM: '%d m~óñt~hs',\n y: 'á ~ýéár',\n yy: '%d ý~éárs',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n ~~((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return xPseudo;\n\n})));\n","//! moment.js locale configuration\n//! locale : Yoruba Nigeria [yo]\n//! author : Atolagbe Abisoye : https://github.com/andela-batolagbe\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var yo = moment.defineLocale('yo', {\n months: 'Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀'.split(\n '_'\n ),\n monthsShort: 'Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀'.split('_'),\n weekdays: 'Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta'.split('_'),\n weekdaysShort: 'Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá'.split('_'),\n weekdaysMin: 'Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb'.split('_'),\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY h:mm A',\n LLLL: 'dddd, D MMMM YYYY h:mm A',\n },\n calendar: {\n sameDay: '[Ònì ni] LT',\n nextDay: '[Ọ̀la ni] LT',\n nextWeek: \"dddd [Ọsẹ̀ tón'bọ] [ni] LT\",\n lastDay: '[Àna ni] LT',\n lastWeek: 'dddd [Ọsẹ̀ tólọ́] [ni] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'ní %s',\n past: '%s kọjá',\n s: 'ìsẹjú aayá die',\n ss: 'aayá %d',\n m: 'ìsẹjú kan',\n mm: 'ìsẹjú %d',\n h: 'wákati kan',\n hh: 'wákati %d',\n d: 'ọjọ́ kan',\n dd: 'ọjọ́ %d',\n M: 'osù kan',\n MM: 'osù %d',\n y: 'ọdún kan',\n yy: 'ọdún %d',\n },\n dayOfMonthOrdinalParse: /ọjọ́\\s\\d{1,2}/,\n ordinal: 'ọjọ́ %d',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return yo;\n\n})));\n","//! moment.js locale configuration\n//! locale : Chinese (China) [zh-cn]\n//! author : suupic : https://github.com/suupic\n//! author : Zeno Zeng : https://github.com/zenozeng\n//! author : uu109 : https://github.com/uu109\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var zhCn = moment.defineLocale('zh-cn', {\n months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(\n '_'\n ),\n monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(\n '_'\n ),\n weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),\n weekdaysShort: '周日_周一_周二_周三_周四_周五_周六'.split('_'),\n weekdaysMin: '日_一_二_三_四_五_六'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY/MM/DD',\n LL: 'YYYY年M月D日',\n LLL: 'YYYY年M月D日Ah点mm分',\n LLLL: 'YYYY年M月D日ddddAh点mm分',\n l: 'YYYY/M/D',\n ll: 'YYYY年M月D日',\n lll: 'YYYY年M月D日 HH:mm',\n llll: 'YYYY年M月D日dddd HH:mm',\n },\n meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {\n return hour;\n } else if (meridiem === '下午' || meridiem === '晚上') {\n return hour + 12;\n } else {\n // '中午'\n return hour >= 11 ? hour : hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n var hm = hour * 100 + minute;\n if (hm < 600) {\n return '凌晨';\n } else if (hm < 900) {\n return '早上';\n } else if (hm < 1130) {\n return '上午';\n } else if (hm < 1230) {\n return '中午';\n } else if (hm < 1800) {\n return '下午';\n } else {\n return '晚上';\n }\n },\n calendar: {\n sameDay: '[今天]LT',\n nextDay: '[明天]LT',\n nextWeek: function (now) {\n if (now.week() !== this.week()) {\n return '[下]dddLT';\n } else {\n return '[本]dddLT';\n }\n },\n lastDay: '[昨天]LT',\n lastWeek: function (now) {\n if (this.week() !== now.week()) {\n return '[上]dddLT';\n } else {\n return '[本]dddLT';\n }\n },\n sameElse: 'L',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(日|月|周)/,\n ordinal: function (number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + '日';\n case 'M':\n return number + '月';\n case 'w':\n case 'W':\n return number + '周';\n default:\n return number;\n }\n },\n relativeTime: {\n future: '%s后',\n past: '%s前',\n s: '几秒',\n ss: '%d 秒',\n m: '1 分钟',\n mm: '%d 分钟',\n h: '1 小时',\n hh: '%d 小时',\n d: '1 天',\n dd: '%d 天',\n w: '1 周',\n ww: '%d 周',\n M: '1 个月',\n MM: '%d 个月',\n y: '1 年',\n yy: '%d 年',\n },\n week: {\n // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return zhCn;\n\n})));\n","//! moment.js locale configuration\n//! locale : Chinese (Hong Kong) [zh-hk]\n//! author : Ben : https://github.com/ben-lin\n//! author : Chris Lam : https://github.com/hehachris\n//! author : Konstantin : https://github.com/skfd\n//! author : Anthony : https://github.com/anthonylau\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var zhHk = moment.defineLocale('zh-hk', {\n months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(\n '_'\n ),\n monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(\n '_'\n ),\n weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),\n weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),\n weekdaysMin: '日_一_二_三_四_五_六'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY/MM/DD',\n LL: 'YYYY年M月D日',\n LLL: 'YYYY年M月D日 HH:mm',\n LLLL: 'YYYY年M月D日dddd HH:mm',\n l: 'YYYY/M/D',\n ll: 'YYYY年M月D日',\n lll: 'YYYY年M月D日 HH:mm',\n llll: 'YYYY年M月D日dddd HH:mm',\n },\n meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {\n return hour;\n } else if (meridiem === '中午') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === '下午' || meridiem === '晚上') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n var hm = hour * 100 + minute;\n if (hm < 600) {\n return '凌晨';\n } else if (hm < 900) {\n return '早上';\n } else if (hm < 1200) {\n return '上午';\n } else if (hm === 1200) {\n return '中午';\n } else if (hm < 1800) {\n return '下午';\n } else {\n return '晚上';\n }\n },\n calendar: {\n sameDay: '[今天]LT',\n nextDay: '[明天]LT',\n nextWeek: '[下]ddddLT',\n lastDay: '[昨天]LT',\n lastWeek: '[上]ddddLT',\n sameElse: 'L',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(日|月|週)/,\n ordinal: function (number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + '日';\n case 'M':\n return number + '月';\n case 'w':\n case 'W':\n return number + '週';\n default:\n return number;\n }\n },\n relativeTime: {\n future: '%s後',\n past: '%s前',\n s: '幾秒',\n ss: '%d 秒',\n m: '1 分鐘',\n mm: '%d 分鐘',\n h: '1 小時',\n hh: '%d 小時',\n d: '1 天',\n dd: '%d 天',\n M: '1 個月',\n MM: '%d 個月',\n y: '1 年',\n yy: '%d 年',\n },\n });\n\n return zhHk;\n\n})));\n","//! moment.js locale configuration\n//! locale : Chinese (Macau) [zh-mo]\n//! author : Ben : https://github.com/ben-lin\n//! author : Chris Lam : https://github.com/hehachris\n//! author : Tan Yuanhong : https://github.com/le0tan\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var zhMo = moment.defineLocale('zh-mo', {\n months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(\n '_'\n ),\n monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(\n '_'\n ),\n weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),\n weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),\n weekdaysMin: '日_一_二_三_四_五_六'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'YYYY年M月D日',\n LLL: 'YYYY年M月D日 HH:mm',\n LLLL: 'YYYY年M月D日dddd HH:mm',\n l: 'D/M/YYYY',\n ll: 'YYYY年M月D日',\n lll: 'YYYY年M月D日 HH:mm',\n llll: 'YYYY年M月D日dddd HH:mm',\n },\n meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {\n return hour;\n } else if (meridiem === '中午') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === '下午' || meridiem === '晚上') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n var hm = hour * 100 + minute;\n if (hm < 600) {\n return '凌晨';\n } else if (hm < 900) {\n return '早上';\n } else if (hm < 1130) {\n return '上午';\n } else if (hm < 1230) {\n return '中午';\n } else if (hm < 1800) {\n return '下午';\n } else {\n return '晚上';\n }\n },\n calendar: {\n sameDay: '[今天] LT',\n nextDay: '[明天] LT',\n nextWeek: '[下]dddd LT',\n lastDay: '[昨天] LT',\n lastWeek: '[上]dddd LT',\n sameElse: 'L',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(日|月|週)/,\n ordinal: function (number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + '日';\n case 'M':\n return number + '月';\n case 'w':\n case 'W':\n return number + '週';\n default:\n return number;\n }\n },\n relativeTime: {\n future: '%s內',\n past: '%s前',\n s: '幾秒',\n ss: '%d 秒',\n m: '1 分鐘',\n mm: '%d 分鐘',\n h: '1 小時',\n hh: '%d 小時',\n d: '1 天',\n dd: '%d 天',\n M: '1 個月',\n MM: '%d 個月',\n y: '1 年',\n yy: '%d 年',\n },\n });\n\n return zhMo;\n\n})));\n","//! moment.js locale configuration\n//! locale : Chinese (Taiwan) [zh-tw]\n//! author : Ben : https://github.com/ben-lin\n//! author : Chris Lam : https://github.com/hehachris\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var zhTw = moment.defineLocale('zh-tw', {\n months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(\n '_'\n ),\n monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(\n '_'\n ),\n weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),\n weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),\n weekdaysMin: '日_一_二_三_四_五_六'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY/MM/DD',\n LL: 'YYYY年M月D日',\n LLL: 'YYYY年M月D日 HH:mm',\n LLLL: 'YYYY年M月D日dddd HH:mm',\n l: 'YYYY/M/D',\n ll: 'YYYY年M月D日',\n lll: 'YYYY年M月D日 HH:mm',\n llll: 'YYYY年M月D日dddd HH:mm',\n },\n meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {\n return hour;\n } else if (meridiem === '中午') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === '下午' || meridiem === '晚上') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n var hm = hour * 100 + minute;\n if (hm < 600) {\n return '凌晨';\n } else if (hm < 900) {\n return '早上';\n } else if (hm < 1130) {\n return '上午';\n } else if (hm < 1230) {\n return '中午';\n } else if (hm < 1800) {\n return '下午';\n } else {\n return '晚上';\n }\n },\n calendar: {\n sameDay: '[今天] LT',\n nextDay: '[明天] LT',\n nextWeek: '[下]dddd LT',\n lastDay: '[昨天] LT',\n lastWeek: '[上]dddd LT',\n sameElse: 'L',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(日|月|週)/,\n ordinal: function (number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + '日';\n case 'M':\n return number + '月';\n case 'w':\n case 'W':\n return number + '週';\n default:\n return number;\n }\n },\n relativeTime: {\n future: '%s後',\n past: '%s前',\n s: '幾秒',\n ss: '%d 秒',\n m: '1 分鐘',\n mm: '%d 分鐘',\n h: '1 小時',\n hh: '%d 小時',\n d: '1 天',\n dd: '%d 天',\n M: '1 個月',\n MM: '%d 個月',\n y: '1 年',\n yy: '%d 年',\n },\n });\n\n return zhTw;\n\n})));\n","//! moment.js\n//! version : 2.29.4\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n global.moment = factory()\n}(this, (function () { 'use strict';\n\n var hookCallback;\n\n function hooks() {\n return hookCallback.apply(null, arguments);\n }\n\n // This is done to register the method called with moment()\n // without creating circular dependencies.\n function setHookCallback(callback) {\n hookCallback = callback;\n }\n\n function isArray(input) {\n return (\n input instanceof Array ||\n Object.prototype.toString.call(input) === '[object Array]'\n );\n }\n\n function isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return (\n input != null &&\n Object.prototype.toString.call(input) === '[object Object]'\n );\n }\n\n function hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n }\n\n function isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return Object.getOwnPropertyNames(obj).length === 0;\n } else {\n var k;\n for (k in obj) {\n if (hasOwnProp(obj, k)) {\n return false;\n }\n }\n return true;\n }\n }\n\n function isUndefined(input) {\n return input === void 0;\n }\n\n function isNumber(input) {\n return (\n typeof input === 'number' ||\n Object.prototype.toString.call(input) === '[object Number]'\n );\n }\n\n function isDate(input) {\n return (\n input instanceof Date ||\n Object.prototype.toString.call(input) === '[object Date]'\n );\n }\n\n function map(arr, fn) {\n var res = [],\n i,\n arrLen = arr.length;\n for (i = 0; i < arrLen; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n }\n\n function extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n }\n\n function createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n }\n\n function defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty: false,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: false,\n invalidEra: null,\n invalidMonth: null,\n invalidFormat: false,\n userInvalidated: false,\n iso: false,\n parsedDateParts: [],\n era: null,\n meridiem: null,\n rfc2822: false,\n weekdayMismatch: false,\n };\n }\n\n function getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n }\n\n var some;\n if (Array.prototype.some) {\n some = Array.prototype.some;\n } else {\n some = function (fun) {\n var t = Object(this),\n len = t.length >>> 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n }\n\n function isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m),\n parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n }),\n isNowValid =\n !isNaN(m._d.getTime()) &&\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidEra &&\n !flags.invalidMonth &&\n !flags.invalidWeekday &&\n !flags.weekdayMismatch &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated &&\n (!flags.meridiem || (flags.meridiem && parsedParts));\n\n if (m._strict) {\n isNowValid =\n isNowValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n } else {\n return isNowValid;\n }\n }\n return m._isValid;\n }\n\n function createInvalid(flags) {\n var m = createUTC(NaN);\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n } else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n }\n\n // Plugins that add properties should also add the key here (null value),\n // so we can properly clone ourselves.\n var momentProperties = (hooks.momentProperties = []),\n updateInProgress = false;\n\n function copyConfig(to, from) {\n var i,\n prop,\n val,\n momentPropertiesLen = momentProperties.length;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentPropertiesLen > 0) {\n for (i = 0; i < momentPropertiesLen; i++) {\n prop = momentProperties[i];\n val = from[prop];\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n }\n\n // Moment prototype object\n function Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n if (!this.isValid()) {\n this._d = new Date(NaN);\n }\n // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n }\n\n function isMoment(obj) {\n return (\n obj instanceof Moment || (obj != null && obj._isAMomentObject != null)\n );\n }\n\n function warn(msg) {\n if (\n hooks.suppressDeprecationWarnings === false &&\n typeof console !== 'undefined' &&\n console.warn\n ) {\n console.warn('Deprecation warning: ' + msg);\n }\n }\n\n function deprecate(msg, fn) {\n var firstTime = true;\n\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n if (firstTime) {\n var args = [],\n arg,\n i,\n key,\n argLen = arguments.length;\n for (i = 0; i < argLen; i++) {\n arg = '';\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n for (key in arguments[0]) {\n if (hasOwnProp(arguments[0], key)) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n }\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n args.push(arg);\n }\n warn(\n msg +\n '\\nArguments: ' +\n Array.prototype.slice.call(args).join('') +\n '\\n' +\n new Error().stack\n );\n firstTime = false;\n }\n return fn.apply(this, arguments);\n }, fn);\n }\n\n var deprecations = {};\n\n function deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n }\n\n hooks.suppressDeprecationWarnings = false;\n hooks.deprecationHandler = null;\n\n function isFunction(input) {\n return (\n (typeof Function !== 'undefined' && input instanceof Function) ||\n Object.prototype.toString.call(input) === '[object Function]'\n );\n }\n\n function set(config) {\n var prop, i;\n for (i in config) {\n if (hasOwnProp(config, i)) {\n prop = config[i];\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n }\n this._config = config;\n // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n this._dayOfMonthOrdinalParseLenient = new RegExp(\n (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n '|' +\n /\\d{1,2}/.source\n );\n }\n\n function mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig),\n prop;\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n for (prop in parentConfig) {\n if (\n hasOwnProp(parentConfig, prop) &&\n !hasOwnProp(childConfig, prop) &&\n isObject(parentConfig[prop])\n ) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n return res;\n }\n\n function Locale(config) {\n if (config != null) {\n this.set(config);\n }\n }\n\n var keys;\n\n if (Object.keys) {\n keys = Object.keys;\n } else {\n keys = function (obj) {\n var i,\n res = [];\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n return res;\n };\n }\n\n var defaultCalendar = {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n };\n\n function calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n }\n\n function zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (\n (sign ? (forceSign ? '+' : '') : '-') +\n Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +\n absNumber\n );\n }\n\n var formattingTokens =\n /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n formatFunctions = {},\n formatTokenFunctions = {};\n\n // token: 'M'\n // padded: ['MM', 2]\n // ordinal: 'Mo'\n // callback: function () { this.month() + 1 }\n function addFormatToken(token, padded, ordinal, callback) {\n var func = callback;\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n if (token) {\n formatTokenFunctions[token] = func;\n }\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(\n func.apply(this, arguments),\n token\n );\n };\n }\n }\n\n function removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n }\n\n function makeFormatFunction(format) {\n var array = format.match(formattingTokens),\n i,\n length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '',\n i;\n for (i = 0; i < length; i++) {\n output += isFunction(array[i])\n ? array[i].call(mom, format)\n : array[i];\n }\n return output;\n };\n }\n\n // format date using native date object\n function formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] =\n formatFunctions[format] || makeFormatFunction(format);\n\n return formatFunctions[format](m);\n }\n\n function expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(\n localFormattingTokens,\n replaceLongDateFormatTokens\n );\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n }\n\n var defaultLongDateFormat = {\n LTS: 'h:mm:ss A',\n LT: 'h:mm A',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A',\n };\n\n function longDateFormat(key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper\n .match(formattingTokens)\n .map(function (tok) {\n if (\n tok === 'MMMM' ||\n tok === 'MM' ||\n tok === 'DD' ||\n tok === 'dddd'\n ) {\n return tok.slice(1);\n }\n return tok;\n })\n .join('');\n\n return this._longDateFormat[key];\n }\n\n var defaultInvalidDate = 'Invalid date';\n\n function invalidDate() {\n return this._invalidDate;\n }\n\n var defaultOrdinal = '%d',\n defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\n function ordinal(number) {\n return this._ordinal.replace('%d', number);\n }\n\n var defaultRelativeTime = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n w: 'a week',\n ww: '%d weeks',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n };\n\n function relativeTime(number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return isFunction(output)\n ? output(number, withoutSuffix, string, isFuture)\n : output.replace(/%d/i, number);\n }\n\n function pastFuture(diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n }\n\n var aliases = {};\n\n function addUnitAlias(unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n }\n\n function normalizeUnits(units) {\n return typeof units === 'string'\n ? aliases[units] || aliases[units.toLowerCase()]\n : undefined;\n }\n\n function normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n }\n\n var priorities = {};\n\n function addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n }\n\n function getPrioritizedUnits(unitsObj) {\n var units = [],\n u;\n for (u in unitsObj) {\n if (hasOwnProp(unitsObj, u)) {\n units.push({ unit: u, priority: priorities[u] });\n }\n }\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n }\n\n function isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n }\n\n function absFloor(number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n }\n\n function toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n }\n\n function makeGetSet(unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n }\n\n function get(mom, unit) {\n return mom.isValid()\n ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()\n : NaN;\n }\n\n function set$1(mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (\n unit === 'FullYear' &&\n isLeapYear(mom.year()) &&\n mom.month() === 1 &&\n mom.date() === 29\n ) {\n value = toInt(value);\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](\n value,\n mom.month(),\n daysInMonth(value, mom.month())\n );\n } else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n }\n\n // MOMENTS\n\n function stringGet(units) {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units]();\n }\n return this;\n }\n\n function stringSet(units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units),\n i,\n prioritizedLen = prioritized.length;\n for (i = 0; i < prioritizedLen; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n return this;\n }\n\n var match1 = /\\d/, // 0 - 9\n match2 = /\\d\\d/, // 00 - 99\n match3 = /\\d{3}/, // 000 - 999\n match4 = /\\d{4}/, // 0000 - 9999\n match6 = /[+-]?\\d{6}/, // -999999 - 999999\n match1to2 = /\\d\\d?/, // 0 - 99\n match3to4 = /\\d\\d\\d\\d?/, // 999 - 9999\n match5to6 = /\\d\\d\\d\\d\\d\\d?/, // 99999 - 999999\n match1to3 = /\\d{1,3}/, // 0 - 999\n match1to4 = /\\d{1,4}/, // 0 - 9999\n match1to6 = /[+-]?\\d{1,6}/, // -999999 - 999999\n matchUnsigned = /\\d+/, // 0 - inf\n matchSigned = /[+-]?\\d+/, // -inf - inf\n matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi, // +00:00 -00:00 +0000 -0000 or Z\n matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/, // 123456789 123456789.123\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n matchWord =\n /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n regexes;\n\n regexes = {};\n\n function addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex)\n ? regex\n : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n }\n\n function getParseRegexForToken(token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n }\n\n // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\n function unescapeFormat(s) {\n return regexEscape(\n s\n .replace('\\\\', '')\n .replace(\n /\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,\n function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }\n )\n );\n }\n\n function regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n }\n\n var tokens = {};\n\n function addParseToken(token, callback) {\n var i,\n func = callback,\n tokenLen;\n if (typeof token === 'string') {\n token = [token];\n }\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n tokenLen = token.length;\n for (i = 0; i < tokenLen; i++) {\n tokens[token[i]] = func;\n }\n }\n\n function addWeekParseToken(token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n }\n\n function addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n }\n\n var YEAR = 0,\n MONTH = 1,\n DATE = 2,\n HOUR = 3,\n MINUTE = 4,\n SECOND = 5,\n MILLISECOND = 6,\n WEEK = 7,\n WEEKDAY = 8;\n\n function mod(n, x) {\n return ((n % x) + x) % x;\n }\n\n var indexOf;\n\n if (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n } else {\n indexOf = function (o) {\n // I know\n var i;\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n return -1;\n };\n }\n\n function daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1\n ? isLeapYear(year)\n ? 29\n : 28\n : 31 - ((modMonth % 7) % 2);\n }\n\n // FORMATTING\n\n addFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n });\n\n addFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n });\n\n addFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n });\n\n // ALIASES\n\n addUnitAlias('month', 'M');\n\n // PRIORITY\n\n addUnitPriority('month', 8);\n\n // PARSING\n\n addRegexToken('M', match1to2);\n addRegexToken('MM', match1to2, match2);\n addRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n });\n addRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n });\n\n addParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n });\n\n addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict);\n // if we didn't find a month name, mark the date as invalid.\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n });\n\n // LOCALES\n\n var defaultLocaleMonths =\n 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n defaultLocaleMonthsShort =\n 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n defaultMonthsShortRegex = matchWord,\n defaultMonthsRegex = matchWord;\n\n function localeMonths(m, format) {\n if (!m) {\n return isArray(this._months)\n ? this._months\n : this._months['standalone'];\n }\n return isArray(this._months)\n ? this._months[m.month()]\n : this._months[\n (this._months.isFormat || MONTHS_IN_FORMAT).test(format)\n ? 'format'\n : 'standalone'\n ][m.month()];\n }\n\n function localeMonthsShort(m, format) {\n if (!m) {\n return isArray(this._monthsShort)\n ? this._monthsShort\n : this._monthsShort['standalone'];\n }\n return isArray(this._monthsShort)\n ? this._monthsShort[m.month()]\n : this._monthsShort[\n MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'\n ][m.month()];\n }\n\n function handleStrictParse(monthName, format, strict) {\n var i,\n ii,\n mom,\n llc = monthName.toLocaleLowerCase();\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n }\n\n function localeMonthsParse(monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n }\n\n // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp(\n '^' + this.months(mom, '').replace('.', '') + '$',\n 'i'\n );\n this._shortMonthsParse[i] = new RegExp(\n '^' + this.monthsShort(mom, '').replace('.', '') + '$',\n 'i'\n );\n }\n if (!strict && !this._monthsParse[i]) {\n regex =\n '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'MMMM' &&\n this._longMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'MMM' &&\n this._shortMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n }\n\n // MOMENTS\n\n function setMonth(mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value);\n // TODO: Another silent failure?\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n return mom;\n }\n\n function getSetMonth(value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n }\n\n function getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n }\n\n function monthsShortRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n return this._monthsShortStrictRegex && isStrict\n ? this._monthsShortStrictRegex\n : this._monthsShortRegex;\n }\n }\n\n function monthsRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n return this._monthsStrictRegex && isStrict\n ? this._monthsStrictRegex\n : this._monthsRegex;\n }\n }\n\n function computeMonthsParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom;\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n }\n // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._monthsShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n }\n\n // FORMATTING\n\n addFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? zeroFill(y, 4) : '+' + y;\n });\n\n addFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n });\n\n addFormatToken(0, ['YYYY', 4], 0, 'year');\n addFormatToken(0, ['YYYYY', 5], 0, 'year');\n addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n // ALIASES\n\n addUnitAlias('year', 'y');\n\n // PRIORITIES\n\n addUnitPriority('year', 1);\n\n // PARSING\n\n addRegexToken('Y', matchSigned);\n addRegexToken('YY', match1to2, match2);\n addRegexToken('YYYY', match1to4, match4);\n addRegexToken('YYYYY', match1to6, match6);\n addRegexToken('YYYYYY', match1to6, match6);\n\n addParseToken(['YYYYY', 'YYYYYY'], YEAR);\n addParseToken('YYYY', function (input, array) {\n array[YEAR] =\n input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n });\n addParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n });\n addParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n });\n\n // HELPERS\n\n function daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n }\n\n // HOOKS\n\n hooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n };\n\n // MOMENTS\n\n var getSetYear = makeGetSet('FullYear', true);\n\n function getIsLeapYear() {\n return isLeapYear(this.year());\n }\n\n function createDate(y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date;\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n }\n\n function createUTCDate(y) {\n var date, args;\n // the Date.UTC function remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n args = Array.prototype.slice.call(arguments);\n // preserve leap years using a full 400 year cycle, then reset\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n }\n\n // start-of-first-week - start-of-year\n function firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n return -fwdlw + fwd - 1;\n }\n\n // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\n function dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear,\n resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear,\n };\n }\n\n function weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek,\n resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear,\n };\n }\n\n function weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n }\n\n // FORMATTING\n\n addFormatToken('w', ['ww', 2], 'wo', 'week');\n addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n // ALIASES\n\n addUnitAlias('week', 'w');\n addUnitAlias('isoWeek', 'W');\n\n // PRIORITIES\n\n addUnitPriority('week', 5);\n addUnitPriority('isoWeek', 5);\n\n // PARSING\n\n addRegexToken('w', match1to2);\n addRegexToken('ww', match1to2, match2);\n addRegexToken('W', match1to2);\n addRegexToken('WW', match1to2, match2);\n\n addWeekParseToken(\n ['w', 'ww', 'W', 'WW'],\n function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n }\n );\n\n // HELPERS\n\n // LOCALES\n\n function localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n }\n\n var defaultLocaleWeek = {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n };\n\n function localeFirstDayOfWeek() {\n return this._week.dow;\n }\n\n function localeFirstDayOfYear() {\n return this._week.doy;\n }\n\n // MOMENTS\n\n function getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n }\n\n function getSetISOWeek(input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n }\n\n // FORMATTING\n\n addFormatToken('d', 0, 'do', 'day');\n\n addFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n });\n\n addFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n });\n\n addFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n });\n\n addFormatToken('e', 0, 0, 'weekday');\n addFormatToken('E', 0, 0, 'isoWeekday');\n\n // ALIASES\n\n addUnitAlias('day', 'd');\n addUnitAlias('weekday', 'e');\n addUnitAlias('isoWeekday', 'E');\n\n // PRIORITY\n addUnitPriority('day', 11);\n addUnitPriority('weekday', 11);\n addUnitPriority('isoWeekday', 11);\n\n // PARSING\n\n addRegexToken('d', match1to2);\n addRegexToken('e', match1to2);\n addRegexToken('E', match1to2);\n addRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n });\n addRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n });\n addRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n });\n\n addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict);\n // if we didn't get a weekday name, mark the date as invalid\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n });\n\n addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n });\n\n // HELPERS\n\n function parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n }\n\n function parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n return isNaN(input) ? null : input;\n }\n\n // LOCALES\n function shiftWeekdays(ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n }\n\n var defaultLocaleWeekdays =\n 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n defaultWeekdaysRegex = matchWord,\n defaultWeekdaysShortRegex = matchWord,\n defaultWeekdaysMinRegex = matchWord;\n\n function localeWeekdays(m, format) {\n var weekdays = isArray(this._weekdays)\n ? this._weekdays\n : this._weekdays[\n m && m !== true && this._weekdays.isFormat.test(format)\n ? 'format'\n : 'standalone'\n ];\n return m === true\n ? shiftWeekdays(weekdays, this._week.dow)\n : m\n ? weekdays[m.day()]\n : weekdays;\n }\n\n function localeWeekdaysShort(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysShort, this._week.dow)\n : m\n ? this._weekdaysShort[m.day()]\n : this._weekdaysShort;\n }\n\n function localeWeekdaysMin(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysMin, this._week.dow)\n : m\n ? this._weekdaysMin[m.day()]\n : this._weekdaysMin;\n }\n\n function handleStrictParse$1(weekdayName, format, strict) {\n var i,\n ii,\n mom,\n llc = weekdayName.toLocaleLowerCase();\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(\n mom,\n ''\n ).toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n }\n\n function localeWeekdaysParse(weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n\n mom = createUTC([2000, 1]).day(i);\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp(\n '^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._shortWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._minWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n }\n if (!this._weekdaysParse[i]) {\n regex =\n '^' +\n this.weekdays(mom, '') +\n '|^' +\n this.weekdaysShort(mom, '') +\n '|^' +\n this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'dddd' &&\n this._fullWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'ddd' &&\n this._shortWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'dd' &&\n this._minWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n }\n\n // MOMENTS\n\n function getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n }\n\n function getSetLocaleDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n }\n\n function getSetISODayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n }\n\n function weekdaysRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n return this._weekdaysStrictRegex && isStrict\n ? this._weekdaysStrictRegex\n : this._weekdaysRegex;\n }\n }\n\n function weekdaysShortRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n return this._weekdaysShortStrictRegex && isStrict\n ? this._weekdaysShortStrictRegex\n : this._weekdaysShortRegex;\n }\n }\n\n function weekdaysMinRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n return this._weekdaysMinStrictRegex && isStrict\n ? this._weekdaysMinStrictRegex\n : this._weekdaysMinRegex;\n }\n }\n\n function computeWeekdaysParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [],\n shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n minp,\n shortp,\n longp;\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = regexEscape(this.weekdaysMin(mom, ''));\n shortp = regexEscape(this.weekdaysShort(mom, ''));\n longp = regexEscape(this.weekdays(mom, ''));\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n }\n // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n\n this._weekdaysStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysMinStrictRegex = new RegExp(\n '^(' + minPieces.join('|') + ')',\n 'i'\n );\n }\n\n // FORMATTING\n\n function hFormat() {\n return this.hours() % 12 || 12;\n }\n\n function kFormat() {\n return this.hours() || 24;\n }\n\n addFormatToken('H', ['HH', 2], 0, 'hour');\n addFormatToken('h', ['hh', 2], 0, hFormat);\n addFormatToken('k', ['kk', 2], 0, kFormat);\n\n addFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n });\n\n addFormatToken('hmmss', 0, 0, function () {\n return (\n '' +\n hFormat.apply(this) +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n });\n\n addFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n });\n\n addFormatToken('Hmmss', 0, 0, function () {\n return (\n '' +\n this.hours() +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n });\n\n function meridiem(token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(\n this.hours(),\n this.minutes(),\n lowercase\n );\n });\n }\n\n meridiem('a', true);\n meridiem('A', false);\n\n // ALIASES\n\n addUnitAlias('hour', 'h');\n\n // PRIORITY\n addUnitPriority('hour', 13);\n\n // PARSING\n\n function matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n }\n\n addRegexToken('a', matchMeridiem);\n addRegexToken('A', matchMeridiem);\n addRegexToken('H', match1to2);\n addRegexToken('h', match1to2);\n addRegexToken('k', match1to2);\n addRegexToken('HH', match1to2, match2);\n addRegexToken('hh', match1to2, match2);\n addRegexToken('kk', match1to2, match2);\n\n addRegexToken('hmm', match3to4);\n addRegexToken('hmmss', match5to6);\n addRegexToken('Hmm', match3to4);\n addRegexToken('Hmmss', match5to6);\n\n addParseToken(['H', 'HH'], HOUR);\n addParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n });\n addParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n });\n addParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n });\n addParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n });\n\n // LOCALES\n\n function localeIsPM(input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return (input + '').toLowerCase().charAt(0) === 'p';\n }\n\n var defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i,\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n getSetHour = makeGetSet('Hours', true);\n\n function localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n }\n\n var baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n\n week: defaultLocaleWeek,\n\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n\n meridiemParse: defaultLocaleMeridiemParse,\n };\n\n // internal storage for locale config files\n var locales = {},\n localeFamilies = {},\n globalLocale;\n\n function commonPrefix(arr1, arr2) {\n var i,\n minl = Math.min(arr1.length, arr2.length);\n for (i = 0; i < minl; i += 1) {\n if (arr1[i] !== arr2[i]) {\n return i;\n }\n }\n return minl;\n }\n\n function normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n }\n\n // pick the locale from the array\n // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\n function chooseLocale(names) {\n var i = 0,\n j,\n next,\n locale,\n split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (\n next &&\n next.length >= j &&\n commonPrefix(split, next) >= j - 1\n ) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return globalLocale;\n }\n\n function isLocaleNameSane(name) {\n // Prevent names that look like filesystem paths, i.e contain '/' or '\\'\n return name.match('^[^/\\\\\\\\]*$') != null;\n }\n\n function loadLocale(name) {\n var oldLocale = null,\n aliasedRequire;\n // TODO: Find a better way to register and load all the locales in Node\n if (\n locales[name] === undefined &&\n typeof module !== 'undefined' &&\n module &&\n module.exports &&\n isLocaleNameSane(name)\n ) {\n try {\n oldLocale = globalLocale._abbr;\n aliasedRequire = require;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {\n // mark as not found to avoid repeating expensive file require call causing high CPU\n // when trying to find en-US, en_US, en-us for every format call\n locales[name] = null; // null means not found\n }\n }\n return locales[name];\n }\n\n // This function will load locale and then set the global locale. If\n // no arguments are passed in, it will simply return the current global\n // locale key.\n function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn(\n 'Locale ' + key + ' not found. Did you forget to load it?'\n );\n }\n }\n }\n\n return globalLocale._abbr;\n }\n\n function defineLocale(name, config) {\n if (config !== null) {\n var locale,\n parentConfig = baseConfig;\n config.abbr = name;\n if (locales[name] != null) {\n deprecateSimple(\n 'defineLocaleOverride',\n 'use moment.updateLocale(localeName, config) to change ' +\n 'an existing locale. moment.defineLocale(localeName, ' +\n 'config) should only be used for creating a new locale ' +\n 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'\n );\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config,\n });\n return null;\n }\n }\n }\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n }\n\n // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n getSetGlobalLocale(name);\n\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n }\n\n function updateLocale(name, config) {\n if (config != null) {\n var locale,\n tmpLocale,\n parentConfig = baseConfig;\n\n if (locales[name] != null && locales[name].parentLocale != null) {\n // Update existing child locale in-place to avoid memory-leaks\n locales[name].set(mergeConfigs(locales[name]._config, config));\n } else {\n // MERGE\n tmpLocale = loadLocale(name);\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n config = mergeConfigs(parentConfig, config);\n if (tmpLocale == null) {\n // updateLocale is called for creating a new locale\n // Set abbr so it will have a name (getters return\n // undefined otherwise).\n config.abbr = name;\n }\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale;\n }\n\n // backwards compat for now: also set the locale\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n if (name === getSetGlobalLocale()) {\n getSetGlobalLocale(name);\n }\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n return locales[name];\n }\n\n // returns locale data\n function getLocale(key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n if (locale) {\n return locale;\n }\n key = [key];\n }\n\n return chooseLocale(key);\n }\n\n function listLocales() {\n return keys(locales);\n }\n\n function checkOverflow(m) {\n var overflow,\n a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow =\n a[MONTH] < 0 || a[MONTH] > 11\n ? MONTH\n : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])\n ? DATE\n : a[HOUR] < 0 ||\n a[HOUR] > 24 ||\n (a[HOUR] === 24 &&\n (a[MINUTE] !== 0 ||\n a[SECOND] !== 0 ||\n a[MILLISECOND] !== 0))\n ? HOUR\n : a[MINUTE] < 0 || a[MINUTE] > 59\n ? MINUTE\n : a[SECOND] < 0 || a[SECOND] > 59\n ? SECOND\n : a[MILLISECOND] < 0 || a[MILLISECOND] > 999\n ? MILLISECOND\n : -1;\n\n if (\n getParsingFlags(m)._overflowDayOfYear &&\n (overflow < YEAR || overflow > DATE)\n ) {\n overflow = DATE;\n }\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n }\n\n // iso 8601 regex\n // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\n var extendedIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n basicIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n isoDates = [\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n ['YYYY-DDD', /\\d{4}-\\d{3}/],\n ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n ['YYYYYYMMDD', /[+-]\\d{10}/],\n ['YYYYMMDD', /\\d{8}/],\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n ['YYYYDDD', /\\d{7}/],\n ['YYYYMM', /\\d{6}/, false],\n ['YYYY', /\\d{4}/, false],\n ],\n // iso time formats and regexes\n isoTimes = [\n ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n ['HH:mm', /\\d\\d:\\d\\d/],\n ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n ['HHmm', /\\d\\d\\d\\d/],\n ['HH', /\\d\\d/],\n ],\n aspNetJsonRegex = /^\\/?Date\\((-?\\d+)/i,\n // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n rfc2822 =\n /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60,\n };\n\n // date from iso format\n function configFromISO(config) {\n var i,\n l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime,\n dateFormat,\n timeFormat,\n tzFormat,\n isoDatesLen = isoDates.length,\n isoTimesLen = isoTimes.length;\n\n if (match) {\n getParsingFlags(config).iso = true;\n for (i = 0, l = isoDatesLen; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n if (match[3]) {\n for (i = 0, l = isoTimesLen; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }\n\n function extractFromRFC2822Strings(\n yearStr,\n monthStr,\n dayStr,\n hourStr,\n minuteStr,\n secondStr\n ) {\n var result = [\n untruncateYear(yearStr),\n defaultLocaleMonthsShort.indexOf(monthStr),\n parseInt(dayStr, 10),\n parseInt(hourStr, 10),\n parseInt(minuteStr, 10),\n ];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n }\n\n function untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n return year;\n }\n\n function preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s\n .replace(/\\([^()]*\\)|[\\n\\t]/g, ' ')\n .replace(/(\\s\\s+)/g, ' ')\n .replace(/^\\s\\s*/, '')\n .replace(/\\s\\s*$/, '');\n }\n\n function checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an independent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(\n parsedInput[0],\n parsedInput[1],\n parsedInput[2]\n ).getDay();\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n return true;\n }\n\n function calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10),\n m = hm % 100,\n h = (hm - m) / 100;\n return h * 60 + m;\n }\n }\n\n // date and time from ref 2822 format\n function configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i)),\n parsedArray;\n if (match) {\n parsedArray = extractFromRFC2822Strings(\n match[4],\n match[3],\n match[2],\n match[5],\n match[6],\n match[7]\n );\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n config._d = createUTCDate.apply(null, config._a);\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n }\n\n // date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict\n function configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n if (config._strict) {\n config._isValid = false;\n } else {\n // Final attempt, use Input Fallback\n hooks.createFromInputFallback(config);\n }\n }\n\n hooks.createFromInputFallback = deprecate(\n 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }\n );\n\n // Pick the first defined of two or three arguments.\n function defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n }\n\n function currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n if (config._useUTC) {\n return [\n nowValue.getUTCFullYear(),\n nowValue.getUTCMonth(),\n nowValue.getUTCDate(),\n ];\n }\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n }\n\n // convert an array to a date.\n // the array should mirror the parameters below\n // note: all values past the year are optional and will default to the lowest possible value.\n // [year, month, day , hour, minute, second, millisecond]\n function configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n expectedWeekday,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (\n config._dayOfYear > daysInYear(yearToUse) ||\n config._dayOfYear === 0\n ) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] =\n config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (\n config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0\n ) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(\n null,\n input\n );\n expectedWeekday = config._useUTC\n ? config._d.getUTCDay()\n : config._d.getDay();\n\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (\n config._w &&\n typeof config._w.d !== 'undefined' &&\n config._w.d !== expectedWeekday\n ) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n }\n\n function dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;\n\n w = config._w;\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4;\n\n // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n weekYear = defaults(\n w.GG,\n config._a[YEAR],\n weekOfYear(createLocal(), 1, 4).year\n );\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n\n curWeek = weekOfYear(createLocal(), dow, doy);\n\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n // Default to current week.\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n }\n\n // constant that refers to the ISO standard\n hooks.ISO_8601 = function () {};\n\n // constant that refers to the RFC 2822 form\n hooks.RFC_2822 = function () {};\n\n // date from string and format string\n function configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n config._a = [];\n getParsingFlags(config).empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i,\n parsedInput,\n tokens,\n token,\n skipped,\n stringLength = string.length,\n totalParsedInputLength = 0,\n era,\n tokenLen;\n\n tokens =\n expandFormat(config._f, config._locale).match(formattingTokens) || [];\n tokenLen = tokens.length;\n for (i = 0; i < tokenLen; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) ||\n [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n string = string.slice(\n string.indexOf(parsedInput) + parsedInput.length\n );\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n } else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n getParsingFlags(config).charsLeftOver =\n stringLength - totalParsedInputLength;\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (\n config._a[HOUR] <= 12 &&\n getParsingFlags(config).bigHour === true &&\n config._a[HOUR] > 0\n ) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem;\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(\n config._locale,\n config._a[HOUR],\n config._meridiem\n );\n\n // handle era\n era = getParsingFlags(config).era;\n if (era !== null) {\n config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);\n }\n\n configFromArray(config);\n checkOverflow(config);\n }\n\n function meridiemFixWrap(locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n if (isPm && hour < 12) {\n hour += 12;\n }\n if (!isPm && hour === 12) {\n hour = 0;\n }\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n }\n\n // date from string and array of format strings\n function configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n scoreToBeat,\n i,\n currentScore,\n validFormatFound,\n bestFormatIsValid = false,\n configfLen = config._f.length;\n\n if (configfLen === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < configfLen; i++) {\n currentScore = 0;\n validFormatFound = false;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (isValid(tempConfig)) {\n validFormatFound = true;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n //or tokens\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n getParsingFlags(tempConfig).score = currentScore;\n\n if (!bestFormatIsValid) {\n if (\n scoreToBeat == null ||\n currentScore < scoreToBeat ||\n validFormatFound\n ) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n if (validFormatFound) {\n bestFormatIsValid = true;\n }\n }\n } else {\n if (currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }\n\n function configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i),\n dayOrDate = i.day === undefined ? i.date : i.day;\n config._a = map(\n [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],\n function (obj) {\n return obj && parseInt(obj, 10);\n }\n );\n\n configFromArray(config);\n }\n\n function createFromConfig(config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n }\n\n function prepareConfig(config) {\n var input = config._i,\n format = config._f;\n\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || (format === undefined && input === '')) {\n return createInvalid({ nullInput: true });\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n }\n\n function configFromInput(config) {\n var input = config._i;\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n }\n\n function createLocalOrUTC(input, format, locale, strict, isUTC) {\n var c = {};\n\n if (format === true || format === false) {\n strict = format;\n format = undefined;\n }\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if (\n (isObject(input) && isObjectEmpty(input)) ||\n (isArray(input) && input.length === 0)\n ) {\n input = undefined;\n }\n // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n\n return createFromConfig(c);\n }\n\n function createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n }\n\n var prototypeMin = deprecate(\n 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n }\n ),\n prototypeMax = deprecate(\n 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }\n );\n\n // Pick a moment m from moments so that m[fn](other) is true for all\n // other. This relies on the function fn to be transitive.\n //\n // moments should either be an array of moment objects or an array, whose\n // first element is an array of moment objects.\n function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }\n\n // TODO: Use [].sort instead?\n function min() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n }\n\n function max() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n }\n\n var now = function () {\n return Date.now ? Date.now() : +new Date();\n };\n\n var ordering = [\n 'year',\n 'quarter',\n 'month',\n 'week',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'millisecond',\n ];\n\n function isDurationValid(m) {\n var key,\n unitHasDecimal = false,\n i,\n orderLen = ordering.length;\n for (key in m) {\n if (\n hasOwnProp(m, key) &&\n !(\n indexOf.call(ordering, key) !== -1 &&\n (m[key] == null || !isNaN(m[key]))\n )\n ) {\n return false;\n }\n }\n\n for (i = 0; i < orderLen; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n }\n\n function isValid$1() {\n return this._isValid;\n }\n\n function createInvalid$1() {\n return createDuration(NaN);\n }\n\n function Duration(duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n\n this._isValid = isDurationValid(normalizedInput);\n\n // representation for dateAddRemove\n this._milliseconds =\n +milliseconds +\n seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n this._days = +days + weeks * 7;\n // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n this._months = +months + quarters * 3 + years * 12;\n\n this._data = {};\n\n this._locale = getLocale();\n\n this._bubble();\n }\n\n function isDuration(obj) {\n return obj instanceof Duration;\n }\n\n function absRound(number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n }\n\n // compare two arrays, return the number of differences\n function compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (\n (dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))\n ) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }\n\n // FORMATTING\n\n function offset(token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset(),\n sign = '+';\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n return (\n sign +\n zeroFill(~~(offset / 60), 2) +\n separator +\n zeroFill(~~offset % 60, 2)\n );\n });\n }\n\n offset('Z', ':');\n offset('ZZ', '');\n\n // PARSING\n\n addRegexToken('Z', matchShortOffset);\n addRegexToken('ZZ', matchShortOffset);\n addParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n });\n\n // HELPERS\n\n // timezone chunker\n // '+10:00' > ['10', '00']\n // '-1530' > ['-15', '30']\n var chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\n function offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher),\n chunk,\n parts,\n minutes;\n\n if (matches === null) {\n return null;\n }\n\n chunk = matches[matches.length - 1] || [];\n parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n }\n\n // Return a moment from input, that is local/utc/zone equivalent to model.\n function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff =\n (isMoment(input) || isDate(input)\n ? input.valueOf()\n : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }\n\n function getDateOffset(m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset());\n }\n\n // HOOKS\n\n // This function will be called whenever a moment is mutated.\n // It is intended to keep the offset in sync with the timezone.\n hooks.updateOffset = function () {};\n\n // MOMENTS\n\n // keepLocalTime = true means only change the timezone, without\n // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n // +0200, so we adjust the time as needed, to be valid.\n //\n // Keeping the time actually adds/subtracts (one hour)\n // from the actual represented time. That is why we call updateOffset\n // a second time. In case it wants us to change the offset again\n // _changeInProgress == true case, then we have to adjust, because\n // there is no such time in the given timezone.\n function getSetOffset(input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(\n this,\n createDuration(input - offset, 'm'),\n 1,\n false\n );\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }\n\n function getSetZone(input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n\n return this;\n } else {\n return -this.utcOffset();\n }\n }\n\n function setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n }\n\n function setOffsetToLocal(keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n return this;\n }\n\n function setOffsetToParsedOffset() {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n if (tZone != null) {\n this.utcOffset(tZone);\n } else {\n this.utcOffset(0, true);\n }\n }\n return this;\n }\n\n function hasAlignedHourOffset(input) {\n if (!this.isValid()) {\n return false;\n }\n input = input ? createLocal(input).utcOffset() : 0;\n\n return (this.utcOffset() - input) % 60 === 0;\n }\n\n function isDaylightSavingTime() {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n }\n\n function isDaylightSavingTimeShifted() {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {},\n other;\n\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted =\n this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n }\n\n function isLocal() {\n return this.isValid() ? !this._isUTC : false;\n }\n\n function isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n }\n\n function isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n }\n\n // ASP.NET json date format regex\n var aspNetRegex = /^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,\n // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n isoRegex =\n /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\n function createDuration(input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms: input._milliseconds,\n d: input._days,\n M: input._months,\n };\n } else if (isNumber(input) || !isNaN(+input)) {\n duration = {};\n if (key) {\n duration[key] = +input;\n } else {\n duration.milliseconds = +input;\n }\n } else if ((match = aspNetRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: 0,\n d: toInt(match[DATE]) * sign,\n h: toInt(match[HOUR]) * sign,\n m: toInt(match[MINUTE]) * sign,\n s: toInt(match[SECOND]) * sign,\n ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match\n };\n } else if ((match = isoRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: parseIso(match[2], sign),\n M: parseIso(match[3], sign),\n w: parseIso(match[4], sign),\n d: parseIso(match[5], sign),\n h: parseIso(match[6], sign),\n m: parseIso(match[7], sign),\n s: parseIso(match[8], sign),\n };\n } else if (duration == null) {\n // checks for null or undefined\n duration = {};\n } else if (\n typeof duration === 'object' &&\n ('from' in duration || 'to' in duration)\n ) {\n diffRes = momentsDifference(\n createLocal(duration.from),\n createLocal(duration.to)\n );\n\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n if (isDuration(input) && hasOwnProp(input, '_isValid')) {\n ret._isValid = input._isValid;\n }\n\n return ret;\n }\n\n createDuration.fn = Duration.prototype;\n createDuration.invalid = createInvalid$1;\n\n function parseIso(inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.'));\n // apply sign while we're at it\n return (isNaN(res) ? 0 : res) * sign;\n }\n\n function positiveMomentsDifference(base, other) {\n var res = {};\n\n res.months =\n other.month() - base.month() + (other.year() - base.year()) * 12;\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +base.clone().add(res.months, 'M');\n\n return res;\n }\n\n function momentsDifference(base, other) {\n var res;\n if (!(base.isValid() && other.isValid())) {\n return { milliseconds: 0, months: 0 };\n }\n\n other = cloneWithOffset(other, base);\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n }\n\n // TODO: remove 'name' arg after deprecation is removed\n function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }\n\n function addSubtract(mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n }\n\n var add = createAdder(1, 'add'),\n subtract = createAdder(-1, 'subtract');\n\n function isString(input) {\n return typeof input === 'string' || input instanceof String;\n }\n\n // type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined\n function isMomentInput(input) {\n return (\n isMoment(input) ||\n isDate(input) ||\n isString(input) ||\n isNumber(input) ||\n isNumberOrStringArray(input) ||\n isMomentInputObject(input) ||\n input === null ||\n input === undefined\n );\n }\n\n function isMomentInputObject(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'years',\n 'year',\n 'y',\n 'months',\n 'month',\n 'M',\n 'days',\n 'day',\n 'd',\n 'dates',\n 'date',\n 'D',\n 'hours',\n 'hour',\n 'h',\n 'minutes',\n 'minute',\n 'm',\n 'seconds',\n 'second',\n 's',\n 'milliseconds',\n 'millisecond',\n 'ms',\n ],\n i,\n property,\n propertyLen = properties.length;\n\n for (i = 0; i < propertyLen; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n }\n\n function isNumberOrStringArray(input) {\n var arrayTest = isArray(input),\n dataTypeTest = false;\n if (arrayTest) {\n dataTypeTest =\n input.filter(function (item) {\n return !isNumber(item) && isString(input);\n }).length === 0;\n }\n return arrayTest && dataTypeTest;\n }\n\n function isCalendarSpec(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'sameDay',\n 'nextDay',\n 'lastDay',\n 'nextWeek',\n 'lastWeek',\n 'sameElse',\n ],\n i,\n property;\n\n for (i = 0; i < properties.length; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n }\n\n function getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6\n ? 'sameElse'\n : diff < -1\n ? 'lastWeek'\n : diff < 0\n ? 'lastDay'\n : diff < 1\n ? 'sameDay'\n : diff < 2\n ? 'nextDay'\n : diff < 7\n ? 'nextWeek'\n : 'sameElse';\n }\n\n function calendar$1(time, formats) {\n // Support for single parameter, formats only overload to the calendar function\n if (arguments.length === 1) {\n if (!arguments[0]) {\n time = undefined;\n formats = undefined;\n } else if (isMomentInput(arguments[0])) {\n time = arguments[0];\n formats = undefined;\n } else if (isCalendarSpec(arguments[0])) {\n formats = arguments[0];\n time = undefined;\n }\n }\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse',\n output =\n formats &&\n (isFunction(formats[format])\n ? formats[format].call(this, now)\n : formats[format]);\n\n return this.format(\n output || this.localeData().calendar(format, this, createLocal(now))\n );\n }\n\n function clone() {\n return new Moment(this);\n }\n\n function isAfter(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n }\n\n function isBefore(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n }\n\n function isBetween(from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n inclusivity = inclusivity || '()';\n return (\n (inclusivity[0] === '('\n ? this.isAfter(localFrom, units)\n : !this.isBefore(localFrom, units)) &&\n (inclusivity[1] === ')'\n ? this.isBefore(localTo, units)\n : !this.isAfter(localTo, units))\n );\n }\n\n function isSame(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return (\n this.clone().startOf(units).valueOf() <= inputMs &&\n inputMs <= this.clone().endOf(units).valueOf()\n );\n }\n }\n\n function isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n }\n\n function isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n }\n\n function diff(input, units, asFloat) {\n var that, zoneDelta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year':\n output = monthDiff(this, that) / 12;\n break;\n case 'month':\n output = monthDiff(this, that);\n break;\n case 'quarter':\n output = monthDiff(this, that) / 3;\n break;\n case 'second':\n output = (this - that) / 1e3;\n break; // 1000\n case 'minute':\n output = (this - that) / 6e4;\n break; // 1000 * 60\n case 'hour':\n output = (this - that) / 36e5;\n break; // 1000 * 60 * 60\n case 'day':\n output = (this - that - zoneDelta) / 864e5;\n break; // 1000 * 60 * 60 * 24, negate dst\n case 'week':\n output = (this - that - zoneDelta) / 6048e5;\n break; // 1000 * 60 * 60 * 24 * 7, negate dst\n default:\n output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n }\n\n function monthDiff(a, b) {\n if (a.date() < b.date()) {\n // end-of-month calculations work correct when the start month has more\n // days than the end month.\n return -monthDiff(b, a);\n }\n // difference in months\n var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2,\n adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor2 - anchor);\n }\n\n //check for negative zero, return zero if negative zero\n return -(wholeMonthDiff + adjust) || 0;\n }\n\n hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\n hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\n function toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n }\n\n function toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n var utc = keepOffset !== true,\n m = utc ? this.clone().utc() : this;\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(\n m,\n utc\n ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'\n : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n }\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)\n .toISOString()\n .replace('Z', formatMoment(m, 'Z'));\n }\n }\n return formatMoment(\n m,\n utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n }\n\n /**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\n function inspect() {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment',\n zone = '',\n prefix,\n year,\n datetime,\n suffix;\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n prefix = '[' + func + '(\"]';\n year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n datetime = '-MM-DD[T]HH:mm:ss.SSS';\n suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n }\n\n function format(inputString) {\n if (!inputString) {\n inputString = this.isUtc()\n ? hooks.defaultFormatUtc\n : hooks.defaultFormat;\n }\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n }\n\n function from(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ to: this, from: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n }\n\n function fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n }\n\n function to(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ from: this, to: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n }\n\n function toNow(withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n }\n\n // If passed a locale key, it will set the locale for this\n // instance. Otherwise, it will return the locale configuration\n // variables for this instance.\n function locale(key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n }\n\n var lang = deprecate(\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n }\n );\n\n function localeData() {\n return this._locale;\n }\n\n var MS_PER_SECOND = 1000,\n MS_PER_MINUTE = 60 * MS_PER_SECOND,\n MS_PER_HOUR = 60 * MS_PER_MINUTE,\n MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;\n\n // actual modulo - handles negative numbers (for dates before 1970):\n function mod$1(dividend, divisor) {\n return ((dividend % divisor) + divisor) % divisor;\n }\n\n function localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n }\n\n function utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n }\n\n function startOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n case 'quarter':\n time = startOfDate(\n this.year(),\n this.month() - (this.month() % 3),\n 1\n );\n break;\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n case 'week':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday()\n );\n break;\n case 'isoWeek':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1)\n );\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n );\n break;\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n }\n\n function endOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n case 'quarter':\n time =\n startOfDate(\n this.year(),\n this.month() - (this.month() % 3) + 3,\n 1\n ) - 1;\n break;\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n case 'week':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday() + 7\n ) - 1;\n break;\n case 'isoWeek':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1) + 7\n ) - 1;\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n case 'hour':\n time = this._d.valueOf();\n time +=\n MS_PER_HOUR -\n mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n ) -\n 1;\n break;\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n }\n\n function valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n }\n\n function unix() {\n return Math.floor(this.valueOf() / 1000);\n }\n\n function toDate() {\n return new Date(this.valueOf());\n }\n\n function toArray() {\n var m = this;\n return [\n m.year(),\n m.month(),\n m.date(),\n m.hour(),\n m.minute(),\n m.second(),\n m.millisecond(),\n ];\n }\n\n function toObject() {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds(),\n };\n }\n\n function toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n }\n\n function isValid$2() {\n return isValid(this);\n }\n\n function parsingFlags() {\n return extend({}, getParsingFlags(this));\n }\n\n function invalidAt() {\n return getParsingFlags(this).overflow;\n }\n\n function creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict,\n };\n }\n\n addFormatToken('N', 0, 0, 'eraAbbr');\n addFormatToken('NN', 0, 0, 'eraAbbr');\n addFormatToken('NNN', 0, 0, 'eraAbbr');\n addFormatToken('NNNN', 0, 0, 'eraName');\n addFormatToken('NNNNN', 0, 0, 'eraNarrow');\n\n addFormatToken('y', ['y', 1], 'yo', 'eraYear');\n addFormatToken('y', ['yy', 2], 0, 'eraYear');\n addFormatToken('y', ['yyy', 3], 0, 'eraYear');\n addFormatToken('y', ['yyyy', 4], 0, 'eraYear');\n\n addRegexToken('N', matchEraAbbr);\n addRegexToken('NN', matchEraAbbr);\n addRegexToken('NNN', matchEraAbbr);\n addRegexToken('NNNN', matchEraName);\n addRegexToken('NNNNN', matchEraNarrow);\n\n addParseToken(\n ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],\n function (input, array, config, token) {\n var era = config._locale.erasParse(input, token, config._strict);\n if (era) {\n getParsingFlags(config).era = era;\n } else {\n getParsingFlags(config).invalidEra = input;\n }\n }\n );\n\n addRegexToken('y', matchUnsigned);\n addRegexToken('yy', matchUnsigned);\n addRegexToken('yyy', matchUnsigned);\n addRegexToken('yyyy', matchUnsigned);\n addRegexToken('yo', matchEraYearOrdinal);\n\n addParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);\n addParseToken(['yo'], function (input, array, config, token) {\n var match;\n if (config._locale._eraYearOrdinalRegex) {\n match = input.match(config._locale._eraYearOrdinalRegex);\n }\n\n if (config._locale.eraYearOrdinalParse) {\n array[YEAR] = config._locale.eraYearOrdinalParse(input, match);\n } else {\n array[YEAR] = parseInt(input, 10);\n }\n });\n\n function localeEras(m, format) {\n var i,\n l,\n date,\n eras = this._eras || getLocale('en')._eras;\n for (i = 0, l = eras.length; i < l; ++i) {\n switch (typeof eras[i].since) {\n case 'string':\n // truncate time\n date = hooks(eras[i].since).startOf('day');\n eras[i].since = date.valueOf();\n break;\n }\n\n switch (typeof eras[i].until) {\n case 'undefined':\n eras[i].until = +Infinity;\n break;\n case 'string':\n // truncate time\n date = hooks(eras[i].until).startOf('day').valueOf();\n eras[i].until = date.valueOf();\n break;\n }\n }\n return eras;\n }\n\n function localeErasParse(eraName, format, strict) {\n var i,\n l,\n eras = this.eras(),\n name,\n abbr,\n narrow;\n eraName = eraName.toUpperCase();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n name = eras[i].name.toUpperCase();\n abbr = eras[i].abbr.toUpperCase();\n narrow = eras[i].narrow.toUpperCase();\n\n if (strict) {\n switch (format) {\n case 'N':\n case 'NN':\n case 'NNN':\n if (abbr === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNN':\n if (name === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNNN':\n if (narrow === eraName) {\n return eras[i];\n }\n break;\n }\n } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {\n return eras[i];\n }\n }\n }\n\n function localeErasConvertYear(era, year) {\n var dir = era.since <= era.until ? +1 : -1;\n if (year === undefined) {\n return hooks(era.since).year();\n } else {\n return hooks(era.since).year() + (year - era.offset) * dir;\n }\n }\n\n function getEraName() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].name;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].name;\n }\n }\n\n return '';\n }\n\n function getEraNarrow() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].narrow;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].narrow;\n }\n }\n\n return '';\n }\n\n function getEraAbbr() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].abbr;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].abbr;\n }\n }\n\n return '';\n }\n\n function getEraYear() {\n var i,\n l,\n dir,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n dir = eras[i].since <= eras[i].until ? +1 : -1;\n\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (\n (eras[i].since <= val && val <= eras[i].until) ||\n (eras[i].until <= val && val <= eras[i].since)\n ) {\n return (\n (this.year() - hooks(eras[i].since).year()) * dir +\n eras[i].offset\n );\n }\n }\n\n return this.year();\n }\n\n function erasNameRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNameRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNameRegex : this._erasRegex;\n }\n\n function erasAbbrRegex(isStrict) {\n if (!hasOwnProp(this, '_erasAbbrRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasAbbrRegex : this._erasRegex;\n }\n\n function erasNarrowRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNarrowRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNarrowRegex : this._erasRegex;\n }\n\n function matchEraAbbr(isStrict, locale) {\n return locale.erasAbbrRegex(isStrict);\n }\n\n function matchEraName(isStrict, locale) {\n return locale.erasNameRegex(isStrict);\n }\n\n function matchEraNarrow(isStrict, locale) {\n return locale.erasNarrowRegex(isStrict);\n }\n\n function matchEraYearOrdinal(isStrict, locale) {\n return locale._eraYearOrdinalRegex || matchUnsigned;\n }\n\n function computeErasParse() {\n var abbrPieces = [],\n namePieces = [],\n narrowPieces = [],\n mixedPieces = [],\n i,\n l,\n eras = this.eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n namePieces.push(regexEscape(eras[i].name));\n abbrPieces.push(regexEscape(eras[i].abbr));\n narrowPieces.push(regexEscape(eras[i].narrow));\n\n mixedPieces.push(regexEscape(eras[i].name));\n mixedPieces.push(regexEscape(eras[i].abbr));\n mixedPieces.push(regexEscape(eras[i].narrow));\n }\n\n this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');\n this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');\n this._erasNarrowRegex = new RegExp(\n '^(' + narrowPieces.join('|') + ')',\n 'i'\n );\n }\n\n // FORMATTING\n\n addFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n });\n\n addFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n });\n\n function addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n }\n\n addWeekYearFormatToken('gggg', 'weekYear');\n addWeekYearFormatToken('ggggg', 'weekYear');\n addWeekYearFormatToken('GGGG', 'isoWeekYear');\n addWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n // ALIASES\n\n addUnitAlias('weekYear', 'gg');\n addUnitAlias('isoWeekYear', 'GG');\n\n // PRIORITY\n\n addUnitPriority('weekYear', 1);\n addUnitPriority('isoWeekYear', 1);\n\n // PARSING\n\n addRegexToken('G', matchSigned);\n addRegexToken('g', matchSigned);\n addRegexToken('GG', match1to2, match2);\n addRegexToken('gg', match1to2, match2);\n addRegexToken('GGGG', match1to4, match4);\n addRegexToken('gggg', match1to4, match4);\n addRegexToken('GGGGG', match1to6, match6);\n addRegexToken('ggggg', match1to6, match6);\n\n addWeekParseToken(\n ['gggg', 'ggggg', 'GGGG', 'GGGGG'],\n function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n }\n );\n\n addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n });\n\n // MOMENTS\n\n function getSetWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.week(),\n this.weekday(),\n this.localeData()._week.dow,\n this.localeData()._week.doy\n );\n }\n\n function getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.isoWeek(),\n this.isoWeekday(),\n 1,\n 4\n );\n }\n\n function getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n }\n\n function getISOWeeksInISOWeekYear() {\n return weeksInYear(this.isoWeekYear(), 1, 4);\n }\n\n function getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n }\n\n function getWeeksInWeekYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);\n }\n\n function getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n }\n\n function setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n }\n\n // FORMATTING\n\n addFormatToken('Q', 0, 'Qo', 'quarter');\n\n // ALIASES\n\n addUnitAlias('quarter', 'Q');\n\n // PRIORITY\n\n addUnitPriority('quarter', 7);\n\n // PARSING\n\n addRegexToken('Q', match1);\n addParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n });\n\n // MOMENTS\n\n function getSetQuarter(input) {\n return input == null\n ? Math.ceil((this.month() + 1) / 3)\n : this.month((input - 1) * 3 + (this.month() % 3));\n }\n\n // FORMATTING\n\n addFormatToken('D', ['DD', 2], 'Do', 'date');\n\n // ALIASES\n\n addUnitAlias('date', 'D');\n\n // PRIORITY\n addUnitPriority('date', 9);\n\n // PARSING\n\n addRegexToken('D', match1to2);\n addRegexToken('DD', match1to2, match2);\n addRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict\n ? locale._dayOfMonthOrdinalParse || locale._ordinalParse\n : locale._dayOfMonthOrdinalParseLenient;\n });\n\n addParseToken(['D', 'DD'], DATE);\n addParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n });\n\n // MOMENTS\n\n var getSetDayOfMonth = makeGetSet('Date', true);\n\n // FORMATTING\n\n addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n // ALIASES\n\n addUnitAlias('dayOfYear', 'DDD');\n\n // PRIORITY\n addUnitPriority('dayOfYear', 4);\n\n // PARSING\n\n addRegexToken('DDD', match1to3);\n addRegexToken('DDDD', match3);\n addParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n });\n\n // HELPERS\n\n // MOMENTS\n\n function getSetDayOfYear(input) {\n var dayOfYear =\n Math.round(\n (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5\n ) + 1;\n return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n }\n\n // FORMATTING\n\n addFormatToken('m', ['mm', 2], 0, 'minute');\n\n // ALIASES\n\n addUnitAlias('minute', 'm');\n\n // PRIORITY\n\n addUnitPriority('minute', 14);\n\n // PARSING\n\n addRegexToken('m', match1to2);\n addRegexToken('mm', match1to2, match2);\n addParseToken(['m', 'mm'], MINUTE);\n\n // MOMENTS\n\n var getSetMinute = makeGetSet('Minutes', false);\n\n // FORMATTING\n\n addFormatToken('s', ['ss', 2], 0, 'second');\n\n // ALIASES\n\n addUnitAlias('second', 's');\n\n // PRIORITY\n\n addUnitPriority('second', 15);\n\n // PARSING\n\n addRegexToken('s', match1to2);\n addRegexToken('ss', match1to2, match2);\n addParseToken(['s', 'ss'], SECOND);\n\n // MOMENTS\n\n var getSetSecond = makeGetSet('Seconds', false);\n\n // FORMATTING\n\n addFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n });\n\n addFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n });\n\n addFormatToken(0, ['SSS', 3], 0, 'millisecond');\n addFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n });\n addFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n });\n addFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n });\n addFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n });\n addFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n });\n addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n });\n\n // ALIASES\n\n addUnitAlias('millisecond', 'ms');\n\n // PRIORITY\n\n addUnitPriority('millisecond', 16);\n\n // PARSING\n\n addRegexToken('S', match1to3, match1);\n addRegexToken('SS', match1to3, match2);\n addRegexToken('SSS', match1to3, match3);\n\n var token, getSetMillisecond;\n for (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n }\n\n function parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n }\n\n for (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n }\n\n getSetMillisecond = makeGetSet('Milliseconds', false);\n\n // FORMATTING\n\n addFormatToken('z', 0, 0, 'zoneAbbr');\n addFormatToken('zz', 0, 0, 'zoneName');\n\n // MOMENTS\n\n function getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n }\n\n function getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n }\n\n var proto = Moment.prototype;\n\n proto.add = add;\n proto.calendar = calendar$1;\n proto.clone = clone;\n proto.diff = diff;\n proto.endOf = endOf;\n proto.format = format;\n proto.from = from;\n proto.fromNow = fromNow;\n proto.to = to;\n proto.toNow = toNow;\n proto.get = stringGet;\n proto.invalidAt = invalidAt;\n proto.isAfter = isAfter;\n proto.isBefore = isBefore;\n proto.isBetween = isBetween;\n proto.isSame = isSame;\n proto.isSameOrAfter = isSameOrAfter;\n proto.isSameOrBefore = isSameOrBefore;\n proto.isValid = isValid$2;\n proto.lang = lang;\n proto.locale = locale;\n proto.localeData = localeData;\n proto.max = prototypeMax;\n proto.min = prototypeMin;\n proto.parsingFlags = parsingFlags;\n proto.set = stringSet;\n proto.startOf = startOf;\n proto.subtract = subtract;\n proto.toArray = toArray;\n proto.toObject = toObject;\n proto.toDate = toDate;\n proto.toISOString = toISOString;\n proto.inspect = inspect;\n if (typeof Symbol !== 'undefined' && Symbol.for != null) {\n proto[Symbol.for('nodejs.util.inspect.custom')] = function () {\n return 'Moment<' + this.format() + '>';\n };\n }\n proto.toJSON = toJSON;\n proto.toString = toString;\n proto.unix = unix;\n proto.valueOf = valueOf;\n proto.creationData = creationData;\n proto.eraName = getEraName;\n proto.eraNarrow = getEraNarrow;\n proto.eraAbbr = getEraAbbr;\n proto.eraYear = getEraYear;\n proto.year = getSetYear;\n proto.isLeapYear = getIsLeapYear;\n proto.weekYear = getSetWeekYear;\n proto.isoWeekYear = getSetISOWeekYear;\n proto.quarter = proto.quarters = getSetQuarter;\n proto.month = getSetMonth;\n proto.daysInMonth = getDaysInMonth;\n proto.week = proto.weeks = getSetWeek;\n proto.isoWeek = proto.isoWeeks = getSetISOWeek;\n proto.weeksInYear = getWeeksInYear;\n proto.weeksInWeekYear = getWeeksInWeekYear;\n proto.isoWeeksInYear = getISOWeeksInYear;\n proto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\n proto.date = getSetDayOfMonth;\n proto.day = proto.days = getSetDayOfWeek;\n proto.weekday = getSetLocaleDayOfWeek;\n proto.isoWeekday = getSetISODayOfWeek;\n proto.dayOfYear = getSetDayOfYear;\n proto.hour = proto.hours = getSetHour;\n proto.minute = proto.minutes = getSetMinute;\n proto.second = proto.seconds = getSetSecond;\n proto.millisecond = proto.milliseconds = getSetMillisecond;\n proto.utcOffset = getSetOffset;\n proto.utc = setOffsetToUTC;\n proto.local = setOffsetToLocal;\n proto.parseZone = setOffsetToParsedOffset;\n proto.hasAlignedHourOffset = hasAlignedHourOffset;\n proto.isDST = isDaylightSavingTime;\n proto.isLocal = isLocal;\n proto.isUtcOffset = isUtcOffset;\n proto.isUtc = isUtc;\n proto.isUTC = isUtc;\n proto.zoneAbbr = getZoneAbbr;\n proto.zoneName = getZoneName;\n proto.dates = deprecate(\n 'dates accessor is deprecated. Use date instead.',\n getSetDayOfMonth\n );\n proto.months = deprecate(\n 'months accessor is deprecated. Use month instead',\n getSetMonth\n );\n proto.years = deprecate(\n 'years accessor is deprecated. Use year instead',\n getSetYear\n );\n proto.zone = deprecate(\n 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',\n getSetZone\n );\n proto.isDSTShifted = deprecate(\n 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',\n isDaylightSavingTimeShifted\n );\n\n function createUnix(input) {\n return createLocal(input * 1000);\n }\n\n function createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n }\n\n function preParsePostFormat(string) {\n return string;\n }\n\n var proto$1 = Locale.prototype;\n\n proto$1.calendar = calendar;\n proto$1.longDateFormat = longDateFormat;\n proto$1.invalidDate = invalidDate;\n proto$1.ordinal = ordinal;\n proto$1.preparse = preParsePostFormat;\n proto$1.postformat = preParsePostFormat;\n proto$1.relativeTime = relativeTime;\n proto$1.pastFuture = pastFuture;\n proto$1.set = set;\n proto$1.eras = localeEras;\n proto$1.erasParse = localeErasParse;\n proto$1.erasConvertYear = localeErasConvertYear;\n proto$1.erasAbbrRegex = erasAbbrRegex;\n proto$1.erasNameRegex = erasNameRegex;\n proto$1.erasNarrowRegex = erasNarrowRegex;\n\n proto$1.months = localeMonths;\n proto$1.monthsShort = localeMonthsShort;\n proto$1.monthsParse = localeMonthsParse;\n proto$1.monthsRegex = monthsRegex;\n proto$1.monthsShortRegex = monthsShortRegex;\n proto$1.week = localeWeek;\n proto$1.firstDayOfYear = localeFirstDayOfYear;\n proto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\n proto$1.weekdays = localeWeekdays;\n proto$1.weekdaysMin = localeWeekdaysMin;\n proto$1.weekdaysShort = localeWeekdaysShort;\n proto$1.weekdaysParse = localeWeekdaysParse;\n\n proto$1.weekdaysRegex = weekdaysRegex;\n proto$1.weekdaysShortRegex = weekdaysShortRegex;\n proto$1.weekdaysMinRegex = weekdaysMinRegex;\n\n proto$1.isPM = localeIsPM;\n proto$1.meridiem = localeMeridiem;\n\n function get$1(format, index, field, setter) {\n var locale = getLocale(),\n utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n }\n\n function listMonthsImpl(format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i,\n out = [];\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n return out;\n }\n\n // ()\n // (5)\n // (fmt, 5)\n // (fmt)\n // (true)\n // (true, 5)\n // (true, fmt, 5)\n // (true, fmt)\n function listWeekdaysImpl(localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0,\n i,\n out = [];\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n return out;\n }\n\n function listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n }\n\n function listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n }\n\n function listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n }\n\n function listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n }\n\n function listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n }\n\n getSetGlobalLocale('en', {\n eras: [\n {\n since: '0001-01-01',\n until: +Infinity,\n offset: 1,\n name: 'Anno Domini',\n narrow: 'AD',\n abbr: 'AD',\n },\n {\n since: '0000-12-31',\n until: -Infinity,\n offset: 1,\n name: 'Before Christ',\n narrow: 'BC',\n abbr: 'BC',\n },\n ],\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n toInt((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n });\n\n // Side effect imports\n\n hooks.lang = deprecate(\n 'moment.lang is deprecated. Use moment.locale instead.',\n getSetGlobalLocale\n );\n hooks.langData = deprecate(\n 'moment.langData is deprecated. Use moment.localeData instead.',\n getLocale\n );\n\n var mathAbs = Math.abs;\n\n function abs() {\n var data = this._data;\n\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n\n return this;\n }\n\n function addSubtract$1(duration, input, value, direction) {\n var other = createDuration(input, value);\n\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n\n return duration._bubble();\n }\n\n // supports only 2.0-style add(1, 's') or add(duration)\n function add$1(input, value) {\n return addSubtract$1(this, input, value, 1);\n }\n\n // supports only 2.0-style subtract(1, 's') or subtract(duration)\n function subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n }\n\n function absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n }\n\n function bubble() {\n var milliseconds = this._milliseconds,\n days = this._days,\n months = this._months,\n data = this._data,\n seconds,\n minutes,\n hours,\n years,\n monthsFromDays;\n\n // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n if (\n !(\n (milliseconds >= 0 && days >= 0 && months >= 0) ||\n (milliseconds <= 0 && days <= 0 && months <= 0)\n )\n ) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n }\n\n // The following code bubbles up values, see the tests for\n // examples of what that means.\n data.milliseconds = milliseconds % 1000;\n\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n\n days += absFloor(hours / 24);\n\n // convert days to months\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays));\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n data.days = days;\n data.months = months;\n data.years = years;\n\n return this;\n }\n\n function daysToMonths(days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return (days * 4800) / 146097;\n }\n\n function monthsToDays(months) {\n // the reverse of daysToMonths\n return (months * 146097) / 4800;\n }\n\n function as(units) {\n if (!this.isValid()) {\n return NaN;\n }\n var days,\n months,\n milliseconds = this._milliseconds;\n\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n switch (units) {\n case 'month':\n return months;\n case 'quarter':\n return months / 3;\n case 'year':\n return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n switch (units) {\n case 'week':\n return days / 7 + milliseconds / 6048e5;\n case 'day':\n return days + milliseconds / 864e5;\n case 'hour':\n return days * 24 + milliseconds / 36e5;\n case 'minute':\n return days * 1440 + milliseconds / 6e4;\n case 'second':\n return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n case 'millisecond':\n return Math.floor(days * 864e5) + milliseconds;\n default:\n throw new Error('Unknown unit ' + units);\n }\n }\n }\n\n // TODO: Use this.as('ms')?\n function valueOf$1() {\n if (!this.isValid()) {\n return NaN;\n }\n return (\n this._milliseconds +\n this._days * 864e5 +\n (this._months % 12) * 2592e6 +\n toInt(this._months / 12) * 31536e6\n );\n }\n\n function makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n }\n\n var asMilliseconds = makeAs('ms'),\n asSeconds = makeAs('s'),\n asMinutes = makeAs('m'),\n asHours = makeAs('h'),\n asDays = makeAs('d'),\n asWeeks = makeAs('w'),\n asMonths = makeAs('M'),\n asQuarters = makeAs('Q'),\n asYears = makeAs('y');\n\n function clone$1() {\n return createDuration(this);\n }\n\n function get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n }\n\n function makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n }\n\n var milliseconds = makeGetter('milliseconds'),\n seconds = makeGetter('seconds'),\n minutes = makeGetter('minutes'),\n hours = makeGetter('hours'),\n days = makeGetter('days'),\n months = makeGetter('months'),\n years = makeGetter('years');\n\n function weeks() {\n return absFloor(this.days() / 7);\n }\n\n var round = Math.round,\n thresholds = {\n ss: 44, // a few seconds to seconds\n s: 45, // seconds to minute\n m: 45, // minutes to hour\n h: 22, // hours to day\n d: 26, // days to month/week\n w: null, // weeks to month\n M: 11, // months to year\n };\n\n // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\n function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n }\n\n function relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {\n var duration = createDuration(posNegDuration).abs(),\n seconds = round(duration.as('s')),\n minutes = round(duration.as('m')),\n hours = round(duration.as('h')),\n days = round(duration.as('d')),\n months = round(duration.as('M')),\n weeks = round(duration.as('w')),\n years = round(duration.as('y')),\n a =\n (seconds <= thresholds.ss && ['s', seconds]) ||\n (seconds < thresholds.s && ['ss', seconds]) ||\n (minutes <= 1 && ['m']) ||\n (minutes < thresholds.m && ['mm', minutes]) ||\n (hours <= 1 && ['h']) ||\n (hours < thresholds.h && ['hh', hours]) ||\n (days <= 1 && ['d']) ||\n (days < thresholds.d && ['dd', days]);\n\n if (thresholds.w != null) {\n a =\n a ||\n (weeks <= 1 && ['w']) ||\n (weeks < thresholds.w && ['ww', weeks]);\n }\n a = a ||\n (months <= 1 && ['M']) ||\n (months < thresholds.M && ['MM', months]) ||\n (years <= 1 && ['y']) || ['yy', years];\n\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n }\n\n // This function allows you to set the rounding function for relative time strings\n function getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }\n\n // This function allows you to set a threshold for relative time strings\n function getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }\n\n function humanize(argWithSuffix, argThresholds) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var withSuffix = false,\n th = thresholds,\n locale,\n output;\n\n if (typeof argWithSuffix === 'object') {\n argThresholds = argWithSuffix;\n argWithSuffix = false;\n }\n if (typeof argWithSuffix === 'boolean') {\n withSuffix = argWithSuffix;\n }\n if (typeof argThresholds === 'object') {\n th = Object.assign({}, thresholds, argThresholds);\n if (argThresholds.s != null && argThresholds.ss == null) {\n th.ss = argThresholds.s - 1;\n }\n }\n\n locale = this.localeData();\n output = relativeTime$1(this, !withSuffix, th, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n }\n\n var abs$1 = Math.abs;\n\n function sign(x) {\n return (x > 0) - (x < 0) || +x;\n }\n\n function toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000,\n days = abs$1(this._days),\n months = abs$1(this._months),\n minutes,\n hours,\n years,\n s,\n total = this.asSeconds(),\n totalSign,\n ymSign,\n daysSign,\n hmsSign;\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n // 3600 seconds -> 60 minutes -> 1 hour\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60;\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n\n totalSign = total < 0 ? '-' : '';\n ymSign = sign(this._months) !== sign(total) ? '-' : '';\n daysSign = sign(this._days) !== sign(total) ? '-' : '';\n hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n return (\n totalSign +\n 'P' +\n (years ? ymSign + years + 'Y' : '') +\n (months ? ymSign + months + 'M' : '') +\n (days ? daysSign + days + 'D' : '') +\n (hours || minutes || seconds ? 'T' : '') +\n (hours ? hmsSign + hours + 'H' : '') +\n (minutes ? hmsSign + minutes + 'M' : '') +\n (seconds ? hmsSign + s + 'S' : '')\n );\n }\n\n var proto$2 = Duration.prototype;\n\n proto$2.isValid = isValid$1;\n proto$2.abs = abs;\n proto$2.add = add$1;\n proto$2.subtract = subtract$1;\n proto$2.as = as;\n proto$2.asMilliseconds = asMilliseconds;\n proto$2.asSeconds = asSeconds;\n proto$2.asMinutes = asMinutes;\n proto$2.asHours = asHours;\n proto$2.asDays = asDays;\n proto$2.asWeeks = asWeeks;\n proto$2.asMonths = asMonths;\n proto$2.asQuarters = asQuarters;\n proto$2.asYears = asYears;\n proto$2.valueOf = valueOf$1;\n proto$2._bubble = bubble;\n proto$2.clone = clone$1;\n proto$2.get = get$2;\n proto$2.milliseconds = milliseconds;\n proto$2.seconds = seconds;\n proto$2.minutes = minutes;\n proto$2.hours = hours;\n proto$2.days = days;\n proto$2.weeks = weeks;\n proto$2.months = months;\n proto$2.years = years;\n proto$2.humanize = humanize;\n proto$2.toISOString = toISOString$1;\n proto$2.toString = toISOString$1;\n proto$2.toJSON = toISOString$1;\n proto$2.locale = locale;\n proto$2.localeData = localeData;\n\n proto$2.toIsoString = deprecate(\n 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',\n toISOString$1\n );\n proto$2.lang = lang;\n\n // FORMATTING\n\n addFormatToken('X', 0, 0, 'unix');\n addFormatToken('x', 0, 0, 'valueOf');\n\n // PARSING\n\n addRegexToken('x', matchSigned);\n addRegexToken('X', matchTimestamp);\n addParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input) * 1000);\n });\n addParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n });\n\n //! moment.js\n\n hooks.version = '2.29.4';\n\n setHookCallback(createLocal);\n\n hooks.fn = proto;\n hooks.min = min;\n hooks.max = max;\n hooks.now = now;\n hooks.utc = createUTC;\n hooks.unix = createUnix;\n hooks.months = listMonths;\n hooks.isDate = isDate;\n hooks.locale = getSetGlobalLocale;\n hooks.invalid = createInvalid;\n hooks.duration = createDuration;\n hooks.isMoment = isMoment;\n hooks.weekdays = listWeekdays;\n hooks.parseZone = createInZone;\n hooks.localeData = getLocale;\n hooks.isDuration = isDuration;\n hooks.monthsShort = listMonthsShort;\n hooks.weekdaysMin = listWeekdaysMin;\n hooks.defineLocale = defineLocale;\n hooks.updateLocale = updateLocale;\n hooks.locales = listLocales;\n hooks.weekdaysShort = listWeekdaysShort;\n hooks.normalizeUnits = normalizeUnits;\n hooks.relativeTimeRounding = getSetRelativeTimeRounding;\n hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\n hooks.calendarFormat = getCalendarFormat;\n hooks.prototype = proto;\n\n // currently HTML5 input type only supports 24-hour formats\n hooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // <input type=\"datetime-local\" />\n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // <input type=\"datetime-local\" step=\"1\" />\n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // <input type=\"datetime-local\" step=\"0.001\" />\n DATE: 'YYYY-MM-DD', // <input type=\"date\" />\n TIME: 'HH:mm', // <input type=\"time\" />\n TIME_SECONDS: 'HH:mm:ss', // <input type=\"time\" step=\"1\" />\n TIME_MS: 'HH:mm:ss.SSS', // <input type=\"time\" step=\"0.001\" />\n WEEK: 'GGGG-[W]WW', // <input type=\"week\" />\n MONTH: 'YYYY-MM', // <input type=\"month\" />\n };\n\n return hooks;\n\n})));\n","'use strict';\n\nvar Queue = require('tinyqueue');\n\nif (Queue.default) Queue = Queue.default; // temporary webpack fix\n\nmodule.exports = polylabel;\nmodule.exports.default = polylabel;\n\nfunction polylabel(polygon, precision, debug) {\n precision = precision || 1.0;\n\n // find the bounding box of the outer ring\n var minX, minY, maxX, maxY;\n for (var i = 0; i < polygon[0].length; i++) {\n var p = polygon[0][i];\n if (!i || p[0] < minX) minX = p[0];\n if (!i || p[1] < minY) minY = p[1];\n if (!i || p[0] > maxX) maxX = p[0];\n if (!i || p[1] > maxY) maxY = p[1];\n }\n\n var width = maxX - minX;\n var height = maxY - minY;\n var cellSize = Math.min(width, height);\n var h = cellSize / 2;\n\n if (cellSize === 0) {\n var degeneratePoleOfInaccessibility = [minX, minY];\n degeneratePoleOfInaccessibility.distance = 0;\n return degeneratePoleOfInaccessibility;\n }\n\n // a priority queue of cells in order of their \"potential\" (max distance to polygon)\n var cellQueue = new Queue(undefined, compareMax);\n\n // cover polygon with initial cells\n for (var x = minX; x < maxX; x += cellSize) {\n for (var y = minY; y < maxY; y += cellSize) {\n cellQueue.push(new Cell(x + h, y + h, h, polygon));\n }\n }\n\n // take centroid as the first best guess\n var bestCell = getCentroidCell(polygon);\n\n // special case for rectangular polygons\n var bboxCell = new Cell(minX + width / 2, minY + height / 2, 0, polygon);\n if (bboxCell.d > bestCell.d) bestCell = bboxCell;\n\n var numProbes = cellQueue.length;\n\n while (cellQueue.length) {\n // pick the most promising cell from the queue\n var cell = cellQueue.pop();\n\n // update the best cell if we found a better one\n if (cell.d > bestCell.d) {\n bestCell = cell;\n if (debug) console.log('found best %d after %d probes', Math.round(1e4 * cell.d) / 1e4, numProbes);\n }\n\n // do not drill down further if there's no chance of a better solution\n if (cell.max - bestCell.d <= precision) continue;\n\n // split the cell into four cells\n h = cell.h / 2;\n cellQueue.push(new Cell(cell.x - h, cell.y - h, h, polygon));\n cellQueue.push(new Cell(cell.x + h, cell.y - h, h, polygon));\n cellQueue.push(new Cell(cell.x - h, cell.y + h, h, polygon));\n cellQueue.push(new Cell(cell.x + h, cell.y + h, h, polygon));\n numProbes += 4;\n }\n\n if (debug) {\n console.log('num probes: ' + numProbes);\n console.log('best distance: ' + bestCell.d);\n }\n\n var poleOfInaccessibility = [bestCell.x, bestCell.y];\n poleOfInaccessibility.distance = bestCell.d;\n return poleOfInaccessibility;\n}\n\nfunction compareMax(a, b) {\n return b.max - a.max;\n}\n\nfunction Cell(x, y, h, polygon) {\n this.x = x; // cell center x\n this.y = y; // cell center y\n this.h = h; // half the cell size\n this.d = pointToPolygonDist(x, y, polygon); // distance from cell center to polygon\n this.max = this.d + this.h * Math.SQRT2; // max distance to polygon within a cell\n}\n\n// signed distance from point to polygon outline (negative if point is outside)\nfunction pointToPolygonDist(x, y, polygon) {\n var inside = false;\n var minDistSq = Infinity;\n\n for (var k = 0; k < polygon.length; k++) {\n var ring = polygon[k];\n\n for (var i = 0, len = ring.length, j = len - 1; i < len; j = i++) {\n var a = ring[i];\n var b = ring[j];\n\n if ((a[1] > y !== b[1] > y) &&\n (x < (b[0] - a[0]) * (y - a[1]) / (b[1] - a[1]) + a[0])) inside = !inside;\n\n minDistSq = Math.min(minDistSq, getSegDistSq(x, y, a, b));\n }\n }\n\n return minDistSq === 0 ? 0 : (inside ? 1 : -1) * Math.sqrt(minDistSq);\n}\n\n// get polygon centroid\nfunction getCentroidCell(polygon) {\n var area = 0;\n var x = 0;\n var y = 0;\n var points = polygon[0];\n\n for (var i = 0, len = points.length, j = len - 1; i < len; j = i++) {\n var a = points[i];\n var b = points[j];\n var f = a[0] * b[1] - b[0] * a[1];\n x += (a[0] + b[0]) * f;\n y += (a[1] + b[1]) * f;\n area += f * 3;\n }\n if (area === 0) return new Cell(points[0][0], points[0][1], 0, polygon);\n return new Cell(x / area, y / area, 0, polygon);\n}\n\n// get squared distance from a point to a segment\nfunction getSegDistSq(px, py, a, b) {\n\n var x = a[0];\n var y = a[1];\n var dx = b[0] - x;\n var dy = b[1] - y;\n\n if (dx !== 0 || dy !== 0) {\n\n var t = ((px - x) * dx + (py - y) * dy) / (dx * dx + dy * dy);\n\n if (t > 1) {\n x = b[0];\n y = b[1];\n\n } else if (t > 0) {\n x += dx * t;\n y += dy * t;\n }\n }\n\n dx = px - x;\n dy = py - y;\n\n return dx * dx + dy * dy;\n}\n","import { Subject } from './Subject';\nexport class BehaviorSubject extends Subject {\n constructor(_value) {\n super();\n this._value = _value;\n }\n get value() {\n return this.getValue();\n }\n _subscribe(subscriber) {\n const subscription = super._subscribe(subscriber);\n !subscription.closed && subscriber.next(this._value);\n return subscription;\n }\n getValue() {\n const { hasError, thrownError, _value } = this;\n if (hasError) {\n throw thrownError;\n }\n this._throwIfClosed();\n return _value;\n }\n next(value) {\n super.next((this._value = value));\n }\n}\n","import { SafeSubscriber, Subscriber } from './Subscriber';\nimport { isSubscription } from './Subscription';\nimport { observable as Symbol_observable } from './symbol/observable';\nimport { pipeFromArray } from './util/pipe';\nimport { config } from './config';\nimport { isFunction } from './util/isFunction';\nimport { errorContext } from './util/errorContext';\nexport class Observable {\n constructor(subscribe) {\n if (subscribe) {\n this._subscribe = subscribe;\n }\n }\n lift(operator) {\n const observable = new Observable();\n observable.source = this;\n observable.operator = operator;\n return observable;\n }\n subscribe(observerOrNext, error, complete) {\n const subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete);\n errorContext(() => {\n const { operator, source } = this;\n subscriber.add(operator\n ?\n operator.call(subscriber, source)\n : source\n ?\n this._subscribe(subscriber)\n :\n this._trySubscribe(subscriber));\n });\n return subscriber;\n }\n _trySubscribe(sink) {\n try {\n return this._subscribe(sink);\n }\n catch (err) {\n sink.error(err);\n }\n }\n forEach(next, promiseCtor) {\n promiseCtor = getPromiseCtor(promiseCtor);\n return new promiseCtor((resolve, reject) => {\n let subscription;\n subscription = this.subscribe((value) => {\n try {\n next(value);\n }\n catch (err) {\n reject(err);\n subscription === null || subscription === void 0 ? void 0 : subscription.unsubscribe();\n }\n }, reject, resolve);\n });\n }\n _subscribe(subscriber) {\n var _a;\n return (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber);\n }\n [Symbol_observable]() {\n return this;\n }\n pipe(...operations) {\n return pipeFromArray(operations)(this);\n }\n toPromise(promiseCtor) {\n promiseCtor = getPromiseCtor(promiseCtor);\n return new promiseCtor((resolve, reject) => {\n let value;\n this.subscribe((x) => (value = x), (err) => reject(err), () => resolve(value));\n });\n }\n}\nObservable.create = (subscribe) => {\n return new Observable(subscribe);\n};\nfunction getPromiseCtor(promiseCtor) {\n var _a;\n return (_a = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : config.Promise) !== null && _a !== void 0 ? _a : Promise;\n}\nfunction isObserver(value) {\n return value && isFunction(value.next) && isFunction(value.error) && isFunction(value.complete);\n}\nfunction isSubscriber(value) {\n return (value && value instanceof Subscriber) || (isObserver(value) && isSubscription(value));\n}\n","import { createErrorClass } from './createErrorClass';\nexport const ObjectUnsubscribedError = createErrorClass((_super) => function ObjectUnsubscribedErrorImpl() {\n _super(this);\n this.name = 'ObjectUnsubscribedError';\n this.message = 'object unsubscribed';\n});\n","import { Observable } from './Observable';\nimport { Subscription, EMPTY_SUBSCRIPTION } from './Subscription';\nimport { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';\nimport { arrRemove } from './util/arrRemove';\nimport { errorContext } from './util/errorContext';\nexport class Subject extends Observable {\n constructor() {\n super();\n this.closed = false;\n this.observers = [];\n this.isStopped = false;\n this.hasError = false;\n this.thrownError = null;\n }\n lift(operator) {\n const subject = new AnonymousSubject(this, this);\n subject.operator = operator;\n return subject;\n }\n _throwIfClosed() {\n if (this.closed) {\n throw new ObjectUnsubscribedError();\n }\n }\n next(value) {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n const copy = this.observers.slice();\n for (const observer of copy) {\n observer.next(value);\n }\n }\n });\n }\n error(err) {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n this.hasError = this.isStopped = true;\n this.thrownError = err;\n const { observers } = this;\n while (observers.length) {\n observers.shift().error(err);\n }\n }\n });\n }\n complete() {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n this.isStopped = true;\n const { observers } = this;\n while (observers.length) {\n observers.shift().complete();\n }\n }\n });\n }\n unsubscribe() {\n this.isStopped = this.closed = true;\n this.observers = null;\n }\n get observed() {\n var _a;\n return ((_a = this.observers) === null || _a === void 0 ? void 0 : _a.length) > 0;\n }\n _trySubscribe(subscriber) {\n this._throwIfClosed();\n return super._trySubscribe(subscriber);\n }\n _subscribe(subscriber) {\n this._throwIfClosed();\n this._checkFinalizedStatuses(subscriber);\n return this._innerSubscribe(subscriber);\n }\n _innerSubscribe(subscriber) {\n const { hasError, isStopped, observers } = this;\n return hasError || isStopped\n ? EMPTY_SUBSCRIPTION\n : (observers.push(subscriber), new Subscription(() => arrRemove(observers, subscriber)));\n }\n _checkFinalizedStatuses(subscriber) {\n const { hasError, thrownError, isStopped } = this;\n if (hasError) {\n subscriber.error(thrownError);\n }\n else if (isStopped) {\n subscriber.complete();\n }\n }\n asObservable() {\n const observable = new Observable();\n observable.source = this;\n return observable;\n }\n}\nSubject.create = (destination, source) => {\n return new AnonymousSubject(destination, source);\n};\nexport class AnonymousSubject extends Subject {\n constructor(destination, source) {\n super();\n this.destination = destination;\n this.source = source;\n }\n next(value) {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.next) === null || _b === void 0 ? void 0 : _b.call(_a, value);\n }\n error(err) {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.call(_a, err);\n }\n complete() {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.complete) === null || _b === void 0 ? void 0 : _b.call(_a);\n }\n _subscribe(subscriber) {\n var _a, _b;\n return (_b = (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber)) !== null && _b !== void 0 ? _b : EMPTY_SUBSCRIPTION;\n }\n}\n","export function noop() { }\n","export const COMPLETE_NOTIFICATION = (() => createNotification('C', undefined, undefined))();\nexport function errorNotification(error) {\n return createNotification('E', undefined, error);\n}\nexport function nextNotification(value) {\n return createNotification('N', value, undefined);\n}\nexport function createNotification(kind, value, error) {\n return {\n kind,\n value,\n error,\n };\n}\n","import { isFunction } from './util/isFunction';\nimport { isSubscription, Subscription } from './Subscription';\nimport { config } from './config';\nimport { reportUnhandledError } from './util/reportUnhandledError';\nimport { noop } from './util/noop';\nimport { nextNotification, errorNotification, COMPLETE_NOTIFICATION } from './NotificationFactories';\nimport { timeoutProvider } from './scheduler/timeoutProvider';\nimport { captureError } from './util/errorContext';\nexport class Subscriber extends Subscription {\n constructor(destination) {\n super();\n this.isStopped = false;\n if (destination) {\n this.destination = destination;\n if (isSubscription(destination)) {\n destination.add(this);\n }\n }\n else {\n this.destination = EMPTY_OBSERVER;\n }\n }\n static create(next, error, complete) {\n return new SafeSubscriber(next, error, complete);\n }\n next(value) {\n if (this.isStopped) {\n handleStoppedNotification(nextNotification(value), this);\n }\n else {\n this._next(value);\n }\n }\n error(err) {\n if (this.isStopped) {\n handleStoppedNotification(errorNotification(err), this);\n }\n else {\n this.isStopped = true;\n this._error(err);\n }\n }\n complete() {\n if (this.isStopped) {\n handleStoppedNotification(COMPLETE_NOTIFICATION, this);\n }\n else {\n this.isStopped = true;\n this._complete();\n }\n }\n unsubscribe() {\n if (!this.closed) {\n this.isStopped = true;\n super.unsubscribe();\n this.destination = null;\n }\n }\n _next(value) {\n this.destination.next(value);\n }\n _error(err) {\n try {\n this.destination.error(err);\n }\n finally {\n this.unsubscribe();\n }\n }\n _complete() {\n try {\n this.destination.complete();\n }\n finally {\n this.unsubscribe();\n }\n }\n}\nexport class SafeSubscriber extends Subscriber {\n constructor(observerOrNext, error, complete) {\n super();\n let next;\n if (isFunction(observerOrNext)) {\n next = observerOrNext;\n }\n else if (observerOrNext) {\n ({ next, error, complete } = observerOrNext);\n let context;\n if (this && config.useDeprecatedNextContext) {\n context = Object.create(observerOrNext);\n context.unsubscribe = () => this.unsubscribe();\n }\n else {\n context = observerOrNext;\n }\n next = next === null || next === void 0 ? void 0 : next.bind(context);\n error = error === null || error === void 0 ? void 0 : error.bind(context);\n complete = complete === null || complete === void 0 ? void 0 : complete.bind(context);\n }\n this.destination = {\n next: next ? wrapForErrorHandling(next, this) : noop,\n error: wrapForErrorHandling(error !== null && error !== void 0 ? error : defaultErrorHandler, this),\n complete: complete ? wrapForErrorHandling(complete, this) : noop,\n };\n }\n}\nfunction wrapForErrorHandling(handler, instance) {\n return (...args) => {\n try {\n handler(...args);\n }\n catch (err) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n captureError(err);\n }\n else {\n reportUnhandledError(err);\n }\n }\n };\n}\nfunction defaultErrorHandler(err) {\n throw err;\n}\nfunction handleStoppedNotification(notification, subscriber) {\n const { onStoppedNotification } = config;\n onStoppedNotification && timeoutProvider.setTimeout(() => onStoppedNotification(notification, subscriber));\n}\nexport const EMPTY_OBSERVER = {\n closed: true,\n next: noop,\n error: defaultErrorHandler,\n complete: noop,\n};\n","import { createErrorClass } from './createErrorClass';\nexport const UnsubscriptionError = createErrorClass((_super) => function UnsubscriptionErrorImpl(errors) {\n _super(this);\n this.message = errors\n ? `${errors.length} errors occurred during unsubscription:\n${errors.map((err, i) => `${i + 1}) ${err.toString()}`).join('\\n ')}`\n : '';\n this.name = 'UnsubscriptionError';\n this.errors = errors;\n});\n","import { isFunction } from './util/isFunction';\nimport { UnsubscriptionError } from './util/UnsubscriptionError';\nimport { arrRemove } from './util/arrRemove';\nexport class Subscription {\n constructor(initialTeardown) {\n this.initialTeardown = initialTeardown;\n this.closed = false;\n this._parentage = null;\n this._teardowns = null;\n }\n unsubscribe() {\n let errors;\n if (!this.closed) {\n this.closed = true;\n const { _parentage } = this;\n if (_parentage) {\n this._parentage = null;\n if (Array.isArray(_parentage)) {\n for (const parent of _parentage) {\n parent.remove(this);\n }\n }\n else {\n _parentage.remove(this);\n }\n }\n const { initialTeardown } = this;\n if (isFunction(initialTeardown)) {\n try {\n initialTeardown();\n }\n catch (e) {\n errors = e instanceof UnsubscriptionError ? e.errors : [e];\n }\n }\n const { _teardowns } = this;\n if (_teardowns) {\n this._teardowns = null;\n for (const teardown of _teardowns) {\n try {\n execTeardown(teardown);\n }\n catch (err) {\n errors = errors !== null && errors !== void 0 ? errors : [];\n if (err instanceof UnsubscriptionError) {\n errors = [...errors, ...err.errors];\n }\n else {\n errors.push(err);\n }\n }\n }\n }\n if (errors) {\n throw new UnsubscriptionError(errors);\n }\n }\n }\n add(teardown) {\n var _a;\n if (teardown && teardown !== this) {\n if (this.closed) {\n execTeardown(teardown);\n }\n else {\n if (teardown instanceof Subscription) {\n if (teardown.closed || teardown._hasParent(this)) {\n return;\n }\n teardown._addParent(this);\n }\n (this._teardowns = (_a = this._teardowns) !== null && _a !== void 0 ? _a : []).push(teardown);\n }\n }\n }\n _hasParent(parent) {\n const { _parentage } = this;\n return _parentage === parent || (Array.isArray(_parentage) && _parentage.includes(parent));\n }\n _addParent(parent) {\n const { _parentage } = this;\n this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent;\n }\n _removeParent(parent) {\n const { _parentage } = this;\n if (_parentage === parent) {\n this._parentage = null;\n }\n else if (Array.isArray(_parentage)) {\n arrRemove(_parentage, parent);\n }\n }\n remove(teardown) {\n const { _teardowns } = this;\n _teardowns && arrRemove(_teardowns, teardown);\n if (teardown instanceof Subscription) {\n teardown._removeParent(this);\n }\n }\n}\nSubscription.EMPTY = (() => {\n const empty = new Subscription();\n empty.closed = true;\n return empty;\n})();\nexport const EMPTY_SUBSCRIPTION = Subscription.EMPTY;\nexport function isSubscription(value) {\n return (value instanceof Subscription ||\n (value && 'closed' in value && isFunction(value.remove) && isFunction(value.add) && isFunction(value.unsubscribe)));\n}\nfunction execTeardown(teardown) {\n if (isFunction(teardown)) {\n teardown();\n }\n else {\n teardown.unsubscribe();\n }\n}\n","export const config = {\n onUnhandledError: null,\n onStoppedNotification: null,\n Promise: undefined,\n useDeprecatedSynchronousErrorHandling: false,\n useDeprecatedNextContext: false,\n};\n","import { EmptyError } from './util/EmptyError';\nimport { SafeSubscriber } from './Subscriber';\nexport function firstValueFrom(source, config) {\n const hasConfig = typeof config === 'object';\n return new Promise((resolve, reject) => {\n const subscriber = new SafeSubscriber({\n next: (value) => {\n resolve(value);\n subscriber.unsubscribe();\n },\n error: reject,\n complete: () => {\n if (hasConfig) {\n resolve(config.defaultValue);\n }\n else {\n reject(new EmptyError());\n }\n },\n });\n source.subscribe(subscriber);\n });\n}\n","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 { argsArgArrayOrObject } from '../util/argsArgArrayOrObject';\nimport { innerFrom } from './innerFrom';\nimport { popResultSelector } from '../util/args';\nimport { OperatorSubscriber } from '../operators/OperatorSubscriber';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nimport { createObject } from '../util/createObject';\nexport function forkJoin(...args) {\n const resultSelector = popResultSelector(args);\n const { args: sources, keys } = argsArgArrayOrObject(args);\n const result = new Observable((subscriber) => {\n const { length } = sources;\n if (!length) {\n subscriber.complete();\n return;\n }\n const values = new Array(length);\n let remainingCompletions = length;\n let remainingEmissions = length;\n for (let sourceIndex = 0; sourceIndex < length; sourceIndex++) {\n let hasValue = false;\n innerFrom(sources[sourceIndex]).subscribe(new OperatorSubscriber(subscriber, (value) => {\n if (!hasValue) {\n hasValue = true;\n remainingEmissions--;\n }\n values[sourceIndex] = value;\n }, () => remainingCompletions--, undefined, () => {\n if (!remainingCompletions || !hasValue) {\n if (!remainingEmissions) {\n subscriber.next(keys ? createObject(keys, values) : values);\n }\n subscriber.complete();\n }\n }));\n }\n });\n return resultSelector ? result.pipe(mapOneOrManyArgs(resultSelector)) : result;\n}\n","import { executeSchedule } from '../util/executeSchedule';\nimport { operate } from '../util/lift';\nimport { OperatorSubscriber } from './OperatorSubscriber';\nexport function observeOn(scheduler, delay = 0) {\n return operate((source, subscriber) => {\n source.subscribe(new OperatorSubscriber(subscriber, (value) => executeSchedule(subscriber, scheduler, () => subscriber.next(value), delay), () => executeSchedule(subscriber, scheduler, () => subscriber.complete(), delay), (err) => executeSchedule(subscriber, scheduler, () => subscriber.error(err), delay)));\n });\n}\n","import { operate } from '../util/lift';\nexport function subscribeOn(scheduler, delay = 0) {\n return operate((source, subscriber) => {\n subscriber.add(scheduler.schedule(() => source.subscribe(subscriber), delay));\n });\n}\n","import { Observable } from '../Observable';\nimport { executeSchedule } from '../util/executeSchedule';\nexport function scheduleAsyncIterable(input, scheduler) {\n if (!input) {\n throw new Error('Iterable cannot be null');\n }\n return new Observable((subscriber) => {\n executeSchedule(subscriber, scheduler, () => {\n const iterator = input[Symbol.asyncIterator]();\n executeSchedule(subscriber, scheduler, () => {\n iterator.next().then((result) => {\n if (result.done) {\n subscriber.complete();\n }\n else {\n subscriber.next(result.value);\n }\n });\n }, 0, true);\n });\n });\n}\n","import { scheduled } from '../scheduled/scheduled';\nimport { innerFrom } from './innerFrom';\nexport function from(input, scheduler) {\n return scheduler ? scheduled(input, scheduler) : innerFrom(input);\n}\n","import { scheduleObservable } from './scheduleObservable';\nimport { schedulePromise } from './schedulePromise';\nimport { scheduleArray } from './scheduleArray';\nimport { scheduleIterable } from './scheduleIterable';\nimport { scheduleAsyncIterable } from './scheduleAsyncIterable';\nimport { isInteropObservable } from '../util/isInteropObservable';\nimport { isPromise } from '../util/isPromise';\nimport { isArrayLike } from '../util/isArrayLike';\nimport { isIterable } from '../util/isIterable';\nimport { isAsyncIterable } from '../util/isAsyncIterable';\nimport { createInvalidObservableTypeError } from '../util/throwUnobservableError';\nimport { isReadableStreamLike } from '../util/isReadableStreamLike';\nimport { scheduleReadableStreamLike } from './scheduleReadableStreamLike';\nexport function scheduled(input, scheduler) {\n if (input != null) {\n if (isInteropObservable(input)) {\n return scheduleObservable(input, scheduler);\n }\n if (isArrayLike(input)) {\n return scheduleArray(input, scheduler);\n }\n if (isPromise(input)) {\n return schedulePromise(input, scheduler);\n }\n if (isAsyncIterable(input)) {\n return scheduleAsyncIterable(input, scheduler);\n }\n if (isIterable(input)) {\n return scheduleIterable(input, scheduler);\n }\n if (isReadableStreamLike(input)) {\n return scheduleReadableStreamLike(input, scheduler);\n }\n }\n throw createInvalidObservableTypeError(input);\n}\n","import { innerFrom } from '../observable/innerFrom';\nimport { observeOn } from '../operators/observeOn';\nimport { subscribeOn } from '../operators/subscribeOn';\nexport function scheduleObservable(input, scheduler) {\n return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler));\n}\n","import { Observable } from '../Observable';\nexport function scheduleArray(input, scheduler) {\n return new Observable((subscriber) => {\n let i = 0;\n return scheduler.schedule(function () {\n if (i === input.length) {\n subscriber.complete();\n }\n else {\n subscriber.next(input[i++]);\n if (!subscriber.closed) {\n this.schedule();\n }\n }\n });\n });\n}\n","import { innerFrom } from '../observable/innerFrom';\nimport { observeOn } from '../operators/observeOn';\nimport { subscribeOn } from '../operators/subscribeOn';\nexport function schedulePromise(input, scheduler) {\n return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler));\n}\n","import { Observable } from '../Observable';\nimport { iterator as Symbol_iterator } from '../symbol/iterator';\nimport { isFunction } from '../util/isFunction';\nimport { executeSchedule } from '../util/executeSchedule';\nexport function scheduleIterable(input, scheduler) {\n return new Observable((subscriber) => {\n let iterator;\n executeSchedule(subscriber, scheduler, () => {\n iterator = input[Symbol_iterator]();\n executeSchedule(subscriber, scheduler, () => {\n let value;\n let done;\n try {\n ({ value, done } = iterator.next());\n }\n catch (err) {\n subscriber.error(err);\n return;\n }\n if (done) {\n subscriber.complete();\n }\n else {\n subscriber.next(value);\n }\n }, 0, true);\n });\n return () => isFunction(iterator === null || iterator === void 0 ? void 0 : iterator.return) && iterator.return();\n });\n}\n","import { scheduleAsyncIterable } from './scheduleAsyncIterable';\nimport { readableStreamLikeToAsyncGenerator } from '../util/isReadableStreamLike';\nexport function scheduleReadableStreamLike(input, scheduler) {\n return scheduleAsyncIterable(readableStreamLikeToAsyncGenerator(input), scheduler);\n}\n","import { __asyncValues, __awaiter } from \"tslib\";\nimport { isArrayLike } from '../util/isArrayLike';\nimport { isPromise } from '../util/isPromise';\nimport { Observable } from '../Observable';\nimport { isInteropObservable } from '../util/isInteropObservable';\nimport { isAsyncIterable } from '../util/isAsyncIterable';\nimport { createInvalidObservableTypeError } from '../util/throwUnobservableError';\nimport { isIterable } from '../util/isIterable';\nimport { isReadableStreamLike, readableStreamLikeToAsyncGenerator } from '../util/isReadableStreamLike';\nimport { isFunction } from '../util/isFunction';\nimport { reportUnhandledError } from '../util/reportUnhandledError';\nimport { observable as Symbol_observable } from '../symbol/observable';\nexport function innerFrom(input) {\n if (input instanceof Observable) {\n return input;\n }\n if (input != null) {\n if (isInteropObservable(input)) {\n return fromInteropObservable(input);\n }\n if (isArrayLike(input)) {\n return fromArrayLike(input);\n }\n if (isPromise(input)) {\n return fromPromise(input);\n }\n if (isAsyncIterable(input)) {\n return fromAsyncIterable(input);\n }\n if (isIterable(input)) {\n return fromIterable(input);\n }\n if (isReadableStreamLike(input)) {\n return fromReadableStreamLike(input);\n }\n }\n throw createInvalidObservableTypeError(input);\n}\nexport function fromInteropObservable(obj) {\n return new Observable((subscriber) => {\n const obs = obj[Symbol_observable]();\n if (isFunction(obs.subscribe)) {\n return obs.subscribe(subscriber);\n }\n throw new TypeError('Provided object does not correctly implement Symbol.observable');\n });\n}\nexport function fromArrayLike(array) {\n return new Observable((subscriber) => {\n for (let i = 0; i < array.length && !subscriber.closed; i++) {\n subscriber.next(array[i]);\n }\n subscriber.complete();\n });\n}\nexport function fromPromise(promise) {\n return new Observable((subscriber) => {\n promise\n .then((value) => {\n if (!subscriber.closed) {\n subscriber.next(value);\n subscriber.complete();\n }\n }, (err) => subscriber.error(err))\n .then(null, reportUnhandledError);\n });\n}\nexport function fromIterable(iterable) {\n return new Observable((subscriber) => {\n for (const value of iterable) {\n subscriber.next(value);\n if (subscriber.closed) {\n return;\n }\n }\n subscriber.complete();\n });\n}\nexport function fromAsyncIterable(asyncIterable) {\n return new Observable((subscriber) => {\n process(asyncIterable, subscriber).catch((err) => subscriber.error(err));\n });\n}\nexport function fromReadableStreamLike(readableStream) {\n return fromAsyncIterable(readableStreamLikeToAsyncGenerator(readableStream));\n}\nfunction process(asyncIterable, subscriber) {\n var asyncIterable_1, asyncIterable_1_1;\n var e_1, _a;\n return __awaiter(this, void 0, void 0, function* () {\n try {\n for (asyncIterable_1 = __asyncValues(asyncIterable); asyncIterable_1_1 = yield asyncIterable_1.next(), !asyncIterable_1_1.done;) {\n const value = asyncIterable_1_1.value;\n subscriber.next(value);\n if (subscriber.closed) {\n return;\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (asyncIterable_1_1 && !asyncIterable_1_1.done && (_a = asyncIterable_1.return)) yield _a.call(asyncIterable_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n subscriber.complete();\n });\n}\n","import { popScheduler } from '../util/args';\nimport { from } from './from';\nexport function of(...args) {\n const scheduler = popScheduler(args);\n return from(args, scheduler);\n}\n","import { Subscriber } from '../Subscriber';\nexport class OperatorSubscriber extends Subscriber {\n constructor(destination, onNext, onComplete, onError, onFinalize) {\n super(destination);\n this.onFinalize = onFinalize;\n this._next = onNext\n ? function (value) {\n try {\n onNext(value);\n }\n catch (err) {\n destination.error(err);\n }\n }\n : super._next;\n this._error = onError\n ? function (err) {\n try {\n onError(err);\n }\n catch (err) {\n destination.error(err);\n }\n finally {\n this.unsubscribe();\n }\n }\n : super._error;\n this._complete = onComplete\n ? function () {\n try {\n onComplete();\n }\n catch (err) {\n destination.error(err);\n }\n finally {\n this.unsubscribe();\n }\n }\n : super._complete;\n }\n unsubscribe() {\n var _a;\n const { closed } = this;\n super.unsubscribe();\n !closed && ((_a = this.onFinalize) === null || _a === void 0 ? void 0 : _a.call(this));\n }\n}\n","import { mergeMap } from './mergeMap';\nimport { isFunction } from '../util/isFunction';\nexport function concatMap(project, resultSelector) {\n return isFunction(resultSelector) ? mergeMap(project, resultSelector, 1) : mergeMap(project, 1);\n}\n","import { operate } from '../util/lift';\nimport { OperatorSubscriber } from './OperatorSubscriber';\nexport function filter(predicate, thisArg) {\n return operate((source, subscriber) => {\n let index = 0;\n source.subscribe(new OperatorSubscriber(subscriber, (value) => predicate.call(thisArg, value, index++) && subscriber.next(value)));\n });\n}\n","import { operate } from '../util/lift';\nimport { OperatorSubscriber } from './OperatorSubscriber';\nexport function map(project, thisArg) {\n return operate((source, subscriber) => {\n let index = 0;\n source.subscribe(new OperatorSubscriber(subscriber, (value) => {\n subscriber.next(project.call(thisArg, value, index++));\n }));\n });\n}\n","import { mergeMap } from './mergeMap';\nimport { identity } from '../util/identity';\nexport function mergeAll(concurrent = Infinity) {\n return mergeMap(identity, concurrent);\n}\n","import { map } from './map';\nimport { innerFrom } from '../observable/innerFrom';\nimport { operate } from '../util/lift';\nimport { mergeInternals } from './mergeInternals';\nimport { isFunction } from '../util/isFunction';\nexport function mergeMap(project, resultSelector, concurrent = Infinity) {\n if (isFunction(resultSelector)) {\n return mergeMap((a, i) => map((b, ii) => resultSelector(a, b, i, ii))(innerFrom(project(a, i))), concurrent);\n }\n else if (typeof resultSelector === 'number') {\n concurrent = resultSelector;\n }\n return operate((source, subscriber) => mergeInternals(source, subscriber, project, concurrent));\n}\n","import { innerFrom } from '../observable/innerFrom';\nimport { executeSchedule } from '../util/executeSchedule';\nimport { OperatorSubscriber } from './OperatorSubscriber';\nexport function mergeInternals(source, subscriber, project, concurrent, onBeforeNext, expand, innerSubScheduler, additionalTeardown) {\n const buffer = [];\n let active = 0;\n let index = 0;\n let isComplete = false;\n const checkComplete = () => {\n if (isComplete && !buffer.length && !active) {\n subscriber.complete();\n }\n };\n const outerNext = (value) => (active < concurrent ? doInnerSub(value) : buffer.push(value));\n const doInnerSub = (value) => {\n expand && subscriber.next(value);\n active++;\n let innerComplete = false;\n innerFrom(project(value, index++)).subscribe(new OperatorSubscriber(subscriber, (innerValue) => {\n onBeforeNext === null || onBeforeNext === void 0 ? void 0 : onBeforeNext(innerValue);\n if (expand) {\n outerNext(innerValue);\n }\n else {\n subscriber.next(innerValue);\n }\n }, () => {\n innerComplete = true;\n }, undefined, () => {\n if (innerComplete) {\n try {\n active--;\n while (buffer.length && active < concurrent) {\n const bufferedValue = buffer.shift();\n if (innerSubScheduler) {\n executeSchedule(subscriber, innerSubScheduler, () => doInnerSub(bufferedValue));\n }\n else {\n doInnerSub(bufferedValue);\n }\n }\n checkComplete();\n }\n catch (err) {\n subscriber.error(err);\n }\n }\n }));\n };\n source.subscribe(new OperatorSubscriber(subscriber, outerNext, () => {\n isComplete = true;\n checkComplete();\n }));\n return () => {\n additionalTeardown === null || additionalTeardown === void 0 ? void 0 : additionalTeardown();\n };\n}\n","import { from } from '../observable/from';\nimport { take } from '../operators/take';\nimport { Subject } from '../Subject';\nimport { SafeSubscriber } from '../Subscriber';\nimport { operate } from '../util/lift';\nexport function share(options = {}) {\n const { connector = () => new Subject(), resetOnError = true, resetOnComplete = true, resetOnRefCountZero = true } = options;\n return (wrapperSource) => {\n let connection = null;\n let resetConnection = null;\n let subject = null;\n let refCount = 0;\n let hasCompleted = false;\n let hasErrored = false;\n const cancelReset = () => {\n resetConnection === null || resetConnection === void 0 ? void 0 : resetConnection.unsubscribe();\n resetConnection = null;\n };\n const reset = () => {\n cancelReset();\n connection = subject = null;\n hasCompleted = hasErrored = false;\n };\n const resetAndUnsubscribe = () => {\n const conn = connection;\n reset();\n conn === null || conn === void 0 ? void 0 : conn.unsubscribe();\n };\n return operate((source, subscriber) => {\n refCount++;\n if (!hasErrored && !hasCompleted) {\n cancelReset();\n }\n const dest = (subject = subject !== null && subject !== void 0 ? subject : connector());\n subscriber.add(() => {\n refCount--;\n if (refCount === 0 && !hasErrored && !hasCompleted) {\n resetConnection = handleReset(resetAndUnsubscribe, resetOnRefCountZero);\n }\n });\n dest.subscribe(subscriber);\n if (!connection) {\n connection = new SafeSubscriber({\n next: (value) => dest.next(value),\n error: (err) => {\n hasErrored = true;\n cancelReset();\n resetConnection = handleReset(reset, resetOnError, err);\n dest.error(err);\n },\n complete: () => {\n hasCompleted = true;\n cancelReset();\n resetConnection = handleReset(reset, resetOnComplete);\n dest.complete();\n },\n });\n from(source).subscribe(connection);\n }\n })(wrapperSource);\n };\n}\nfunction handleReset(reset, on, ...args) {\n if (on === true) {\n reset();\n return null;\n }\n if (on === false) {\n return null;\n }\n return on(...args)\n .pipe(take(1))\n .subscribe(() => reset());\n}\n","import { Subject } from './Subject';\nimport { dateTimestampProvider } from './scheduler/dateTimestampProvider';\nexport class ReplaySubject extends Subject {\n constructor(_bufferSize = Infinity, _windowTime = Infinity, _timestampProvider = dateTimestampProvider) {\n super();\n this._bufferSize = _bufferSize;\n this._windowTime = _windowTime;\n this._timestampProvider = _timestampProvider;\n this._buffer = [];\n this._infiniteTimeWindow = true;\n this._infiniteTimeWindow = _windowTime === Infinity;\n this._bufferSize = Math.max(1, _bufferSize);\n this._windowTime = Math.max(1, _windowTime);\n }\n next(value) {\n const { isStopped, _buffer, _infiniteTimeWindow, _timestampProvider, _windowTime } = this;\n if (!isStopped) {\n _buffer.push(value);\n !_infiniteTimeWindow && _buffer.push(_timestampProvider.now() + _windowTime);\n }\n this._trimBuffer();\n super.next(value);\n }\n _subscribe(subscriber) {\n this._throwIfClosed();\n this._trimBuffer();\n const subscription = this._innerSubscribe(subscriber);\n const { _infiniteTimeWindow, _buffer } = this;\n const copy = _buffer.slice();\n for (let i = 0; i < copy.length && !subscriber.closed; i += _infiniteTimeWindow ? 1 : 2) {\n subscriber.next(copy[i]);\n }\n this._checkFinalizedStatuses(subscriber);\n return subscription;\n }\n _trimBuffer() {\n const { _bufferSize, _timestampProvider, _buffer, _infiniteTimeWindow } = this;\n const adjustedBufferSize = (_infiniteTimeWindow ? 1 : 2) * _bufferSize;\n _bufferSize < Infinity && adjustedBufferSize < _buffer.length && _buffer.splice(0, _buffer.length - adjustedBufferSize);\n if (!_infiniteTimeWindow) {\n const now = _timestampProvider.now();\n let last = 0;\n for (let i = 1; i < _buffer.length && _buffer[i] <= now; i += 2) {\n last = i;\n }\n last && _buffer.splice(0, last + 1);\n }\n }\n}\n","import { ReplaySubject } from '../ReplaySubject';\nimport { share } from './share';\nexport function shareReplay(configOrBufferSize, windowTime, scheduler) {\n var _a, _b;\n let bufferSize;\n let refCount = false;\n if (configOrBufferSize && typeof configOrBufferSize === 'object') {\n bufferSize = (_a = configOrBufferSize.bufferSize) !== null && _a !== void 0 ? _a : Infinity;\n windowTime = (_b = configOrBufferSize.windowTime) !== null && _b !== void 0 ? _b : Infinity;\n refCount = !!configOrBufferSize.refCount;\n scheduler = configOrBufferSize.scheduler;\n }\n else {\n bufferSize = configOrBufferSize !== null && configOrBufferSize !== void 0 ? configOrBufferSize : Infinity;\n }\n return share({\n connector: () => new ReplaySubject(bufferSize, windowTime, scheduler),\n resetOnError: true,\n resetOnComplete: false,\n resetOnRefCountZero: refCount\n });\n}\n","import { EMPTY } from '../observable/empty';\nimport { operate } from '../util/lift';\nimport { OperatorSubscriber } from './OperatorSubscriber';\nexport function take(count) {\n return count <= 0\n ?\n () => EMPTY\n : operate((source, subscriber) => {\n let seen = 0;\n source.subscribe(new OperatorSubscriber(subscriber, (value) => {\n if (++seen <= count) {\n subscriber.next(value);\n if (count <= seen) {\n subscriber.complete();\n }\n }\n }));\n });\n}\n","export const dateTimestampProvider = {\n now() {\n return (dateTimestampProvider.delegate || Date).now();\n },\n delegate: undefined,\n};\n","export const timeoutProvider = {\n setTimeout(...args) {\n const { delegate } = timeoutProvider;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.setTimeout) || setTimeout)(...args);\n },\n clearTimeout(handle) {\n const { delegate } = timeoutProvider;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearTimeout) || clearTimeout)(handle);\n },\n delegate: undefined,\n};\n","export function getSymbolIterator() {\n if (typeof Symbol !== 'function' || !Symbol.iterator) {\n return '@@iterator';\n }\n return Symbol.iterator;\n}\nexport const iterator = getSymbolIterator();\n","export const observable = (() => (typeof Symbol === 'function' && Symbol.observable) || '@@observable')();\n","import { createErrorClass } from './createErrorClass';\nexport const EmptyError = createErrorClass((_super) => function EmptyErrorImpl() {\n _super(this);\n this.name = 'EmptyError';\n this.message = 'no elements in sequence';\n});\n","import { isFunction } from './isFunction';\nimport { isScheduler } from './isScheduler';\nfunction last(arr) {\n return arr[arr.length - 1];\n}\nexport function popResultSelector(args) {\n return isFunction(last(args)) ? args.pop() : undefined;\n}\nexport function popScheduler(args) {\n return isScheduler(last(args)) ? args.pop() : undefined;\n}\nexport function popNumber(args, defaultValue) {\n return typeof last(args) === 'number' ? args.pop() : defaultValue;\n}\n","import { isFunction } from './isFunction';\nexport function isScheduler(value) {\n return value && isFunction(value.schedule);\n}\n","const { isArray } = Array;\nconst { getPrototypeOf, prototype: objectProto, keys: getKeys } = Object;\nexport function argsArgArrayOrObject(args) {\n if (args.length === 1) {\n const first = args[0];\n if (isArray(first)) {\n return { args: first, keys: null };\n }\n if (isPOJO(first)) {\n const keys = getKeys(first);\n return {\n args: keys.map((key) => first[key]),\n keys,\n };\n }\n }\n return { args: args, keys: null };\n}\nfunction isPOJO(obj) {\n return obj && typeof obj === 'object' && getPrototypeOf(obj) === objectProto;\n}\n","export function arrRemove(arr, item) {\n if (arr) {\n const index = arr.indexOf(item);\n 0 <= index && arr.splice(index, 1);\n }\n}\n","export function createErrorClass(createImpl) {\n const _super = (instance) => {\n Error.call(instance);\n instance.stack = new Error().stack;\n };\n const ctorFunc = createImpl(_super);\n ctorFunc.prototype = Object.create(Error.prototype);\n ctorFunc.prototype.constructor = ctorFunc;\n return ctorFunc;\n}\n","export function createObject(keys, values) {\n return keys.reduce((result, key, i) => ((result[key] = values[i]), result), {});\n}\n","import { config } from '../config';\nlet context = null;\nexport function errorContext(cb) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n const isRoot = !context;\n if (isRoot) {\n context = { errorThrown: false, error: null };\n }\n cb();\n if (isRoot) {\n const { errorThrown, error } = context;\n context = null;\n if (errorThrown) {\n throw error;\n }\n }\n }\n else {\n cb();\n }\n}\nexport function captureError(err) {\n if (config.useDeprecatedSynchronousErrorHandling && context) {\n context.errorThrown = true;\n context.error = err;\n }\n}\n","export function executeSchedule(parentSubscription, scheduler, work, delay = 0, repeat = false) {\n const scheduleSubscription = scheduler.schedule(function () {\n work();\n if (repeat) {\n parentSubscription.add(this.schedule(null, delay));\n }\n else {\n this.unsubscribe();\n }\n }, delay);\n parentSubscription.add(scheduleSubscription);\n if (!repeat) {\n return scheduleSubscription;\n }\n}\n","export function identity(x) {\n return x;\n}\n","export const isArrayLike = ((x) => x && typeof x.length === 'number' && typeof x !== 'function');\n","import { isFunction } from './isFunction';\nexport function isAsyncIterable(obj) {\n return Symbol.asyncIterator && isFunction(obj === null || obj === void 0 ? void 0 : obj[Symbol.asyncIterator]);\n}\n","export function isFunction(value) {\n return typeof value === 'function';\n}\n","import { observable as Symbol_observable } from '../symbol/observable';\nimport { isFunction } from './isFunction';\nexport function isInteropObservable(input) {\n return isFunction(input[Symbol_observable]);\n}\n","import { iterator as Symbol_iterator } from '../symbol/iterator';\nimport { isFunction } from './isFunction';\nexport function isIterable(input) {\n return isFunction(input === null || input === void 0 ? void 0 : input[Symbol_iterator]);\n}\n","import { isFunction } from \"./isFunction\";\nexport function isPromise(value) {\n return isFunction(value === null || value === void 0 ? void 0 : value.then);\n}\n","import { __asyncGenerator, __await } from \"tslib\";\nimport { isFunction } from './isFunction';\nexport function readableStreamLikeToAsyncGenerator(readableStream) {\n return __asyncGenerator(this, arguments, function* readableStreamLikeToAsyncGenerator_1() {\n const reader = readableStream.getReader();\n try {\n while (true) {\n const { value, done } = yield __await(reader.read());\n if (done) {\n return yield __await(void 0);\n }\n yield yield __await(value);\n }\n }\n finally {\n reader.releaseLock();\n }\n });\n}\nexport function isReadableStreamLike(obj) {\n return isFunction(obj === null || obj === void 0 ? void 0 : obj.getReader);\n}\n","import { isFunction } from './isFunction';\nexport function hasLift(source) {\n return isFunction(source === null || source === void 0 ? void 0 : source.lift);\n}\nexport function operate(init) {\n return (source) => {\n if (hasLift(source)) {\n return source.lift(function (liftedSource) {\n try {\n return init(liftedSource, this);\n }\n catch (err) {\n this.error(err);\n }\n });\n }\n throw new TypeError('Unable to lift unknown Observable type');\n };\n}\n","import { map } from \"../operators/map\";\nconst { isArray } = Array;\nfunction callOrApply(fn, args) {\n return isArray(args) ? fn(...args) : fn(args);\n}\nexport function mapOneOrManyArgs(fn) {\n return map(args => callOrApply(fn, args));\n}\n","import { 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 { config } from '../config';\nimport { timeoutProvider } from '../scheduler/timeoutProvider';\nexport function reportUnhandledError(err) {\n timeoutProvider.setTimeout(() => {\n const { onUnhandledError } = config;\n if (onUnhandledError) {\n onUnhandledError(err);\n }\n else {\n throw err;\n }\n });\n}\n","export function createInvalidObservableTypeError(input) {\n return new TypeError(`You provided ${input !== null && typeof input === 'object' ? 'an invalid object' : `'${input}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`);\n}\n","\nexport default class TinyQueue {\n constructor(data = [], compare = defaultCompare) {\n this.data = data;\n this.length = this.data.length;\n this.compare = compare;\n\n if (this.length > 0) {\n for (let i = (this.length >> 1) - 1; i >= 0; i--) this._down(i);\n }\n }\n\n push(item) {\n this.data.push(item);\n this.length++;\n this._up(this.length - 1);\n }\n\n pop() {\n if (this.length === 0) return undefined;\n\n const top = this.data[0];\n const bottom = this.data.pop();\n this.length--;\n\n if (this.length > 0) {\n this.data[0] = bottom;\n this._down(0);\n }\n\n return top;\n }\n\n peek() {\n return this.data[0];\n }\n\n _up(pos) {\n const {data, compare} = this;\n const item = data[pos];\n\n while (pos > 0) {\n const parent = (pos - 1) >> 1;\n const current = data[parent];\n if (compare(item, current) >= 0) break;\n data[pos] = current;\n pos = parent;\n }\n\n data[pos] = item;\n }\n\n _down(pos) {\n const {data, compare} = this;\n const halfLength = this.length >> 1;\n const item = data[pos];\n\n while (pos < halfLength) {\n let left = (pos << 1) + 1;\n let best = data[left];\n const right = left + 1;\n\n if (right < this.length && compare(data[right], best) < 0) {\n left = right;\n best = data[right];\n }\n if (compare(best, item) >= 0) break;\n\n data[pos] = best;\n pos = left;\n }\n\n data[pos] = item;\n }\n}\n\nfunction defaultCompare(a, b) {\n return a < b ? -1 : a > b ? 1 : 0;\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 (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\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 var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(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, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, 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\n/** @deprecated */\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\n/** @deprecated */\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 __spreadArray(to, from) {\r\n for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)\r\n to[j] = from[i];\r\n return to;\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\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\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 (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, 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","/******************************************************************************\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 (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\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 (g && (g = 0, op[0] && (_ = 0)), _) 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 var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(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, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, 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\n/** @deprecated */\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\n/** @deprecated */\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 __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\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\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\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 (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, 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, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n","/**\n * @license Angular v15.1.0-rc.0\n * (c) 2010-2022 Google LLC. https://angular.io/\n * License: MIT\n */\n\n/**\n * An injectable service that produces an animation sequence programmatically within an\n * Angular component or directive.\n * Provided by the `BrowserAnimationsModule` or `NoopAnimationsModule`.\n *\n * @usageNotes\n *\n * To use this service, add it to your component or directive as a dependency.\n * The service is instantiated along with your component.\n *\n * Apps do not typically need to create their own animation players, but if you\n * do need to, follow these steps:\n *\n * 1. Use the <code>[AnimationBuilder.build](api/animations/AnimationBuilder#build)()</code> method\n * to create a programmatic animation. The method returns an `AnimationFactory` instance.\n *\n * 2. Use the factory object to create an `AnimationPlayer` and attach it to a DOM element.\n *\n * 3. Use the player object to control the animation programmatically.\n *\n * For example:\n *\n * ```ts\n * // import the service from BrowserAnimationsModule\n * import {AnimationBuilder} from '@angular/animations';\n * // require the service as a dependency\n * class MyCmp {\n * constructor(private _builder: AnimationBuilder) {}\n *\n * makeAnimation(element: any) {\n * // first define a reusable animation\n * const myAnimation = this._builder.build([\n * style({ width: 0 }),\n * animate(1000, style({ width: '100px' }))\n * ]);\n *\n * // use the returned factory object to create a player\n * const player = myAnimation.create(element);\n *\n * player.play();\n * }\n * }\n * ```\n *\n * @publicApi\n */\nclass AnimationBuilder {\n}\n/**\n * A factory object returned from the\n * <code>[AnimationBuilder.build](api/animations/AnimationBuilder#build)()</code>\n * method.\n *\n * @publicApi\n */\nclass AnimationFactory {\n}\n\n/**\n * Specifies automatic styling.\n *\n * @publicApi\n */\nconst AUTO_STYLE = '*';\n/**\n * Creates a named animation trigger, containing a list of [`state()`](api/animations/state)\n * and `transition()` entries to be evaluated when the expression\n * bound to the trigger changes.\n *\n * @param name An identifying string.\n * @param definitions An animation definition object, containing an array of\n * [`state()`](api/animations/state) and `transition()` declarations.\n *\n * @return An object that encapsulates the trigger data.\n *\n * @usageNotes\n * Define an animation trigger in the `animations` section of `@Component` metadata.\n * In the template, reference the trigger by name and bind it to a trigger expression that\n * evaluates to a defined animation state, using the following format:\n *\n * `[@triggerName]=\"expression\"`\n *\n * Animation trigger bindings convert all values to strings, and then match the\n * previous and current values against any linked transitions.\n * Booleans can be specified as `1` or `true` and `0` or `false`.\n *\n * ### Usage Example\n *\n * The following example creates an animation trigger reference based on the provided\n * name value.\n * The provided animation value is expected to be an array consisting of state and\n * transition declarations.\n *\n * ```typescript\n * @Component({\n * selector: \"my-component\",\n * templateUrl: \"my-component-tpl.html\",\n * animations: [\n * trigger(\"myAnimationTrigger\", [\n * state(...),\n * state(...),\n * transition(...),\n * transition(...)\n * ])\n * ]\n * })\n * class MyComponent {\n * myStatusExp = \"something\";\n * }\n * ```\n *\n * The template associated with this component makes use of the defined trigger\n * by binding to an element within its template code.\n *\n * ```html\n * <!-- somewhere inside of my-component-tpl.html -->\n * <div [@myAnimationTrigger]=\"myStatusExp\">...</div>\n * ```\n *\n * ### Using an inline function\n * The `transition` animation method also supports reading an inline function which can decide\n * if its associated animation should be run.\n *\n * ```typescript\n * // this method is run each time the `myAnimationTrigger` trigger value changes.\n * function myInlineMatcherFn(fromState: string, toState: string, element: any, params: {[key:\n string]: any}): boolean {\n * // notice that `element` and `params` are also available here\n * return toState == 'yes-please-animate';\n * }\n *\n * @Component({\n * selector: 'my-component',\n * templateUrl: 'my-component-tpl.html',\n * animations: [\n * trigger('myAnimationTrigger', [\n * transition(myInlineMatcherFn, [\n * // the animation sequence code\n * ]),\n * ])\n * ]\n * })\n * class MyComponent {\n * myStatusExp = \"yes-please-animate\";\n * }\n * ```\n *\n * ### Disabling Animations\n * When true, the special animation control binding `@.disabled` binding prevents\n * all animations from rendering.\n * Place the `@.disabled` binding on an element to disable\n * animations on the element itself, as well as any inner animation triggers\n * within the element.\n *\n * The following example shows how to use this feature:\n *\n * ```typescript\n * @Component({\n * selector: 'my-component',\n * template: `\n * <div [@.disabled]=\"isDisabled\">\n * <div [@childAnimation]=\"exp\"></div>\n * </div>\n * `,\n * animations: [\n * trigger(\"childAnimation\", [\n * // ...\n * ])\n * ]\n * })\n * class MyComponent {\n * isDisabled = true;\n * exp = '...';\n * }\n * ```\n *\n * When `@.disabled` is true, it prevents the `@childAnimation` trigger from animating,\n * along with any inner animations.\n *\n * ### Disable animations application-wide\n * When an area of the template is set to have animations disabled,\n * **all** inner components have their animations disabled as well.\n * This means that you can disable all animations for an app\n * by placing a host binding set on `@.disabled` on the topmost Angular component.\n *\n * ```typescript\n * import {Component, HostBinding} from '@angular/core';\n *\n * @Component({\n * selector: 'app-component',\n * templateUrl: 'app.component.html',\n * })\n * class AppComponent {\n * @HostBinding('@.disabled')\n * public animationsDisabled = true;\n * }\n * ```\n *\n * ### Overriding disablement of inner animations\n * Despite inner animations being disabled, a parent animation can `query()`\n * for inner elements located in disabled areas of the template and still animate\n * them if needed. This is also the case for when a sub animation is\n * queried by a parent and then later animated using `animateChild()`.\n *\n * ### Detecting when an animation is disabled\n * If a region of the DOM (or the entire application) has its animations disabled, the animation\n * trigger callbacks still fire, but for zero seconds. When the callback fires, it provides\n * an instance of an `AnimationEvent`. If animations are disabled,\n * the `.disabled` flag on the event is true.\n *\n * @publicApi\n */\nfunction trigger(name, definitions) {\n return { type: 7 /* AnimationMetadataType.Trigger */, name, definitions, options: {} };\n}\n/**\n * Defines an animation step that combines styling information with timing information.\n *\n * @param timings Sets `AnimateTimings` for the parent animation.\n * A string in the format \"duration [delay] [easing]\".\n * - Duration and delay are expressed as a number and optional time unit,\n * such as \"1s\" or \"10ms\" for one second and 10 milliseconds, respectively.\n * The default unit is milliseconds.\n * - The easing value controls how the animation accelerates and decelerates\n * during its runtime. Value is one of `ease`, `ease-in`, `ease-out`,\n * `ease-in-out`, or a `cubic-bezier()` function call.\n * If not supplied, no easing is applied.\n *\n * For example, the string \"1s 100ms ease-out\" specifies a duration of\n * 1000 milliseconds, and delay of 100 ms, and the \"ease-out\" easing style,\n * which decelerates near the end of the duration.\n * @param styles Sets AnimationStyles for the parent animation.\n * A function call to either `style()` or `keyframes()`\n * that returns a collection of CSS style entries to be applied to the parent animation.\n * When null, uses the styles from the destination state.\n * This is useful when describing an animation step that will complete an animation;\n * see \"Animating to the final state\" in `transitions()`.\n * @returns An object that encapsulates the animation step.\n *\n * @usageNotes\n * Call within an animation `sequence()`, `{@link animations/group group()}`, or\n * `transition()` call to specify an animation step\n * that applies given style data to the parent animation for a given amount of time.\n *\n * ### Syntax Examples\n * **Timing examples**\n *\n * The following examples show various `timings` specifications.\n * - `animate(500)` : Duration is 500 milliseconds.\n * - `animate(\"1s\")` : Duration is 1000 milliseconds.\n * - `animate(\"100ms 0.5s\")` : Duration is 100 milliseconds, delay is 500 milliseconds.\n * - `animate(\"5s ease-in\")` : Duration is 5000 milliseconds, easing in.\n * - `animate(\"5s 10ms cubic-bezier(.17,.67,.88,.1)\")` : Duration is 5000 milliseconds, delay is 10\n * milliseconds, easing according to a bezier curve.\n *\n * **Style examples**\n *\n * The following example calls `style()` to set a single CSS style.\n * ```typescript\n * animate(500, style({ background: \"red\" }))\n * ```\n * The following example calls `keyframes()` to set a CSS style\n * to different values for successive keyframes.\n * ```typescript\n * animate(500, keyframes(\n * [\n * style({ background: \"blue\" }),\n * style({ background: \"red\" })\n * ])\n * ```\n *\n * @publicApi\n */\nfunction animate(timings, styles = null) {\n return { type: 4 /* AnimationMetadataType.Animate */, styles, timings };\n}\n/**\n * @description Defines a list of animation steps to be run in parallel.\n *\n * @param steps An array of animation step objects.\n * - When steps are defined by `style()` or `animate()`\n * function calls, each call within the group is executed instantly.\n * - To specify offset styles to be applied at a later time, define steps with\n * `keyframes()`, or use `animate()` calls with a delay value.\n * For example:\n *\n * ```typescript\n * group([\n * animate(\"1s\", style({ background: \"black\" })),\n * animate(\"2s\", style({ color: \"white\" }))\n * ])\n * ```\n *\n * @param options An options object containing a delay and\n * developer-defined parameters that provide styling defaults and\n * can be overridden on invocation.\n *\n * @return An object that encapsulates the group data.\n *\n * @usageNotes\n * Grouped animations are useful when a series of styles must be\n * animated at different starting times and closed off at different ending times.\n *\n * When called within a `sequence()` or a\n * `transition()` call, does not continue to the next\n * instruction until all of the inner animation steps have completed.\n *\n * @publicApi\n */\nfunction group(steps, options = null) {\n return { type: 3 /* AnimationMetadataType.Group */, steps, options };\n}\n/**\n * Defines a list of animation steps to be run sequentially, one by one.\n *\n * @param steps An array of animation step objects.\n * - Steps defined by `style()` calls apply the styling data immediately.\n * - Steps defined by `animate()` calls apply the styling data over time\n * as specified by the timing data.\n *\n * ```typescript\n * sequence([\n * style({ opacity: 0 }),\n * animate(\"1s\", style({ opacity: 1 }))\n * ])\n * ```\n *\n * @param options An options object containing a delay and\n * developer-defined parameters that provide styling defaults and\n * can be overridden on invocation.\n *\n * @return An object that encapsulates the sequence data.\n *\n * @usageNotes\n * When you pass an array of steps to a\n * `transition()` call, the steps run sequentially by default.\n * Compare this to the `{@link animations/group group()}` call, which runs animation steps in\n *parallel.\n *\n * When a sequence is used within a `{@link animations/group group()}` or a `transition()` call,\n * execution continues to the next instruction only after each of the inner animation\n * steps have completed.\n *\n * @publicApi\n **/\nfunction sequence(steps, options = null) {\n return { type: 2 /* AnimationMetadataType.Sequence */, steps, options };\n}\n/**\n * Declares a key/value object containing CSS properties/styles that\n * can then be used for an animation [`state`](api/animations/state), within an animation\n *`sequence`, or as styling data for calls to `animate()` and `keyframes()`.\n *\n * @param tokens A set of CSS styles or HTML styles associated with an animation state.\n * The value can be any of the following:\n * - A key-value style pair associating a CSS property with a value.\n * - An array of key-value style pairs.\n * - An asterisk (*), to use auto-styling, where styles are derived from the element\n * being animated and applied to the animation when it starts.\n *\n * Auto-styling can be used to define a state that depends on layout or other\n * environmental factors.\n *\n * @return An object that encapsulates the style data.\n *\n * @usageNotes\n * The following examples create animation styles that collect a set of\n * CSS property values:\n *\n * ```typescript\n * // string values for CSS properties\n * style({ background: \"red\", color: \"blue\" })\n *\n * // numerical pixel values\n * style({ width: 100, height: 0 })\n * ```\n *\n * The following example uses auto-styling to allow an element to animate from\n * a height of 0 up to its full height:\n *\n * ```\n * style({ height: 0 }),\n * animate(\"1s\", style({ height: \"*\" }))\n * ```\n *\n * @publicApi\n **/\nfunction style(tokens) {\n return { type: 6 /* AnimationMetadataType.Style */, styles: tokens, offset: null };\n}\n/**\n * Declares an animation state within a trigger attached to an element.\n *\n * @param name One or more names for the defined state in a comma-separated string.\n * The following reserved state names can be supplied to define a style for specific use\n * cases:\n *\n * - `void` You can associate styles with this name to be used when\n * the element is detached from the application. For example, when an `ngIf` evaluates\n * to false, the state of the associated element is void.\n * - `*` (asterisk) Indicates the default state. You can associate styles with this name\n * to be used as the fallback when the state that is being animated is not declared\n * within the trigger.\n *\n * @param styles A set of CSS styles associated with this state, created using the\n * `style()` function.\n * This set of styles persists on the element once the state has been reached.\n * @param options Parameters that can be passed to the state when it is invoked.\n * 0 or more key-value pairs.\n * @return An object that encapsulates the new state data.\n *\n * @usageNotes\n * Use the `trigger()` function to register states to an animation trigger.\n * Use the `transition()` function to animate between states.\n * When a state is active within a component, its associated styles persist on the element,\n * even when the animation ends.\n *\n * @publicApi\n **/\nfunction state(name, styles, options) {\n return { type: 0 /* AnimationMetadataType.State */, name, styles, options };\n}\n/**\n * Defines a set of animation styles, associating each style with an optional `offset` value.\n *\n * @param steps A set of animation styles with optional offset data.\n * The optional `offset` value for a style specifies a percentage of the total animation\n * time at which that style is applied.\n * @returns An object that encapsulates the keyframes data.\n *\n * @usageNotes\n * Use with the `animate()` call. Instead of applying animations\n * from the current state\n * to the destination state, keyframes describe how each style entry is applied and at what point\n * within the animation arc.\n * Compare [CSS Keyframe Animations](https://www.w3schools.com/css/css3_animations.asp).\n *\n * ### Usage\n *\n * In the following example, the offset values describe\n * when each `backgroundColor` value is applied. The color is red at the start, and changes to\n * blue when 20% of the total time has elapsed.\n *\n * ```typescript\n * // the provided offset values\n * animate(\"5s\", keyframes([\n * style({ backgroundColor: \"red\", offset: 0 }),\n * style({ backgroundColor: \"blue\", offset: 0.2 }),\n * style({ backgroundColor: \"orange\", offset: 0.3 }),\n * style({ backgroundColor: \"black\", offset: 1 })\n * ]))\n * ```\n *\n * If there are no `offset` values specified in the style entries, the offsets\n * are calculated automatically.\n *\n * ```typescript\n * animate(\"5s\", keyframes([\n * style({ backgroundColor: \"red\" }) // offset = 0\n * style({ backgroundColor: \"blue\" }) // offset = 0.33\n * style({ backgroundColor: \"orange\" }) // offset = 0.66\n * style({ backgroundColor: \"black\" }) // offset = 1\n * ]))\n *```\n\n * @publicApi\n */\nfunction keyframes(steps) {\n return { type: 5 /* AnimationMetadataType.Keyframes */, steps };\n}\n/**\n * Declares an animation transition which is played when a certain specified condition is met.\n *\n * @param stateChangeExpr A string with a specific format or a function that specifies when the\n * animation transition should occur (see [State Change Expression](#state-change-expression)).\n *\n * @param steps One or more animation objects that represent the animation's instructions.\n *\n * @param options An options object that can be used to specify a delay for the animation or provide\n * custom parameters for it.\n *\n * @returns An object that encapsulates the transition data.\n *\n * @usageNotes\n *\n * ### State Change Expression\n *\n * The State Change Expression instructs Angular when to run the transition's animations, it can\n *either be\n * - a string with a specific syntax\n * - or a function that compares the previous and current state (value of the expression bound to\n * the element's trigger) and returns `true` if the transition should occur or `false` otherwise\n *\n * The string format can be:\n * - `fromState => toState`, which indicates that the transition's animations should occur then the\n * expression bound to the trigger's element goes from `fromState` to `toState`\n *\n * _Example:_\n * ```typescript\n * transition('open => closed', animate('.5s ease-out', style({ height: 0 }) ))\n * ```\n *\n * - `fromState <=> toState`, which indicates that the transition's animations should occur then\n * the expression bound to the trigger's element goes from `fromState` to `toState` or vice versa\n *\n * _Example:_\n * ```typescript\n * transition('enabled <=> disabled', animate('1s cubic-bezier(0.8,0.3,0,1)'))\n * ```\n *\n * - `:enter`/`:leave`, which indicates that the transition's animations should occur when the\n * element enters or exists the DOM\n *\n * _Example:_\n * ```typescript\n * transition(':enter', [\n * style({ opacity: 0 }),\n * animate('500ms', style({ opacity: 1 }))\n * ])\n * ```\n *\n * - `:increment`/`:decrement`, which indicates that the transition's animations should occur when\n * the numerical expression bound to the trigger's element has increased in value or decreased\n *\n * _Example:_\n * ```typescript\n * transition(':increment', query('@counter', animateChild()))\n * ```\n *\n * - a sequence of any of the above divided by commas, which indicates that transition's animations\n * should occur whenever one of the state change expressions matches\n *\n * _Example:_\n * ```typescript\n * transition(':increment, * => enabled, :enter', animate('1s ease', keyframes([\n * style({ transform: 'scale(1)', offset: 0}),\n * style({ transform: 'scale(1.1)', offset: 0.7}),\n * style({ transform: 'scale(1)', offset: 1})\n * ]))),\n * ```\n *\n * Also note that in such context:\n * - `void` can be used to indicate the absence of the element\n * - asterisks can be used as wildcards that match any state\n * - (as a consequence of the above, `void => *` is equivalent to `:enter` and `* => void` is\n * equivalent to `:leave`)\n * - `true` and `false` also match expression values of `1` and `0` respectively (but do not match\n * _truthy_ and _falsy_ values)\n *\n * <div class=\"alert is-helpful\">\n *\n * Be careful about entering end leaving elements as their transitions present a common\n * pitfall for developers.\n *\n * Note that when an element with a trigger enters the DOM its `:enter` transition always\n * gets executed, but its `:leave` transition will not be executed if the element is removed\n * alongside its parent (as it will be removed \"without warning\" before its transition has\n * a chance to be executed, the only way that such transition can occur is if the element\n * is exiting the DOM on its own).\n *\n *\n * </div>\n *\n * ### Animating to a Final State\n *\n * If the final step in a transition is a call to `animate()` that uses a timing value\n * with no `style` data, that step is automatically considered the final animation arc,\n * for the element to reach the final state, in such case Angular automatically adds or removes\n * CSS styles to ensure that the element is in the correct final state.\n *\n *\n * ### Usage Examples\n *\n * - Transition animations applied based on\n * the trigger's expression value\n *\n * ```HTML\n * <div [@myAnimationTrigger]=\"myStatusExp\">\n * ...\n * </div>\n * ```\n *\n * ```typescript\n * trigger(\"myAnimationTrigger\", [\n * ..., // states\n * transition(\"on => off, open => closed\", animate(500)),\n * transition(\"* <=> error\", query('.indicator', animateChild()))\n * ])\n * ```\n *\n * - Transition animations applied based on custom logic dependent\n * on the trigger's expression value and provided parameters\n *\n * ```HTML\n * <div [@myAnimationTrigger]=\"{\n * value: stepName,\n * params: { target: currentTarget }\n * }\">\n * ...\n * </div>\n * ```\n *\n * ```typescript\n * trigger(\"myAnimationTrigger\", [\n * ..., // states\n * transition(\n * (fromState, toState, _element, params) =>\n * ['firststep', 'laststep'].includes(fromState.toLowerCase())\n * && toState === params?.['target'],\n * animate('1s')\n * )\n * ])\n * ```\n *\n * @publicApi\n **/\nfunction transition(stateChangeExpr, steps, options = null) {\n return { type: 1 /* AnimationMetadataType.Transition */, expr: stateChangeExpr, animation: steps, options };\n}\n/**\n * Produces a reusable animation that can be invoked in another animation or sequence,\n * by calling the `useAnimation()` function.\n *\n * @param steps One or more animation objects, as returned by the `animate()`\n * or `sequence()` function, that form a transformation from one state to another.\n * A sequence is used by default when you pass an array.\n * @param options An options object that can contain a delay value for the start of the\n * animation, and additional developer-defined parameters.\n * Provided values for additional parameters are used as defaults,\n * and override values can be passed to the caller on invocation.\n * @returns An object that encapsulates the animation data.\n *\n * @usageNotes\n * The following example defines a reusable animation, providing some default parameter\n * values.\n *\n * ```typescript\n * var fadeAnimation = animation([\n * style({ opacity: '{{ start }}' }),\n * animate('{{ time }}',\n * style({ opacity: '{{ end }}'}))\n * ],\n * { params: { time: '1000ms', start: 0, end: 1 }});\n * ```\n *\n * The following invokes the defined animation with a call to `useAnimation()`,\n * passing in override parameter values.\n *\n * ```js\n * useAnimation(fadeAnimation, {\n * params: {\n * time: '2s',\n * start: 1,\n * end: 0\n * }\n * })\n * ```\n *\n * If any of the passed-in parameter values are missing from this call,\n * the default values are used. If one or more parameter values are missing before a step is\n * animated, `useAnimation()` throws an error.\n *\n * @publicApi\n */\nfunction animation(steps, options = null) {\n return { type: 8 /* AnimationMetadataType.Reference */, animation: steps, options };\n}\n/**\n * Executes a queried inner animation element within an animation sequence.\n *\n * @param options An options object that can contain a delay value for the start of the\n * animation, and additional override values for developer-defined parameters.\n * @return An object that encapsulates the child animation data.\n *\n * @usageNotes\n * Each time an animation is triggered in Angular, the parent animation\n * has priority and any child animations are blocked. In order\n * for a child animation to run, the parent animation must query each of the elements\n * containing child animations, and run them using this function.\n *\n * Note that this feature is designed to be used with `query()` and it will only work\n * with animations that are assigned using the Angular animation library. CSS keyframes\n * and transitions are not handled by this API.\n *\n * @publicApi\n */\nfunction animateChild(options = null) {\n return { type: 9 /* AnimationMetadataType.AnimateChild */, options };\n}\n/**\n * Starts a reusable animation that is created using the `animation()` function.\n *\n * @param animation The reusable animation to start.\n * @param options An options object that can contain a delay value for the start of\n * the animation, and additional override values for developer-defined parameters.\n * @return An object that contains the animation parameters.\n *\n * @publicApi\n */\nfunction useAnimation(animation, options = null) {\n return { type: 10 /* AnimationMetadataType.AnimateRef */, animation, options };\n}\n/**\n * Finds one or more inner elements within the current element that is\n * being animated within a sequence. Use with `animate()`.\n *\n * @param selector The element to query, or a set of elements that contain Angular-specific\n * characteristics, specified with one or more of the following tokens.\n * - `query(\":enter\")` or `query(\":leave\")` : Query for newly inserted/removed elements (not\n * all elements can be queried via these tokens, see\n * [Entering and Leaving Elements](#entering-and-leaving-elements))\n * - `query(\":animating\")` : Query all currently animating elements.\n * - `query(\"@triggerName\")` : Query elements that contain an animation trigger.\n * - `query(\"@*\")` : Query all elements that contain an animation triggers.\n * - `query(\":self\")` : Include the current element into the animation sequence.\n *\n * @param animation One or more animation steps to apply to the queried element or elements.\n * An array is treated as an animation sequence.\n * @param options An options object. Use the 'limit' field to limit the total number of\n * items to collect.\n * @return An object that encapsulates the query data.\n *\n * @usageNotes\n *\n * ### Multiple Tokens\n *\n * Tokens can be merged into a combined query selector string. For example:\n *\n * ```typescript\n * query(':self, .record:enter, .record:leave, @subTrigger', [...])\n * ```\n *\n * The `query()` function collects multiple elements and works internally by using\n * `element.querySelectorAll`. Use the `limit` field of an options object to limit\n * the total number of items to be collected. For example:\n *\n * ```js\n * query('div', [\n * animate(...),\n * animate(...)\n * ], { limit: 1 })\n * ```\n *\n * By default, throws an error when zero items are found. Set the\n * `optional` flag to ignore this error. For example:\n *\n * ```js\n * query('.some-element-that-may-not-be-there', [\n * animate(...),\n * animate(...)\n * ], { optional: true })\n * ```\n *\n * ### Entering and Leaving Elements\n *\n * Not all elements can be queried via the `:enter` and `:leave` tokens, the only ones\n * that can are those that Angular assumes can enter/leave based on their own logic\n * (if their insertion/removal is simply a consequence of that of their parent they\n * should be queried via a different token in their parent's `:enter`/`:leave` transitions).\n *\n * The only elements Angular assumes can enter/leave based on their own logic (thus the only\n * ones that can be queried via the `:enter` and `:leave` tokens) are:\n * - Those inserted dynamically (via `ViewContainerRef`)\n * - Those that have a structural directive (which, under the hood, are a subset of the above ones)\n *\n * <div class=\"alert is-helpful\">\n *\n * Note that elements will be successfully queried via `:enter`/`:leave` even if their\n * insertion/removal is not done manually via `ViewContainerRef`or caused by their structural\n * directive (e.g. they enter/exit alongside their parent).\n *\n * </div>\n *\n * <div class=\"alert is-important\">\n *\n * There is an exception to what previously mentioned, besides elements entering/leaving based on\n * their own logic, elements with an animation trigger can always be queried via `:leave` when\n * their parent is also leaving.\n *\n * </div>\n *\n * ### Usage Example\n *\n * The following example queries for inner elements and animates them\n * individually using `animate()`.\n *\n * ```typescript\n * @Component({\n * selector: 'inner',\n * template: `\n * <div [@queryAnimation]=\"exp\">\n * <h1>Title</h1>\n * <div class=\"content\">\n * Blah blah blah\n * </div>\n * </div>\n * `,\n * animations: [\n * trigger('queryAnimation', [\n * transition('* => goAnimate', [\n * // hide the inner elements\n * query('h1', style({ opacity: 0 })),\n * query('.content', style({ opacity: 0 })),\n *\n * // animate the inner elements in, one by one\n * query('h1', animate(1000, style({ opacity: 1 }))),\n * query('.content', animate(1000, style({ opacity: 1 }))),\n * ])\n * ])\n * ]\n * })\n * class Cmp {\n * exp = '';\n *\n * goAnimate() {\n * this.exp = 'goAnimate';\n * }\n * }\n * ```\n *\n * @publicApi\n */\nfunction query(selector, animation, options = null) {\n return { type: 11 /* AnimationMetadataType.Query */, selector, animation, options };\n}\n/**\n * Use within an animation `query()` call to issue a timing gap after\n * each queried item is animated.\n *\n * @param timings A delay value.\n * @param animation One ore more animation steps.\n * @returns An object that encapsulates the stagger data.\n *\n * @usageNotes\n * In the following example, a container element wraps a list of items stamped out\n * by an `ngFor`. The container element contains an animation trigger that will later be set\n * to query for each of the inner items.\n *\n * Each time items are added, the opacity fade-in animation runs,\n * and each removed item is faded out.\n * When either of these animations occur, the stagger effect is\n * applied after each item's animation is started.\n *\n * ```html\n * <!-- list.component.html -->\n * <button (click)=\"toggle()\">Show / Hide Items</button>\n * <hr />\n * <div [@listAnimation]=\"items.length\">\n * <div *ngFor=\"let item of items\">\n * {{ item }}\n * </div>\n * </div>\n * ```\n *\n * Here is the component code:\n *\n * ```typescript\n * import {trigger, transition, style, animate, query, stagger} from '@angular/animations';\n * @Component({\n * templateUrl: 'list.component.html',\n * animations: [\n * trigger('listAnimation', [\n * ...\n * ])\n * ]\n * })\n * class ListComponent {\n * items = [];\n *\n * showItems() {\n * this.items = [0,1,2,3,4];\n * }\n *\n * hideItems() {\n * this.items = [];\n * }\n *\n * toggle() {\n * this.items.length ? this.hideItems() : this.showItems();\n * }\n * }\n * ```\n *\n * Here is the animation trigger code:\n *\n * ```typescript\n * trigger('listAnimation', [\n * transition('* => *', [ // each time the binding value changes\n * query(':leave', [\n * stagger(100, [\n * animate('0.5s', style({ opacity: 0 }))\n * ])\n * ]),\n * query(':enter', [\n * style({ opacity: 0 }),\n * stagger(100, [\n * animate('0.5s', style({ opacity: 1 }))\n * ])\n * ])\n * ])\n * ])\n * ```\n *\n * @publicApi\n */\nfunction stagger(timings, animation) {\n return { type: 12 /* AnimationMetadataType.Stagger */, timings, animation };\n}\n\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.1.0\n * (c) 2010-2022 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport * as i0 from '@angular/core';\nimport { InjectionToken, Injectable, ɵɵinject, Inject, inject, Optional, EventEmitter, ɵfindLocaleData, ɵLocaleDataIndex, ɵgetLocaleCurrencyCode, ɵgetLocalePluralCase, LOCALE_ID, ɵregisterLocaleData, ɵisListLikeIterable, ɵstringify, Directive, Input, createNgModule, NgModuleRef, ɵRuntimeError, Host, Attribute, RendererStyleFlags2, ɵisPromise, ɵisSubscribable, Pipe, DEFAULT_CURRENCY_CODE, NgModule, Version, ɵɵdefineInjectable, ɵformatRuntimeError, Renderer2, ElementRef, Injector, PLATFORM_ID, NgZone } from '@angular/core';\n\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. In a browser this is the DOM Document.\n *\n * Note: Document might not be available in the Application Context when Application and Rendering\n * Contexts are not the same (e.g. when running the application in a Web Worker).\n *\n * @publicApi\n */\nconst DOCUMENT = new InjectionToken('DocumentToken');\n\n/**\n * 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.1.0\", ngImport: i0, type: PlatformLocation, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nPlatformLocation.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: PlatformLocation, providedIn: 'platform', useFactory: useBrowserPlatformLocation });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", ngImport: i0, type: BrowserPlatformLocation, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\nBrowserPlatformLocation.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: BrowserPlatformLocation, providedIn: 'platform', useFactory: createBrowserPlatformLocation });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", ngImport: i0, type: LocationStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nLocationStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: LocationStrategy, providedIn: 'root', useFactory: () => inject(PathLocationStrategy) });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", 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.1.0\", ngImport: i0, type: PathLocationStrategy, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", 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.1.0\", ngImport: i0, type: HashLocationStrategy });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", ngImport: i0, type: Location, deps: [{ token: LocationStrategy }], target: i0.ɵɵFactoryTarget.Injectable });\nLocation.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: Location, providedIn: 'root', useFactory: createLocation });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: Location, decorators: [{\n type: Injectable,\n args: [{\n providedIn: 'root',\n // See #23917\n useFactory: createLocation,\n }]\n }], ctorParameters: function () { return [{ type: LocationStrategy }]; } });\nfunction createLocation() {\n return new Location(ɵɵinject(LocationStrategy));\n}\nfunction _stripBasePath(basePath, url) {\n return basePath && url.startsWith(basePath) ? url.substring(basePath.length) : url;\n}\nfunction _stripIndexHtml(url) {\n return url.replace(/\\/index.html$/, '');\n}\nfunction _stripOrigin(baseHref) {\n // DO NOT REFACTOR! Previously, this check looked like this:\n // `/^(https?:)?\\/\\//.test(baseHref)`, but that resulted in\n // syntactically incorrect code after Closure Compiler minification.\n // This was likely caused by a bug in Closure Compiler, but\n // for now, the check is rewritten to use `new RegExp` instead.\n const isAbsoluteUrl = (new RegExp('^(https?:)?//')).test(baseHref);\n if (isAbsoluteUrl) {\n const [, pathname] = baseHref.split(/\\/\\/[^\\/]+/);\n return pathname;\n }\n return baseHref;\n}\n\n/** @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.1.0\", ngImport: i0, type: NgLocalization, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nNgLocalization.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: NgLocalization, providedIn: 'root', useFactory: (locale) => new NgLocaleLocalization(locale), deps: [{ token: LOCALE_ID }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", ngImport: i0, type: NgLocaleLocalization, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Injectable });\nNgLocaleLocalization.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: NgLocaleLocalization });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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\n/**\n * @ngModule CommonModule\n *\n * @usageNotes\n * ```\n * <some-element [ngClass]=\"'first second'\">...</some-element>\n *\n * <some-element [ngClass]=\"['first', 'second']\">...</some-element>\n *\n * <some-element [ngClass]=\"{'first': true, 'second': true, 'third': false}\">...</some-element>\n *\n * <some-element [ngClass]=\"stringExp|arrayExp|objExp\">...</some-element>\n *\n * <some-element [ngClass]=\"{'class1 class2 class3' : true}\">...</some-element>\n * ```\n *\n * @description\n *\n * Adds and removes CSS classes on an HTML element.\n *\n * The CSS classes are updated as follows, depending on the type of the expression evaluation:\n * - `string` - the CSS classes listed in the string (space delimited) are added,\n * - `Array` - the CSS classes declared as Array elements are added,\n * - `Object` - keys are CSS classes that get added when the expression given in the value\n * evaluates to a truthy value, otherwise they are removed.\n *\n * @publicApi\n */\nclass NgClass {\n constructor(_iterableDiffers, _keyValueDiffers, _ngEl, _renderer) {\n this._iterableDiffers = _iterableDiffers;\n this._keyValueDiffers = _keyValueDiffers;\n this._ngEl = _ngEl;\n this._renderer = _renderer;\n this._iterableDiffer = null;\n this._keyValueDiffer = null;\n this._initialClasses = [];\n this._rawClass = null;\n }\n set klass(value) {\n this._removeClasses(this._initialClasses);\n this._initialClasses = typeof value === 'string' ? value.split(/\\s+/) : [];\n this._applyClasses(this._initialClasses);\n this._applyClasses(this._rawClass);\n }\n set ngClass(value) {\n this._removeClasses(this._rawClass);\n this._applyClasses(this._initialClasses);\n this._iterableDiffer = null;\n this._keyValueDiffer = null;\n this._rawClass = typeof value === 'string' ? value.split(/\\s+/) : value;\n if (this._rawClass) {\n if (ɵisListLikeIterable(this._rawClass)) {\n this._iterableDiffer = this._iterableDiffers.find(this._rawClass).create();\n }\n else {\n this._keyValueDiffer = this._keyValueDiffers.find(this._rawClass).create();\n }\n }\n }\n ngDoCheck() {\n if (this._iterableDiffer) {\n const iterableChanges = this._iterableDiffer.diff(this._rawClass);\n if (iterableChanges) {\n this._applyIterableChanges(iterableChanges);\n }\n }\n else if (this._keyValueDiffer) {\n const keyValueChanges = this._keyValueDiffer.diff(this._rawClass);\n if (keyValueChanges) {\n this._applyKeyValueChanges(keyValueChanges);\n }\n }\n }\n _applyKeyValueChanges(changes) {\n changes.forEachAddedItem((record) => this._toggleClass(record.key, record.currentValue));\n changes.forEachChangedItem((record) => this._toggleClass(record.key, record.currentValue));\n changes.forEachRemovedItem((record) => {\n if (record.previousValue) {\n this._toggleClass(record.key, false);\n }\n });\n }\n _applyIterableChanges(changes) {\n changes.forEachAddedItem((record) => {\n if (typeof record.item === 'string') {\n this._toggleClass(record.item, true);\n }\n else {\n throw new Error(`NgClass can only toggle CSS classes expressed as strings, got ${ɵstringify(record.item)}`);\n }\n });\n changes.forEachRemovedItem((record) => this._toggleClass(record.item, false));\n }\n /**\n * Applies a collection of CSS classes to the DOM element.\n *\n * For argument of type Set and Array CSS class names contained in those collections are always\n * added.\n * For argument of type Map CSS class name in the map's key is toggled based on the value (added\n * for truthy and removed for falsy).\n */\n _applyClasses(rawClassVal) {\n if (rawClassVal) {\n if (Array.isArray(rawClassVal) || rawClassVal instanceof Set) {\n rawClassVal.forEach((klass) => this._toggleClass(klass, true));\n }\n else {\n Object.keys(rawClassVal).forEach(klass => this._toggleClass(klass, !!rawClassVal[klass]));\n }\n }\n }\n /**\n * Removes a collection of CSS classes from the DOM element. This is mostly useful for cleanup\n * purposes.\n */\n _removeClasses(rawClassVal) {\n if (rawClassVal) {\n if (Array.isArray(rawClassVal) || rawClassVal instanceof Set) {\n rawClassVal.forEach((klass) => this._toggleClass(klass, false));\n }\n else {\n Object.keys(rawClassVal).forEach(klass => this._toggleClass(klass, false));\n }\n }\n }\n _toggleClass(klass, enabled) {\n klass = klass.trim();\n if (klass) {\n klass.split(/\\s+/g).forEach(klass => {\n if (enabled) {\n this._renderer.addClass(this._ngEl.nativeElement, klass);\n }\n else {\n this._renderer.removeClass(this._ngEl.nativeElement, klass);\n }\n });\n }\n }\n}\nNgClass.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", type: NgClass, isStandalone: true, selector: \"[ngClass]\", inputs: { klass: [\"class\", \"klass\"], ngClass: \"ngClass\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", ngImport: i0, type: NgComponentOutlet, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });\nNgComponentOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.1.0\", 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.1.0\", 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.1.0\", 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.1.0\", type: NgForOf, isStandalone: true, selector: \"[ngFor][ngForOf]\", inputs: { ngForOf: \"ngForOf\", ngForTrackBy: \"ngForTrackBy\", ngForTemplate: \"ngForTemplate\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", 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.1.0\", type: NgIf, isStandalone: true, selector: \"[ngIf]\", inputs: { ngIf: \"ngIf\", ngIfThen: \"ngIfThen\", ngIfElse: \"ngIfElse\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", ngImport: i0, type: NgSwitch, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nNgSwitch.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.1.0\", type: NgSwitch, isStandalone: true, selector: \"[ngSwitch]\", inputs: { ngSwitch: \"ngSwitch\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", 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.1.0\", type: NgSwitchCase, isStandalone: true, selector: \"[ngSwitchCase]\", inputs: { ngSwitchCase: \"ngSwitchCase\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", 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.1.0\", type: NgSwitchDefault, isStandalone: true, selector: \"[ngSwitchDefault]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", ngImport: i0, type: NgPlural, deps: [{ token: NgLocalization }], target: i0.ɵɵFactoryTarget.Directive });\nNgPlural.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.1.0\", type: NgPlural, isStandalone: true, selector: \"[ngPlural]\", inputs: { ngPlural: \"ngPlural\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", 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.1.0\", type: NgPluralCase, isStandalone: true, selector: \"[ngPluralCase]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", 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.1.0\", type: NgStyle, isStandalone: true, selector: \"[ngStyle]\", inputs: { ngStyle: \"ngStyle\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", ngImport: i0, type: NgTemplateOutlet, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });\nNgTemplateOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.1.0\", 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.1.0\", 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.1.0\", ngImport: i0, type: AsyncPipe, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Pipe });\nAsyncPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.1.0\", ngImport: i0, type: AsyncPipe, isStandalone: true, name: \"async\", pure: false });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", ngImport: i0, type: LowerCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });\nLowerCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.1.0\", ngImport: i0, type: LowerCasePipe, isStandalone: true, name: \"lowercase\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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-\\u0A5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\\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\\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DE80-\\uDEAA\\uDEB8\\uDF00-\\uDF1A\\uDF40-\\uDF46]|\\uD806[\\uDC00-\\uDC2B\\uDCA0-\\uDCDF\\uDCFF-\\uDD06\\uDD09\\uDD0C-\\uDD13\\uDD15\\uDD16\\uDD18-\\uDD2F\\uDD3F\\uDD41\\uDDA0-\\uDDA7\\uDDAA-\\uDDD0\\uDDE1\\uDDE3\\uDE00\\uDE0B-\\uDE32\\uDE3A\\uDE50\\uDE5C-\\uDE89\\uDE9D\\uDEB0-\\uDEF8]|\\uD807[\\uDC00-\\uDC08\\uDC0A-\\uDC2E\\uDC40\\uDC72-\\uDC8F\\uDD00-\\uDD06\\uDD08\\uDD09\\uDD0B-\\uDD30\\uDD46\\uDD60-\\uDD65\\uDD67\\uDD68\\uDD6A-\\uDD89\\uDD98\\uDEE0-\\uDEF2\\uDFB0]|\\uD808[\\uDC00-\\uDF99]|\\uD809[\\uDC80-\\uDD43]|\\uD80B[\\uDF90-\\uDFF0]|[\\uD80C\\uD81C-\\uD820\\uD822\\uD840-\\uD868\\uD86A-\\uD86C\\uD86F-\\uD872\\uD874-\\uD879\\uD880-\\uD883][\\uDC00-\\uDFFF]|\\uD80D[\\uDC00-\\uDC2E]|\\uD811[\\uDC00-\\uDE46]|\\uD81A[\\uDC00-\\uDE38\\uDE40-\\uDE5E\\uDE70-\\uDEBE\\uDED0-\\uDEED\\uDF00-\\uDF2F\\uDF40-\\uDF43\\uDF63-\\uDF77\\uDF7D-\\uDF8F]|\\uD81B[\\uDE40-\\uDE7F\\uDF00-\\uDF4A\\uDF50\\uDF93-\\uDF9F\\uDFE0\\uDFE1\\uDFE3]|\\uD821[\\uDC00-\\uDFF7]|\\uD823[\\uDC00-\\uDCD5\\uDD00-\\uDD08]|\\uD82B[\\uDFF0-\\uDFF3\\uDFF5-\\uDFFB\\uDFFD\\uDFFE]|\\uD82C[\\uDC00-\\uDD22\\uDD50-\\uDD52\\uDD64-\\uDD67\\uDD70-\\uDEFB]|\\uD82F[\\u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\\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.1.0\", ngImport: i0, type: TitleCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });\nTitleCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.1.0\", ngImport: i0, type: TitleCasePipe, isStandalone: true, name: \"titlecase\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", ngImport: i0, type: UpperCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });\nUpperCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.1.0\", ngImport: i0, type: UpperCasePipe, isStandalone: true, name: \"uppercase\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", 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.1.0\", ngImport: i0, type: DatePipe, isStandalone: true, name: \"date\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", ngImport: i0, type: I18nPluralPipe, deps: [{ token: NgLocalization }], target: i0.ɵɵFactoryTarget.Pipe });\nI18nPluralPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.1.0\", ngImport: i0, type: I18nPluralPipe, isStandalone: true, name: \"i18nPlural\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", ngImport: i0, type: I18nSelectPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });\nI18nSelectPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.1.0\", ngImport: i0, type: I18nSelectPipe, isStandalone: true, name: \"i18nSelect\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", ngImport: i0, type: JsonPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });\nJsonPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.1.0\", ngImport: i0, type: JsonPipe, isStandalone: true, name: \"json\", pure: false });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", ngImport: i0, type: KeyValuePipe, deps: [{ token: i0.KeyValueDiffers }], target: i0.ɵɵFactoryTarget.Pipe });\nKeyValuePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.1.0\", ngImport: i0, type: KeyValuePipe, isStandalone: true, name: \"keyvalue\", pure: false });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", ngImport: i0, type: DecimalPipe, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe });\nDecimalPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.1.0\", ngImport: i0, type: DecimalPipe, isStandalone: true, name: \"number\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", ngImport: i0, type: PercentPipe, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe });\nPercentPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.1.0\", ngImport: i0, type: PercentPipe, isStandalone: true, name: \"percent\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: PercentPipe, decorators: [{\n type: Pipe,\n args: [{\n name: 'percent',\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [LOCALE_ID]\n }] }]; } });\n/**\n * @ngModule CommonModule\n * @description\n *\n * Transforms a number to a currency string, formatted according to locale rules\n * that determine group sizing and separator, decimal-point character,\n * and other locale-specific configurations.\n *\n * {@a currency-code-deprecation}\n * <div class=\"alert is-helpful\">\n *\n * **Deprecation notice:**\n *\n * The default currency code is currently always `USD` but this is deprecated from v9.\n *\n * **In v11 the default currency code will be taken from the current locale identified by\n * the `LOCALE_ID` token. See the [i18n guide](guide/i18n-common-locale-id) for\n * more information.**\n *\n * If you need the previous behavior then set it by creating a `DEFAULT_CURRENCY_CODE` provider in\n * your application `NgModule`:\n *\n * ```ts\n * {provide: DEFAULT_CURRENCY_CODE, useValue: 'USD'}\n * ```\n *\n * </div>\n *\n * @see `getCurrencySymbol()`\n * @see `formatCurrency()`\n *\n * @usageNotes\n * The following code shows how the pipe transforms numbers\n * into text strings, according to various format specifications,\n * where the caller's default locale is `en-US`.\n *\n * <code-example path=\"common/pipes/ts/currency_pipe.ts\" region='CurrencyPipe'></code-example>\n *\n * @publicApi\n */\nclass CurrencyPipe {\n constructor(_locale, _defaultCurrencyCode = 'USD') {\n this._locale = _locale;\n this._defaultCurrencyCode = _defaultCurrencyCode;\n }\n /**\n *\n * @param value The number to be formatted as currency.\n * @param currencyCode The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code,\n * such as `USD` for the US dollar and `EUR` for the euro. The default currency code can be\n * configured using the `DEFAULT_CURRENCY_CODE` injection token.\n * @param display The format for the currency indicator. One of the following:\n * - `code`: Show the code (such as `USD`).\n * - `symbol`(default): Show the symbol (such as `$`).\n * - `symbol-narrow`: Use the narrow symbol for locales that have two symbols for their\n * currency.\n * For example, the Canadian dollar CAD has the symbol `CA$` and the symbol-narrow `$`. If the\n * locale has no narrow symbol, uses the standard symbol for the locale.\n * - String: Use the given string value instead of a code or a symbol.\n * For example, an empty string will suppress the currency & symbol.\n * - Boolean (marked deprecated in v5): `true` for symbol and false for `code`.\n *\n * @param digitsInfo Decimal representation options, specified by a string\n * in the following format:<br>\n * <code>{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}</code>.\n * - `minIntegerDigits`: The minimum number of integer digits before the decimal point.\n * Default is `1`.\n * - `minFractionDigits`: The minimum number of digits after the decimal point.\n * Default is `2`.\n * - `maxFractionDigits`: The maximum number of digits after the decimal point.\n * Default is `2`.\n * If not provided, the number will be formatted with the proper amount of digits,\n * depending on what the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) specifies.\n * For example, the Canadian dollar has 2 digits, whereas the Chilean peso has none.\n * @param locale A locale code for the locale format rules to use.\n * When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default.\n * See [Setting your app locale](guide/i18n-common-locale-id).\n */\n transform(value, currencyCode = this._defaultCurrencyCode, display = 'symbol', digitsInfo, locale) {\n if (!isValue(value))\n return null;\n locale = locale || this._locale;\n if (typeof display === 'boolean') {\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && console && console.warn) {\n console.warn(`Warning: the currency pipe has been changed in Angular v5. The symbolDisplay option (third parameter) is now a string instead of a boolean. The accepted values are \"code\", \"symbol\" or \"symbol-narrow\".`);\n }\n display = display ? 'symbol' : 'code';\n }\n let currency = currencyCode || this._defaultCurrencyCode;\n if (display !== 'code') {\n if (display === 'symbol' || display === 'symbol-narrow') {\n currency = getCurrencySymbol(currency, display === 'symbol' ? 'wide' : 'narrow', locale);\n }\n else {\n currency = display;\n }\n }\n try {\n const num = strToNumber(value);\n return formatCurrency(num, locale, currency, currencyCode, digitsInfo);\n }\n catch (error) {\n throw invalidPipeArgumentError(CurrencyPipe, error.message);\n }\n }\n}\nCurrencyPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", ngImport: i0, type: CurrencyPipe, isStandalone: true, name: \"currency\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", ngImport: i0, type: SlicePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });\nSlicePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.1.0\", ngImport: i0, type: SlicePipe, isStandalone: true, name: \"slice\", pure: false });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", ngImport: i0, type: CommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nCommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.1.0\", 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.1.0\", ngImport: i0, type: CommonModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0');\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 let params = `tr:q-auto`; // applies the \"auto quality\" transformation\n if (config.width) {\n params += `,w-${config.width}`;\n }\n return `${path}/${params}/${config.src}`;\n}\n\n/**\n * 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.1.0\", ngImport: i0, type: LCPImageObserver, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nLCPImageObserver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: LCPImageObserver, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", ngImport: i0, type: PreconnectLinkChecker, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nPreconnectLinkChecker.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: PreconnectLinkChecker, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", ngImport: i0, type: PreloadLinkCreator, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nPreloadLinkCreator.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: PreloadLinkCreator, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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 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 'disableOptimizedSrcset',\n ]);\n }\n }\n getLoadingBehavior() {\n if (!this.priority && this.loading !== undefined) {\n return this.loading;\n }\n return this.priority ? 'eager' : 'lazy';\n }\n getFetchPriority() {\n return this.priority ? 'high' : 'auto';\n }\n getRewrittenSrc() {\n // ImageLoaderConfig supports setting a width property. However, we're not setting width here\n // because if the developer uses rendered width instead of intrinsic width in the HTML width\n // attribute, the image requested may be too small for 2x+ screens.\n if (!this._renderedSrc) {\n const imgConfig = { src: this.ngSrc };\n // Cache calculated image src to reuse it later in the code.\n this._renderedSrc = this.imageLoader(imgConfig);\n }\n return this._renderedSrc;\n }\n getRewrittenSrcset() {\n const widthSrcSet = VALID_WIDTH_DESCRIPTOR_SRCSET.test(this.ngSrcset);\n const finalSrcs = this.ngSrcset.split(',').filter(src => src !== '').map(srcStr => {\n srcStr = srcStr.trim();\n const width = widthSrcSet ? parseFloat(srcStr) : parseFloat(srcStr) * this.width;\n return `${this.imageLoader({ src: this.ngSrc, width })} ${srcStr}`;\n });\n return finalSrcs.join(', ');\n }\n getAutomaticSrcset() {\n if (this.sizes) {\n return this.getResponsiveSrcset();\n }\n else {\n return this.getFixedSrcset();\n }\n }\n getResponsiveSrcset() {\n const { breakpoints } = this.config;\n let filteredBreakpoints = breakpoints;\n if (this.sizes?.trim() === '100vw') {\n // Since this is a full-screen-width image, our srcset only needs to include\n // breakpoints with full viewport widths.\n filteredBreakpoints = breakpoints.filter(bp => bp >= VIEWPORT_BREAKPOINT_CUTOFF);\n }\n const finalSrcs = filteredBreakpoints.map(bp => `${this.imageLoader({ src: this.ngSrc, width: bp })} ${bp}w`);\n return finalSrcs.join(', ');\n }\n getFixedSrcset() {\n const finalSrcs = DENSITY_SRCSET_MULTIPLIERS.map(multiplier => `${this.imageLoader({ src: this.ngSrc, width: this.width * multiplier })} ${multiplier}x`);\n return finalSrcs.join(', ');\n }\n shouldGenerateAutomaticSrcset() {\n return !this._disableOptimizedSrcset && !this.srcset && this.imageLoader !== noopImageLoader &&\n !(this.width > FIXED_SRCSET_WIDTH_LIMIT || this.height > FIXED_SRCSET_HEIGHT_LIMIT);\n }\n /** @nodoc */\n ngOnDestroy() {\n if (ngDevMode) {\n if (!this.priority && this._renderedSrc !== null && this.lcpObserver !== null) {\n this.lcpObserver.unregisterImage(this._renderedSrc);\n }\n }\n }\n setHostAttribute(name, value) {\n this.renderer.setAttribute(this.imgElement, name, value);\n }\n}\nNgOptimizedImage.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: NgOptimizedImage, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nNgOptimizedImage.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.1.0\", type: NgOptimizedImage, isStandalone: true, selector: \"img[ngSrc]\", inputs: { ngSrc: \"ngSrc\", ngSrcset: \"ngSrcset\", sizes: \"sizes\", width: \"width\", height: \"height\", loading: \"loading\", priority: \"priority\", disableOptimizedSrcset: \"disableOptimizedSrcset\", fill: \"fill\", src: \"src\", srcset: \"srcset\" }, host: { properties: { \"style.position\": \"fill ? \\\"absolute\\\" : null\", \"style.width\": \"fill ? \\\"100%\\\" : null\", \"style.height\": \"fill ? \\\"100%\\\" : null\", \"style.inset\": \"fill ? \\\"0px\\\" : null\" } }, usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: NgOptimizedImage, decorators: [{\n type: Directive,\n args: [{\n standalone: true,\n selector: 'img[ngSrc]',\n host: {\n '[style.position]': 'fill ? \"absolute\" : null',\n '[style.width]': 'fill ? \"100%\" : null',\n '[style.height]': 'fill ? \"100%\" : null',\n '[style.inset]': 'fill ? \"0px\" : null'\n }\n }]\n }], propDecorators: { ngSrc: [{\n type: Input\n }], ngSrcset: [{\n type: Input\n }], sizes: [{\n type: Input\n }], width: [{\n type: Input\n }], height: [{\n type: Input\n }], loading: [{\n type: Input\n }], priority: [{\n type: Input\n }], disableOptimizedSrcset: [{\n type: Input\n }], fill: [{\n type: Input\n }], src: [{\n type: Input\n }], srcset: [{\n type: Input\n }] } });\n/***** Helpers *****/\n/**\n * Convert input value to integer.\n */\nfunction inputToInteger(value) {\n return typeof value === 'string' ? parseInt(value, 10) : value;\n}\n/**\n * Convert input value to boolean.\n */\nfunction inputToBoolean(value) {\n return value != null && `${value}` !== 'false';\n}\n/**\n * Sorts provided config breakpoints and uses defaults.\n */\nfunction processConfig(config) {\n let sortedBreakpoints = {};\n if (config.breakpoints) {\n sortedBreakpoints.breakpoints = config.breakpoints.sort((a, b) => a - b);\n }\n return Object.assign({}, defaultConfig, config, sortedBreakpoints);\n}\n/***** Assert functions *****/\n/**\n * Verifies that there is no `src` set on a host element.\n */\nfunction assertNoConflictingSrc(dir) {\n if (dir.src) {\n throw new ɵRuntimeError(2950 /* RuntimeErrorCode.UNEXPECTED_SRC_ATTR */, `${imgDirectiveDetails(dir.ngSrc)} both \\`src\\` and \\`ngSrc\\` have been set. ` +\n `Supplying both of these attributes breaks lazy loading. ` +\n `The NgOptimizedImage directive sets \\`src\\` itself based on the value of \\`ngSrc\\`. ` +\n `To fix this, please remove the \\`src\\` attribute.`);\n }\n}\n/**\n * Verifies that there is no `srcset` set on a host element.\n */\nfunction assertNoConflictingSrcset(dir) {\n if (dir.srcset) {\n throw new ɵRuntimeError(2951 /* RuntimeErrorCode.UNEXPECTED_SRCSET_ATTR */, `${imgDirectiveDetails(dir.ngSrc)} both \\`srcset\\` and \\`ngSrcset\\` have been set. ` +\n `Supplying both of these attributes breaks lazy loading. ` +\n `The NgOptimizedImage directive sets \\`srcset\\` itself based on the value of ` +\n `\\`ngSrcset\\`. To fix this, please remove the \\`srcset\\` attribute.`);\n }\n}\n/**\n * Verifies that the `ngSrc` is not a Base64-encoded image.\n */\nfunction assertNotBase64Image(dir) {\n let ngSrc = dir.ngSrc.trim();\n if (ngSrc.startsWith('data:')) {\n if (ngSrc.length > BASE64_IMG_MAX_LENGTH_IN_ERROR) {\n ngSrc = ngSrc.substring(0, BASE64_IMG_MAX_LENGTH_IN_ERROR) + '...';\n }\n throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc, false)} \\`ngSrc\\` is a Base64-encoded string ` +\n `(${ngSrc}). NgOptimizedImage does not support Base64-encoded strings. ` +\n `To fix this, disable the NgOptimizedImage directive for this element ` +\n `by removing \\`ngSrc\\` and using a standard \\`src\\` attribute instead.`);\n }\n}\n/**\n * Verifies that the 'sizes' only includes responsive values.\n */\nfunction assertNoComplexSizes(dir) {\n let sizes = dir.sizes;\n if (sizes?.match(/((\\)|,)\\s|^)\\d+px/)) {\n throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc, false)} \\`sizes\\` was set to a string including ` +\n `pixel values. For automatic \\`srcset\\` generation, \\`sizes\\` must only include responsive ` +\n `values, such as \\`sizes=\"50vw\"\\` or \\`sizes=\"(min-width: 768px) 50vw, 100vw\"\\`. ` +\n `To fix this, modify the \\`sizes\\` attribute, or provide your own \\`ngSrcset\\` value directly.`);\n }\n}\n/**\n * Verifies that the `ngSrc` is not a Blob URL.\n */\nfunction assertNotBlobUrl(dir) {\n const ngSrc = dir.ngSrc.trim();\n if (ngSrc.startsWith('blob:')) {\n throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} \\`ngSrc\\` was set to a blob URL (${ngSrc}). ` +\n `Blob URLs are not supported by the NgOptimizedImage directive. ` +\n `To fix this, disable the NgOptimizedImage directive for this element ` +\n `by removing \\`ngSrc\\` and using a regular \\`src\\` attribute instead.`);\n }\n}\n/**\n * Verifies that the input is set to a non-empty string.\n */\nfunction assertNonEmptyInput(dir, name, value) {\n const isString = typeof value === 'string';\n const isEmptyString = isString && value.trim() === '';\n if (!isString || isEmptyString) {\n throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} \\`${name}\\` has an invalid value ` +\n `(\\`${value}\\`). To fix this, change the value to a non-empty string.`);\n }\n}\n/**\n * Verifies that the `ngSrcset` is in a valid format, e.g. \"100w, 200w\" or \"1x, 2x\".\n */\nfunction assertValidNgSrcset(dir, value) {\n if (value == null)\n return;\n assertNonEmptyInput(dir, 'ngSrcset', value);\n const stringVal = value;\n const isValidWidthDescriptor = VALID_WIDTH_DESCRIPTOR_SRCSET.test(stringVal);\n const isValidDensityDescriptor = VALID_DENSITY_DESCRIPTOR_SRCSET.test(stringVal);\n if (isValidDensityDescriptor) {\n assertUnderDensityCap(dir, stringVal);\n }\n const isValidSrcset = isValidWidthDescriptor || isValidDensityDescriptor;\n if (!isValidSrcset) {\n throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} \\`ngSrcset\\` has an invalid value (\\`${value}\\`). ` +\n `To fix this, supply \\`ngSrcset\\` using a comma-separated list of one or more width ` +\n `descriptors (e.g. \"100w, 200w\") or density descriptors (e.g. \"1x, 2x\").`);\n }\n}\nfunction assertUnderDensityCap(dir, value) {\n const underDensityCap = value.split(',').every(num => num === '' || parseFloat(num) <= ABSOLUTE_SRCSET_DENSITY_CAP);\n if (!underDensityCap) {\n throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the \\`ngSrcset\\` contains an unsupported image density:` +\n `\\`${value}\\`. NgOptimizedImage generally recommends a max image density of ` +\n `${RECOMMENDED_SRCSET_DENSITY_CAP}x but supports image densities up to ` +\n `${ABSOLUTE_SRCSET_DENSITY_CAP}x. The human eye cannot distinguish between image densities ` +\n `greater than ${RECOMMENDED_SRCSET_DENSITY_CAP}x - which makes them unnecessary for ` +\n `most use cases. Images that will be pinch-zoomed are typically the primary use case for ` +\n `${ABSOLUTE_SRCSET_DENSITY_CAP}x images. Please remove the high density descriptor and try again.`);\n }\n}\n/**\n * Creates a `RuntimeError` instance to represent a situation when an input is set after\n * the directive has initialized.\n */\nfunction postInitInputChangeError(dir, inputName) {\n let reason;\n if (inputName === 'width' || inputName === 'height') {\n reason = `Changing \\`${inputName}\\` may result in different attribute value ` +\n `applied to the underlying image element and cause layout shifts on a page.`;\n }\n else {\n reason = `Changing the \\`${inputName}\\` would have no effect on the underlying ` +\n `image element, because the resource loading has already occurred.`;\n }\n return new ɵRuntimeError(2953 /* RuntimeErrorCode.UNEXPECTED_INPUT_CHANGE */, `${imgDirectiveDetails(dir.ngSrc)} \\`${inputName}\\` was updated after initialization. ` +\n `The NgOptimizedImage directive will not react to this input change. ${reason} ` +\n `To fix this, either switch \\`${inputName}\\` to a static value ` +\n `or wrap the image element in an *ngIf that is gated on the necessary value.`);\n}\n/**\n * Verify that none of the listed inputs has changed.\n */\nfunction assertNoPostInitInputChange(dir, changes, inputs) {\n inputs.forEach(input => {\n const isUpdated = changes.hasOwnProperty(input);\n if (isUpdated && !changes[input].isFirstChange()) {\n if (input === 'ngSrc') {\n // When the `ngSrc` input changes, we detect that only in the\n // `ngOnChanges` hook, thus the `ngSrc` is already set. We use\n // `ngSrc` in the error message, so we use a previous value, but\n // not the updated one in it.\n dir = { ngSrc: changes[input].previousValue };\n }\n throw postInitInputChangeError(dir, input);\n }\n });\n}\n/**\n * Verifies that a specified input is a number greater than 0.\n */\nfunction assertGreaterThanZero(dir, inputValue, inputName) {\n const validNumber = typeof inputValue === 'number' && inputValue > 0;\n const validString = typeof inputValue === 'string' && /^\\d+$/.test(inputValue.trim()) && parseInt(inputValue) > 0;\n if (!validNumber && !validString) {\n throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} \\`${inputName}\\` has an invalid value ` +\n `(\\`${inputValue}\\`). To fix this, provide \\`${inputName}\\` ` +\n `as a number greater than 0.`);\n }\n}\n/**\n * Verifies that the rendered image is not visually distorted. Effectively this is checking:\n * - Whether the \"width\" and \"height\" attributes reflect the actual dimensions of the image.\n * - Whether image styling is \"correct\" (see below for a longer explanation).\n */\nfunction assertNoImageDistortion(dir, img, renderer) {\n const removeListenerFn = renderer.listen(img, 'load', () => {\n removeListenerFn();\n const renderedWidth = img.clientWidth;\n const renderedHeight = img.clientHeight;\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// 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, BrowserPlatformLocation as ɵBrowserPlatformLocation, DomAdapter as ɵDomAdapter, NullViewportScroller as ɵNullViewportScroller, PLATFORM_BROWSER_ID as ɵPLATFORM_BROWSER_ID, PLATFORM_SERVER_ID as ɵPLATFORM_SERVER_ID, PLATFORM_WORKER_APP_ID as ɵPLATFORM_WORKER_APP_ID, PLATFORM_WORKER_UI_ID as ɵPLATFORM_WORKER_UI_ID, getDOM as ɵgetDOM, parseCookieValue as ɵparseCookieValue, setRootDomAdapter as ɵsetRootDomAdapter };\n","/**\n * @license Angular v15.1.0\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.keys(headers).forEach(name => {\n let values = headers[name];\n const key = name.toLowerCase();\n if (typeof values === 'string') {\n values = [values];\n }\n if (values.length > 0) {\n this.headers.set(key, values);\n this.maybeSetNormalizedName(name, key);\n }\n });\n };\n }\n }\n /**\n * Checks for existence of a given header.\n *\n * @param name The header name to check for existence.\n *\n * @returns True if the header exists, false otherwise.\n */\n has(name) {\n this.init();\n return this.headers.has(name.toLowerCase());\n }\n /**\n * Retrieves the first value of a given header.\n *\n * @param name The header name.\n *\n * @returns The value string if the header exists, null otherwise\n */\n get(name) {\n this.init();\n const values = this.headers.get(name.toLowerCase());\n return values && values.length > 0 ? values[0] : null;\n }\n /**\n * Retrieves the names of the headers.\n *\n * @returns A list of header names.\n */\n keys() {\n this.init();\n return Array.from(this.normalizedNames.values());\n }\n /**\n * Retrieves a list of values for a given header.\n *\n * @param name The header name from which to retrieve values.\n *\n * @returns A string of values if the header exists, null otherwise.\n */\n getAll(name) {\n this.init();\n return this.headers.get(name.toLowerCase()) || null;\n }\n /**\n * Appends a new value to the existing set of values for a header\n * and returns them in a clone of the original instance.\n *\n * @param name The header name for which to append the values.\n * @param value The value to append.\n *\n * @returns A clone of the HTTP headers object with the value appended to the given header.\n */\n append(name, value) {\n return this.clone({ name, value, op: 'a' });\n }\n /**\n * Sets or modifies a value for a given header in a clone of the original instance.\n * If the header already exists, its value is replaced with the given value\n * in the returned object.\n *\n * @param name The header name.\n * @param value The value or values to set or override for the given header.\n *\n * @returns A clone of the HTTP headers object with the newly set header value.\n */\n set(name, value) {\n return this.clone({ name, value, op: 's' });\n }\n /**\n * Deletes values for a given header in a clone of the original instance.\n *\n * @param name The header name.\n * @param value The value or values to delete for the given header.\n *\n * @returns A clone of the HTTP headers object with the given value deleted.\n */\n delete(name, value) {\n return this.clone({ name, value, op: 'd' });\n }\n maybeSetNormalizedName(name, lcName) {\n if (!this.normalizedNames.has(lcName)) {\n this.normalizedNames.set(lcName, name);\n }\n }\n init() {\n if (!!this.lazyInit) {\n if (this.lazyInit instanceof HttpHeaders) {\n this.copyFrom(this.lazyInit);\n }\n else {\n this.lazyInit();\n }\n this.lazyInit = null;\n if (!!this.lazyUpdate) {\n this.lazyUpdate.forEach(update => this.applyUpdate(update));\n this.lazyUpdate = null;\n }\n }\n }\n copyFrom(other) {\n other.init();\n Array.from(other.headers.keys()).forEach(key => {\n this.headers.set(key, other.headers.get(key));\n this.normalizedNames.set(key, other.normalizedNames.get(key));\n });\n }\n clone(update) {\n const clone = new HttpHeaders();\n clone.lazyInit =\n (!!this.lazyInit && this.lazyInit instanceof HttpHeaders) ? this.lazyInit : this;\n clone.lazyUpdate = (this.lazyUpdate || []).concat([update]);\n return clone;\n }\n applyUpdate(update) {\n const key = update.name.toLowerCase();\n switch (update.op) {\n case 'a':\n case 's':\n let value = update.value;\n if (typeof value === 'string') {\n value = [value];\n }\n if (value.length === 0) {\n return;\n }\n this.maybeSetNormalizedName(update.name, key);\n const base = (update.op === 'a' ? this.headers.get(key) : undefined) || [];\n base.push(...value);\n this.headers.set(key, base);\n break;\n case 'd':\n const toDelete = update.value;\n if (!toDelete) {\n this.headers.delete(key);\n this.normalizedNames.delete(key);\n }\n else {\n let existing = this.headers.get(key);\n if (!existing) {\n return;\n }\n existing = existing.filter(value => toDelete.indexOf(value) === -1);\n if (existing.length === 0) {\n this.headers.delete(key);\n this.normalizedNames.delete(key);\n }\n else {\n this.headers.set(key, existing);\n }\n }\n break;\n }\n }\n /**\n * @internal\n */\n forEach(fn) {\n this.init();\n Array.from(this.normalizedNames.keys())\n .forEach(key => fn(this.normalizedNames.get(key), this.headers.get(key)));\n }\n}\n/**\n * Verifies that the headers object has the right shape: the values\n * must be either strings or arrays. Throws an error if an invalid\n * header value is present.\n */\nfunction assertValidHeaders(headers) {\n for (const [key, value] of Object.entries(headers)) {\n if (typeof value !== 'string' && !Array.isArray(value)) {\n throw new Error(`Unexpected value of the \\`${key}\\` header provided. ` +\n `Expecting either a string or an array, but got: \\`${value}\\`.`);\n }\n }\n}\n\n/**\n * 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.1.0\", ngImport: i0, type: HttpClient, deps: [{ token: HttpHandler }], target: i0.ɵɵFactoryTarget.Injectable });\nHttpClient.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: HttpClient });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", ngImport: i0, type: HttpInterceptorHandler, deps: [{ token: HttpBackend }, { token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Injectable });\nHttpInterceptorHandler.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: HttpInterceptorHandler });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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 `HttpHandler`\n * @see `HttpXhrBackend`\n *\n * @publicApi\n */\nclass JsonpClientBackend {\n constructor(callbackMap, document) {\n this.callbackMap = callbackMap;\n this.document = document;\n /**\n * A resolved promise that can be used to schedule microtasks in the event handlers.\n */\n this.resolvedPromise = Promise.resolve();\n }\n /**\n * Get the name of the next callback method, by incrementing the global `nextRequestId`.\n */\n nextCallback() {\n return `ng_jsonp_callback_${nextRequestId++}`;\n }\n /**\n * Processes a JSONP request and returns an event stream of the results.\n * @param req The request object.\n * @returns An observable of the response events.\n *\n */\n handle(req) {\n // Firstly, check both the method and response type. If either doesn't match\n // then the request was improperly routed here and cannot be handled.\n if (req.method !== 'JSONP') {\n throw new Error(JSONP_ERR_WRONG_METHOD);\n }\n else if (req.responseType !== 'json') {\n throw new Error(JSONP_ERR_WRONG_RESPONSE_TYPE);\n }\n // Check the request headers. JSONP doesn't support headers and\n // cannot set any that were supplied.\n if (req.headers.keys().length > 0) {\n throw new Error(JSONP_ERR_HEADERS_NOT_SUPPORTED);\n }\n // Everything else happens inside the Observable boundary.\n return new Observable((observer) => {\n // The first step to make a request is to generate the callback name, and replace the\n // callback placeholder in the URL with the name. Care has to be taken here to ensure\n // a trailing &, if matched, gets inserted back into the URL in the correct place.\n const callback = this.nextCallback();\n const url = req.urlWithParams.replace(/=JSONP_CALLBACK(&|$)/, `=${callback}$1`);\n // Construct the <script> tag and point it at the URL.\n const node = this.document.createElement('script');\n node.src = url;\n // A JSONP request requires waiting for multiple callbacks. These variables\n // are closed over and track state across those callbacks.\n // The response object, if one has been received, or null otherwise.\n let body = null;\n // Whether the response callback has been called.\n let finished = false;\n // Set the response callback in this.callbackMap (which will be the window\n // object in the browser. The script being loaded via the <script> tag will\n // eventually call this callback.\n this.callbackMap[callback] = (data) => {\n // Data has been received from the JSONP script. Firstly, delete this callback.\n delete this.callbackMap[callback];\n // Set state to indicate data was received.\n body = data;\n finished = true;\n };\n // cleanup() is a utility closure that removes the <script> from the page and\n // the response callback from the window. This logic is used in both the\n // success, error, and cancellation paths, so it's extracted out for convenience.\n const cleanup = () => {\n // Remove the <script> tag if it's still on the page.\n if (node.parentNode) {\n node.parentNode.removeChild(node);\n }\n // Remove the response callback from the callbackMap (window object in the\n // browser).\n delete this.callbackMap[callback];\n };\n // onLoad() is the success callback which runs after the response callback\n // if the JSONP script loads successfully. The event itself is unimportant.\n // If something went wrong, onLoad() may run without the response callback\n // having been invoked.\n const onLoad = (event) => {\n // We wrap it in an extra Promise, to ensure the microtask\n // is scheduled after the loaded endpoint has executed any potential microtask itself,\n // which is not guaranteed in Internet Explorer and EdgeHTML. See issue #39496\n this.resolvedPromise.then(() => {\n // Cleanup the page.\n cleanup();\n // Check whether the response callback has run.\n if (!finished) {\n // It hasn't, something went wrong with the request. Return an error via\n // the Observable error path. All JSONP errors have status 0.\n observer.error(new HttpErrorResponse({\n url,\n status: 0,\n statusText: 'JSONP Error',\n error: new Error(JSONP_ERR_NO_CALLBACK),\n }));\n return;\n }\n // Success. body either contains the response body or null if none was\n // returned.\n observer.next(new HttpResponse({\n body,\n status: 200 /* HttpStatusCode.Ok */,\n statusText: 'OK',\n url,\n }));\n // Complete the stream, the response is over.\n observer.complete();\n });\n };\n // onError() is the error callback, which runs if the script returned generates\n // a Javascript error. It emits the error via the Observable error channel as\n // a HttpErrorResponse.\n const onError = (error) => {\n cleanup();\n // Wrap the error in a HttpErrorResponse.\n observer.error(new HttpErrorResponse({\n error,\n status: 0,\n statusText: 'JSONP Error',\n url,\n }));\n };\n // Subscribe to both the success (load) and error events on the <script> tag,\n // and add it to the page.\n node.addEventListener('load', onLoad);\n node.addEventListener('error', onError);\n this.document.body.appendChild(node);\n // The request has now been successfully sent.\n observer.next({ type: HttpEventType.Sent });\n // Cancellation handler.\n return () => {\n if (!finished) {\n this.removeListeners(node);\n }\n // And finally, clean up the page.\n cleanup();\n };\n });\n }\n removeListeners(script) {\n // Issue #34818\n // Changing <script>'s ownerDocument will prevent it from execution.\n // https://html.spec.whatwg.org/multipage/scripting.html#execute-the-script-block\n if (!foreignDocument) {\n foreignDocument = this.document.implementation.createHTMLDocument();\n }\n foreignDocument.adoptNode(script);\n }\n}\nJsonpClientBackend.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: JsonpClientBackend, deps: [{ token: JsonpCallbackContext }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\nJsonpClientBackend.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: JsonpClientBackend });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: JsonpClientBackend, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: JsonpCallbackContext }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; } });\n/**\n * Identifies requests with the method JSONP and shifts them to the `JsonpClientBackend`.\n */\nfunction jsonpInterceptorFn(req, next) {\n if (req.method === 'JSONP') {\n return inject(JsonpClientBackend).handle(req);\n }\n // Fall through for normal HTTP requests.\n return next(req);\n}\n/**\n * Identifies requests with the method JSONP and\n * shifts them to the `JsonpClientBackend`.\n *\n * @see `HttpInterceptor`\n *\n * @publicApi\n */\nclass JsonpInterceptor {\n constructor(injector) {\n this.injector = injector;\n }\n /**\n * Identifies and handles a given JSONP request.\n * @param initialRequest The outgoing request object to handle.\n * @param next The next interceptor in the chain, or the backend\n * if no interceptors remain in the chain.\n * @returns An observable of the event stream.\n */\n intercept(initialRequest, next) {\n return this.injector.runInContext(() => jsonpInterceptorFn(initialRequest, downstreamRequest => next.handle(downstreamRequest)));\n }\n}\nJsonpInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: JsonpInterceptor, deps: [{ token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Injectable });\nJsonpInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: JsonpInterceptor });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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 `HttpHandler`\n * @see `JsonpClientBackend`\n *\n * @publicApi\n */\nclass HttpXhrBackend {\n constructor(xhrFactory) {\n this.xhrFactory = xhrFactory;\n }\n /**\n * Processes a request and returns a stream of response events.\n * @param req The request object.\n * @returns An observable of the response events.\n */\n handle(req) {\n // Quick check to give a better error message when a user attempts to use\n // HttpClient.jsonp() without installing the HttpClientJsonpModule\n if (req.method === 'JSONP') {\n throw new Error(`Attempted to construct Jsonp request without HttpClientJsonpModule installed.`);\n }\n // Everything happens on Observable subscription.\n return new Observable((observer) => {\n // Start by setting up the XHR object with request method, URL, and withCredentials flag.\n const xhr = this.xhrFactory.build();\n xhr.open(req.method, req.urlWithParams);\n if (!!req.withCredentials) {\n xhr.withCredentials = true;\n }\n // Add all the requested headers.\n req.headers.forEach((name, values) => xhr.setRequestHeader(name, values.join(',')));\n // Add an Accept header if one isn't present already.\n if (!req.headers.has('Accept')) {\n xhr.setRequestHeader('Accept', 'application/json, text/plain, */*');\n }\n // Auto-detect the Content-Type header if one isn't present already.\n if (!req.headers.has('Content-Type')) {\n const detectedType = req.detectContentTypeHeader();\n // Sometimes Content-Type detection fails.\n if (detectedType !== null) {\n xhr.setRequestHeader('Content-Type', detectedType);\n }\n }\n // Set the responseType if one was requested.\n if (req.responseType) {\n const responseType = req.responseType.toLowerCase();\n // JSON responses need to be processed as text. This is because if the server\n // returns an XSSI-prefixed JSON response, the browser will fail to parse it,\n // xhr.response will be null, and xhr.responseText cannot be accessed to\n // retrieve the prefixed JSON data in order to strip the prefix. Thus, all JSON\n // is parsed by first requesting text and then applying JSON.parse.\n xhr.responseType = ((responseType !== 'json') ? responseType : 'text');\n }\n // Serialize the request body if one is present. If not, this will be set to null.\n const reqBody = req.serializeBody();\n // If progress events are enabled, response headers will be delivered\n // in two events - the HttpHeaderResponse event and the full HttpResponse\n // event. However, since response headers don't change in between these\n // two events, it doesn't make sense to parse them twice. So headerResponse\n // caches the data extracted from the response whenever it's first parsed,\n // to ensure parsing isn't duplicated.\n let headerResponse = null;\n // partialFromXhr extracts the HttpHeaderResponse from the current XMLHttpRequest\n // state, and memoizes it into headerResponse.\n const partialFromXhr = () => {\n if (headerResponse !== null) {\n return headerResponse;\n }\n const statusText = xhr.statusText || 'OK';\n // Parse headers from XMLHttpRequest - this step is lazy.\n const headers = new HttpHeaders(xhr.getAllResponseHeaders());\n // Read the response URL from the XMLHttpResponse instance and fall back on the\n // request URL.\n const url = getResponseUrl(xhr) || req.url;\n // Construct the HttpHeaderResponse and memoize it.\n headerResponse = new HttpHeaderResponse({ headers, status: xhr.status, statusText, url });\n return headerResponse;\n };\n // Next, a few closures are defined for the various events which XMLHttpRequest can\n // emit. This allows them to be unregistered as event listeners later.\n // First up is the load event, which represents a response being fully available.\n const onLoad = () => {\n // Read response state from the memoized partial data.\n let { headers, status, statusText, url } = partialFromXhr();\n // The body will be read out if present.\n let body = null;\n if (status !== 204 /* HttpStatusCode.NoContent */) {\n // Use XMLHttpRequest.response if set, responseText otherwise.\n body = (typeof xhr.response === 'undefined') ? xhr.responseText : xhr.response;\n }\n // Normalize another potential bug (this one comes from CORS).\n if (status === 0) {\n status = !!body ? 200 /* HttpStatusCode.Ok */ : 0;\n }\n // ok determines whether the response will be transmitted on the event or\n // error channel. Unsuccessful status codes (not 2xx) will always be errors,\n // but a successful status code can still result in an error if the user\n // asked for JSON data and the body cannot be parsed as such.\n let ok = status >= 200 && status < 300;\n // Check whether the body needs to be parsed as JSON (in many cases the browser\n // will have done that already).\n if (req.responseType === 'json' && typeof body === 'string') {\n // Save the original body, before attempting XSSI prefix stripping.\n const originalBody = body;\n body = body.replace(XSSI_PREFIX, '');\n try {\n // Attempt the parse. If it fails, a parse error should be delivered to the user.\n body = body !== '' ? JSON.parse(body) : null;\n }\n catch (error) {\n // Since the JSON.parse failed, it's reasonable to assume this might not have been a\n // JSON response. Restore the original body (including any XSSI prefix) to deliver\n // a better error response.\n body = originalBody;\n // If this was an error request to begin with, leave it as a string, it probably\n // just isn't JSON. Otherwise, deliver the parsing error to the user.\n if (ok) {\n // Even though the response status was 2xx, this is still an error.\n ok = false;\n // The parse error contains the text of the body that failed to parse.\n body = { error, text: body };\n }\n }\n }\n if (ok) {\n // A successful response is delivered on the event stream.\n observer.next(new HttpResponse({\n body,\n headers,\n status,\n statusText,\n url: url || undefined,\n }));\n // The full body has been received and delivered, no further events\n // are possible. This request is complete.\n observer.complete();\n }\n else {\n // An unsuccessful request is delivered on the error channel.\n observer.error(new HttpErrorResponse({\n // The error in this case is the response body (error from the server).\n error: body,\n headers,\n status,\n statusText,\n url: url || undefined,\n }));\n }\n };\n // The onError callback is called when something goes wrong at the network level.\n // Connection timeout, DNS error, offline, etc. These are actual errors, and are\n // transmitted on the error channel.\n const onError = (error) => {\n const { url } = partialFromXhr();\n const res = new HttpErrorResponse({\n error,\n status: xhr.status || 0,\n statusText: xhr.statusText || 'Unknown Error',\n url: url || undefined,\n });\n observer.error(res);\n };\n // The sentHeaders flag tracks whether the HttpResponseHeaders event\n // has been sent on the stream. This is necessary to track if progress\n // is enabled since the event will be sent on only the first download\n // progress event.\n let sentHeaders = false;\n // The download progress event handler, which is only registered if\n // progress events are enabled.\n const onDownProgress = (event) => {\n // Send the HttpResponseHeaders event if it hasn't been sent already.\n if (!sentHeaders) {\n observer.next(partialFromXhr());\n sentHeaders = true;\n }\n // Start building the download progress event to deliver on the response\n // event stream.\n let progressEvent = {\n type: HttpEventType.DownloadProgress,\n loaded: event.loaded,\n };\n // Set the total number of bytes in the event if it's available.\n if (event.lengthComputable) {\n progressEvent.total = event.total;\n }\n // If the request was for text content and a partial response is\n // available on XMLHttpRequest, include it in the progress event\n // to allow for streaming reads.\n if (req.responseType === 'text' && !!xhr.responseText) {\n progressEvent.partialText = xhr.responseText;\n }\n // Finally, fire the event.\n observer.next(progressEvent);\n };\n // The upload progress event handler, which is only registered if\n // progress events are enabled.\n const onUpProgress = (event) => {\n // Upload progress events are simpler. Begin building the progress\n // event.\n let progress = {\n type: HttpEventType.UploadProgress,\n loaded: event.loaded,\n };\n // If the total number of bytes being uploaded is available, include\n // it.\n if (event.lengthComputable) {\n progress.total = event.total;\n }\n // Send the event.\n observer.next(progress);\n };\n // By default, register for load and error events.\n xhr.addEventListener('load', onLoad);\n xhr.addEventListener('error', onError);\n xhr.addEventListener('timeout', onError);\n xhr.addEventListener('abort', onError);\n // Progress events are only enabled if requested.\n if (req.reportProgress) {\n // Download progress is always enabled if requested.\n xhr.addEventListener('progress', onDownProgress);\n // Upload progress depends on whether there is a body to upload.\n if (reqBody !== null && xhr.upload) {\n xhr.upload.addEventListener('progress', onUpProgress);\n }\n }\n // Fire the request, and notify the event stream that it was fired.\n xhr.send(reqBody);\n observer.next({ type: HttpEventType.Sent });\n // This is the return from the Observable function, which is the\n // request cancellation handler.\n return () => {\n // On a cancellation, remove all registered event listeners.\n xhr.removeEventListener('error', onError);\n xhr.removeEventListener('abort', onError);\n xhr.removeEventListener('load', onLoad);\n xhr.removeEventListener('timeout', onError);\n if (req.reportProgress) {\n xhr.removeEventListener('progress', onDownProgress);\n if (reqBody !== null && xhr.upload) {\n xhr.upload.removeEventListener('progress', onUpProgress);\n }\n }\n // Finally, abort the in-flight request.\n if (xhr.readyState !== xhr.DONE) {\n xhr.abort();\n }\n };\n });\n }\n}\nHttpXhrBackend.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: HttpXhrBackend, deps: [{ token: i1.XhrFactory }], target: i0.ɵɵFactoryTarget.Injectable });\nHttpXhrBackend.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: HttpXhrBackend });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", 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.1.0\", ngImport: i0, type: HttpXsrfCookieExtractor });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", ngImport: i0, type: HttpXsrfInterceptor, deps: [{ token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Injectable });\nHttpXsrfInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: HttpXsrfInterceptor });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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 withInterceptors\n * @see withInterceptorsFromDi\n * @see withXsrfConfiguration\n * @see withNoXsrfProtection\n * @see withJsonpSupport\n * @see withRequestsMadeViaParent\n */\nfunction provideHttpClient(...features) {\n if (ngDevMode) {\n const featureKinds = new Set(features.map(f => f.ɵkind));\n if (featureKinds.has(HttpFeatureKind.NoXsrfProtection) &&\n featureKinds.has(HttpFeatureKind.CustomXsrfConfiguration)) {\n throw new Error(ngDevMode ?\n `Configuration error: found both withXsrfConfiguration() and withNoXsrfProtection() in the same call to provideHttpClient(), which is a contradiction.` :\n '');\n }\n }\n const providers = [\n HttpClient,\n HttpXhrBackend,\n HttpInterceptorHandler,\n { provide: HttpHandler, useExisting: HttpInterceptorHandler },\n { provide: HttpBackend, useExisting: HttpXhrBackend },\n {\n provide: HTTP_INTERCEPTOR_FNS,\n useValue: xsrfInterceptorFn,\n multi: true,\n },\n { provide: XSRF_ENABLED, useValue: true },\n { provide: HttpXsrfTokenExtractor, useClass: HttpXsrfCookieExtractor },\n ];\n for (const feature of features) {\n providers.push(...feature.ɵproviders);\n }\n return makeEnvironmentProviders(providers);\n}\n/**\n * Adds one or more functional-style HTTP interceptors to the configuration of the `HttpClient`\n * instance.\n *\n * @see HttpInterceptorFn\n * @see provideHttpClient\n * @publicApi\n */\nfunction withInterceptors(interceptorFns) {\n return makeHttpFeature(HttpFeatureKind.Interceptors, interceptorFns.map(interceptorFn => {\n return {\n provide: HTTP_INTERCEPTOR_FNS,\n useValue: interceptorFn,\n multi: true,\n };\n }));\n}\nconst LEGACY_INTERCEPTOR_FN = new InjectionToken('LEGACY_INTERCEPTOR_FN');\n/**\n * Includes class-based interceptors configured using a multi-provider in the current injector into\n * the configured `HttpClient` instance.\n *\n * Prefer `withInterceptors` and functional interceptors instead, as support for DI-provided\n * interceptors may be phased out in a later release.\n *\n * @see HttpInterceptor\n * @see HTTP_INTERCEPTORS\n * @see provideHttpClient\n */\nfunction withInterceptorsFromDi() {\n // Note: the legacy interceptor function is provided here via an intermediate token\n // (`LEGACY_INTERCEPTOR_FN`), using a pattern which guarantees that if these providers are\n // included multiple times, all of the multi-provider entries will have the same instance of the\n // interceptor function. That way, the `HttpINterceptorHandler` will dedup them and legacy\n // interceptors will not run multiple times.\n return makeHttpFeature(HttpFeatureKind.LegacyInterceptors, [\n {\n provide: LEGACY_INTERCEPTOR_FN,\n useFactory: legacyInterceptorFnFactory,\n },\n {\n provide: HTTP_INTERCEPTOR_FNS,\n useExisting: LEGACY_INTERCEPTOR_FN,\n multi: true,\n }\n ]);\n}\n/**\n * Customizes the XSRF protection for the configuration of the current `HttpClient` instance.\n *\n * This feature is incompatible with the `withNoXsrfProtection` feature.\n *\n * @see provideHttpClient\n */\nfunction withXsrfConfiguration({ cookieName, headerName }) {\n const providers = [];\n if (cookieName !== undefined) {\n providers.push({ provide: XSRF_COOKIE_NAME, useValue: cookieName });\n }\n if (headerName !== undefined) {\n providers.push({ provide: XSRF_HEADER_NAME, useValue: headerName });\n }\n return makeHttpFeature(HttpFeatureKind.CustomXsrfConfiguration, providers);\n}\n/**\n * Disables XSRF protection in the configuration of the current `HttpClient` instance.\n *\n * This feature is incompatible with the `withXsrfConfiguration` feature.\n *\n * @see provideHttpClient\n */\nfunction withNoXsrfProtection() {\n return makeHttpFeature(HttpFeatureKind.NoXsrfProtection, [\n {\n provide: XSRF_ENABLED,\n useValue: false,\n },\n ]);\n}\n/**\n * Add JSONP support to the configuration of the current `HttpClient` instance.\n *\n * @see provideHttpClient\n */\nfunction withJsonpSupport() {\n return makeHttpFeature(HttpFeatureKind.JsonpSupport, [\n JsonpClientBackend,\n { provide: JsonpCallbackContext, useFactory: jsonpCallbackContext },\n { provide: HTTP_INTERCEPTOR_FNS, useValue: jsonpInterceptorFn, multi: true },\n ]);\n}\n/**\n * Configures the current `HttpClient` instance to make requests via the parent injector's\n * `HttpClient` instead of directly.\n *\n * By default, `provideHttpClient` configures `HttpClient` in its injector to be an independent\n * instance. For example, even if `HttpClient` is configured in the parent injector with\n * one or more interceptors, they will not intercept requests made via this instance.\n *\n * With this option enabled, once the request has passed through the current injector's\n * interceptors, it will be delegated to the parent injector's `HttpClient` chain instead of\n * dispatched directly, and interceptors in the parent configuration will be applied to the request.\n *\n * If there are several `HttpClient` instances in the injector hierarchy, it's possible for\n * `withRequestsMadeViaParent` to be used at multiple levels, which will cause the request to\n * \"bubble up\" until either reaching the root level or an `HttpClient` which was not configured with\n * this option.\n *\n * @see provideHttpClient\n * @developerPreview\n */\nfunction withRequestsMadeViaParent() {\n return makeHttpFeature(HttpFeatureKind.RequestsMadeViaParent, [\n {\n provide: HttpBackend,\n useFactory: () => {\n const handlerFromParent = inject(HttpHandler, { skipSelf: true, optional: true });\n if (ngDevMode && handlerFromParent === null) {\n throw new Error('withRequestsMadeViaParent() can only be used when the parent injector also configures HttpClient');\n }\n return handlerFromParent;\n },\n },\n ]);\n}\n\n/**\n * 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.1.0\", ngImport: i0, type: HttpClientXsrfModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nHttpClientXsrfModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.1.0\", ngImport: i0, type: HttpClientXsrfModule });\nHttpClientXsrfModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", 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.1.0\", ngImport: i0, type: HttpClientModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nHttpClientModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.1.0\", ngImport: i0, type: HttpClientModule });\nHttpClientModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: HttpClientModule, providers: [\n provideHttpClient(withInterceptorsFromDi(), withXsrfConfiguration({\n cookieName: XSRF_DEFAULT_COOKIE_NAME,\n headerName: XSRF_DEFAULT_HEADER_NAME,\n })),\n ] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: HttpClientModule, decorators: [{\n type: NgModule,\n args: [{\n /**\n * Configures the [dependency injector](guide/glossary#injector) where it is imported\n * with supporting services for HTTP communications.\n */\n providers: [\n provideHttpClient(withInterceptorsFromDi(), withXsrfConfiguration({\n cookieName: XSRF_DEFAULT_COOKIE_NAME,\n headerName: XSRF_DEFAULT_HEADER_NAME,\n })),\n ],\n }]\n }] });\n/**\n * Configures the [dependency injector](guide/glossary#injector) for `HttpClient`\n * with supporting services for JSONP.\n * Without this module, Jsonp requests reach the backend\n * with method JSONP, where they are rejected.\n *\n * @publicApi\n */\nclass HttpClientJsonpModule {\n}\nHttpClientJsonpModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: HttpClientJsonpModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nHttpClientJsonpModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.1.0\", ngImport: i0, type: HttpClientJsonpModule });\nHttpClientJsonpModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: HttpClientJsonpModule, providers: [\n withJsonpSupport().ɵproviders,\n ] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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","/**\n * @license Angular v15.1.0-rc.0\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 const typeName = getTypeName(type);\n // TODO(FW-1307): Re-add ngDevMode when closure can handle it\n // ngDevMode &&\n console.warn(`DEPRECATED: DI is instantiating a token \"${typeName}\" that inherits its @Injectable decorator but does not provide one itself.\\n` +\n `This will become an error in a future version of Angular. Please add @Injectable() to the \"${typeName}\" class.`);\n return def;\n }\n else {\n return null;\n }\n}\n/** Gets the name of a type, accounting for some cross-browser differences. */\nfunction getTypeName(type) {\n // `Function.prototype.name` behaves differently between IE and other browsers. In most browsers\n // it'll always return the name of the function itself, no matter how many other functions it\n // inherits from. On IE the function doesn't have its own `name` property, but it takes it from\n // the lowest level in the prototype chain. E.g. if we have `class Foo extends Parent` most\n // browsers will evaluate `Foo.name` to `Foo` while IE will return `Parent`. We work around\n // the issue by converting the function to a string and parsing its name out that way via a regex.\n if (type.hasOwnProperty('name')) {\n return type.name;\n }\n const match = ('' + type).match(/^function\\s*([^\\s(]+)/);\n return match === null ? '' : match[1];\n}\n/**\n * Read the injector def type in a way which is immune to accidentally reading inherited value.\n *\n * @param type type which may have an injector def (`ɵinj`)\n */\nfunction getInjectorDef(type) {\n return type && (type.hasOwnProperty(NG_INJ_DEF) || type.hasOwnProperty(NG_INJECTOR_DEF)) ?\n type[NG_INJ_DEF] :\n null;\n}\nconst NG_PROV_DEF = getClosureSafeProperty({ ɵprov: getClosureSafeProperty });\nconst NG_INJ_DEF = getClosureSafeProperty({ ɵinj: getClosureSafeProperty });\n// We need to keep these around so we can read off old defs if new defs are unavailable\nconst NG_INJECTABLE_DEF = getClosureSafeProperty({ ngInjectableDef: getClosureSafeProperty });\nconst NG_INJECTOR_DEF = getClosureSafeProperty({ ngInjectorDef: getClosureSafeProperty });\n\n/**\n * 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 * Defines the possible states of the default change detector.\n * @see `ChangeDetectorRef`\n */\nvar ChangeDetectorStatus;\n(function (ChangeDetectorStatus) {\n /**\n * A state in which, after calling `detectChanges()`, the change detector\n * state becomes `Checked`, and must be explicitly invoked or reactivated.\n */\n ChangeDetectorStatus[ChangeDetectorStatus[\"CheckOnce\"] = 0] = \"CheckOnce\";\n /**\n * A state in which change detection is skipped until the change detector mode\n * becomes `CheckOnce`.\n */\n ChangeDetectorStatus[ChangeDetectorStatus[\"Checked\"] = 1] = \"Checked\";\n /**\n * A state in which change detection continues automatically until explicitly\n * deactivated.\n */\n ChangeDetectorStatus[ChangeDetectorStatus[\"CheckAlways\"] = 2] = \"CheckAlways\";\n /**\n * A state in which a change detector sub tree is not a part of the main tree and\n * should be skipped.\n */\n ChangeDetectorStatus[ChangeDetectorStatus[\"Detached\"] = 3] = \"Detached\";\n /**\n * Indicates that the change detector encountered an error checking a binding\n * or calling a directive lifecycle method and is now in an inconsistent state. Change\n * detectors in this state do not detect changes.\n */\n ChangeDetectorStatus[ChangeDetectorStatus[\"Errored\"] = 4] = \"Errored\";\n /**\n * Indicates that the change detector has been destroyed.\n */\n ChangeDetectorStatus[ChangeDetectorStatus[\"Destroyed\"] = 5] = \"Destroyed\";\n})(ChangeDetectorStatus || (ChangeDetectorStatus = {}));\n/**\n * Reports whether a given strategy is currently the default for change detection.\n * @param changeDetectionStrategy The strategy to check.\n * @returns True if the given strategy is the current default, false otherwise.\n * @see `ChangeDetectorStatus`\n * @see `ChangeDetectorRef`\n */\nfunction isDefaultChangeDetectionStrategy(changeDetectionStrategy) {\n return changeDetectionStrategy == null ||\n changeDetectionStrategy === ChangeDetectionStrategy.Default;\n}\n\n/**\n * 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 MyDirective {\n * // Generated by Angular Template Compiler\n * // [Symbol] syntax will not be supported by TypeScript until v2.7\n * static ɵcmp = defineComponent({\n * ...\n * });\n * }\n * ```\n * @codeGenApi\n */\nfunction ɵɵdefineComponent(componentDefinition) {\n return noSideEffects(() => {\n // Initialize ngDevMode. This must be the first statement in ɵɵdefineComponent.\n // See the `initNgDevMode` docstring for more information.\n (typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode();\n const type = componentDefinition.type;\n const standalone = componentDefinition.standalone === true;\n const declaredInputs = {};\n const def = {\n type: type,\n providersResolver: null,\n decls: componentDefinition.decls,\n vars: componentDefinition.vars,\n factory: null,\n template: componentDefinition.template || null,\n consts: componentDefinition.consts || null,\n ngContentSelectors: componentDefinition.ngContentSelectors,\n hostBindings: componentDefinition.hostBindings || null,\n hostVars: componentDefinition.hostVars || 0,\n hostAttrs: componentDefinition.hostAttrs || null,\n contentQueries: componentDefinition.contentQueries || null,\n declaredInputs: declaredInputs,\n inputs: null,\n outputs: null,\n exportAs: componentDefinition.exportAs || null,\n onPush: componentDefinition.changeDetection === ChangeDetectionStrategy.OnPush,\n directiveDefs: null,\n pipeDefs: null,\n standalone,\n dependencies: standalone && componentDefinition.dependencies || null,\n getStandaloneInjector: null,\n selectors: componentDefinition.selectors || EMPTY_ARRAY,\n viewQuery: componentDefinition.viewQuery || null,\n features: componentDefinition.features || null,\n data: componentDefinition.data || {},\n encapsulation: componentDefinition.encapsulation || ViewEncapsulation$1.Emulated,\n id: `c${componentDefCount++}`,\n styles: componentDefinition.styles || EMPTY_ARRAY,\n _: null,\n setInput: null,\n schemas: componentDefinition.schemas || null,\n tView: null,\n findHostDirectiveDefs: null,\n hostDirectives: null,\n };\n const dependencies = componentDefinition.dependencies;\n const feature = componentDefinition.features;\n def.inputs = invertObject(componentDefinition.inputs, declaredInputs),\n def.outputs = invertObject(componentDefinition.outputs),\n feature && feature.forEach((fn) => fn(def));\n def.directiveDefs = dependencies ?\n (() => (typeof dependencies === 'function' ? dependencies() : dependencies)\n .map(extractDirectiveDef)\n .filter(nonNull)) :\n null;\n def.pipeDefs = dependencies ?\n (() => (typeof dependencies === 'function' ? dependencies() : dependencies)\n .map(getPipeDef$1)\n .filter(nonNull)) :\n null;\n return def;\n });\n}\n/**\n * Generated next to NgModules to monkey-patch directive and pipe references onto a component's\n * definition, when generating a direct reference in the component file would otherwise create an\n * import cycle.\n *\n * See [this explanation](https://hackmd.io/Odw80D0pR6yfsOjg_7XCJg?view) for more details.\n *\n * @codeGenApi\n */\nfunction ɵɵsetComponentScope(type, directives, pipes) {\n const def = type.ɵcmp;\n def.directiveDefs = () => (typeof directives === 'function' ? directives() : directives).map(extractDirectiveDef);\n def.pipeDefs = () => (typeof pipes === 'function' ? pipes() : pipes).map(getPipeDef$1);\n}\nfunction extractDirectiveDef(type) {\n return getComponentDef(type) || getDirectiveDef(type);\n}\nfunction nonNull(value) {\n return value !== null;\n}\n/**\n * @codeGenApi\n */\nfunction ɵɵdefineNgModule(def) {\n return noSideEffects(() => {\n const res = {\n type: def.type,\n bootstrap: def.bootstrap || EMPTY_ARRAY,\n declarations: def.declarations || EMPTY_ARRAY,\n imports: def.imports || EMPTY_ARRAY,\n exports: def.exports || EMPTY_ARRAY,\n transitiveCompileScopes: null,\n schemas: def.schemas || null,\n id: def.id || null,\n };\n return res;\n });\n}\n/**\n * Adds the module metadata that is necessary to compute the module's transitive scope to an\n * existing module definition.\n *\n * Scope metadata of modules is not used in production builds, so calls to this function can be\n * marked pure to tree-shake it from the bundle, allowing for all referenced declarations\n * to become eligible for tree-shaking as well.\n *\n * @codeGenApi\n */\nfunction ɵɵsetNgModuleScope(type, scope) {\n return noSideEffects(() => {\n const ngModuleDef = getNgModuleDef(type, true);\n ngModuleDef.declarations = scope.declarations || EMPTY_ARRAY;\n ngModuleDef.imports = scope.imports || EMPTY_ARRAY;\n ngModuleDef.exports = scope.exports || EMPTY_ARRAY;\n });\n}\n/**\n * Inverts an inputs or outputs lookup such that the keys, which were the\n * minified keys, are part of the values, and the values are parsed so that\n * the publicName of the property is the new key\n *\n * e.g. for\n *\n * ```\n * class Comp {\n * @Input()\n * propName1: string;\n *\n * @Input('publicName2')\n * declaredPropName2: number;\n * }\n * ```\n *\n * will be serialized as\n *\n * ```\n * {\n * propName1: 'propName1',\n * declaredPropName2: ['publicName2', 'declaredPropName2'],\n * }\n * ```\n *\n * which is than translated by the minifier as:\n *\n * ```\n * {\n * minifiedPropName1: 'propName1',\n * minifiedPropName2: ['publicName2', 'declaredPropName2'],\n * }\n * ```\n *\n * becomes: (public name => minifiedName)\n *\n * ```\n * {\n * 'propName1': 'minifiedPropName1',\n * 'publicName2': 'minifiedPropName2',\n * }\n * ```\n *\n * Optionally the function can take `secondary` which will result in: (public name => declared name)\n *\n * ```\n * {\n * 'propName1': 'propName1',\n * 'publicName2': 'declaredPropName2',\n * }\n * ```\n *\n\n */\nfunction invertObject(obj, secondary) {\n if (obj == null)\n return EMPTY_OBJ;\n const newLookup = {};\n for (const minifiedKey in obj) {\n if (obj.hasOwnProperty(minifiedKey)) {\n let publicName = obj[minifiedKey];\n let declaredName = publicName;\n if (Array.isArray(publicName)) {\n declaredName = publicName[1];\n publicName = publicName[0];\n }\n newLookup[publicName] = minifiedKey;\n if (secondary) {\n (secondary[publicName] = declaredName);\n }\n }\n }\n return newLookup;\n}\n/**\n * Create a directive definition object.\n *\n * # Example\n * ```ts\n * class MyDirective {\n * // Generated by Angular Template Compiler\n * // [Symbol] syntax will not be supported by TypeScript until v2.7\n * static ɵdir = ɵɵdefineDirective({\n * ...\n * });\n * }\n * ```\n *\n * @codeGenApi\n */\nconst ɵɵdefineDirective = ɵɵdefineComponent;\n/**\n * Create a pipe definition object.\n *\n * # Example\n * ```\n * class MyPipe implements PipeTransform {\n * // Generated by Angular Template Compiler\n * static ɵpipe = definePipe({\n * ...\n * });\n * }\n * ```\n * @param pipeDef Pipe definition generated by the compiler\n *\n * @codeGenApi\n */\nfunction ɵɵdefinePipe(pipeDef) {\n return {\n type: pipeDef.type,\n name: pipeDef.name,\n factory: null,\n pure: pipeDef.pure !== false,\n standalone: pipeDef.standalone === true,\n onDestroy: pipeDef.type.prototype.ngOnDestroy || null\n };\n}\n/**\n * The following getter methods retrieve the definition from the type. Currently the retrieval\n * honors inheritance, but in the future we may change the rule to require that definitions are\n * explicit. This would require some sort of migration strategy.\n */\nfunction getComponentDef(type) {\n return type[NG_COMP_DEF] || null;\n}\nfunction getDirectiveDef(type) {\n return type[NG_DIR_DEF] || null;\n}\nfunction getPipeDef$1(type) {\n return type[NG_PIPE_DEF] || null;\n}\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}\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 !== null;\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 = []))\n .push(directiveIndex, wrappedOnChanges);\n }\n if (ngOnInit) {\n (tView.preOrderHooks || (tView.preOrderHooks = [])).push(0 - directiveIndex, ngOnInit);\n }\n if (ngDoCheck) {\n (tView.preOrderHooks || (tView.preOrderHooks = [])).push(directiveIndex, ngDoCheck);\n (tView.preOrderCheckHooks || (tView.preOrderCheckHooks = [])).push(directiveIndex, ngDoCheck);\n }\n}\n/**\n *\n * Loops through the directives on the provided `tNode` and queues hooks to be\n * run that are not initialization hooks.\n *\n * Should be executed during `elementEnd()` and similar to\n * preserve hook execution order. Content, view, and destroy hooks for projected\n * components and directives must be called *before* their hosts.\n *\n * Sets up the content, view, and destroy hooks on the provided `tView`,\n * see {@link HookData} for details about the data structure.\n *\n * NOTE: This does not set up `onChanges`, `onInit` or `doCheck`, those are set up\n * separately at `elementStart`.\n *\n * @param tView The current TView\n * @param tNode The TNode whose directives are to be searched for hooks to queue\n */\nfunction registerPostOrderHooks(tView, tNode) {\n ngDevMode && assertFirstCreatePass(tView);\n // It's necessary to loop through the directives at elementEnd() (rather than processing in\n // directiveCreate) so we can preserve the current hook order. Content, view, and destroy\n // hooks for projected components and directives must be called *before* their hosts.\n for (let i = tNode.directiveStart, end = tNode.directiveEnd; i < end; i++) {\n const directiveDef = tView.data[i];\n ngDevMode && assertDefined(directiveDef, 'Expecting DirectiveDef');\n const lifecycleHooks = directiveDef.type.prototype;\n const { ngAfterContentInit, ngAfterContentChecked, ngAfterViewInit, ngAfterViewChecked, ngOnDestroy } = lifecycleHooks;\n if (ngAfterContentInit) {\n (tView.contentHooks || (tView.contentHooks = [])).push(-i, ngAfterContentInit);\n }\n if (ngAfterContentChecked) {\n (tView.contentHooks || (tView.contentHooks = [])).push(i, ngAfterContentChecked);\n (tView.contentCheckHooks || (tView.contentCheckHooks = [])).push(i, ngAfterContentChecked);\n }\n if (ngAfterViewInit) {\n (tView.viewHooks || (tView.viewHooks = [])).push(-i, ngAfterViewInit);\n }\n if (ngAfterViewChecked) {\n (tView.viewHooks || (tView.viewHooks = [])).push(i, ngAfterViewChecked);\n (tView.viewCheckHooks || (tView.viewCheckHooks = [])).push(i, ngAfterViewChecked);\n }\n if (ngOnDestroy != null) {\n (tView.destroyHooks || (tView.destroyHooks = [])).push(i, ngOnDestroy);\n }\n }\n}\n/**\n * Executing hooks requires complex logic as we need to deal with 2 constraints.\n *\n * 1. Init hooks (ngOnInit, ngAfterContentInit, ngAfterViewInit) must all be executed once and only\n * once, across many change detection cycles. This must be true even if some hooks throw, or if\n * some recursively trigger a change detection cycle.\n * To solve that, it is required to track the state of the execution of these init hooks.\n * This is done by storing and maintaining flags in the view: the {@link InitPhaseState},\n * and the index within that phase. They can be seen as a cursor in the following structure:\n * [[onInit1, onInit2], [afterContentInit1], [afterViewInit1, afterViewInit2, afterViewInit3]]\n * They are are stored as flags in LView[FLAGS].\n *\n * 2. Pre-order hooks can be executed in batches, because of the select instruction.\n * To be able to pause and resume their execution, we also need some state about the hook's array\n * that is being processed:\n * - the index of the next hook to be executed\n * - the number of init hooks already found in the processed part of the array\n * They are are stored as flags in LView[PREORDER_HOOK_FLAGS].\n */\n/**\n * Executes pre-order check hooks ( OnChanges, DoChanges) given a view where all the init hooks were\n * executed once. This is a light version of executeInitAndCheckPreOrderHooks where we can skip read\n * / write of the init-hooks related flags.\n * @param lView The LView where hooks are defined\n * @param hooks Hooks to be run\n * @param nodeIndex 3 cases depending on the value:\n * - undefined: all hooks from the array should be executed (post-order case)\n * - null: execute hooks only from the saved index until the end of the array (pre-order case, when\n * flushing the remaining hooks)\n * - number: execute hooks only from the saved index until that node index exclusive (pre-order\n * case, when executing select(number))\n */\nfunction executeCheckHooks(lView, hooks, nodeIndex) {\n callHooks(lView, hooks, 3 /* InitPhaseState.InitPhaseCompleted */, nodeIndex);\n}\n/**\n * Executes post-order init and check hooks (one of AfterContentInit, AfterContentChecked,\n * AfterViewInit, AfterViewChecked) given a view where there are pending init hooks to be executed.\n * @param lView The LView where hooks are defined\n * @param hooks Hooks to be run\n * @param initPhase A phase for which hooks should be run\n * @param nodeIndex 3 cases depending on the value:\n * - undefined: all hooks from the array should be executed (post-order case)\n * - null: execute hooks only from the saved index until the end of the array (pre-order case, when\n * flushing the remaining hooks)\n * - number: execute hooks only from the saved index until that node index exclusive (pre-order\n * case, when executing select(number))\n */\nfunction executeInitAndCheckHooks(lView, hooks, initPhase, nodeIndex) {\n ngDevMode &&\n assertNotEqual(initPhase, 3 /* InitPhaseState.InitPhaseCompleted */, 'Init pre-order hooks should not be called more than once');\n if ((lView[FLAGS] & 3 /* LViewFlags.InitPhaseStateMask */) === initPhase) {\n callHooks(lView, hooks, initPhase, nodeIndex);\n }\n}\nfunction incrementInitPhaseFlags(lView, initPhase) {\n ngDevMode &&\n assertNotEqual(initPhase, 3 /* InitPhaseState.InitPhaseCompleted */, 'Init hooks phase should not be incremented after all init hooks have been run.');\n let flags = lView[FLAGS];\n if ((flags & 3 /* LViewFlags.InitPhaseStateMask */) === initPhase) {\n flags &= 2047 /* LViewFlags.IndexWithinInitPhaseReset */;\n flags += 1 /* LViewFlags.InitPhaseStateIncrementer */;\n lView[FLAGS] = flags;\n }\n}\n/**\n * Calls lifecycle hooks with their contexts, skipping init hooks if it's not\n * the first LView pass\n *\n * @param currentView The current view\n * @param arr The array in which the hooks are found\n * @param initPhaseState the current state of the init phase\n * @param currentNodeIndex 3 cases depending on the value:\n * - undefined: all hooks from the array should be executed (post-order case)\n * - null: execute hooks only from the saved index until the end of the array (pre-order case, when\n * flushing the remaining hooks)\n * - number: execute hooks only from the saved index until that node index exclusive (pre-order\n * case, when executing select(number))\n */\nfunction callHooks(currentView, arr, initPhase, currentNodeIndex) {\n ngDevMode &&\n assertEqual(isInCheckNoChangesMode(), false, 'Hooks should never be run when in check no changes mode.');\n const startIndex = currentNodeIndex !== undefined ?\n (currentView[PREORDER_HOOK_FLAGS] & 65535 /* PreOrderHookFlags.IndexOfTheNextPreOrderHookMaskMask */) :\n 0;\n const nodeIndexLimit = currentNodeIndex != null ? currentNodeIndex : -1;\n const max = arr.length - 1; // Stop the loop at length - 1, because we look for the hook at i + 1\n let lastNodeIndexFound = 0;\n for (let i = startIndex; i < max; i++) {\n const hook = arr[i + 1];\n if (typeof hook === 'number') {\n lastNodeIndexFound = arr[i];\n if (currentNodeIndex != null && lastNodeIndexFound >= currentNodeIndex) {\n break;\n }\n }\n else {\n const isInitHook = arr[i] < 0;\n if (isInitHook)\n currentView[PREORDER_HOOK_FLAGS] += 65536 /* PreOrderHookFlags.NumberOfInitHooksCalledIncrementer */;\n if (lastNodeIndexFound < nodeIndexLimit || nodeIndexLimit == -1) {\n callHook(currentView, initPhase, arr, i);\n currentView[PREORDER_HOOK_FLAGS] =\n (currentView[PREORDER_HOOK_FLAGS] & 4294901760 /* PreOrderHookFlags.NumberOfInitHooksCalledMask */) + i +\n 2;\n }\n i++;\n }\n }\n}\n/**\n * Execute one hook against the current `LView`.\n *\n * @param currentView The current view\n * @param initPhaseState the current state of the init phase\n * @param arr The array in which the hooks are found\n * @param i The current index within the hook data array\n */\nfunction callHook(currentView, initPhase, arr, i) {\n const isInitHook = arr[i] < 0;\n const hook = arr[i + 1];\n const directiveIndex = isInitHook ? -arr[i] : arr[i];\n const directive = currentView[directiveIndex];\n if (isInitHook) {\n const indexWithintInitPhase = currentView[FLAGS] >> 11 /* LViewFlags.IndexWithinInitPhaseShift */;\n // The init phase state must be always checked here as it may have been recursively updated.\n if (indexWithintInitPhase <\n (currentView[PREORDER_HOOK_FLAGS] >> 16 /* PreOrderHookFlags.NumberOfInitHooksCalledShift */) &&\n (currentView[FLAGS] & 3 /* LViewFlags.InitPhaseStateMask */) === initPhase) {\n currentView[FLAGS] += 2048 /* LViewFlags.IndexWithinInitPhaseIncrementer */;\n profiler(4 /* ProfilerEvent.LifecycleHookStart */, directive, hook);\n try {\n hook.call(directive);\n }\n finally {\n profiler(5 /* ProfilerEvent.LifecycleHookEnd */, directive, hook);\n }\n }\n }\n else {\n profiler(4 /* ProfilerEvent.LifecycleHookStart */, directive, hook);\n try {\n hook.call(directive);\n }\n finally {\n profiler(5 /* ProfilerEvent.LifecycleHookEnd */, directive, hook);\n }\n }\n}\n\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'`,\n // because while most browsers return 'function', IE returns 'object'.\n (typeof HTMLUnknownElement !== 'undefined' && HTMLUnknownElement &&\n element instanceof HTMLUnknownElement) ||\n (typeof customElements !== 'undefined' && tagName.indexOf('-') > -1 &&\n !customElements.get(tagName));\n if (isUnknown && !matchingSchemas(schemas, tagName)) {\n const isHostStandalone = isHostComponentStandalone(lView);\n const templateLocation = getTemplateLocationDetails(lView);\n const schemas = `'${isHostStandalone ? '@Component' : '@NgModule'}.schemas'`;\n let message = `'${tagName}' is not a known element${templateLocation}:\\n`;\n message += `1. If '${tagName}' is an Angular component, then verify that it is ${isHostStandalone ? 'included in the \\'@Component.imports\\' of this component' :\n 'a part of an @NgModule where this component is declared'}.\\n`;\n if (tagName && tagName.indexOf('-') > -1) {\n message +=\n `2. If '${tagName}' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the ${schemas} of this component to suppress this message.`;\n }\n else {\n message +=\n `2. To allow any element add 'NO_ERRORS_SCHEMA' to the ${schemas} of this component.`;\n }\n if (shouldThrowErrorOnUnknownElement) {\n throw new RuntimeError(304 /* RuntimeErrorCode.UNKNOWN_ELEMENT */, message);\n }\n else {\n console.error(formatRuntimeError(304 /* RuntimeErrorCode.UNKNOWN_ELEMENT */, message));\n }\n }\n }\n}\n/**\n * Validates that the property of the element is known at runtime and returns\n * false if it's not the case.\n * This check is relevant for JIT-compiled components (for AOT-compiled\n * ones this check happens at build time).\n *\n * The property is considered known if either:\n * - it's a known property of the element\n * - the element is allowed by one of the schemas\n * - the property is used for animations\n *\n * @param element Element to validate\n * @param propName Name of the property to check\n * @param tagName Name of the tag hosting the property\n * @param schemas Array of schemas\n */\nfunction isPropertyValid(element, propName, tagName, schemas) {\n // If `schemas` is set to `null`, that's an indication that this Component was compiled in AOT\n // mode where this check happens at compile time. In JIT mode, `schemas` is always present and\n // defined as an array (as an empty array in case `schemas` field is not defined) and we should\n // execute the check below.\n if (schemas === null)\n return true;\n // The property is considered valid if the element matches the schema, it exists on the element,\n // or it is synthetic, and we are in a browser context (web worker nodes should be skipped).\n if (matchingSchemas(schemas, tagName) || propName in element || isAnimationProp(propName)) {\n return true;\n }\n // Note: `typeof Node` returns 'function' in most browsers, but on IE it is 'object' so we\n // need to account for both here, while being careful with `typeof null` also returning 'object'.\n return typeof Node === 'undefined' || Node === null || !(element instanceof Node);\n}\n/**\n * Logs or throws an error that a property is not supported on an element.\n *\n * @param propName Name of the invalid property\n * @param tagName Name of the tag hosting the property\n * @param nodeType Type of the node hosting the property\n * @param lView An `LView` that represents a current component\n */\nfunction handleUnknownPropertyError(propName, tagName, nodeType, lView) {\n // Special-case a situation when a structural directive is applied to\n // an `<ng-template>` element, for example: `<ng-template *ngIf=\"true\">`.\n // In this case the compiler generates the `ɵɵtemplate` instruction with\n // the `null` as the tagName. The directive matching logic at runtime relies\n // on this effect (see `isInlineTemplate`), thus using the 'ng-template' as\n // a default value of the `tNode.value` is not feasible at this moment.\n if (!tagName && nodeType === 4 /* TNodeType.Container */) {\n tagName = 'ng-template';\n }\n const isHostStandalone = isHostComponentStandalone(lView);\n const templateLocation = getTemplateLocationDetails(lView);\n let message = `Can't bind to '${propName}' since it isn't a known property of '${tagName}'${templateLocation}.`;\n const schemas = `'${isHostStandalone ? '@Component' : '@NgModule'}.schemas'`;\n const importLocation = isHostStandalone ?\n 'included in the \\'@Component.imports\\' of this component' :\n 'a part of an @NgModule where this component is declared';\n if (KNOWN_CONTROL_FLOW_DIRECTIVES.has(propName)) {\n // Most likely this is a control flow directive (such as `*ngIf`) used in\n // a template, but the directive or the `CommonModule` is not imported.\n const correspondingImport = KNOWN_CONTROL_FLOW_DIRECTIVES.get(propName);\n message += `\\nIf the '${propName}' is an Angular control flow directive, ` +\n `please make sure that either the '${correspondingImport}' directive or the 'CommonModule' is ${importLocation}.`;\n }\n else {\n // May be an Angular component, which is not imported/declared?\n message += `\\n1. If '${tagName}' is an Angular component and it has the ` +\n `'${propName}' input, then verify that it is ${importLocation}.`;\n // May be a Web Component?\n if (tagName && tagName.indexOf('-') > -1) {\n message += `\\n2. If '${tagName}' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' ` +\n `to the ${schemas} of this component to suppress this message.`;\n message += `\\n3. To allow any property add 'NO_ERRORS_SCHEMA' to ` +\n `the ${schemas} of this component.`;\n }\n else {\n // If it's expected, the error can be suppressed by the `NO_ERRORS_SCHEMA` schema.\n message += `\\n2. To allow any property add 'NO_ERRORS_SCHEMA' to ` +\n `the ${schemas} of this component.`;\n }\n }\n reportUnknownPropertyError(message);\n}\nfunction reportUnknownPropertyError(message) {\n if (shouldThrowErrorOnUnknownProperty) {\n throw new RuntimeError(303 /* RuntimeErrorCode.UNKNOWN_BINDING */, message);\n }\n else {\n console.error(formatRuntimeError(303 /* RuntimeErrorCode.UNKNOWN_BINDING */, message));\n }\n}\n/**\n * WARNING: this is a **dev-mode only** function (thus should always be guarded by the `ngDevMode`)\n * and must **not** be used in production bundles. The function makes megamorphic reads, which might\n * be too slow for production mode and also it relies on the constructor function being available.\n *\n * Gets a reference to the host component def (where a current component is declared).\n *\n * @param lView An `LView` that represents a current component that is being rendered.\n */\nfunction getDeclarationComponentDef(lView) {\n !ngDevMode && throwError('Must never be called in production mode');\n const declarationLView = lView[DECLARATION_COMPONENT_VIEW];\n const context = declarationLView[CONTEXT];\n // Unable to obtain a context.\n if (!context)\n return null;\n return context.constructor ? getComponentDef(context.constructor) : null;\n}\n/**\n * WARNING: this is a **dev-mode only** function (thus should always be guarded by the `ngDevMode`)\n * and must **not** be used in production bundles. The function makes megamorphic reads, which might\n * be too slow for production mode.\n *\n * Checks if the current component is declared inside of a standalone component template.\n *\n * @param lView An `LView` that represents a current component that is being rendered.\n */\nfunction isHostComponentStandalone(lView) {\n !ngDevMode && throwError('Must never be called in production mode');\n const componentDef = getDeclarationComponentDef(lView);\n // Treat host component as non-standalone if we can't obtain the def.\n return !!componentDef?.standalone;\n}\n/**\n * WARNING: this is a **dev-mode only** function (thus should always be guarded by the `ngDevMode`)\n * and must **not** be used in production bundles. The function makes megamorphic reads, which might\n * be too slow for production mode.\n *\n * Constructs a string describing the location of the host component template. The function is used\n * in dev mode to produce error messages.\n *\n * @param lView An `LView` that represents a current component that is being rendered.\n */\nfunction getTemplateLocationDetails(lView) {\n !ngDevMode && throwError('Must never be called in production mode');\n const hostComponentDef = getDeclarationComponentDef(lView);\n const componentClassName = hostComponentDef?.type?.name;\n return componentClassName ? ` (used in the '${componentClassName}' component template)` : '';\n}\n/**\n * The set of known control flow directives and their corresponding imports.\n * We use this set to produce a more precises error message with a note\n * that the `CommonModule` should also be included.\n */\nconst KNOWN_CONTROL_FLOW_DIRECTIVES = new Map([\n ['ngIf', 'NgIf'], ['ngFor', 'NgFor'], ['ngSwitchCase', 'NgSwitchCase'],\n ['ngSwitchDefault', 'NgSwitchDefault']\n]);\n/**\n * Returns true if the tag name is allowed by specified schemas.\n * @param schemas Array of schemas\n * @param tagName Name of the tag\n */\nfunction matchingSchemas(schemas, tagName) {\n if (schemas !== null) {\n for (let i = 0; i < schemas.length; i++) {\n const schema = schemas[i];\n if (schema === NO_ERRORS_SCHEMA ||\n schema === CUSTOM_ELEMENTS_SCHEMA && tagName && tagName.indexOf('-') > -1) {\n return true;\n }\n }\n }\n return false;\n}\n\n/**\n * 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, if supported, or an inert body element created via\n * `createHtmlDocument` to create and fill an inert DOM element.\n * This is the fallback strategy if the browser does not support DOMParser.\n */\nclass InertDocumentHelper {\n constructor(defaultDoc) {\n this.defaultDoc = defaultDoc;\n this.inertDocument = this.defaultDoc.implementation.createHTMLDocument('sanitization-inert');\n if (this.inertDocument.body == null) {\n // usually there should be only one body element in the document, but IE doesn't have any, so\n // we need to create one.\n const inertHtml = this.inertDocument.createElement('html');\n this.inertDocument.appendChild(inertHtml);\n const inertBodyElement = this.inertDocument.createElement('body');\n inertHtml.appendChild(inertBodyElement);\n }\n }\n getInertBodyElement(html) {\n // Prefer using <template> element if supported.\n const templateEl = this.inertDocument.createElement('template');\n if ('content' in templateEl) {\n templateEl.innerHTML = trustedHTMLFromString(html);\n return templateEl;\n }\n // Note that previously we used to do something like `this.inertDocument.body.innerHTML = html`\n // and we returned the inert `body` node. This was changed, because IE seems to treat setting\n // `innerHTML` on an inserted element differently, compared to one that hasn't been inserted\n // yet. In particular, IE appears to split some of the text into multiple text nodes rather\n // than keeping them in a single one which ends up messing with Ivy's i18n parsing further\n // down the line. This has been worked around by creating a new inert `body` and using it as\n // the root node in which we insert the HTML.\n const inertBody = this.inertDocument.createElement('body');\n inertBody.innerHTML = trustedHTMLFromString(html);\n // Support: IE 11 only\n // strip custom-namespaced attributes on IE<=11\n if (this.defaultDoc.documentMode) {\n this.stripCustomNsAttrs(inertBody);\n }\n return inertBody;\n }\n /**\n * When IE11 comes across an unknown namespaced attribute e.g. 'xlink:foo' it adds 'xmlns:ns1'\n * attribute to declare ns1 namespace and prefixes the attribute with 'ns1' (e.g.\n * 'ns1:xlink:foo').\n *\n * This is undesirable since we don't want to allow any of these custom attributes. This method\n * strips them all.\n */\n stripCustomNsAttrs(el) {\n const elAttrs = el.attributes;\n // loop backwards so that we can support removals.\n for (let i = elAttrs.length - 1; 0 < i; i--) {\n const attrib = elAttrs.item(i);\n const attrName = attrib.name;\n if (attrName === 'xmlns:ns1' || attrName.indexOf('ns1:') === 0) {\n el.removeAttribute(attrName);\n }\n }\n let childNode = el.firstChild;\n while (childNode) {\n if (childNode.nodeType === Node.ELEMENT_NODE)\n this.stripCustomNsAttrs(childNode);\n childNode = childNode.nextSibling;\n }\n }\n}\n/**\n * We need to determine whether the DOMParser exists in the global context and\n * supports parsing HTML; HTML parsing support is not as wide as other formats, see\n * https://developer.mozilla.org/en-US/docs/Web/API/DOMParser#Browser_compatibility.\n *\n * @suppress {uselessCode}\n */\nfunction isDOMParserAvailable() {\n try {\n return !!new window.DOMParser().parseFromString(trustedHTMLFromString(''), 'text/html');\n }\n catch {\n return false;\n }\n}\n\n/**\n * A pattern that recognizes a commonly useful subset of URLs that are safe.\n *\n * This regular expression matches a subset of URLs that will not cause script\n * execution if used in URL context within a HTML document. Specifically, this\n * regular expression matches if (comment from here on and regex copied from\n * Soy's EscapingConventions):\n * (1) Either an allowed protocol (http, https, mailto or ftp).\n * (2) or no protocol. A protocol must be followed by a colon. The below\n * allows that by allowing colons only after one of the characters [/?#].\n * A colon after a hash (#) must be in the fragment.\n * Otherwise, a colon after a (?) must be in a query.\n * Otherwise, a colon after a single solidus (/) must be in a path.\n * Otherwise, a colon after a double solidus (//) must be in the authority\n * (before port).\n *\n * The pattern disallows &, used in HTML entity declarations before\n * one of the characters in [/?#]. This disallows HTML entities used in the\n * protocol name, which should never happen, e.g. \"http\" for \"http\".\n * It also disallows HTML entities in the first path part of a relative path,\n * e.g. \"foo<bar/baz\". Our existing escaping functions should not produce\n * that. More importantly, it disallows masking of a colon,\n * e.g. \"javascript:...\".\n *\n * This regular expression was taken from the Closure sanitization library.\n */\nconst SAFE_URL_PATTERN = /^(?:(?:https?|mailto|data|ftp|tel|file|sms):|[^&:/?#]*(?:[/?#]|$))/gi;\nfunction _sanitizeUrl(url) {\n url = String(url);\n if (url.match(SAFE_URL_PATTERN))\n return url;\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n console.warn(`WARNING: sanitizing unsafe URL value ${url} (see ${XSS_SECURITY_URL})`);\n }\n return 'unsafe:' + url;\n}\n\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.1.0');\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 while (i < attrs.length) {\n let item = attrs[i++];\n if (isProjectionMode && item === 'class') {\n item = attrs[i];\n if (classIndexOf(item.toLowerCase(), cssClassToMatch, 0) !== -1) {\n return true;\n }\n }\n else if (item === 1 /* AttributeMarker.Classes */) {\n // We found the classes section. Start searching for the class.\n while (i < attrs.length && typeof (item = attrs[i++]) == 'string') {\n // while we have strings\n if (item.toLowerCase() === cssClassToMatch)\n return true;\n }\n return false;\n }\n }\n return false;\n}\n/**\n * Checks whether the `tNode` represents an inline template (e.g. `*ngFor`).\n *\n * @param tNode current TNode\n */\nfunction isInlineTemplate(tNode) {\n return tNode.type === 4 /* TNodeType.Container */ && tNode.value !== NG_TEMPLATE_SELECTOR;\n}\n/**\n * Function that checks whether a given tNode matches tag-based selector and has a valid type.\n *\n * Matching can be performed in 2 modes: projection mode (when we project nodes) and regular\n * directive matching mode:\n * - in the \"directive matching\" mode we do _not_ take TContainer's tagName into account if it is\n * different from NG_TEMPLATE_SELECTOR (value different from NG_TEMPLATE_SELECTOR indicates that a\n * tag name was extracted from * syntax so we would match the same directive twice);\n * - in the \"projection\" mode, we use a tag name potentially extracted from the * syntax processing\n * (applicable to TNodeType.Container only).\n */\nfunction hasTagAndTypeMatch(tNode, currentSelector, isProjectionMode) {\n const tagNameToCompare = tNode.type === 4 /* TNodeType.Container */ && !isProjectionMode ? NG_TEMPLATE_SELECTOR : tNode.value;\n return currentSelector === tagNameToCompare;\n}\n/**\n * A utility function to match an Ivy node static data against a simple CSS selector\n *\n * @param node static data of the node to match\n * @param selector The selector to try matching against the node.\n * @param isProjectionMode if `true` we are matching for content projection, otherwise we are doing\n * directive matching.\n * @returns true if node matches the selector.\n */\nfunction isNodeMatchingSelector(tNode, selector, isProjectionMode) {\n ngDevMode && assertDefined(selector[0], 'Selector should have a tag name');\n let mode = 4 /* SelectorFlags.ELEMENT */;\n const nodeAttrs = tNode.attrs || [];\n // Find the index of first attribute that has no value, only a name.\n const nameOnlyMarkerIdx = getNameOnlyMarkerIndex(nodeAttrs);\n // When processing \":not\" selectors, we skip to the next \":not\" if the\n // current one doesn't match\n let skipToNextSelector = false;\n for (let i = 0; i < selector.length; i++) {\n const current = selector[i];\n if (typeof current === 'number') {\n // If we finish processing a :not selector and it hasn't failed, return false\n if (!skipToNextSelector && !isPositive(mode) && !isPositive(current)) {\n return false;\n }\n // If we are skipping to the next :not() and this mode flag is positive,\n // it's a part of the current :not() selector, and we should keep skipping\n if (skipToNextSelector && isPositive(current))\n continue;\n skipToNextSelector = false;\n mode = current | (mode & 1 /* SelectorFlags.NOT */);\n continue;\n }\n if (skipToNextSelector)\n continue;\n if (mode & 4 /* SelectorFlags.ELEMENT */) {\n mode = 2 /* SelectorFlags.ATTRIBUTE */ | mode & 1 /* SelectorFlags.NOT */;\n if (current !== '' && !hasTagAndTypeMatch(tNode, current, isProjectionMode) ||\n current === '' && selector.length === 1) {\n if (isPositive(mode))\n return false;\n skipToNextSelector = true;\n }\n }\n else {\n const selectorAttrValue = mode & 8 /* SelectorFlags.CLASS */ ? current : selector[++i];\n // special case for matching against classes when a tNode has been instantiated with\n // class and style values as separate attribute values (e.g. ['title', CLASS, 'foo'])\n if ((mode & 8 /* SelectorFlags.CLASS */) && tNode.attrs !== null) {\n if (!isCssClassMatching(tNode.attrs, selectorAttrValue, isProjectionMode)) {\n if (isPositive(mode))\n return false;\n skipToNextSelector = true;\n }\n continue;\n }\n const attrName = (mode & 8 /* SelectorFlags.CLASS */) ? 'class' : current;\n const attrIndexInNode = findAttrIndexInNode(attrName, nodeAttrs, isInlineTemplate(tNode), isProjectionMode);\n if (attrIndexInNode === -1) {\n if (isPositive(mode))\n return false;\n skipToNextSelector = true;\n continue;\n }\n if (selectorAttrValue !== '') {\n let nodeAttrValue;\n if (attrIndexInNode > nameOnlyMarkerIdx) {\n nodeAttrValue = '';\n }\n else {\n ngDevMode &&\n assertNotEqual(nodeAttrs[attrIndexInNode], 0 /* AttributeMarker.NamespaceURI */, 'We do not match directives on namespaced attributes');\n // we lowercase the attribute value to be able to match\n // selectors without case-sensitivity\n // (selectors are already in lowercase when generated)\n nodeAttrValue = nodeAttrs[attrIndexInNode + 1].toLowerCase();\n }\n const compareAgainstClassName = mode & 8 /* SelectorFlags.CLASS */ ? nodeAttrValue : null;\n if (compareAgainstClassName &&\n classIndexOf(compareAgainstClassName, selectorAttrValue, 0) !== -1 ||\n mode & 2 /* SelectorFlags.ATTRIBUTE */ && selectorAttrValue !== nodeAttrValue) {\n if (isPositive(mode))\n return false;\n skipToNextSelector = true;\n }\n }\n }\n }\n return isPositive(mode) || skipToNextSelector;\n}\nfunction isPositive(mode) {\n return (mode & 1 /* SelectorFlags.NOT */) === 0;\n}\n/**\n * Examines the attribute's definition array for a node to find the index of the\n * attribute that matches the given `name`.\n *\n * NOTE: This will not match namespaced attributes.\n *\n * Attribute matching depends upon `isInlineTemplate` and `isProjectionMode`.\n * The following table summarizes which types of attributes we attempt to match:\n *\n * ===========================================================================================================\n * Modes | Normal Attributes | Bindings Attributes | Template Attributes | I18n\n * Attributes\n * ===========================================================================================================\n * Inline + Projection | YES | YES | NO | YES\n * -----------------------------------------------------------------------------------------------------------\n * Inline + Directive | NO | NO | YES | NO\n * -----------------------------------------------------------------------------------------------------------\n * Non-inline + Projection | YES | YES | NO | YES\n * -----------------------------------------------------------------------------------------------------------\n * Non-inline + Directive | YES | YES | NO | YES\n * ===========================================================================================================\n *\n * @param name the name of the attribute to find\n * @param attrs the attribute array to examine\n * @param isInlineTemplate true if the node being matched is an inline template (e.g. `*ngFor`)\n * rather than a manually expanded template node (e.g `<ng-template>`).\n * @param isProjectionMode true if we are matching against content projection otherwise we are\n * matching against directives.\n */\nfunction findAttrIndexInNode(name, attrs, isInlineTemplate, isProjectionMode) {\n if (attrs === null)\n return -1;\n let i = 0;\n if (isProjectionMode || !isInlineTemplate) {\n let bindingsMode = false;\n while (i < attrs.length) {\n const maybeAttrName = attrs[i];\n if (maybeAttrName === name) {\n return i;\n }\n else if (maybeAttrName === 3 /* AttributeMarker.Bindings */ || maybeAttrName === 6 /* AttributeMarker.I18n */) {\n bindingsMode = true;\n }\n else if (maybeAttrName === 1 /* AttributeMarker.Classes */ || maybeAttrName === 2 /* AttributeMarker.Styles */) {\n let value = attrs[++i];\n // We should skip classes here because we have a separate mechanism for\n // matching classes in projection mode.\n while (typeof value === 'string') {\n value = attrs[++i];\n }\n continue;\n }\n else if (maybeAttrName === 4 /* AttributeMarker.Template */) {\n // We do not care about Template attributes in this scenario.\n break;\n }\n else if (maybeAttrName === 0 /* AttributeMarker.NamespaceURI */) {\n // Skip the whole namespaced attribute and value. This is by design.\n i += 4;\n continue;\n }\n // In binding mode there are only names, rather than name-value pairs.\n i += bindingsMode ? 1 : 2;\n }\n // We did not match the attribute\n return -1;\n }\n else {\n return matchTemplateAttribute(attrs, name);\n }\n}\nfunction isNodeMatchingSelectorList(tNode, selector, isProjectionMode = false) {\n for (let i = 0; i < selector.length; i++) {\n if (isNodeMatchingSelector(tNode, selector[i], isProjectionMode)) {\n return true;\n }\n }\n return false;\n}\nfunction getProjectAsAttrValue(tNode) {\n const nodeAttrs = tNode.attrs;\n if (nodeAttrs != null) {\n const ngProjectAsAttrIdx = nodeAttrs.indexOf(5 /* AttributeMarker.ProjectAs */);\n // only check for ngProjectAs in attribute names, don't accidentally match attribute's value\n // (attribute names are stored at even indexes)\n if ((ngProjectAsAttrIdx & 1) === 0) {\n return nodeAttrs[ngProjectAsAttrIdx + 1];\n }\n }\n return null;\n}\nfunction getNameOnlyMarkerIndex(nodeAttrs) {\n for (let i = 0; i < nodeAttrs.length; i++) {\n const nodeAttr = nodeAttrs[i];\n if (isNameOnlyAttributeMarker(nodeAttr)) {\n return i;\n }\n }\n return nodeAttrs.length;\n}\nfunction matchTemplateAttribute(attrs, name) {\n let i = attrs.indexOf(4 /* AttributeMarker.Template */);\n if (i > -1) {\n i++;\n while (i < attrs.length) {\n const attr = attrs[i];\n // Return in case we checked all template attrs and are switching to the next section in the\n // attrs array (that starts with a number that represents an attribute marker).\n if (typeof attr === 'number')\n return -1;\n if (attr === name)\n return i;\n i++;\n }\n }\n return -1;\n}\n/**\n * Checks whether a selector is inside a CssSelectorList\n * @param selector Selector to be checked.\n * @param list List in which to look for the selector.\n */\nfunction isSelectorInSelectorList(selector, list) {\n selectorListLoop: for (let i = 0; i < list.length; i++) {\n const currentSelectorInList = list[i];\n if (selector.length !== currentSelectorInList.length) {\n continue;\n }\n for (let j = 0; j < selector.length; j++) {\n if (selector[j] !== currentSelectorInList[j]) {\n continue selectorListLoop;\n }\n }\n return true;\n }\n return false;\n}\nfunction maybeWrapInNotSelector(isNegativeMode, chunk) {\n return isNegativeMode ? ':not(' + chunk.trim() + ')' : chunk;\n}\nfunction stringifyCSSSelector(selector) {\n let result = selector[0];\n let i = 1;\n let mode = 2 /* SelectorFlags.ATTRIBUTE */;\n let currentChunk = '';\n let isNegativeMode = false;\n while (i < selector.length) {\n let valueOrMarker = selector[i];\n if (typeof valueOrMarker === 'string') {\n if (mode & 2 /* SelectorFlags.ATTRIBUTE */) {\n const attrValue = selector[++i];\n currentChunk +=\n '[' + valueOrMarker + (attrValue.length > 0 ? '=\"' + attrValue + '\"' : '') + ']';\n }\n else if (mode & 8 /* SelectorFlags.CLASS */) {\n currentChunk += '.' + valueOrMarker;\n }\n else if (mode & 4 /* SelectorFlags.ELEMENT */) {\n currentChunk += ' ' + valueOrMarker;\n }\n }\n else {\n //\n // Append current chunk to the final result in case we come across SelectorFlag, which\n // indicates that the previous section of a selector is over. We need to accumulate content\n // between flags to make sure we wrap the chunk later in :not() selector if needed, e.g.\n // ```\n // ['', Flags.CLASS, '.classA', Flags.CLASS | Flags.NOT, '.classB', '.classC']\n // ```\n // should be transformed to `.classA :not(.classB .classC)`.\n //\n // Note: for negative selector part, we accumulate content between flags until we find the\n // next negative flag. This is needed to support a case where `:not()` rule contains more than\n // one chunk, e.g. the following selector:\n // ```\n // ['', Flags.ELEMENT | Flags.NOT, 'p', Flags.CLASS, 'foo', Flags.CLASS | Flags.NOT, 'bar']\n // ```\n // should be stringified to `:not(p.foo) :not(.bar)`\n //\n if (currentChunk !== '' && !isPositive(valueOrMarker)) {\n result += maybeWrapInNotSelector(isNegativeMode, currentChunk);\n currentChunk = '';\n }\n mode = valueOrMarker;\n // According to CssSelector spec, once we come across `SelectorFlags.NOT` flag, the negative\n // mode is maintained for remaining chunks of a selector.\n isNegativeMode = isNegativeMode || !isPositive(mode);\n }\n i++;\n }\n if (currentChunk !== '') {\n result += maybeWrapInNotSelector(isNegativeMode, currentChunk);\n }\n return result;\n}\n/**\n * Generates string representation of CSS selector in parsed form.\n *\n * ComponentDef and DirectiveDef are generated with the selector in parsed form to avoid doing\n * additional parsing at runtime (for example, for directive matching). However in some cases (for\n * example, while bootstrapping a component), a string version of the selector is required to query\n * for the host element on the page. This function takes the parsed form of a selector and returns\n * its string representation.\n *\n * @param selectorList selector in parsed form\n * @returns string representation of a given selector\n */\nfunction stringifyCSSSelectorList(selectorList) {\n return selectorList.map(stringifyCSSSelector).join(',');\n}\n/**\n * Extracts attributes and classes information from a given CSS selector.\n *\n * This function is used while creating a component dynamically. In this case, the host element\n * (that is created dynamically) should contain attributes and classes specified in component's CSS\n * selector.\n *\n * @param selector CSS selector in parsed form (in a form of array)\n * @returns object with `attrs` and `classes` fields that contain extracted information\n */\nfunction extractAttrsAndClassesFromSelector(selector) {\n const attrs = [];\n const classes = [];\n let i = 1;\n let mode = 2 /* SelectorFlags.ATTRIBUTE */;\n while (i < selector.length) {\n let valueOrMarker = selector[i];\n if (typeof valueOrMarker === 'string') {\n if (mode === 2 /* SelectorFlags.ATTRIBUTE */) {\n if (valueOrMarker !== '') {\n attrs.push(valueOrMarker, selector[++i]);\n }\n }\n else if (mode === 8 /* SelectorFlags.CLASS */) {\n classes.push(valueOrMarker);\n }\n }\n else {\n // According to CssSelector spec, once we come across `SelectorFlags.NOT` flag, the negative\n // mode is maintained for remaining chunks of a selector. Since attributes and classes are\n // extracted only for \"positive\" part of the selector, we can stop here.\n if (!isPositive(mode))\n break;\n mode = valueOrMarker;\n }\n i++;\n }\n return { attrs, classes };\n}\n\n/** 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 }\n }\n }\n return tNode;\n}\n/**\n * When elements are created dynamically after a view blueprint is created (e.g. through\n * i18nApply()), we need to adjust the blueprint for future\n * template passes.\n *\n * @param tView `TView` associated with `LView`\n * @param lView The `LView` containing the blueprint to adjust\n * @param numSlotsToAlloc The number of slots to alloc in the LView, should be >0\n * @param initialValue Initial value to store in blueprint\n */\nfunction allocExpando(tView, lView, numSlotsToAlloc, initialValue) {\n if (numSlotsToAlloc === 0)\n return -1;\n if (ngDevMode) {\n assertFirstCreatePass(tView);\n assertSame(tView, lView[TVIEW], '`LView` must be associated with `TView`!');\n assertEqual(tView.data.length, lView.length, 'Expecting LView to be same size as TView');\n assertEqual(tView.data.length, tView.blueprint.length, 'Expecting Blueprint to be same size as TView');\n assertFirstUpdatePass(tView);\n }\n const allocIdx = lView.length;\n for (let i = 0; i < numSlotsToAlloc; i++) {\n lView.push(initialValue);\n tView.blueprint.push(initialValue);\n tView.data.push(null);\n }\n return allocIdx;\n}\n//////////////////////////\n//// Render\n//////////////////////////\n/**\n * Processes a view in the creation mode. This includes a number of steps in a specific order:\n * - creating view query functions (if any);\n * - executing a template function in the creation mode;\n * - updating static queries (if any);\n * - creating child components defined in a given view.\n */\nfunction renderView(tView, lView, context) {\n ngDevMode && assertEqual(isCreationMode(lView), true, 'Should be run in creation mode');\n enterView(lView);\n try {\n const viewQuery = tView.viewQuery;\n if (viewQuery !== null) {\n executeViewQueryFn(1 /* RenderFlags.Create */, viewQuery, context);\n }\n // Execute a template associated with this view, if it exists. A template function might not be\n // defined for the root component views.\n const templateFn = tView.template;\n if (templateFn !== null) {\n executeTemplate(tView, lView, templateFn, 1 /* RenderFlags.Create */, context);\n }\n // This needs to be set before children are processed to support recursive components.\n // This must be set to false immediately after the first creation run because in an\n // ngFor loop, all the views will be created together before update mode runs and turns\n // off firstCreatePass. If we don't set it here, instances will perform directive\n // matching, etc again and again.\n if (tView.firstCreatePass) {\n tView.firstCreatePass = false;\n }\n // We resolve content queries specifically marked as `static` in creation mode. Dynamic\n // content queries are resolved during change detection (i.e. update mode), after embedded\n // views are refreshed (see block above).\n if (tView.staticContentQueries) {\n refreshContentQueries(tView, lView);\n }\n // We must materialize query results before child components are processed\n // in case a child component has projected a container. The LContainer needs\n // to exist so the embedded views are properly attached by the container.\n if (tView.staticViewQueries) {\n executeViewQueryFn(2 /* RenderFlags.Update */, tView.viewQuery, context);\n }\n // Render child component views.\n const components = tView.components;\n if (components !== null) {\n renderChildComponents(lView, components);\n }\n }\n catch (error) {\n // If we didn't manage to get past the first template pass due to\n // an error, mark the view as corrupted so we can try to recover.\n if (tView.firstCreatePass) {\n tView.incompleteFirstPass = true;\n tView.firstCreatePass = false;\n }\n throw error;\n }\n finally {\n lView[FLAGS] &= ~4 /* LViewFlags.CreationMode */;\n leaveView();\n }\n}\n/**\n * Processes a view in update mode. This includes a number of steps in a specific order:\n * - executing a template function in update mode;\n * - executing hooks;\n * - refreshing queries;\n * - setting host bindings;\n * - refreshing child (embedded and component) views.\n */\nfunction refreshView(tView, lView, templateFn, context) {\n ngDevMode && assertEqual(isCreationMode(lView), false, 'Should be run in update mode');\n const flags = lView[FLAGS];\n if ((flags & 128 /* LViewFlags.Destroyed */) === 128 /* LViewFlags.Destroyed */)\n return;\n enterView(lView);\n // Check no changes mode is a dev only mode used to verify that bindings have not changed\n // since they were assigned. We do not want to execute lifecycle hooks in that mode.\n const isInCheckNoChangesPass = ngDevMode && isInCheckNoChangesMode();\n try {\n resetPreOrderHookFlags(lView);\n setBindingIndex(tView.bindingStartIndex);\n if (templateFn !== null) {\n executeTemplate(tView, lView, templateFn, 2 /* RenderFlags.Update */, context);\n }\n const hooksInitPhaseCompleted = (flags & 3 /* LViewFlags.InitPhaseStateMask */) === 3 /* InitPhaseState.InitPhaseCompleted */;\n // execute pre-order hooks (OnInit, OnChanges, DoCheck)\n // PERF WARNING: do NOT extract this to a separate function without running benchmarks\n if (!isInCheckNoChangesPass) {\n if (hooksInitPhaseCompleted) {\n const preOrderCheckHooks = tView.preOrderCheckHooks;\n if (preOrderCheckHooks !== null) {\n executeCheckHooks(lView, preOrderCheckHooks, null);\n }\n }\n else {\n const preOrderHooks = tView.preOrderHooks;\n if (preOrderHooks !== null) {\n executeInitAndCheckHooks(lView, preOrderHooks, 0 /* InitPhaseState.OnInitHooksToBeRun */, null);\n }\n incrementInitPhaseFlags(lView, 0 /* InitPhaseState.OnInitHooksToBeRun */);\n }\n }\n // First mark transplanted views that are declared in this lView as needing a refresh at their\n // insertion points. This is needed to avoid the situation where the template is defined in this\n // `LView` but its declaration appears after the insertion component.\n markTransplantedViewsForRefresh(lView);\n refreshEmbeddedViews(lView);\n // Content query results must be refreshed before content hooks are called.\n if (tView.contentQueries !== null) {\n refreshContentQueries(tView, lView);\n }\n // execute content hooks (AfterContentInit, AfterContentChecked)\n // PERF WARNING: do NOT extract this to a separate function without running benchmarks\n if (!isInCheckNoChangesPass) {\n if (hooksInitPhaseCompleted) {\n const contentCheckHooks = tView.contentCheckHooks;\n if (contentCheckHooks !== null) {\n executeCheckHooks(lView, contentCheckHooks);\n }\n }\n else {\n const contentHooks = tView.contentHooks;\n if (contentHooks !== null) {\n executeInitAndCheckHooks(lView, contentHooks, 1 /* InitPhaseState.AfterContentInitHooksToBeRun */);\n }\n incrementInitPhaseFlags(lView, 1 /* InitPhaseState.AfterContentInitHooksToBeRun */);\n }\n }\n processHostBindingOpCodes(tView, lView);\n // Refresh child component views.\n const components = tView.components;\n if (components !== null) {\n refreshChildComponents(lView, components);\n }\n // View queries must execute after refreshing child components because a template in this view\n // could be inserted in a child component. If the view query executes before child component\n // refresh, the template might not yet be inserted.\n const viewQuery = tView.viewQuery;\n if (viewQuery !== null) {\n executeViewQueryFn(2 /* RenderFlags.Update */, viewQuery, context);\n }\n // execute view hooks (AfterViewInit, AfterViewChecked)\n // PERF WARNING: do NOT extract this to a separate function without running benchmarks\n if (!isInCheckNoChangesPass) {\n if (hooksInitPhaseCompleted) {\n const viewCheckHooks = tView.viewCheckHooks;\n if (viewCheckHooks !== null) {\n executeCheckHooks(lView, viewCheckHooks);\n }\n }\n else {\n const viewHooks = tView.viewHooks;\n if (viewHooks !== null) {\n executeInitAndCheckHooks(lView, viewHooks, 2 /* InitPhaseState.AfterViewInitHooksToBeRun */);\n }\n incrementInitPhaseFlags(lView, 2 /* InitPhaseState.AfterViewInitHooksToBeRun */);\n }\n }\n if (tView.firstUpdatePass === true) {\n // We need to make sure that we only flip the flag on successful `refreshView` only\n // Don't do this in `finally` block.\n // If we did this in `finally` block then an exception could block the execution of styling\n // instructions which in turn would be unable to insert themselves into the styling linked\n // list. The result of this would be that if the exception would not be throw on subsequent CD\n // the styling would be unable to process it data and reflect to the DOM.\n tView.firstUpdatePass = false;\n }\n // Do not reset the dirty state when running in check no changes mode. We don't want components\n // to behave differently depending on whether check no changes is enabled or not. For example:\n // Marking an OnPush component as dirty from within the `ngAfterViewInit` hook in order to\n // refresh a `NgClass` binding should work. If we would reset the dirty state in the check\n // no changes cycle, the component would be not be dirty for the next update pass. This would\n // be different in production mode where the component dirty state is not reset.\n if (!isInCheckNoChangesPass) {\n lView[FLAGS] &= ~(32 /* LViewFlags.Dirty */ | 8 /* LViewFlags.FirstLViewPass */);\n }\n if (lView[FLAGS] & 512 /* LViewFlags.RefreshTransplantedView */) {\n lView[FLAGS] &= ~512 /* LViewFlags.RefreshTransplantedView */;\n updateTransplantedViewCount(lView[PARENT], -1);\n }\n }\n finally {\n leaveView();\n }\n}\nfunction executeTemplate(tView, lView, templateFn, rf, context) {\n const prevSelectedIndex = getSelectedIndex();\n const isUpdatePhase = rf & 2 /* RenderFlags.Update */;\n try {\n setSelectedIndex(-1);\n if (isUpdatePhase && lView.length > HEADER_OFFSET) {\n // When we're updating, inherently select 0 so we don't\n // have to generate that instruction for most update blocks.\n selectIndexInternal(tView, lView, HEADER_OFFSET, !!ngDevMode && isInCheckNoChangesMode());\n }\n const preHookType = isUpdatePhase ? 2 /* ProfilerEvent.TemplateUpdateStart */ : 0 /* ProfilerEvent.TemplateCreateStart */;\n profiler(preHookType, context);\n templateFn(rf, context);\n }\n finally {\n setSelectedIndex(prevSelectedIndex);\n const postHookType = isUpdatePhase ? 3 /* ProfilerEvent.TemplateUpdateEnd */ : 1 /* ProfilerEvent.TemplateCreateEnd */;\n profiler(postHookType, context);\n }\n}\n//////////////////////////\n//// Element\n//////////////////////////\nfunction executeContentQueries(tView, tNode, lView) {\n if (isContentQueryHost(tNode)) {\n const start = tNode.directiveStart;\n const end = tNode.directiveEnd;\n for (let directiveIndex = start; directiveIndex < end; directiveIndex++) {\n const def = tView.data[directiveIndex];\n if (def.contentQueries) {\n def.contentQueries(1 /* RenderFlags.Create */, lView[directiveIndex], directiveIndex);\n }\n }\n }\n}\n/**\n * Creates directive instances.\n */\nfunction createDirectivesInstances(tView, lView, tNode) {\n if (!getBindingsEnabled())\n return;\n instantiateAllDirectives(tView, lView, tNode, getNativeByTNode(tNode, lView));\n if ((tNode.flags & 64 /* TNodeFlags.hasHostBindings */) === 64 /* TNodeFlags.hasHostBindings */) {\n invokeDirectivesHostBindings(tView, lView, tNode);\n }\n}\n/**\n * Takes a list of local names and indices and pushes the resolved local variable values\n * to LView in the same order as they are loaded in the template with load().\n */\nfunction saveResolvedLocalsInData(viewData, tNode, localRefExtractor = getNativeByTNode) {\n const localNames = tNode.localNames;\n if (localNames !== null) {\n let localIndex = tNode.index + 1;\n for (let i = 0; i < localNames.length; i += 2) {\n const index = localNames[i + 1];\n const value = index === -1 ?\n localRefExtractor(tNode, viewData) :\n viewData[index];\n viewData[localIndex++] = value;\n }\n }\n}\n/**\n * Gets TView from a template function or creates a new TView\n * if it doesn't already exist.\n *\n * @param def ComponentDef\n * @returns TView\n */\nfunction getOrCreateComponentTView(def) {\n const tView = def.tView;\n // Create a TView if there isn't one, or recreate it if the first create pass didn't\n // complete successfully since we can't know for sure whether it's in a usable shape.\n if (tView === null || tView.incompleteFirstPass) {\n // Declaration node here is null since this function is called when we dynamically create a\n // component and hence there is no declaration.\n const declTNode = null;\n return def.tView = createTView(1 /* TViewType.Component */, declTNode, def.template, def.decls, def.vars, def.directiveDefs, def.pipeDefs, def.viewQuery, def.schemas, def.consts);\n }\n return tView;\n}\n/**\n * Creates a TView instance\n *\n * @param type Type of `TView`.\n * @param declTNode Declaration location of this `TView`.\n * @param templateFn Template function\n * @param decls The number of nodes, local refs, and pipes in this template\n * @param directives Registry of directives for this view\n * @param pipes Registry of pipes for this view\n * @param viewQuery View queries for this view\n * @param schemas Schemas for this view\n * @param consts Constants for this view\n */\nfunction createTView(type, declTNode, templateFn, decls, vars, directives, pipes, viewQuery, schemas, constsOrFactory) {\n ngDevMode && ngDevMode.tView++;\n const bindingStartIndex = HEADER_OFFSET + decls;\n // This length does not yet contain host bindings from child directives because at this point,\n // we don't know which directives are active on this template. As soon as a directive is matched\n // that has a host binding, we will update the blueprint with that def's hostVars count.\n const initialViewLength = bindingStartIndex + vars;\n const blueprint = createViewBlueprint(bindingStartIndex, initialViewLength);\n const consts = typeof constsOrFactory === 'function' ? constsOrFactory() : constsOrFactory;\n const tView = blueprint[TVIEW] = {\n type: type,\n blueprint: blueprint,\n template: templateFn,\n queries: null,\n viewQuery: viewQuery,\n declTNode: declTNode,\n data: blueprint.slice().fill(null, bindingStartIndex),\n bindingStartIndex: bindingStartIndex,\n expandoStartIndex: initialViewLength,\n hostBindingOpCodes: null,\n firstCreatePass: true,\n firstUpdatePass: true,\n staticViewQueries: false,\n staticContentQueries: false,\n preOrderHooks: null,\n preOrderCheckHooks: null,\n contentHooks: null,\n contentCheckHooks: null,\n viewHooks: null,\n viewCheckHooks: null,\n destroyHooks: null,\n cleanup: null,\n contentQueries: null,\n components: null,\n directiveRegistry: typeof directives === 'function' ? directives() : directives,\n pipeRegistry: typeof pipes === 'function' ? pipes() : pipes,\n firstChild: null,\n schemas: schemas,\n consts: consts,\n incompleteFirstPass: false\n };\n if (ngDevMode) {\n // For performance reasons it is important that the tView retains the same shape during runtime.\n // (To make sure that all of the code is monomorphic.) For this reason we seal the object to\n // prevent class transitions.\n Object.seal(tView);\n }\n return tView;\n}\nfunction createViewBlueprint(bindingStartIndex, initialViewLength) {\n const blueprint = [];\n for (let i = 0; i < initialViewLength; i++) {\n blueprint.push(i < bindingStartIndex ? null : NO_CHANGE);\n }\n return blueprint;\n}\n/**\n * Locates the host native element, used for bootstrapping existing nodes into rendering pipeline.\n *\n * @param rendererFactory Factory function to create renderer instance.\n * @param elementOrSelector Render element or CSS selector to locate the element.\n * @param encapsulation View Encapsulation defined for component that requests host element.\n */\nfunction locateHostElement(renderer, elementOrSelector, encapsulation) {\n // When using native Shadow DOM, do not clear host element to allow native slot projection\n const preserveContent = encapsulation === ViewEncapsulation$1.ShadowDom;\n return renderer.selectRootElement(elementOrSelector, preserveContent);\n}\n/**\n * Saves context for this cleanup function in LView.cleanupInstances.\n *\n * On the first template pass, saves in TView:\n * - Cleanup function\n * - Index of context we just saved in LView.cleanupInstances\n *\n * This function can also be used to store instance specific cleanup fns. In that case the `context`\n * is `null` and the function is store in `LView` (rather than it `TView`).\n */\nfunction storeCleanupWithContext(tView, lView, context, cleanupFn) {\n const lCleanup = getOrCreateLViewCleanup(lView);\n if (context === null) {\n // If context is null that this is instance specific callback. These callbacks can only be\n // inserted after template shared instances. For this reason in ngDevMode we freeze the TView.\n if (ngDevMode) {\n Object.freeze(getOrCreateTViewCleanup(tView));\n }\n lCleanup.push(cleanupFn);\n }\n else {\n lCleanup.push(context);\n if (tView.firstCreatePass) {\n getOrCreateTViewCleanup(tView).push(cleanupFn, lCleanup.length - 1);\n }\n }\n}\nfunction createTNode(tView, tParent, type, index, value, attrs) {\n ngDevMode && index !== 0 && // 0 are bogus nodes and they are OK. See `createContainerRef` in\n // `view_engine_compatibility` for additional context.\n assertGreaterThanOrEqual(index, HEADER_OFFSET, 'TNodes can\\'t be in the LView header.');\n ngDevMode && assertNotSame(attrs, undefined, '\\'undefined\\' is not valid value for \\'attrs\\'');\n ngDevMode && ngDevMode.tNode++;\n ngDevMode && tParent && assertTNodeForTView(tParent, tView);\n let injectorIndex = tParent ? tParent.injectorIndex : -1;\n const tNode = {\n type,\n index,\n insertBeforeIndex: null,\n injectorIndex,\n directiveStart: -1,\n directiveEnd: -1,\n directiveStylingLast: -1,\n componentOffset: -1,\n propertyBindings: null,\n flags: 0,\n providerIndexes: 0,\n value: value,\n attrs: attrs,\n mergedAttrs: null,\n localNames: null,\n initialInputs: undefined,\n inputs: null,\n outputs: null,\n tViews: null,\n next: null,\n projectionNext: null,\n child: null,\n parent: tParent,\n projection: null,\n styles: null,\n stylesWithoutHost: null,\n residualStyles: undefined,\n classes: null,\n classesWithoutHost: null,\n residualClasses: undefined,\n classBindings: 0,\n styleBindings: 0,\n };\n if (ngDevMode) {\n // For performance reasons it is important that the tNode retains the same shape during runtime.\n // (To make sure that all of the code is monomorphic.) For this reason we seal the object to\n // prevent class transitions.\n Object.seal(tNode);\n }\n return tNode;\n}\n/**\n * Generates the `PropertyAliases` data structure from the provided input/output mapping.\n * @param aliasMap Input/output mapping from the directive definition.\n * @param directiveIndex Index of the directive.\n * @param propertyAliases Object in which to store the results.\n * @param hostDirectiveAliasMap Object used to alias or filter out properties for host directives.\n * If the mapping is provided, it'll act as an allowlist, as well as a mapping of what public\n * name inputs/outputs should be exposed under.\n */\nfunction generatePropertyAliases(aliasMap, directiveIndex, propertyAliases, hostDirectiveAliasMap) {\n for (let publicName in aliasMap) {\n if (aliasMap.hasOwnProperty(publicName)) {\n propertyAliases = propertyAliases === null ? {} : propertyAliases;\n const internalName = aliasMap[publicName];\n // If there are no host directive mappings, we want to remap using the alias map from the\n // definition itself. If there is an alias map, it has two functions:\n // 1. It serves as an allowlist of bindings that are exposed by the host directives. Only the\n // ones inside the host directive map will be exposed on the host.\n // 2. The public name of the property is aliased using the host directive alias map, rather\n // than the alias map from the definition.\n if (hostDirectiveAliasMap === null) {\n addPropertyAlias(propertyAliases, directiveIndex, publicName, internalName);\n }\n else if (hostDirectiveAliasMap.hasOwnProperty(publicName)) {\n addPropertyAlias(propertyAliases, directiveIndex, hostDirectiveAliasMap[publicName], internalName);\n }\n }\n }\n return propertyAliases;\n}\nfunction addPropertyAlias(propertyAliases, directiveIndex, publicName, internalName) {\n if (propertyAliases.hasOwnProperty(publicName)) {\n propertyAliases[publicName].push(directiveIndex, internalName);\n }\n else {\n propertyAliases[publicName] = [directiveIndex, internalName];\n }\n}\n/**\n * Initializes data structures required to work with directive inputs and outputs.\n * Initialization is done for all directives matched on a given TNode.\n */\nfunction initializeInputAndOutputAliases(tView, tNode, hostDirectiveDefinitionMap) {\n ngDevMode && assertFirstCreatePass(tView);\n const start = tNode.directiveStart;\n const end = tNode.directiveEnd;\n const tViewData = tView.data;\n const tNodeAttrs = tNode.attrs;\n const inputsFromAttrs = [];\n let inputsStore = null;\n let outputsStore = null;\n for (let directiveIndex = start; directiveIndex < end; directiveIndex++) {\n const directiveDef = tViewData[directiveIndex];\n const aliasData = hostDirectiveDefinitionMap ? hostDirectiveDefinitionMap.get(directiveDef) : null;\n const aliasedInputs = aliasData ? aliasData.inputs : null;\n const aliasedOutputs = aliasData ? aliasData.outputs : null;\n inputsStore =\n generatePropertyAliases(directiveDef.inputs, directiveIndex, inputsStore, aliasedInputs);\n outputsStore =\n generatePropertyAliases(directiveDef.outputs, directiveIndex, outputsStore, aliasedOutputs);\n // Do not use unbound attributes as inputs to structural directives, since structural\n // directive inputs can only be set using microsyntax (e.g. `<div *dir=\"exp\">`).\n // TODO(FW-1930): microsyntax expressions may also contain unbound/static attributes, which\n // should be set for inline templates.\n const initialInputs = (inputsStore !== null && tNodeAttrs !== null && !isInlineTemplate(tNode)) ?\n generateInitialInputs(inputsStore, directiveIndex, tNodeAttrs) :\n null;\n inputsFromAttrs.push(initialInputs);\n }\n if (inputsStore !== null) {\n if (inputsStore.hasOwnProperty('class')) {\n tNode.flags |= 8 /* TNodeFlags.hasClassInput */;\n }\n if (inputsStore.hasOwnProperty('style')) {\n tNode.flags |= 16 /* TNodeFlags.hasStyleInput */;\n }\n }\n tNode.initialInputs = inputsFromAttrs;\n tNode.inputs = inputsStore;\n tNode.outputs = outputsStore;\n}\n/**\n * Mapping between attributes names that don't correspond to their element property names.\n *\n * Performance note: this function is written as a series of if checks (instead of, say, a property\n * object lookup) for performance reasons - the series of `if` checks seems to be the fastest way of\n * mapping property names. Do NOT change without benchmarking.\n *\n * Note: this mapping has to be kept in sync with the equally named mapping in the template\n * type-checking machinery of ngtsc.\n */\nfunction mapPropName(name) {\n if (name === 'class')\n return 'className';\n if (name === 'for')\n return 'htmlFor';\n if (name === 'formaction')\n return 'formAction';\n if (name === 'innerHtml')\n return 'innerHTML';\n if (name === 'readonly')\n return 'readOnly';\n if (name === 'tabindex')\n return 'tabIndex';\n return name;\n}\nfunction elementPropertyInternal(tView, tNode, lView, propName, value, renderer, sanitizer, nativeOnly) {\n ngDevMode && assertNotSame(value, NO_CHANGE, 'Incoming value should never be NO_CHANGE.');\n const element = getNativeByTNode(tNode, lView);\n let inputData = tNode.inputs;\n let dataValue;\n if (!nativeOnly && inputData != null && (dataValue = inputData[propName])) {\n setInputsForProperty(tView, lView, dataValue, propName, value);\n if (isComponentHost(tNode))\n markDirtyIfOnPush(lView, tNode.index);\n if (ngDevMode) {\n setNgReflectProperties(lView, element, tNode.type, dataValue, value);\n }\n }\n else if (tNode.type & 3 /* TNodeType.AnyRNode */) {\n propName = mapPropName(propName);\n if (ngDevMode) {\n validateAgainstEventProperties(propName);\n if (!isPropertyValid(element, propName, tNode.value, tView.schemas)) {\n handleUnknownPropertyError(propName, tNode.value, tNode.type, lView);\n }\n ngDevMode.rendererSetProperty++;\n }\n // It is assumed that the sanitizer is only added when the compiler determines that the\n // property is risky, so sanitization can be done without further checks.\n value = sanitizer != null ? sanitizer(value, tNode.value || '', propName) : value;\n renderer.setProperty(element, propName, value);\n }\n else if (tNode.type & 12 /* TNodeType.AnyContainer */) {\n // If the node is a container and the property didn't\n // match any of the inputs or schemas we should throw.\n if (ngDevMode && !matchingSchemas(tView.schemas, tNode.value)) {\n handleUnknownPropertyError(propName, tNode.value, tNode.type, lView);\n }\n }\n}\n/** If node is an OnPush component, marks its LView dirty. */\nfunction markDirtyIfOnPush(lView, viewIndex) {\n ngDevMode && assertLView(lView);\n const childComponentLView = getComponentLViewByIndex(viewIndex, lView);\n if (!(childComponentLView[FLAGS] & 16 /* LViewFlags.CheckAlways */)) {\n childComponentLView[FLAGS] |= 32 /* LViewFlags.Dirty */;\n }\n}\nfunction setNgReflectProperty(lView, element, type, attrName, value) {\n const renderer = lView[RENDERER];\n attrName = normalizeDebugBindingName(attrName);\n const debugValue = normalizeDebugBindingValue(value);\n if (type & 3 /* TNodeType.AnyRNode */) {\n if (value == null) {\n renderer.removeAttribute(element, attrName);\n }\n else {\n renderer.setAttribute(element, attrName, debugValue);\n }\n }\n else {\n const textContent = escapeCommentText(`bindings=${JSON.stringify({ [attrName]: debugValue }, null, 2)}`);\n renderer.setValue(element, textContent);\n }\n}\nfunction setNgReflectProperties(lView, element, type, dataValue, value) {\n if (type & (3 /* TNodeType.AnyRNode */ | 4 /* TNodeType.Container */)) {\n /**\n * dataValue is an array containing runtime input or output names for the directives:\n * i+0: directive instance index\n * i+1: privateName\n *\n * e.g. [0, 'change', 'change-minified']\n * we want to set the reflected property with the privateName: dataValue[i+1]\n */\n for (let i = 0; i < dataValue.length; i += 2) {\n setNgReflectProperty(lView, element, type, dataValue[i + 1], value);\n }\n }\n}\n/**\n * Resolve the matched directives on a node.\n */\nfunction resolveDirectives(tView, lView, tNode, localRefs) {\n // Please make sure to have explicit type for `exportsMap`. Inferred type triggers bug in\n // tsickle.\n ngDevMode && assertFirstCreatePass(tView);\n let hasDirectives = false;\n if (getBindingsEnabled()) {\n const exportsMap = localRefs === null ? null : { '': -1 };\n const matchResult = findDirectiveDefMatches(tView, tNode);\n let directiveDefs;\n let hostDirectiveDefs;\n if (matchResult === null) {\n directiveDefs = hostDirectiveDefs = null;\n }\n else {\n [directiveDefs, hostDirectiveDefs] = matchResult;\n }\n if (directiveDefs !== null) {\n hasDirectives = true;\n initializeDirectives(tView, lView, tNode, directiveDefs, exportsMap, hostDirectiveDefs);\n }\n if (exportsMap)\n cacheMatchingLocalNames(tNode, localRefs, exportsMap);\n }\n // Merge the template attrs last so that they have the highest priority.\n tNode.mergedAttrs = mergeHostAttrs(tNode.mergedAttrs, tNode.attrs);\n return hasDirectives;\n}\n/** Initializes the data structures necessary for a list of directives to be instantiated. */\nfunction initializeDirectives(tView, lView, tNode, directives, exportsMap, hostDirectiveDefs) {\n ngDevMode && assertFirstCreatePass(tView);\n // Publishes the directive types to DI so they can be injected. Needs to\n // happen in a separate pass before the TNode flags have been initialized.\n for (let i = 0; i < directives.length; i++) {\n diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, lView), tView, directives[i].type);\n }\n initTNodeFlags(tNode, tView.data.length, directives.length);\n // When the same token is provided by several directives on the same node, some rules apply in\n // the viewEngine:\n // - viewProviders have priority over providers\n // - the last directive in NgModule.declarations has priority over the previous one\n // So to match these rules, the order in which providers are added in the arrays is very\n // important.\n for (let i = 0; i < directives.length; i++) {\n const def = directives[i];\n if (def.providersResolver)\n def.providersResolver(def);\n }\n let preOrderHooksFound = false;\n let preOrderCheckHooksFound = false;\n let directiveIdx = allocExpando(tView, lView, directives.length, null);\n ngDevMode &&\n assertSame(directiveIdx, tNode.directiveStart, 'TNode.directiveStart should point to just allocated space');\n for (let i = 0; i < directives.length; i++) {\n const def = directives[i];\n // Merge the attrs in the order of matches. This assumes that the first directive is the\n // component itself, so that the component has the least priority.\n tNode.mergedAttrs = mergeHostAttrs(tNode.mergedAttrs, def.hostAttrs);\n configureViewWithDirective(tView, tNode, lView, directiveIdx, def);\n saveNameToExportMap(directiveIdx, def, exportsMap);\n if (def.contentQueries !== null)\n tNode.flags |= 4 /* TNodeFlags.hasContentQuery */;\n if (def.hostBindings !== null || def.hostAttrs !== null || def.hostVars !== 0)\n tNode.flags |= 64 /* TNodeFlags.hasHostBindings */;\n const lifeCycleHooks = def.type.prototype;\n // Only push a node index into the preOrderHooks array if this is the first\n // pre-order hook found on this node.\n if (!preOrderHooksFound &&\n (lifeCycleHooks.ngOnChanges || lifeCycleHooks.ngOnInit || lifeCycleHooks.ngDoCheck)) {\n // We will push the actual hook function into this array later during dir instantiation.\n // We cannot do it now because we must ensure hooks are registered in the same\n // order that directives are created (i.e. injection order).\n (tView.preOrderHooks || (tView.preOrderHooks = [])).push(tNode.index);\n preOrderHooksFound = true;\n }\n if (!preOrderCheckHooksFound && (lifeCycleHooks.ngOnChanges || lifeCycleHooks.ngDoCheck)) {\n (tView.preOrderCheckHooks || (tView.preOrderCheckHooks = [])).push(tNode.index);\n preOrderCheckHooksFound = true;\n }\n directiveIdx++;\n }\n initializeInputAndOutputAliases(tView, tNode, hostDirectiveDefs);\n}\n/**\n * Add `hostBindings` to the `TView.hostBindingOpCodes`.\n *\n * @param tView `TView` to which the `hostBindings` should be added.\n * @param tNode `TNode` the element which contains the directive\n * @param directiveIdx Directive index in view.\n * @param directiveVarsIdx Where will the directive's vars be stored\n * @param def `ComponentDef`/`DirectiveDef`, which contains the `hostVars`/`hostBindings` to add.\n */\nfunction registerHostBindingOpCodes(tView, tNode, directiveIdx, directiveVarsIdx, def) {\n ngDevMode && assertFirstCreatePass(tView);\n const hostBindings = def.hostBindings;\n if (hostBindings) {\n let hostBindingOpCodes = tView.hostBindingOpCodes;\n if (hostBindingOpCodes === null) {\n hostBindingOpCodes = tView.hostBindingOpCodes = [];\n }\n const elementIndx = ~tNode.index;\n if (lastSelectedElementIdx(hostBindingOpCodes) != elementIndx) {\n // Conditionally add select element so that we are more efficient in execution.\n // NOTE: this is strictly not necessary and it trades code size for runtime perf.\n // (We could just always add it.)\n hostBindingOpCodes.push(elementIndx);\n }\n hostBindingOpCodes.push(directiveIdx, directiveVarsIdx, hostBindings);\n }\n}\n/**\n * Returns the last selected element index in the `HostBindingOpCodes`\n *\n * For perf reasons we don't need to update the selected element index in `HostBindingOpCodes` only\n * if it changes. This method returns the last index (or '0' if not found.)\n *\n * Selected element index are only the ones which are negative.\n */\nfunction lastSelectedElementIdx(hostBindingOpCodes) {\n let i = hostBindingOpCodes.length;\n while (i > 0) {\n const value = hostBindingOpCodes[--i];\n if (typeof value === 'number' && value < 0) {\n return value;\n }\n }\n return 0;\n}\n/**\n * Instantiate all the directives that were previously resolved on the current node.\n */\nfunction instantiateAllDirectives(tView, lView, tNode, native) {\n const start = tNode.directiveStart;\n const end = tNode.directiveEnd;\n // The component view needs to be created before creating the node injector\n // since it is used to inject some special symbols like `ChangeDetectorRef`.\n if (isComponentHost(tNode)) {\n ngDevMode && assertTNodeType(tNode, 3 /* TNodeType.AnyRNode */);\n addComponentLogic(lView, tNode, tView.data[start + tNode.componentOffset]);\n }\n if (!tView.firstCreatePass) {\n getOrCreateNodeInjectorForNode(tNode, lView);\n }\n attachPatchData(native, lView);\n const initialInputs = tNode.initialInputs;\n for (let i = start; i < end; i++) {\n const def = tView.data[i];\n const directive = getNodeInjectable(lView, tView, i, tNode);\n attachPatchData(directive, lView);\n if (initialInputs !== null) {\n setInputsFromAttrs(lView, i - start, directive, def, tNode, initialInputs);\n }\n if (isComponentDef(def)) {\n const componentView = getComponentLViewByIndex(tNode.index, lView);\n componentView[CONTEXT] = getNodeInjectable(lView, tView, i, tNode);\n }\n }\n}\nfunction invokeDirectivesHostBindings(tView, lView, tNode) {\n const start = tNode.directiveStart;\n const end = tNode.directiveEnd;\n const elementIndex = tNode.index;\n const currentDirectiveIndex = getCurrentDirectiveIndex();\n try {\n setSelectedIndex(elementIndex);\n for (let dirIndex = start; dirIndex < end; dirIndex++) {\n const def = tView.data[dirIndex];\n const directive = lView[dirIndex];\n setCurrentDirectiveIndex(dirIndex);\n if (def.hostBindings !== null || def.hostVars !== 0 || def.hostAttrs !== null) {\n invokeHostBindingsInCreationMode(def, directive);\n }\n }\n }\n finally {\n setSelectedIndex(-1);\n setCurrentDirectiveIndex(currentDirectiveIndex);\n }\n}\n/**\n * Invoke the host bindings in creation mode.\n *\n * @param def `DirectiveDef` which may contain the `hostBindings` function.\n * @param directive Instance of directive.\n */\nfunction invokeHostBindingsInCreationMode(def, directive) {\n if (def.hostBindings !== null) {\n def.hostBindings(1 /* RenderFlags.Create */, directive);\n }\n}\n/**\n * Matches the current node against all available selectors.\n * If a component is matched (at most one), it is returned in first position in the array.\n */\nfunction findDirectiveDefMatches(tView, tNode) {\n ngDevMode && assertFirstCreatePass(tView);\n ngDevMode && assertTNodeType(tNode, 3 /* TNodeType.AnyRNode */ | 12 /* TNodeType.AnyContainer */);\n const registry = tView.directiveRegistry;\n let matches = null;\n let hostDirectiveDefs = null;\n if (registry) {\n for (let i = 0; i < registry.length; i++) {\n const def = registry[i];\n if (isNodeMatchingSelectorList(tNode, def.selectors, /* isProjectionMode */ false)) {\n matches || (matches = []);\n if (isComponentDef(def)) {\n if (ngDevMode) {\n assertTNodeType(tNode, 2 /* TNodeType.Element */, `\"${tNode.value}\" tags cannot be used as component hosts. ` +\n `Please use a different tag to activate the ${stringify(def.type)} component.`);\n if (isComponentHost(tNode)) {\n throwMultipleComponentError(tNode, matches.find(isComponentDef).type, def.type);\n }\n }\n // Components are inserted at the front of the matches array so that their lifecycle\n // hooks run before any directive lifecycle hooks. This appears to be for ViewEngine\n // compatibility. This logic doesn't make sense with host directives, because it\n // would allow the host directives to undo any overrides the host may have made.\n // To handle this case, the host directives of components are inserted at the beginning\n // of the array, followed by the component. As such, the insertion order is as follows:\n // 1. Host directives belonging to the selector-matched component.\n // 2. Selector-matched component.\n // 3. Host directives belonging to selector-matched directives.\n // 4. Selector-matched directives.\n if (def.findHostDirectiveDefs !== null) {\n const hostDirectiveMatches = [];\n hostDirectiveDefs = hostDirectiveDefs || new Map();\n def.findHostDirectiveDefs(def, hostDirectiveMatches, hostDirectiveDefs);\n // Add all host directives declared on this component, followed by the component itself.\n // Host directives should execute first so the host has a chance to override changes\n // to the DOM made by them.\n matches.unshift(...hostDirectiveMatches, def);\n // Component is offset starting from the beginning of the host directives array.\n const componentOffset = hostDirectiveMatches.length;\n markAsComponentHost(tView, tNode, componentOffset);\n }\n else {\n // No host directives on this component, just add the\n // component def to the beginning of the matches.\n matches.unshift(def);\n markAsComponentHost(tView, tNode, 0);\n }\n }\n else {\n // Append any host directives to the matches first.\n hostDirectiveDefs = hostDirectiveDefs || new Map();\n def.findHostDirectiveDefs?.(def, matches, hostDirectiveDefs);\n matches.push(def);\n }\n }\n }\n }\n return matches === null ? null : [matches, hostDirectiveDefs];\n}\n/**\n * Marks a given TNode as a component's host. This consists of:\n * - setting the component offset on the TNode.\n * - storing index of component's host element so it will be queued for view refresh during CD.\n */\nfunction markAsComponentHost(tView, hostTNode, componentOffset) {\n ngDevMode && assertFirstCreatePass(tView);\n ngDevMode && assertGreaterThan(componentOffset, -1, 'componentOffset must be great than -1');\n hostTNode.componentOffset = componentOffset;\n (tView.components || (tView.components = [])).push(hostTNode.index);\n}\n/** Caches local names and their matching directive indices for query and template lookups. */\nfunction cacheMatchingLocalNames(tNode, localRefs, exportsMap) {\n if (localRefs) {\n const localNames = tNode.localNames = [];\n // Local names must be stored in tNode in the same order that localRefs are defined\n // in the template to ensure the data is loaded in the same slots as their refs\n // in the template (for template queries).\n for (let i = 0; i < localRefs.length; i += 2) {\n const index = exportsMap[localRefs[i + 1]];\n if (index == null)\n throw new RuntimeError(-301 /* RuntimeErrorCode.EXPORT_NOT_FOUND */, ngDevMode && `Export of name '${localRefs[i + 1]}' not found!`);\n localNames.push(localRefs[i], index);\n }\n }\n}\n/**\n * Builds up an export map as directives are created, so local refs can be quickly mapped\n * to their directive instances.\n */\nfunction saveNameToExportMap(directiveIdx, def, exportsMap) {\n if (exportsMap) {\n if (def.exportAs) {\n for (let i = 0; i < def.exportAs.length; i++) {\n exportsMap[def.exportAs[i]] = directiveIdx;\n }\n }\n if (isComponentDef(def))\n exportsMap[''] = directiveIdx;\n }\n}\n/**\n * Initializes the flags on the current node, setting all indices to the initial index,\n * the directive count to 0, and adding the isComponent flag.\n * @param index the initial index\n */\nfunction initTNodeFlags(tNode, index, numberOfDirectives) {\n ngDevMode &&\n assertNotEqual(numberOfDirectives, tNode.directiveEnd - tNode.directiveStart, 'Reached the max number of directives');\n tNode.flags |= 1 /* TNodeFlags.isDirectiveHost */;\n // When the first directive is created on a node, save the index\n tNode.directiveStart = index;\n tNode.directiveEnd = index + numberOfDirectives;\n tNode.providerIndexes = index;\n}\n/**\n * Setup directive for instantiation.\n *\n * We need to create a `NodeInjectorFactory` which is then inserted in both the `Blueprint` as well\n * as `LView`. `TView` gets the `DirectiveDef`.\n *\n * @param tView `TView`\n * @param tNode `TNode`\n * @param lView `LView`\n * @param directiveIndex Index where the directive will be stored in the Expando.\n * @param def `DirectiveDef`\n */\nfunction configureViewWithDirective(tView, tNode, lView, directiveIndex, def) {\n ngDevMode &&\n assertGreaterThanOrEqual(directiveIndex, HEADER_OFFSET, 'Must be in Expando section');\n tView.data[directiveIndex] = def;\n const directiveFactory = def.factory || (def.factory = getFactoryDef(def.type, true));\n // Even though `directiveFactory` will already be using `ɵɵdirectiveInject` in its generated code,\n // we also want to support `inject()` directly from the directive constructor context so we set\n // `ɵɵdirectiveInject` as the inject implementation here too.\n const nodeInjectorFactory = new NodeInjectorFactory(directiveFactory, isComponentDef(def), ɵɵdirectiveInject);\n tView.blueprint[directiveIndex] = nodeInjectorFactory;\n lView[directiveIndex] = nodeInjectorFactory;\n registerHostBindingOpCodes(tView, tNode, directiveIndex, allocExpando(tView, lView, def.hostVars, NO_CHANGE), def);\n}\nfunction addComponentLogic(lView, hostTNode, def) {\n const native = getNativeByTNode(hostTNode, lView);\n const tView = getOrCreateComponentTView(def);\n // Only component views should be added to the view tree directly. Embedded views are\n // accessed through their containers because they may be removed / re-added later.\n const rendererFactory = lView[RENDERER_FACTORY];\n const componentView = addToViewTree(lView, createLView(lView, tView, null, def.onPush ? 32 /* LViewFlags.Dirty */ : 16 /* LViewFlags.CheckAlways */, native, hostTNode, rendererFactory, rendererFactory.createRenderer(native, def), null, null, null));\n // Component view will always be created before any injected LContainers,\n // so this is a regular element, wrap it with the component view\n lView[hostTNode.index] = componentView;\n}\nfunction elementAttributeInternal(tNode, lView, name, value, sanitizer, namespace) {\n if (ngDevMode) {\n assertNotSame(value, NO_CHANGE, 'Incoming value should never be NO_CHANGE.');\n validateAgainstEventAttributes(name);\n assertTNodeType(tNode, 2 /* TNodeType.Element */, `Attempted to set attribute \\`${name}\\` on a container node. ` +\n `Host bindings are not valid on ng-container or ng-template.`);\n }\n const element = getNativeByTNode(tNode, lView);\n setElementAttribute(lView[RENDERER], element, namespace, tNode.value, name, value, sanitizer);\n}\nfunction setElementAttribute(renderer, element, namespace, tagName, name, value, sanitizer) {\n if (value == null) {\n ngDevMode && ngDevMode.rendererRemoveAttribute++;\n renderer.removeAttribute(element, name, namespace);\n }\n else {\n ngDevMode && ngDevMode.rendererSetAttribute++;\n const strValue = sanitizer == null ? renderStringify(value) : sanitizer(value, tagName || '', name);\n renderer.setAttribute(element, name, strValue, namespace);\n }\n}\n/**\n * Sets initial input properties on directive instances from attribute data\n *\n * @param lView Current LView that is being processed.\n * @param directiveIndex Index of the directive in directives array\n * @param instance Instance of the directive on which to set the initial inputs\n * @param def The directive def that contains the list of inputs\n * @param tNode The static data for this node\n */\nfunction setInputsFromAttrs(lView, directiveIndex, instance, def, tNode, initialInputData) {\n const initialInputs = initialInputData[directiveIndex];\n if (initialInputs !== null) {\n const setInput = def.setInput;\n for (let i = 0; i < initialInputs.length;) {\n const publicName = initialInputs[i++];\n const privateName = initialInputs[i++];\n const value = initialInputs[i++];\n if (setInput !== null) {\n def.setInput(instance, value, publicName, privateName);\n }\n else {\n instance[privateName] = value;\n }\n if (ngDevMode) {\n const nativeElement = getNativeByTNode(tNode, lView);\n setNgReflectProperty(lView, nativeElement, tNode.type, privateName, value);\n }\n }\n }\n}\n/**\n * Generates initialInputData for a node and stores it in the template's static storage\n * so subsequent template invocations don't have to recalculate it.\n *\n * initialInputData is an array containing values that need to be set as input properties\n * for directives on this node, but only once on creation. We need this array to support\n * the case where you set an @Input property of a directive using attribute-like syntax.\n * e.g. if you have a `name` @Input, you can set it once like this:\n *\n * <my-component name=\"Bess\"></my-component>\n *\n * @param inputs Input alias map that was generated from the directive def inputs.\n * @param directiveIndex Index of the directive that is currently being processed.\n * @param attrs Static attrs on this node.\n */\nfunction generateInitialInputs(inputs, directiveIndex, attrs) {\n let inputsToStore = null;\n let i = 0;\n while (i < attrs.length) {\n const attrName = attrs[i];\n if (attrName === 0 /* AttributeMarker.NamespaceURI */) {\n // We do not allow inputs on namespaced attributes.\n i += 4;\n continue;\n }\n else if (attrName === 5 /* AttributeMarker.ProjectAs */) {\n // Skip over the `ngProjectAs` value.\n i += 2;\n continue;\n }\n // If we hit any other attribute markers, we're done anyway. None of those are valid inputs.\n if (typeof attrName === 'number')\n break;\n if (inputs.hasOwnProperty(attrName)) {\n if (inputsToStore === null)\n inputsToStore = [];\n // Find the input's public name from the input store. Note that we can be found easier\n // through the directive def, but we want to do it using the inputs store so that it can\n // account for host directive aliases.\n const inputConfig = inputs[attrName];\n for (let j = 0; j < inputConfig.length; j += 2) {\n if (inputConfig[j] === directiveIndex) {\n inputsToStore.push(attrName, inputConfig[j + 1], attrs[i + 1]);\n // A directive can't have multiple inputs with the same name so we can break here.\n break;\n }\n }\n }\n i += 2;\n }\n return inputsToStore;\n}\n//////////////////////////\n//// ViewContainer & View\n//////////////////////////\n/**\n * Creates a LContainer, either from a container instruction, or for a ViewContainerRef.\n *\n * @param hostNative The host element for the LContainer\n * @param hostTNode The host TNode for the LContainer\n * @param currentView The parent view of the LContainer\n * @param native The native comment element\n * @param isForViewContainerRef Optional a flag indicating the ViewContainerRef case\n * @returns LContainer\n */\nfunction createLContainer(hostNative, currentView, native, tNode) {\n ngDevMode && assertLView(currentView);\n const lContainer = [\n hostNative,\n true,\n false,\n currentView,\n null,\n 0,\n tNode,\n native,\n null,\n null, // moved views\n ];\n ngDevMode &&\n assertEqual(lContainer.length, CONTAINER_HEADER_OFFSET, 'Should allocate correct number of slots for LContainer header.');\n return lContainer;\n}\n/**\n * Goes over embedded views (ones created through ViewContainerRef APIs) and refreshes\n * them by executing an associated template function.\n */\nfunction refreshEmbeddedViews(lView) {\n for (let lContainer = getFirstLContainer(lView); lContainer !== null; lContainer = getNextLContainer(lContainer)) {\n for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n const embeddedLView = lContainer[i];\n const embeddedTView = embeddedLView[TVIEW];\n ngDevMode && assertDefined(embeddedTView, 'TView must be allocated');\n if (viewAttachedToChangeDetector(embeddedLView)) {\n refreshView(embeddedTView, embeddedLView, embeddedTView.template, embeddedLView[CONTEXT]);\n }\n }\n }\n}\n/**\n * Mark transplanted views as needing to be refreshed at their insertion points.\n *\n * @param lView The `LView` that may have transplanted views.\n */\nfunction markTransplantedViewsForRefresh(lView) {\n for (let lContainer = getFirstLContainer(lView); lContainer !== null; lContainer = getNextLContainer(lContainer)) {\n if (!lContainer[HAS_TRANSPLANTED_VIEWS])\n continue;\n const movedViews = lContainer[MOVED_VIEWS];\n ngDevMode && assertDefined(movedViews, 'Transplanted View flags set but missing MOVED_VIEWS');\n for (let i = 0; i < movedViews.length; i++) {\n const movedLView = movedViews[i];\n const insertionLContainer = movedLView[PARENT];\n ngDevMode && assertLContainer(insertionLContainer);\n // We don't want to increment the counter if the moved LView was already marked for\n // refresh.\n if ((movedLView[FLAGS] & 512 /* LViewFlags.RefreshTransplantedView */) === 0) {\n updateTransplantedViewCount(insertionLContainer, 1);\n }\n // Note, it is possible that the `movedViews` is tracking views that are transplanted *and*\n // those that aren't (declaration component === insertion component). In the latter case,\n // it's fine to add the flag, as we will clear it immediately in\n // `refreshEmbeddedViews` for the view currently being refreshed.\n movedLView[FLAGS] |= 512 /* LViewFlags.RefreshTransplantedView */;\n }\n }\n}\n/////////////\n/**\n * Refreshes components by entering the component view and processing its bindings, queries, etc.\n *\n * @param componentHostIdx Element index in LView[] (adjusted for HEADER_OFFSET)\n */\nfunction refreshComponent(hostLView, componentHostIdx) {\n ngDevMode && assertEqual(isCreationMode(hostLView), false, 'Should be run in update mode');\n const componentView = getComponentLViewByIndex(componentHostIdx, hostLView);\n // Only attached components that are CheckAlways or OnPush and dirty should be refreshed\n if (viewAttachedToChangeDetector(componentView)) {\n const tView = componentView[TVIEW];\n if (componentView[FLAGS] & (16 /* LViewFlags.CheckAlways */ | 32 /* LViewFlags.Dirty */)) {\n refreshView(tView, componentView, tView.template, componentView[CONTEXT]);\n }\n else if (componentView[TRANSPLANTED_VIEWS_TO_REFRESH] > 0) {\n // Only attached components that are CheckAlways or OnPush and dirty should be refreshed\n refreshContainsDirtyView(componentView);\n }\n }\n}\n/**\n * Refreshes all transplanted views marked with `LViewFlags.RefreshTransplantedView` that are\n * children or descendants of the given lView.\n *\n * @param lView The lView which contains descendant transplanted views that need to be refreshed.\n */\nfunction refreshContainsDirtyView(lView) {\n for (let lContainer = getFirstLContainer(lView); lContainer !== null; lContainer = getNextLContainer(lContainer)) {\n for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n const embeddedLView = lContainer[i];\n if (viewAttachedToChangeDetector(embeddedLView)) {\n if (embeddedLView[FLAGS] & 512 /* LViewFlags.RefreshTransplantedView */) {\n const embeddedTView = embeddedLView[TVIEW];\n ngDevMode && assertDefined(embeddedTView, 'TView must be allocated');\n refreshView(embeddedTView, embeddedLView, embeddedTView.template, embeddedLView[CONTEXT]);\n }\n else if (embeddedLView[TRANSPLANTED_VIEWS_TO_REFRESH] > 0) {\n refreshContainsDirtyView(embeddedLView);\n }\n }\n }\n }\n const tView = lView[TVIEW];\n // Refresh child component views.\n const components = tView.components;\n if (components !== null) {\n for (let i = 0; i < components.length; i++) {\n const componentView = getComponentLViewByIndex(components[i], lView);\n // Only attached components that are CheckAlways or OnPush and dirty should be refreshed\n if (viewAttachedToChangeDetector(componentView) &&\n componentView[TRANSPLANTED_VIEWS_TO_REFRESH] > 0) {\n refreshContainsDirtyView(componentView);\n }\n }\n }\n}\nfunction renderComponent(hostLView, componentHostIdx) {\n ngDevMode && assertEqual(isCreationMode(hostLView), true, 'Should be run in creation mode');\n const componentView = getComponentLViewByIndex(componentHostIdx, hostLView);\n const componentTView = componentView[TVIEW];\n syncViewWithBlueprint(componentTView, componentView);\n renderView(componentTView, componentView, componentView[CONTEXT]);\n}\n/**\n * Syncs an LView instance with its blueprint if they have gotten out of sync.\n *\n * Typically, blueprints and their view instances should always be in sync, so the loop here\n * will be skipped. However, consider this case of two components side-by-side:\n *\n * App template:\n * ```\n * <comp></comp>\n * <comp></comp>\n * ```\n *\n * The following will happen:\n * 1. App template begins processing.\n * 2. First <comp> is matched as a component and its LView is created.\n * 3. Second <comp> is matched as a component and its LView is created.\n * 4. App template completes processing, so it's time to check child templates.\n * 5. First <comp> template is checked. It has a directive, so its def is pushed to blueprint.\n * 6. Second <comp> template is checked. Its blueprint has been updated by the first\n * <comp> template, but its LView was created before this update, so it is out of sync.\n *\n * Note that embedded views inside ngFor loops will never be out of sync because these views\n * are processed as soon as they are created.\n *\n * @param tView The `TView` that contains the blueprint for syncing\n * @param lView The view to sync\n */\nfunction syncViewWithBlueprint(tView, lView) {\n for (let i = lView.length; i < tView.blueprint.length; i++) {\n lView.push(tView.blueprint[i]);\n }\n}\n/**\n * Adds LView or LContainer to the end of the current view tree.\n *\n * This structure will be used to traverse through nested views to remove listeners\n * and call onDestroy callbacks.\n *\n * @param lView The view where LView or LContainer should be added\n * @param adjustedHostIndex Index of the view's host node in LView[], adjusted for header\n * @param lViewOrLContainer The LView or LContainer to add to the view tree\n * @returns The state passed in\n */\nfunction addToViewTree(lView, lViewOrLContainer) {\n // TODO(benlesh/misko): This implementation is incorrect, because it always adds the LContainer\n // to the end of the queue, which means if the developer retrieves the LContainers from RNodes out\n // of order, the change detection will run out of order, as the act of retrieving the the\n // LContainer from the RNode is what adds it to the queue.\n if (lView[CHILD_HEAD]) {\n lView[CHILD_TAIL][NEXT] = lViewOrLContainer;\n }\n else {\n lView[CHILD_HEAD] = lViewOrLContainer;\n }\n lView[CHILD_TAIL] = lViewOrLContainer;\n return lViewOrLContainer;\n}\n///////////////////////////////\n//// Change detection\n///////////////////////////////\n/**\n * Marks current view and all ancestors dirty.\n *\n * Returns the root view because it is found as a byproduct of marking the view tree\n * dirty, and can be used by methods that consume markViewDirty() to easily schedule\n * change detection. Otherwise, such methods would need to traverse up the view tree\n * an additional time to get the root view and schedule a tick on it.\n *\n * @param lView The starting LView to mark dirty\n * @returns the root LView\n */\nfunction markViewDirty(lView) {\n while (lView) {\n lView[FLAGS] |= 32 /* LViewFlags.Dirty */;\n const parent = getLViewParent(lView);\n // Stop traversing up as soon as you find a root view that wasn't attached to any container\n if (isRootView(lView) && !parent) {\n return lView;\n }\n // continue otherwise\n lView = parent;\n }\n return null;\n}\nfunction detectChangesInternal(tView, lView, context, notifyErrorHandler = true) {\n const rendererFactory = lView[RENDERER_FACTORY];\n // Check no changes mode is a dev only mode used to verify that bindings have not changed\n // since they were assigned. We do not want to invoke renderer factory functions in that mode\n // to avoid any possible side-effects.\n const checkNoChangesMode = !!ngDevMode && isInCheckNoChangesMode();\n if (!checkNoChangesMode && rendererFactory.begin)\n rendererFactory.begin();\n try {\n refreshView(tView, lView, tView.template, context);\n }\n catch (error) {\n if (notifyErrorHandler) {\n handleError(lView, error);\n }\n throw error;\n }\n finally {\n if (!checkNoChangesMode && rendererFactory.end)\n rendererFactory.end();\n }\n}\nfunction checkNoChangesInternal(tView, lView, context, notifyErrorHandler = true) {\n setIsInCheckNoChangesMode(true);\n try {\n detectChangesInternal(tView, lView, context, notifyErrorHandler);\n }\n finally {\n setIsInCheckNoChangesMode(false);\n }\n}\nfunction executeViewQueryFn(flags, viewQueryFn, component) {\n ngDevMode && assertDefined(viewQueryFn, 'View queries function to execute must be defined.');\n setCurrentQueryIndex(0);\n viewQueryFn(flags, component);\n}\n///////////////////////////////\n//// Bindings & interpolations\n///////////////////////////////\n/**\n * Stores meta-data for a property binding to be used by TestBed's `DebugElement.properties`.\n *\n * In order to support TestBed's `DebugElement.properties` we need to save, for each binding:\n * - a bound property name;\n * - a static parts of interpolated strings;\n *\n * A given property metadata is saved at the binding's index in the `TView.data` (in other words, a\n * property binding metadata will be stored in `TView.data` at the same index as a bound value in\n * `LView`). Metadata are represented as `INTERPOLATION_DELIMITER`-delimited string with the\n * following format:\n * - `propertyName` for bound properties;\n * - `propertyName�prefix�interpolation_static_part1�..interpolation_static_partN�suffix` for\n * interpolated properties.\n *\n * @param tData `TData` where meta-data will be saved;\n * @param tNode `TNode` that is a target of the binding;\n * @param propertyName bound property name;\n * @param bindingIndex binding index in `LView`\n * @param interpolationParts static interpolation parts (for property interpolations)\n */\nfunction storePropertyBindingMetadata(tData, tNode, propertyName, bindingIndex, ...interpolationParts) {\n // Binding meta-data are stored only the first time a given property instruction is processed.\n // Since we don't have a concept of the \"first update pass\" we need to check for presence of the\n // binding meta-data to decide if one should be stored (or if was stored already).\n if (tData[bindingIndex] === null) {\n if (tNode.inputs == null || !tNode.inputs[propertyName]) {\n const propBindingIdxs = tNode.propertyBindings || (tNode.propertyBindings = []);\n propBindingIdxs.push(bindingIndex);\n let bindingMetadata = propertyName;\n if (interpolationParts.length > 0) {\n bindingMetadata +=\n INTERPOLATION_DELIMITER + interpolationParts.join(INTERPOLATION_DELIMITER);\n }\n tData[bindingIndex] = bindingMetadata;\n }\n }\n}\nfunction getOrCreateLViewCleanup(view) {\n // top level variables should not be exported for performance reasons (PERF_NOTES.md)\n return view[CLEANUP] || (view[CLEANUP] = []);\n}\nfunction getOrCreateTViewCleanup(tView) {\n return tView.cleanup || (tView.cleanup = []);\n}\n/**\n * There are cases where the sub component's renderer needs to be included\n * instead of the current renderer (see the componentSyntheticHost* instructions).\n */\nfunction loadComponentRenderer(currentDef, tNode, lView) {\n // TODO(FW-2043): the `currentDef` is null when host bindings are invoked while creating root\n // component (see packages/core/src/render3/component.ts). This is not consistent with the process\n // of creating inner components, when current directive index is available in the state. In order\n // to avoid relying on current def being `null` (thus special-casing root component creation), the\n // process of creating root component should be unified with the process of creating inner\n // components.\n if (currentDef === null || isComponentDef(currentDef)) {\n lView = unwrapLView(lView[tNode.index]);\n }\n return lView[RENDERER];\n}\n/** Handles an error thrown in an LView. */\nfunction handleError(lView, error) {\n const injector = lView[INJECTOR$1];\n const errorHandler = injector ? injector.get(ErrorHandler, null) : null;\n errorHandler && errorHandler.handleError(error);\n}\n/**\n * Set the inputs of directives at the current node to corresponding value.\n *\n * @param tView The current TView\n * @param lView the `LView` which contains the directives.\n * @param inputs mapping between the public \"input\" name and privately-known,\n * possibly minified, property names to write to.\n * @param value Value to set.\n */\nfunction setInputsForProperty(tView, lView, inputs, publicName, value) {\n for (let i = 0; i < inputs.length;) {\n const index = inputs[i++];\n const privateName = inputs[i++];\n const instance = lView[index];\n ngDevMode && assertIndexInRange(lView, index);\n const def = tView.data[index];\n if (def.setInput !== null) {\n def.setInput(instance, value, publicName, privateName);\n }\n else {\n instance[privateName] = value;\n }\n }\n}\n/**\n * Updates a text binding at a given index in a given LView.\n */\nfunction textBindingInternal(lView, index, value) {\n ngDevMode && assertString(value, 'Value should be a string');\n ngDevMode && assertNotSame(value, NO_CHANGE, 'value should not be NO_CHANGE');\n ngDevMode && assertIndexInRange(lView, index);\n const element = getNativeByIndex(index, lView);\n ngDevMode && assertDefined(element, 'native element should exist');\n updateTextNode(lView[RENDERER], element, value);\n}\n\n/**\n * 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 markDirtyIfOnPush(lView, this._tNode.index);\n }\n else {\n if (ngDevMode) {\n const cmpNameForError = stringifyForError(this.componentType);\n let message = `Can't set value of the '${name}' input on the '${cmpNameForError}' component. `;\n message += `Make sure that the '${name}' property is annotated with @Input() or a mapped @Input('${name}') exists.`;\n reportUnknownPropertyError(message);\n }\n }\n }\n get injector() {\n return new NodeInjector(this._tNode, this._rootLView);\n }\n destroy() {\n this.hostView.destroy();\n }\n onDestroy(callback) {\n this.hostView.onDestroy(callback);\n }\n}\n// TODO: A hack to not pull in the NullInjector from @angular/core.\nconst NULL_INJECTOR = {\n get: (token, notFoundValue) => {\n throwProviderNotFoundError(token, 'NullInjector');\n }\n};\n/** Creates a TNode that can be used to instantiate a root component. */\nfunction createRootComponentTNode(lView, rNode) {\n const tView = lView[TVIEW];\n const index = HEADER_OFFSET;\n ngDevMode && assertIndexInRange(lView, index);\n lView[index] = rNode;\n // '#host' is added here as we don't know the real host DOM name (we don't want to read it) and at\n // the same time we want to communicate the debug `TNode` that this is a special `TNode`\n // representing a host element.\n return getOrCreateTNode(tView, index, 2 /* TNodeType.Element */, '#host', null);\n}\n/**\n * Creates the root component view and the root component node.\n *\n * @param rNode Render host element.\n * @param rootComponentDef ComponentDef\n * @param rootView The parent view where the host node is stored\n * @param rendererFactory Factory to be used for creating child renderers.\n * @param hostRenderer The current renderer\n * @param sanitizer The sanitizer, if provided\n *\n * @returns Component view created\n */\nfunction createRootComponentView(tNode, rNode, rootComponentDef, rootDirectives, rootView, rendererFactory, hostRenderer, sanitizer) {\n const tView = rootView[TVIEW];\n applyRootComponentStyling(rootDirectives, tNode, rNode, hostRenderer);\n const viewRenderer = rendererFactory.createRenderer(rNode, rootComponentDef);\n const componentView = createLView(rootView, getOrCreateComponentTView(rootComponentDef), null, rootComponentDef.onPush ? 32 /* LViewFlags.Dirty */ : 16 /* LViewFlags.CheckAlways */, rootView[tNode.index], tNode, rendererFactory, viewRenderer, sanitizer || null, null, null);\n if (tView.firstCreatePass) {\n markAsComponentHost(tView, tNode, rootDirectives.length - 1);\n }\n addToViewTree(rootView, componentView);\n // Store component view at node index, with node as the HOST\n return rootView[tNode.index] = componentView;\n}\n/** Sets up the styling information on a root component. */\nfunction applyRootComponentStyling(rootDirectives, tNode, rNode, hostRenderer) {\n for (const def of rootDirectives) {\n tNode.mergedAttrs = mergeHostAttrs(tNode.mergedAttrs, def.hostAttrs);\n }\n if (tNode.mergedAttrs !== null) {\n computeStaticStyling(tNode, tNode.mergedAttrs, true);\n if (rNode !== null) {\n setupStaticAttributes(hostRenderer, rNode, tNode);\n }\n }\n}\n/**\n * Creates a root component and sets it up with features and host bindings.Shared by\n * renderComponent() and ViewContainerRef.createComponent().\n */\nfunction createRootComponent(componentView, rootComponentDef, rootDirectives, hostDirectiveDefs, rootLView, hostFeatures) {\n const rootTNode = getCurrentTNode();\n ngDevMode && assertDefined(rootTNode, 'tNode should have been already created');\n const tView = rootLView[TVIEW];\n const native = getNativeByTNode(rootTNode, rootLView);\n initializeDirectives(tView, rootLView, rootTNode, rootDirectives, null, hostDirectiveDefs);\n for (let i = 0; i < rootDirectives.length; i++) {\n const directiveIndex = rootTNode.directiveStart + i;\n const directiveInstance = getNodeInjectable(rootLView, tView, directiveIndex, rootTNode);\n attachPatchData(directiveInstance, rootLView);\n }\n invokeDirectivesHostBindings(tView, rootLView, rootTNode);\n if (native) {\n attachPatchData(native, rootLView);\n }\n // We're guaranteed for the `componentOffset` to be positive here\n // since a root component always matches a component def.\n ngDevMode &&\n assertGreaterThan(rootTNode.componentOffset, -1, 'componentOffset must be great than -1');\n const component = getNodeInjectable(rootLView, tView, rootTNode.directiveStart + rootTNode.componentOffset, rootTNode);\n componentView[CONTEXT] = rootLView[CONTEXT] = component;\n if (hostFeatures !== null) {\n for (const feature of hostFeatures) {\n feature(component, rootComponentDef);\n }\n }\n // We want to generate an empty QueryList for root content queries for backwards\n // compatibility with ViewEngine.\n executeContentQueries(tView, rootTNode, componentView);\n return component;\n}\n/** Sets the static attributes on a root component. */\nfunction setRootNodeAttributes(hostRenderer, componentDef, hostRNode, rootSelectorOrNode) {\n if (rootSelectorOrNode) {\n setUpAttributes(hostRenderer, hostRNode, ['ng-version', VERSION.full]);\n }\n else {\n // If host element is created as a part of this function call (i.e. `rootSelectorOrNode`\n // is not defined), also apply attributes and classes extracted from component selector.\n // Extract attributes and classes from the first selector only to match VE behavior.\n const { attrs, classes } = extractAttrsAndClassesFromSelector(componentDef.selectors[0]);\n if (attrs) {\n setUpAttributes(hostRenderer, hostRNode, attrs);\n }\n if (classes && classes.length > 0) {\n writeDirectClass(hostRenderer, hostRNode, classes.join(' '));\n }\n }\n}\n/** Projects the `projectableNodes` that were specified when creating a root component. */\nfunction projectNodes(tNode, ngContentSelectors, projectableNodes) {\n const projection = tNode.projection = [];\n for (let i = 0; i < ngContentSelectors.length; i++) {\n const nodesforSlot = projectableNodes[i];\n // Projectable nodes can be passed as array of arrays or an array of iterables (ngUpgrade\n // case). Here we do normalize passed data structure to be an array of arrays to avoid\n // complex checks down the line.\n // We also normalize the length of the passed in projectable nodes (to match the number of\n // <ng-container> slots defined by a component).\n projection.push(nodesforSlot != null ? Array.from(nodesforSlot) : null);\n }\n}\n/**\n * Used to enable lifecycle hooks on the root component.\n *\n * Include this feature when calling `renderComponent` if the root component\n * you are rendering has lifecycle hooks defined. Otherwise, the hooks won't\n * be called properly.\n *\n * Example:\n *\n * ```\n * renderComponent(AppComponent, {hostFeatures: [LifecycleHooksFeature]});\n * ```\n */\nfunction LifecycleHooksFeature() {\n const tNode = getCurrentTNode();\n ngDevMode && assertDefined(tNode, 'TNode is required');\n registerPostOrderHooks(getLView()[TVIEW], tNode);\n}\n\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\nlet _symbolIterator = null;\nfunction getSymbolIterator() {\n if (!_symbolIterator) {\n const Symbol = _global['Symbol'];\n if (Symbol && Symbol.iterator) {\n _symbolIterator = Symbol.iterator;\n }\n else {\n // es6-shim specific logic\n const keys = Object.getOwnPropertyNames(Map.prototype);\n for (let i = 0; i < keys.length; ++i) {\n const key = keys[i];\n if (key !== 'entries' && key !== 'size' &&\n Map.prototype[key] === Map.prototype['entries']) {\n _symbolIterator = key;\n }\n }\n }\n }\n return _symbolIterator;\n}\n\nfunction isIterable(obj) {\n return obj !== null && typeof obj === 'object' && obj[getSymbolIterator()] !== undefined;\n}\nfunction isListLikeIterable(obj) {\n if (!isJsObject(obj))\n return false;\n return Array.isArray(obj) ||\n (!(obj instanceof Map) && // JS Map are iterables but return entries as [k, v]\n getSymbolIterator() in obj); // JS Iterable have a Symbol.iterator prop\n}\nfunction areIterablesEqual(a, b, comparator) {\n const iterator1 = a[getSymbolIterator()]();\n const iterator2 = b[getSymbolIterator()]();\n while (true) {\n const item1 = iterator1.next();\n const item2 = iterator2.next();\n if (item1.done && item2.done)\n return true;\n if (item1.done || item2.done)\n return false;\n if (!comparator(item1.value, item2.value))\n return false;\n }\n}\nfunction iterateListLike(obj, fn) {\n if (Array.isArray(obj)) {\n for (let i = 0; i < obj.length; i++) {\n fn(obj[i]);\n }\n }\n else {\n const iterator = obj[getSymbolIterator()]();\n let item;\n while (!((item = iterator.next()).done)) {\n fn(item.value);\n }\n }\n}\nfunction isJsObject(o) {\n return o !== null && (typeof o === 'function' || typeof o === 'object');\n}\n\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.tViews = createTView(2 /* TViewType.Embedded */, tNode, templateFn, decls, vars, tView.directiveRegistry, tView.pipeRegistry, null, tView.schemas, tViewConsts);\n if (tView.queries !== null) {\n tView.queries.template(tView, tNode);\n embeddedTView.queries = tView.queries.embeddedTView(tNode);\n }\n return tNode;\n}\n/**\n * Creates an LContainer for an ng-template (dynamically-inserted view), e.g.\n *\n * <ng-template #foo>\n * <div></div>\n * </ng-template>\n *\n * @param index The index of the container in the data array\n * @param templateFn Inline template\n * @param decls The number of nodes, local refs, and pipes for this template\n * @param vars The number of bindings for this template\n * @param tagName The name of the container element, if applicable\n * @param attrsIndex Index of template attributes in the `consts` array.\n * @param localRefs Index of the local references in the `consts` array.\n * @param localRefExtractor A function which extracts local-refs values from the template.\n * Defaults to the current element associated with the local-ref.\n *\n * @codeGenApi\n */\nfunction ɵɵtemplate(index, templateFn, decls, vars, tagName, attrsIndex, localRefsIndex, localRefExtractor) {\n const lView = getLView();\n const tView = getTView();\n const adjustedIndex = index + HEADER_OFFSET;\n const tNode = tView.firstCreatePass ? templateFirstCreatePass(adjustedIndex, tView, lView, templateFn, decls, vars, tagName, attrsIndex, localRefsIndex) :\n tView.data[adjustedIndex];\n setCurrentTNode(tNode, false);\n const comment = lView[RENDERER].createComment(ngDevMode ? 'container' : '');\n appendChild(tView, lView, comment, tNode);\n attachPatchData(comment, lView);\n addToViewTree(lView, lView[adjustedIndex] = createLContainer(comment, lView, comment, tNode));\n if (isDirectiveHost(tNode)) {\n createDirectivesInstances(tView, lView, tNode);\n }\n if (localRefsIndex != null) {\n saveResolvedLocalsInData(lView, tNode, localRefExtractor);\n }\n}\n\n/** 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, native, name, attrsIndex, localRefsIndex) {\n ngDevMode && assertFirstCreatePass(tView);\n ngDevMode && ngDevMode.firstCreatePass++;\n const tViewConsts = tView.consts;\n const attrs = getConstant(tViewConsts, attrsIndex);\n const tNode = getOrCreateTNode(tView, index, 2 /* TNodeType.Element */, name, attrs);\n const hasDirectives = resolveDirectives(tView, lView, tNode, getConstant(tViewConsts, localRefsIndex));\n if (ngDevMode) {\n validateElementIsKnown(native, lView, tNode.value, tView.schemas, hasDirectives);\n }\n if (tNode.attrs !== null) {\n computeStaticStyling(tNode, tNode.attrs, false);\n }\n if (tNode.mergedAttrs !== null) {\n computeStaticStyling(tNode, tNode.mergedAttrs, true);\n }\n if (tView.queries !== null) {\n tView.queries.elementStart(tView, tNode);\n }\n return tNode;\n}\n/**\n * Create DOM element. The instruction must later be followed by `elementEnd()` call.\n *\n * @param index Index of the element in the LView array\n * @param name Name of the DOM Node\n * @param attrsIndex Index of the element's attributes in the `consts` array.\n * @param localRefsIndex Index of the element's local references in the `consts` array.\n * @returns This function returns itself so that it may be chained.\n *\n * Attributes and localRefs are passed as an array of strings where elements with an even index\n * hold an attribute name and elements with an odd index hold an attribute value, ex.:\n * ['id', 'warning5', 'class', 'alert']\n *\n * @codeGenApi\n */\nfunction ɵɵelementStart(index, name, attrsIndex, localRefsIndex) {\n const lView = getLView();\n const tView = getTView();\n const adjustedIndex = HEADER_OFFSET + index;\n ngDevMode &&\n assertEqual(getBindingIndex(), tView.bindingStartIndex, 'elements should be created before any bindings');\n ngDevMode && assertIndexInRange(lView, adjustedIndex);\n const renderer = lView[RENDERER];\n const native = lView[adjustedIndex] = createElementNode(renderer, name, getNamespace$1());\n const tNode = tView.firstCreatePass ?\n elementStartFirstCreatePass(adjustedIndex, tView, lView, native, name, attrsIndex, localRefsIndex) :\n tView.data[adjustedIndex];\n setCurrentTNode(tNode, true);\n setupStaticAttributes(renderer, native, tNode);\n if ((tNode.flags & 32 /* TNodeFlags.isDetached */) !== 32 /* TNodeFlags.isDetached */) {\n // In the i18n case, the translation may have removed this element, so only add it if it is not\n // detached. See `TNodeType.Placeholder` and `LFrame.inI18n` for more context.\n appendChild(tView, lView, native, tNode);\n }\n // any immediate children of a component or template container must be pre-emptively\n // monkey-patched with the component view data so that the element can be inspected\n // later on using any element discovery utility methods (see `element_discovery.ts`)\n if (getElementDepthCount() === 0) {\n attachPatchData(native, lView);\n }\n increaseElementDepthCount();\n if (isDirectiveHost(tNode)) {\n createDirectivesInstances(tView, lView, tNode);\n executeContentQueries(tView, tNode, lView);\n }\n if (localRefsIndex !== null) {\n saveResolvedLocalsInData(lView, tNode);\n }\n return ɵɵelementStart;\n}\n/**\n * Mark the end of the element.\n * @returns This function returns itself so that it may be chained.\n *\n * @codeGenApi\n */\nfunction ɵɵelementEnd() {\n let currentTNode = getCurrentTNode();\n ngDevMode && assertDefined(currentTNode, 'No parent node to close.');\n if (isCurrentTNodeParent()) {\n setCurrentTNodeAsNotParent();\n }\n else {\n ngDevMode && assertHasParent(getCurrentTNode());\n currentTNode = currentTNode.parent;\n setCurrentTNode(currentTNode, false);\n }\n const tNode = currentTNode;\n ngDevMode && assertTNodeType(tNode, 3 /* TNodeType.AnyRNode */);\n decreaseElementDepthCount();\n const tView = getTView();\n if (tView.firstCreatePass) {\n registerPostOrderHooks(tView, currentTNode);\n if (isContentQueryHost(currentTNode)) {\n tView.queries.elementEnd(currentTNode);\n }\n }\n if (tNode.classesWithoutHost != null && hasClassInput(tNode)) {\n setDirectiveInputsWhichShadowsStyling(tView, tNode, getLView(), tNode.classesWithoutHost, true);\n }\n if (tNode.stylesWithoutHost != null && hasStyleInput(tNode)) {\n setDirectiveInputsWhichShadowsStyling(tView, tNode, getLView(), tNode.stylesWithoutHost, false);\n }\n return ɵɵelementEnd;\n}\n/**\n * Creates an empty element using {@link elementStart} and {@link elementEnd}\n *\n * @param index Index of the element in the data array\n * @param name Name of the DOM Node\n * @param attrsIndex Index of the element's attributes in the `consts` array.\n * @param localRefsIndex Index of the element's local references in the `consts` array.\n * @returns This function returns itself so that it may be chained.\n *\n * @codeGenApi\n */\nfunction ɵɵelement(index, name, attrsIndex, localRefsIndex) {\n ɵɵelementStart(index, name, attrsIndex, localRefsIndex);\n ɵɵelementEnd();\n return ɵɵelement;\n}\n\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(keyValueArraySet, classStringParser, classes, true);\n}\n/**\n * Parse text as class and add values to KeyValueArray.\n *\n * This code is pulled out to a separate function so that it can be tree shaken away if it is not\n * needed. It is only referenced from `ɵɵclassMap`.\n *\n * @param keyValueArray KeyValueArray to add parsed values to.\n * @param text text to parse.\n */\nfunction classStringParser(keyValueArray, text) {\n for (let i = parseClassName(text); i >= 0; i = parseClassNameNext(text, i)) {\n keyValueArraySet(keyValueArray, getLastParsedKey(text), true);\n }\n}\n/**\n * Common code between `ɵɵclassProp` and `ɵɵstyleProp`.\n *\n * @param prop property name.\n * @param value binding value.\n * @param suffix suffix for the property (e.g. `em` or `px`)\n * @param isClassBased `true` if `class` change (`false` if `style`)\n */\nfunction checkStylingProperty(prop, value, suffix, isClassBased) {\n const lView = getLView();\n const tView = getTView();\n // Styling instructions use 2 slots per binding.\n // 1. one for the value / TStylingKey\n // 2. one for the intermittent-value / TStylingRange\n const bindingIndex = incrementBindingIndex(2);\n if (tView.firstUpdatePass) {\n stylingFirstUpdatePass(tView, prop, bindingIndex, isClassBased);\n }\n if (value !== NO_CHANGE && bindingUpdated(lView, bindingIndex, value)) {\n const tNode = tView.data[getSelectedIndex()];\n updateStyling(tView, tNode, lView, lView[RENDERER], prop, lView[bindingIndex + 1] = normalizeSuffix(value, suffix), isClassBased, bindingIndex);\n }\n}\n/**\n * Common code between `ɵɵclassMap` and `ɵɵstyleMap`.\n *\n * @param keyValueArraySet (See `keyValueArraySet` in \"util/array_utils\") Gets passed in as a\n * function so that `style` can be processed. This is done for tree shaking purposes.\n * @param stringParser Parser used to parse `value` if `string`. (Passed in as `style` and `class`\n * have different parsers.)\n * @param value bound value from application\n * @param isClassBased `true` if `class` change (`false` if `style`)\n */\nfunction checkStylingMap(keyValueArraySet, stringParser, value, isClassBased) {\n const tView = getTView();\n const bindingIndex = incrementBindingIndex(2);\n if (tView.firstUpdatePass) {\n stylingFirstUpdatePass(tView, null, bindingIndex, isClassBased);\n }\n const lView = getLView();\n if (value !== NO_CHANGE && bindingUpdated(lView, bindingIndex, value)) {\n // `getSelectedIndex()` should be here (rather than in instruction) so that it is guarded by the\n // if so as not to read unnecessarily.\n const tNode = tView.data[getSelectedIndex()];\n if (hasStylingInputShadow(tNode, isClassBased) && !isInHostBindings(tView, bindingIndex)) {\n if (ngDevMode) {\n // verify that if we are shadowing then `TData` is appropriately marked so that we skip\n // processing this binding in styling resolution.\n const tStylingKey = tView.data[bindingIndex];\n assertEqual(Array.isArray(tStylingKey) ? tStylingKey[1] : tStylingKey, false, 'Styling linked list shadow input should be marked as \\'false\\'');\n }\n // VE does not concatenate the static portion like we are doing here.\n // Instead VE just ignores the static completely if dynamic binding is present.\n // Because of locality we have already set the static portion because we don't know if there\n // is a dynamic portion until later. If we would ignore the static portion it would look like\n // the binding has removed it. This would confuse `[ngStyle]`/`[ngClass]` to do the wrong\n // thing as it would think that the static portion was removed. For this reason we\n // concatenate it so that `[ngStyle]`/`[ngClass]` can continue to work on changed.\n let staticPrefix = isClassBased ? tNode.classesWithoutHost : tNode.stylesWithoutHost;\n ngDevMode && isClassBased === false && staticPrefix !== null &&\n assertEqual(staticPrefix.endsWith(';'), true, 'Expecting static portion to end with \\';\\'');\n if (staticPrefix !== null) {\n // We want to make sure that falsy values of `value` become empty strings.\n value = concatStringsWithSpace(staticPrefix, value ? value : '');\n }\n // Given `<div [style] my-dir>` such that `my-dir` has `@Input('style')`.\n // This takes over the `[style]` binding. (Same for `[class]`)\n setDirectiveInputsWhichShadowsStyling(tView, tNode, lView, value, isClassBased);\n }\n else {\n updateStylingMap(tView, tNode, lView, lView[RENDERER], lView[bindingIndex + 1], lView[bindingIndex + 1] = toStylingKeyValueArray(keyValueArraySet, stringParser, value), isClassBased, bindingIndex);\n }\n }\n}\n/**\n * Determines when the binding is in `hostBindings` section\n *\n * @param tView Current `TView`\n * @param bindingIndex index of binding which we would like if it is in `hostBindings`\n */\nfunction isInHostBindings(tView, bindingIndex) {\n // All host bindings are placed after the expando section.\n return bindingIndex >= tView.expandoStartIndex;\n}\n/**\n * Collects the necessary information to insert the binding into a linked list of style bindings\n * using `insertTStylingBinding`.\n *\n * @param tView `TView` where the binding linked list will be stored.\n * @param tStylingKey Property/key of the binding.\n * @param bindingIndex Index of binding associated with the `prop`\n * @param isClassBased `true` if `class` change (`false` if `style`)\n */\nfunction stylingFirstUpdatePass(tView, tStylingKey, bindingIndex, isClassBased) {\n ngDevMode && assertFirstUpdatePass(tView);\n const tData = tView.data;\n if (tData[bindingIndex + 1] === null) {\n // The above check is necessary because we don't clear first update pass until first successful\n // (no exception) template execution. This prevents the styling instruction from double adding\n // itself to the list.\n // `getSelectedIndex()` should be here (rather than in instruction) so that it is guarded by the\n // if so as not to read unnecessarily.\n const tNode = tData[getSelectedIndex()];\n ngDevMode && assertDefined(tNode, 'TNode expected');\n const isHostBindings = isInHostBindings(tView, bindingIndex);\n if (hasStylingInputShadow(tNode, isClassBased) && tStylingKey === null && !isHostBindings) {\n // `tStylingKey === null` implies that we are either `[style]` or `[class]` binding.\n // If there is a directive which uses `@Input('style')` or `@Input('class')` than\n // we need to neutralize this binding since that directive is shadowing it.\n // We turn this into a noop by setting the key to `false`\n tStylingKey = false;\n }\n tStylingKey = wrapInStaticStylingKey(tData, tNode, tStylingKey, isClassBased);\n insertTStylingBinding(tData, tNode, tStylingKey, bindingIndex, isHostBindings, isClassBased);\n }\n}\n/**\n * Adds static styling information to the binding if applicable.\n *\n * The linked list of styles not only stores the list and keys, but also stores static styling\n * information on some of the keys. This function determines if the key should contain the styling\n * information and computes it.\n *\n * See `TStylingStatic` for more details.\n *\n * @param tData `TData` where the linked list is stored.\n * @param tNode `TNode` for which the styling is being computed.\n * @param stylingKey `TStylingKeyPrimitive` which may need to be wrapped into `TStylingKey`\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nfunction wrapInStaticStylingKey(tData, tNode, stylingKey, isClassBased) {\n const hostDirectiveDef = getCurrentDirectiveDef(tData);\n let residual = isClassBased ? tNode.residualClasses : tNode.residualStyles;\n if (hostDirectiveDef === null) {\n // We are in template node.\n // If template node already had styling instruction then it has already collected the static\n // styling and there is no need to collect them again. We know that we are the first styling\n // instruction because the `TNode.*Bindings` points to 0 (nothing has been inserted yet).\n const isFirstStylingInstructionInTemplate = (isClassBased ? tNode.classBindings : tNode.styleBindings) === 0;\n if (isFirstStylingInstructionInTemplate) {\n // It would be nice to be able to get the statics from `mergeAttrs`, however, at this point\n // they are already merged and it would not be possible to figure which property belongs where\n // in the priority.\n stylingKey = collectStylingFromDirectives(null, tData, tNode, stylingKey, isClassBased);\n stylingKey = collectStylingFromTAttrs(stylingKey, tNode.attrs, isClassBased);\n // We know that if we have styling binding in template we can't have residual.\n residual = null;\n }\n }\n else {\n // We are in host binding node and there was no binding instruction in template node.\n // This means that we need to compute the residual.\n const directiveStylingLast = tNode.directiveStylingLast;\n const isFirstStylingInstructionInHostBinding = directiveStylingLast === -1 || tData[directiveStylingLast] !== hostDirectiveDef;\n if (isFirstStylingInstructionInHostBinding) {\n stylingKey =\n collectStylingFromDirectives(hostDirectiveDef, tData, tNode, stylingKey, isClassBased);\n if (residual === null) {\n // - If `null` than either:\n // - Template styling instruction already ran and it has consumed the static\n // styling into its `TStylingKey` and so there is no need to update residual. Instead\n // we need to update the `TStylingKey` associated with the first template node\n // instruction. OR\n // - Some other styling instruction ran and determined that there are no residuals\n let templateStylingKey = getTemplateHeadTStylingKey(tData, tNode, isClassBased);\n if (templateStylingKey !== undefined && Array.isArray(templateStylingKey)) {\n // Only recompute if `templateStylingKey` had static values. (If no static value found\n // then there is nothing to do since this operation can only produce less static keys, not\n // more.)\n templateStylingKey = collectStylingFromDirectives(null, tData, tNode, templateStylingKey[1] /* unwrap previous statics */, isClassBased);\n templateStylingKey =\n collectStylingFromTAttrs(templateStylingKey, tNode.attrs, isClassBased);\n setTemplateHeadTStylingKey(tData, tNode, isClassBased, templateStylingKey);\n }\n }\n else {\n // We only need to recompute residual if it is not `null`.\n // - If existing residual (implies there was no template styling). This means that some of\n // the statics may have moved from the residual to the `stylingKey` and so we have to\n // recompute.\n // - If `undefined` this is the first time we are running.\n residual = collectResidual(tData, tNode, isClassBased);\n }\n }\n }\n if (residual !== undefined) {\n isClassBased ? (tNode.residualClasses = residual) : (tNode.residualStyles = residual);\n }\n return stylingKey;\n}\n/**\n * Retrieve the `TStylingKey` for the template styling instruction.\n *\n * This is needed since `hostBinding` styling instructions are inserted after the template\n * instruction. While the template instruction needs to update the residual in `TNode` the\n * `hostBinding` instructions need to update the `TStylingKey` of the template instruction because\n * the template instruction is downstream from the `hostBindings` instructions.\n *\n * @param tData `TData` where the linked list is stored.\n * @param tNode `TNode` for which the styling is being computed.\n * @param isClassBased `true` if `class` (`false` if `style`)\n * @return `TStylingKey` if found or `undefined` if not found.\n */\nfunction getTemplateHeadTStylingKey(tData, tNode, isClassBased) {\n const bindings = isClassBased ? tNode.classBindings : tNode.styleBindings;\n if (getTStylingRangeNext(bindings) === 0) {\n // There does not seem to be a styling instruction in the `template`.\n return undefined;\n }\n return tData[getTStylingRangePrev(bindings)];\n}\n/**\n * Update the `TStylingKey` of the first template instruction in `TNode`.\n *\n * Logically `hostBindings` styling instructions are of lower priority than that of the template.\n * However, they execute after the template styling instructions. This means that they get inserted\n * in front of the template styling instructions.\n *\n * If we have a template styling instruction and a new `hostBindings` styling instruction is\n * executed it means that it may need to steal static fields from the template instruction. This\n * method allows us to update the first template instruction `TStylingKey` with a new value.\n *\n * Assume:\n * ```\n * <div my-dir style=\"color: red\" [style.color]=\"tmplExp\"></div>\n *\n * @Directive({\n * host: {\n * 'style': 'width: 100px',\n * '[style.color]': 'dirExp',\n * }\n * })\n * class MyDir {}\n * ```\n *\n * when `[style.color]=\"tmplExp\"` executes it creates this data structure.\n * ```\n * ['', 'color', 'color', 'red', 'width', '100px'],\n * ```\n *\n * The reason for this is that the template instruction does not know if there are styling\n * instructions and must assume that there are none and must collect all of the static styling.\n * (both\n * `color' and 'width`)\n *\n * When `'[style.color]': 'dirExp',` executes we need to insert a new data into the linked list.\n * ```\n * ['', 'color', 'width', '100px'], // newly inserted\n * ['', 'color', 'color', 'red', 'width', '100px'], // this is wrong\n * ```\n *\n * Notice that the template statics is now wrong as it incorrectly contains `width` so we need to\n * update it like so:\n * ```\n * ['', 'color', 'width', '100px'],\n * ['', 'color', 'color', 'red'], // UPDATE\n * ```\n *\n * @param tData `TData` where the linked list is stored.\n * @param tNode `TNode` for which the styling is being computed.\n * @param isClassBased `true` if `class` (`false` if `style`)\n * @param tStylingKey New `TStylingKey` which is replacing the old one.\n */\nfunction setTemplateHeadTStylingKey(tData, tNode, isClassBased, tStylingKey) {\n const bindings = isClassBased ? tNode.classBindings : tNode.styleBindings;\n ngDevMode &&\n assertNotEqual(getTStylingRangeNext(bindings), 0, 'Expecting to have at least one template styling binding.');\n tData[getTStylingRangePrev(bindings)] = tStylingKey;\n}\n/**\n * Collect all static values after the current `TNode.directiveStylingLast` index.\n *\n * Collect the remaining styling information which has not yet been collected by an existing\n * styling instruction.\n *\n * @param tData `TData` where the `DirectiveDefs` are stored.\n * @param tNode `TNode` which contains the directive range.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nfunction collectResidual(tData, tNode, isClassBased) {\n let residual = undefined;\n const directiveEnd = tNode.directiveEnd;\n ngDevMode &&\n assertNotEqual(tNode.directiveStylingLast, -1, 'By the time this function gets called at least one hostBindings-node styling instruction must have executed.');\n // We add `1 + tNode.directiveStart` because we need to skip the current directive (as we are\n // collecting things after the last `hostBindings` directive which had a styling instruction.)\n for (let i = 1 + tNode.directiveStylingLast; i < directiveEnd; i++) {\n const attrs = tData[i].hostAttrs;\n residual = collectStylingFromTAttrs(residual, attrs, isClassBased);\n }\n return collectStylingFromTAttrs(residual, tNode.attrs, isClassBased);\n}\n/**\n * Collect the static styling information with lower priority than `hostDirectiveDef`.\n *\n * (This is opposite of residual styling.)\n *\n * @param hostDirectiveDef `DirectiveDef` for which we want to collect lower priority static\n * styling. (Or `null` if template styling)\n * @param tData `TData` where the linked list is stored.\n * @param tNode `TNode` for which the styling is being computed.\n * @param stylingKey Existing `TStylingKey` to update or wrap.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nfunction collectStylingFromDirectives(hostDirectiveDef, tData, tNode, stylingKey, isClassBased) {\n // We need to loop because there can be directives which have `hostAttrs` but don't have\n // `hostBindings` so this loop catches up to the current directive..\n let currentDirective = null;\n const directiveEnd = tNode.directiveEnd;\n let directiveStylingLast = tNode.directiveStylingLast;\n if (directiveStylingLast === -1) {\n directiveStylingLast = tNode.directiveStart;\n }\n else {\n directiveStylingLast++;\n }\n while (directiveStylingLast < directiveEnd) {\n currentDirective = tData[directiveStylingLast];\n ngDevMode && assertDefined(currentDirective, 'expected to be defined');\n stylingKey = collectStylingFromTAttrs(stylingKey, currentDirective.hostAttrs, isClassBased);\n if (currentDirective === hostDirectiveDef)\n break;\n directiveStylingLast++;\n }\n if (hostDirectiveDef !== null) {\n // we only advance the styling cursor if we are collecting data from host bindings.\n // Template executes before host bindings and so if we would update the index,\n // host bindings would not get their statics.\n tNode.directiveStylingLast = directiveStylingLast;\n }\n return stylingKey;\n}\n/**\n * Convert `TAttrs` into `TStylingStatic`.\n *\n * @param stylingKey existing `TStylingKey` to update or wrap.\n * @param attrs `TAttributes` to process.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nfunction collectStylingFromTAttrs(stylingKey, attrs, isClassBased) {\n const desiredMarker = isClassBased ? 1 /* AttributeMarker.Classes */ : 2 /* AttributeMarker.Styles */;\n let currentMarker = -1 /* AttributeMarker.ImplicitAttributes */;\n if (attrs !== null) {\n for (let i = 0; i < attrs.length; i++) {\n const item = attrs[i];\n if (typeof item === 'number') {\n currentMarker = item;\n }\n else {\n if (currentMarker === desiredMarker) {\n if (!Array.isArray(stylingKey)) {\n stylingKey = stylingKey === undefined ? [] : ['', stylingKey];\n }\n keyValueArraySet(stylingKey, item, isClassBased ? true : attrs[++i]);\n }\n }\n }\n }\n return stylingKey === undefined ? null : stylingKey;\n}\n/**\n * Convert user input to `KeyValueArray`.\n *\n * This function takes user input which could be `string`, Object literal, or iterable and converts\n * it into a consistent representation. The output of this is `KeyValueArray` (which is an array\n * where\n * even indexes contain keys and odd indexes contain values for those keys).\n *\n * The advantage of converting to `KeyValueArray` is that we can perform diff in an input\n * independent\n * way.\n * (ie we can compare `foo bar` to `['bar', 'baz'] and determine a set of changes which need to be\n * applied)\n *\n * The fact that `KeyValueArray` is sorted is very important because it allows us to compute the\n * difference in linear fashion without the need to allocate any additional data.\n *\n * For example if we kept this as a `Map` we would have to iterate over previous `Map` to determine\n * which values need to be deleted, over the new `Map` to determine additions, and we would have to\n * keep additional `Map` to keep track of duplicates or items which have not yet been visited.\n *\n * @param keyValueArraySet (See `keyValueArraySet` in \"util/array_utils\") Gets passed in as a\n * function so that `style` can be processed. This is done\n * for tree shaking purposes.\n * @param stringParser The parser is passed in so that it will be tree shakable. See\n * `styleStringParser` and `classStringParser`\n * @param value The value to parse/convert to `KeyValueArray`\n */\nfunction toStylingKeyValueArray(keyValueArraySet, stringParser, value) {\n if (value == null /*|| value === undefined */ || value === '')\n return EMPTY_ARRAY;\n const styleKeyValueArray = [];\n const unwrappedValue = unwrapSafeValue(value);\n if (Array.isArray(unwrappedValue)) {\n for (let i = 0; i < unwrappedValue.length; i++) {\n keyValueArraySet(styleKeyValueArray, unwrappedValue[i], true);\n }\n }\n else if (typeof unwrappedValue === 'object') {\n for (const key in unwrappedValue) {\n if (unwrappedValue.hasOwnProperty(key)) {\n keyValueArraySet(styleKeyValueArray, key, unwrappedValue[key]);\n }\n }\n }\n else if (typeof unwrappedValue === 'string') {\n stringParser(styleKeyValueArray, unwrappedValue);\n }\n else {\n ngDevMode &&\n throwError('Unsupported styling type ' + typeof unwrappedValue + ': ' + unwrappedValue);\n }\n return styleKeyValueArray;\n}\n/**\n * Set a `value` for a `key`.\n *\n * See: `keyValueArraySet` for details\n *\n * @param keyValueArray KeyValueArray to add to.\n * @param key Style key to add.\n * @param value The value to set.\n */\nfunction styleKeyValueArraySet(keyValueArray, key, value) {\n keyValueArraySet(keyValueArray, key, unwrapSafeValue(value));\n}\n/**\n * Update map based styling.\n *\n * Map based styling could be anything which contains more than one binding. For example `string`,\n * or object literal. Dealing with all of these types would complicate the logic so\n * instead this function expects that the complex input is first converted into normalized\n * `KeyValueArray`. The advantage of normalization is that we get the values sorted, which makes it\n * very cheap to compute deltas between the previous and current value.\n *\n * @param tView Associated `TView.data` contains the linked list of binding priorities.\n * @param tNode `TNode` where the binding is located.\n * @param lView `LView` contains the values associated with other styling binding at this `TNode`.\n * @param renderer Renderer to use if any updates.\n * @param oldKeyValueArray Previous value represented as `KeyValueArray`\n * @param newKeyValueArray Current value represented as `KeyValueArray`\n * @param isClassBased `true` if `class` (`false` if `style`)\n * @param bindingIndex Binding index of the binding.\n */\nfunction updateStylingMap(tView, tNode, lView, renderer, oldKeyValueArray, newKeyValueArray, isClassBased, bindingIndex) {\n if (oldKeyValueArray === NO_CHANGE) {\n // On first execution the oldKeyValueArray is NO_CHANGE => treat it as empty KeyValueArray.\n oldKeyValueArray = EMPTY_ARRAY;\n }\n let oldIndex = 0;\n let newIndex = 0;\n let oldKey = 0 < oldKeyValueArray.length ? oldKeyValueArray[0] : null;\n let newKey = 0 < newKeyValueArray.length ? newKeyValueArray[0] : null;\n while (oldKey !== null || newKey !== null) {\n ngDevMode && assertLessThan(oldIndex, 999, 'Are we stuck in infinite loop?');\n ngDevMode && assertLessThan(newIndex, 999, 'Are we stuck in infinite loop?');\n const oldValue = oldIndex < oldKeyValueArray.length ? oldKeyValueArray[oldIndex + 1] : undefined;\n const newValue = newIndex < newKeyValueArray.length ? newKeyValueArray[newIndex + 1] : undefined;\n let setKey = null;\n let setValue = undefined;\n if (oldKey === newKey) {\n // UPDATE: Keys are equal => new value is overwriting old value.\n oldIndex += 2;\n newIndex += 2;\n if (oldValue !== newValue) {\n setKey = newKey;\n setValue = newValue;\n }\n }\n else if (newKey === null || oldKey !== null && oldKey < newKey) {\n // DELETE: oldKey key is missing or we did not find the oldKey in the newValue\n // (because the keyValueArray is sorted and `newKey` is found later alphabetically).\n // `\"background\" < \"color\"` so we need to delete `\"background\"` because it is not found in the\n // new array.\n oldIndex += 2;\n setKey = oldKey;\n }\n else {\n // CREATE: newKey's is earlier alphabetically than oldKey's (or no oldKey) => we have new key.\n // `\"color\" > \"background\"` so we need to add `color` because it is in new array but not in\n // old array.\n ngDevMode && assertDefined(newKey, 'Expecting to have a valid key');\n newIndex += 2;\n setKey = newKey;\n setValue = newValue;\n }\n if (setKey !== null) {\n updateStyling(tView, tNode, lView, renderer, setKey, setValue, isClassBased, bindingIndex);\n }\n oldKey = oldIndex < oldKeyValueArray.length ? oldKeyValueArray[oldIndex] : null;\n newKey = newIndex < newKeyValueArray.length ? newKeyValueArray[newIndex] : null;\n }\n}\n/**\n * Update a simple (property name) styling.\n *\n * This function takes `prop` and updates the DOM to that value. The function takes the binding\n * value as well as binding priority into consideration to determine which value should be written\n * to DOM. (For example it may be determined that there is a higher priority overwrite which blocks\n * the DOM write, or if the value goes to `undefined` a lower priority overwrite may be consulted.)\n *\n * @param tView Associated `TView.data` contains the linked list of binding priorities.\n * @param tNode `TNode` where the binding is located.\n * @param lView `LView` contains the values associated with other styling binding at this `TNode`.\n * @param renderer Renderer to use if any updates.\n * @param prop Either style property name or a class name.\n * @param value Either style value for `prop` or `true`/`false` if `prop` is class.\n * @param isClassBased `true` if `class` (`false` if `style`)\n * @param bindingIndex Binding index of the binding.\n */\nfunction updateStyling(tView, tNode, lView, renderer, prop, value, isClassBased, bindingIndex) {\n if (!(tNode.type & 3 /* TNodeType.AnyRNode */)) {\n // It is possible to have styling on non-elements (such as ng-container).\n // This is rare, but it does happen. In such a case, just ignore the binding.\n return;\n }\n const tData = tView.data;\n const tRange = tData[bindingIndex + 1];\n const higherPriorityValue = getTStylingRangeNextDuplicate(tRange) ?\n findStylingValue(tData, tNode, lView, prop, getTStylingRangeNext(tRange), isClassBased) :\n undefined;\n if (!isStylingValuePresent(higherPriorityValue)) {\n // We don't have a next duplicate, or we did not find a duplicate value.\n if (!isStylingValuePresent(value)) {\n // We should delete current value or restore to lower priority value.\n if (getTStylingRangePrevDuplicate(tRange)) {\n // We have a possible prev duplicate, let's retrieve it.\n value = findStylingValue(tData, null, lView, prop, bindingIndex, isClassBased);\n }\n }\n const rNode = getNativeByIndex(getSelectedIndex(), lView);\n applyStyling(renderer, isClassBased, rNode, prop, value);\n }\n}\n/**\n * Search for styling value with higher priority which is overwriting current value, or a\n * value of lower priority to which we should fall back if the value is `undefined`.\n *\n * When value is being applied at a location, related values need to be consulted.\n * - If there is a higher priority binding, we should be using that one instead.\n * For example `<div [style]=\"{color:exp1}\" [style.color]=\"exp2\">` change to `exp1`\n * requires that we check `exp2` to see if it is set to value other than `undefined`.\n * - If there is a lower priority binding and we are changing to `undefined`\n * For example `<div [style]=\"{color:exp1}\" [style.color]=\"exp2\">` change to `exp2` to\n * `undefined` requires that we check `exp1` (and static values) and use that as new value.\n *\n * NOTE: The styling stores two values.\n * 1. The raw value which came from the application is stored at `index + 0` location. (This value\n * is used for dirty checking).\n * 2. The normalized value is stored at `index + 1`.\n *\n * @param tData `TData` used for traversing the priority.\n * @param tNode `TNode` to use for resolving static styling. Also controls search direction.\n * - `TNode` search next and quit as soon as `isStylingValuePresent(value)` is true.\n * If no value found consult `tNode.residualStyle`/`tNode.residualClass` for default value.\n * - `null` search prev and go all the way to end. Return last value where\n * `isStylingValuePresent(value)` is true.\n * @param lView `LView` used for retrieving the actual values.\n * @param prop Property which we are interested in.\n * @param index Starting index in the linked list of styling bindings where the search should start.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nfunction findStylingValue(tData, tNode, lView, prop, index, isClassBased) {\n // `TNode` to use for resolving static styling. Also controls search direction.\n // - `TNode` search next and quit as soon as `isStylingValuePresent(value)` is true.\n // If no value found consult `tNode.residualStyle`/`tNode.residualClass` for default value.\n // - `null` search prev and go all the way to end. Return last value where\n // `isStylingValuePresent(value)` is true.\n const isPrevDirection = tNode === null;\n let value = undefined;\n while (index > 0) {\n const rawKey = tData[index];\n const containsStatics = Array.isArray(rawKey);\n // Unwrap the key if we contain static values.\n const key = containsStatics ? rawKey[1] : rawKey;\n const isStylingMap = key === null;\n let valueAtLViewIndex = lView[index + 1];\n if (valueAtLViewIndex === NO_CHANGE) {\n // In firstUpdatePass the styling instructions create a linked list of styling.\n // On subsequent passes it is possible for a styling instruction to try to read a binding\n // which\n // has not yet executed. In that case we will find `NO_CHANGE` and we should assume that\n // we have `undefined` (or empty array in case of styling-map instruction) instead. This\n // allows the resolution to apply the value (which may later be overwritten when the\n // binding actually executes.)\n valueAtLViewIndex = isStylingMap ? EMPTY_ARRAY : undefined;\n }\n let currentValue = isStylingMap ? keyValueArrayGet(valueAtLViewIndex, prop) :\n (key === prop ? valueAtLViewIndex : undefined);\n if (containsStatics && !isStylingValuePresent(currentValue)) {\n currentValue = keyValueArrayGet(rawKey, prop);\n }\n if (isStylingValuePresent(currentValue)) {\n value = currentValue;\n if (isPrevDirection) {\n return value;\n }\n }\n const tRange = tData[index + 1];\n index = isPrevDirection ? getTStylingRangePrev(tRange) : getTStylingRangeNext(tRange);\n }\n if (tNode !== null) {\n // in case where we are going in next direction AND we did not find anything, we need to\n // consult residual styling\n let residual = isClassBased ? tNode.residualClasses : tNode.residualStyles;\n if (residual != null /** OR residual !=== undefined */) {\n value = keyValueArrayGet(residual, prop);\n }\n }\n return value;\n}\n/**\n * Determines if the binding value should be used (or if the value is 'undefined' and hence priority\n * resolution should be used.)\n *\n * @param value Binding style value.\n */\nfunction isStylingValuePresent(value) {\n // Currently only `undefined` value is considered non-binding. That is `undefined` says I don't\n // have an opinion as to what this binding should be and you should consult other bindings by\n // priority to determine the valid value.\n // This is extracted into a single function so that we have a single place to control this.\n return value !== undefined;\n}\n/**\n * Normalizes and/or adds a suffix to the value.\n *\n * If value is `null`/`undefined` no suffix is added\n * @param value\n * @param suffix\n */\nfunction normalizeSuffix(value, suffix) {\n if (value == null /** || value === undefined */) {\n // do nothing\n }\n else if (typeof suffix === 'string') {\n value = value + suffix;\n }\n else if (typeof value === 'object') {\n value = stringify(unwrapSafeValue(value));\n }\n return value;\n}\n/**\n * Tests if the `TNode` has input shadow.\n *\n * An input shadow is when a directive steals (shadows) the input by using `@Input('style')` or\n * `@Input('class')` as input.\n *\n * @param tNode `TNode` which we would like to see if it has shadow.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nfunction hasStylingInputShadow(tNode, isClassBased) {\n return (tNode.flags & (isClassBased ? 8 /* TNodeFlags.hasClassInput */ : 16 /* TNodeFlags.hasStyleInput */)) !== 0;\n}\n\n/**\n * 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('tViews') || value.hasOwnProperty('currentCaseLViewIndex'))) {\n throwError('We expect to get \\'null\\'|\\'TIcu\\'|\\'TIcuContainer\\', but got: ' + value);\n }\n // Here the `value.hasOwnProperty('currentCaseLViewIndex')` is a polymorphic read as it can be\n // either TIcu or TIcuContainerNode. This is not ideal, but we still think it is OK because it\n // will be just two cases which fits into the browser inline cache (inline cache can take up to\n // 4)\n const tIcu = value.hasOwnProperty('currentCaseLViewIndex') ? value :\n value.value;\n ngDevMode && assertTIcu(tIcu);\n return tIcu;\n}\n/**\n * Store `TIcu` at a give `index`.\n *\n * The `TIcu` can be stored either directly (if it is nested ICU) OR\n * it is stored inside tho `TIcuContainer` if it is top level ICU.\n *\n * The reason for this is that the top level ICU need a `TNode` so that they are part of the render\n * tree, but nested ICU's have no TNode, because we don't know ahead of time if the nested ICU is\n * expressed (parent ICU may have selected a case which does not contain it.)\n *\n * @param tView Current `TView`.\n * @param index Index where the value should be stored at in `Tview.data`\n * @param tIcu The TIcu to store.\n */\nfunction setTIcu(tView, index, tIcu) {\n const tNode = tView.data[index];\n ngDevMode &&\n assertEqual(tNode === null || tNode.hasOwnProperty('tViews'), true, 'We expect to get \\'null\\'|\\'TIcuContainer\\'');\n if (tNode === null) {\n tView.data[index] = tIcu;\n }\n else {\n ngDevMode && assertTNodeType(tNode, 32 /* TNodeType.Icu */);\n tNode.value = tIcu;\n }\n}\n/**\n * Set `TNode.insertBeforeIndex` taking the `Array` into account.\n *\n * See `TNode.insertBeforeIndex`\n */\nfunction setTNodeInsertBeforeIndex(tNode, index) {\n ngDevMode && assertTNode(tNode);\n let insertBeforeIndex = tNode.insertBeforeIndex;\n if (insertBeforeIndex === null) {\n setI18nHandling(getInsertInFrontOfRNodeWithI18n, processI18nInsertBefore);\n insertBeforeIndex = tNode.insertBeforeIndex =\n [null /* may be updated to number later */, index];\n }\n else {\n assertEqual(Array.isArray(insertBeforeIndex), true, 'Expecting array here');\n insertBeforeIndex.push(index);\n }\n}\n/**\n * Create `TNode.type=TNodeType.Placeholder` node.\n *\n * See `TNodeType.Placeholder` for more information.\n */\nfunction createTNodePlaceholder(tView, previousTNodes, index) {\n const tNode = createTNodeAtIndex(tView, index, 64 /* TNodeType.Placeholder */, null, null);\n addTNodeAndUpdateInsertBeforeIndex(previousTNodes, tNode);\n return tNode;\n}\n/**\n * Returns current ICU case.\n *\n * ICU cases are stored as index into the `TIcu.cases`.\n * At times it is necessary to communicate that the ICU case just switched and that next ICU update\n * should update all bindings regardless of the mask. In such a case the we store negative numbers\n * for cases which have just been switched. This function removes the negative flag.\n */\nfunction getCurrentICUCaseIndex(tIcu, lView) {\n const currentCase = lView[tIcu.currentCaseLViewIndex];\n return currentCase === null ? currentCase : (currentCase < 0 ? ~currentCase : currentCase);\n}\nfunction getParentFromIcuCreateOpCode(mergedCode) {\n return mergedCode >>> 17 /* IcuCreateOpCode.SHIFT_PARENT */;\n}\nfunction getRefFromIcuCreateOpCode(mergedCode) {\n return (mergedCode & 131070 /* IcuCreateOpCode.MASK_REF */) >>> 1 /* IcuCreateOpCode.SHIFT_REF */;\n}\nfunction getInstructionFromIcuCreateOpCode(mergedCode) {\n return mergedCode & 1 /* IcuCreateOpCode.MASK_INSTRUCTION */;\n}\nfunction icuCreateOpCode(opCode, parentIdx, refIdx) {\n ngDevMode && assertGreaterThanOrEqual(parentIdx, 0, 'Missing parent index');\n ngDevMode && assertGreaterThan(refIdx, 0, 'Missing ref index');\n return opCode | parentIdx << 17 /* IcuCreateOpCode.SHIFT_PARENT */ | refIdx << 1 /* IcuCreateOpCode.SHIFT_REF */;\n}\n\n/**\n * 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.template !== undefined && obj.declaredInputs !== undefined;\n}\n/**\n * Retrieve the component `LView` from component/element.\n *\n * NOTE: `LView` is a private and should not be leaked outside.\n * Don't export this method to `ng.*` on window.\n *\n * @param target DOM element or component instance for which to retrieve the LView.\n */\nfunction getComponentLView(target) {\n const lContext = getLContext(target);\n const nodeIndx = lContext.nodeIndex;\n const lView = lContext.lView;\n ngDevMode && assertLView(lView);\n const componentLView = lView[nodeIndx];\n ngDevMode && assertLView(componentLView);\n return componentLView;\n}\n/** Asserts that a value is a DOM Element. */\nfunction assertDomElement(value) {\n if (typeof Element !== 'undefined' && !(value instanceof Element)) {\n throw new Error('Expecting instance of DOM Element');\n }\n}\n\n/**\n * 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 return this._results[getSymbolIterator()]();\n}\n/**\n * An unmodifiable list of items that Angular keeps up to date when the state\n * of the application changes.\n *\n * The type of object that {@link ViewChildren}, {@link ContentChildren}, and {@link QueryList}\n * provide.\n *\n * Implements an iterable interface, therefore it can be used in both ES6\n * javascript `for (var i of items)` loops as well as in Angular templates with\n * `*ngFor=\"let i of myList\"`.\n *\n * Changes can be observed by subscribing to the changes `Observable`.\n *\n * NOTE: In the future this class will implement an `Observable` interface.\n *\n * @usageNotes\n * ### Example\n * ```typescript\n * @Component({...})\n * class Container {\n * @ViewChildren(Item) items:QueryList<Item>;\n * }\n * ```\n *\n * @publicApi\n */\nclass QueryList {\n /**\n * 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 // [getSymbolIterator()](): Iterator<T> { ... }\n const symbol = getSymbolIterator();\n const proto = QueryList.prototype;\n if (!proto[symbol])\n proto[symbol] = 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.tViews;\n const embeddedLView = createLView(this._declarationLView, embeddedTView, context, 16 /* LViewFlags.CheckAlways */, null, embeddedTView.declTNode, null, null, null, null, injector || null);\n const declarationLContainer = this._declarationLView[this._declarationTContainer.index];\n ngDevMode && assertLContainer(declarationLContainer);\n embeddedLView[DECLARATION_LCONTAINER] = declarationLContainer;\n const declarationViewLQueries = this._declarationLView[QUERIES];\n if (declarationViewLQueries !== null) {\n embeddedLView[QUERIES] = declarationViewLQueries.createEmbeddedView(embeddedTView);\n }\n renderView(embeddedTView, embeddedLView, context);\n return new ViewRef$1(embeddedLView);\n }\n};\n/**\n * Creates a TemplateRef given a node.\n *\n * @returns The TemplateRef instance to use\n */\nfunction injectTemplateRef() {\n return createTemplateRef(getCurrentTNode(), getLView());\n}\n/**\n * Creates a TemplateRef and stores it on the injector.\n *\n * @param hostTNode The node on which a TemplateRef is requested\n * @param hostLView The `LView` to which the node belongs\n * @returns The TemplateRef instance or null if we can't create a TemplateRef on a given node type\n */\nfunction createTemplateRef(hostTNode, hostLView) {\n if (hostTNode.type & 4 /* TNodeType.Container */) {\n ngDevMode && assertDefined(hostTNode.tViews, 'TView must be allocated');\n return new R3TemplateRef(hostLView, hostTNode, createElementRef(hostTNode, hostLView));\n }\n return null;\n}\n\n/**\n * Represents a container where one or more views can be attached to a component.\n *\n * Can contain *host views* (created by instantiating a\n * component with the `createComponent()` method), and *embedded views*\n * (created by instantiating a `TemplateRef` with the `createEmbeddedView()` method).\n *\n * A view container instance can contain other view containers,\n * creating a [view hierarchy](guide/glossary#view-tree).\n *\n * @see `ComponentRef`\n * @see `EmbeddedViewRef`\n *\n * @publicApi\n */\nclass ViewContainerRef {\n}\n/**\n * @internal\n * @nocollapse\n */\nViewContainerRef.__NG_ELEMENT_ID__ = injectViewContainerRef;\n/**\n * Creates a ViewContainerRef and stores it on the injector. Or, if the ViewContainerRef\n * already exists, retrieves the existing ViewContainerRef.\n *\n * @returns The ViewContainerRef instance to use\n */\nfunction injectViewContainerRef() {\n const previousTNode = getCurrentTNode();\n return createContainerRef(previousTNode, getLView());\n}\nconst VE_ViewContainerRef = ViewContainerRef;\n// TODO(alxhub): cleaning up this indirection triggers a subtle bug in Closure in g3. Once the fix\n// for that lands, this can be cleaned up.\nconst R3ViewContainerRef = class ViewContainerRef extends VE_ViewContainerRef {\n constructor(_lContainer, _hostTNode, _hostLView) {\n super();\n this._lContainer = _lContainer;\n this._hostTNode = _hostTNode;\n this._hostLView = _hostLView;\n }\n get element() {\n return createElementRef(this._hostTNode, this._hostLView);\n }\n get injector() {\n return new NodeInjector(this._hostTNode, this._hostLView);\n }\n /** @deprecated No replacement */\n get parentInjector() {\n const parentLocation = getParentInjectorLocation(this._hostTNode, this._hostLView);\n if (hasParentInjector(parentLocation)) {\n const parentView = getParentInjectorView(parentLocation, this._hostLView);\n const injectorIndex = getParentInjectorIndex(parentLocation);\n ngDevMode && assertNodeInjector(parentView, injectorIndex);\n const parentTNode = parentView[TVIEW].data[injectorIndex + 8 /* NodeInjectorOffset.TNODE */];\n return new NodeInjector(parentTNode, parentView);\n }\n else {\n return new NodeInjector(null, this._hostLView);\n }\n }\n clear() {\n while (this.length > 0) {\n this.remove(this.length - 1);\n }\n }\n get(index) {\n const viewRefs = getViewRefs(this._lContainer);\n return viewRefs !== null && viewRefs[index] || null;\n }\n get length() {\n return this._lContainer.length - CONTAINER_HEADER_OFFSET;\n }\n createEmbeddedView(templateRef, context, indexOrOptions) {\n let index;\n let injector;\n if (typeof indexOrOptions === 'number') {\n index = indexOrOptions;\n }\n else if (indexOrOptions != null) {\n index = indexOrOptions.index;\n injector = indexOrOptions.injector;\n }\n const viewRef = templateRef.createEmbeddedView(context || {}, injector);\n this.insert(viewRef, index);\n return viewRef;\n }\n createComponent(componentFactoryOrType, indexOrOptions, injector, projectableNodes, environmentInjector) {\n const isComponentFactory = componentFactoryOrType && !isType(componentFactoryOrType);\n let index;\n // This function supports 2 signatures and we need to handle options correctly for both:\n // 1. When first argument is a Component type. This signature also requires extra\n // options to be provided as as object (more ergonomic option).\n // 2. First argument is a Component factory. In this case extra options are represented as\n // positional arguments. This signature is less ergonomic and will be deprecated.\n if (isComponentFactory) {\n if (ngDevMode) {\n assertEqual(typeof indexOrOptions !== 'object', true, 'It looks like Component factory was provided as the first argument ' +\n 'and an options object as the second argument. This combination of arguments ' +\n 'is incompatible. You can either change the first argument to provide Component ' +\n 'type or change the second argument to be a number (representing an index at ' +\n 'which to insert the new component\\'s host view into this container)');\n }\n index = indexOrOptions;\n }\n else {\n if (ngDevMode) {\n assertDefined(getComponentDef(componentFactoryOrType), `Provided Component class doesn't contain Component definition. ` +\n `Please check whether provided class has @Component decorator.`);\n assertEqual(typeof indexOrOptions !== 'number', true, 'It looks like Component type was provided as the first argument ' +\n 'and a number (representing an index at which to insert the new component\\'s ' +\n 'host view into this container as the second argument. This combination of arguments ' +\n 'is incompatible. Please use an object as the second argument instead.');\n }\n const options = (indexOrOptions || {});\n if (ngDevMode && options.environmentInjector && options.ngModuleRef) {\n throwError(`Cannot pass both environmentInjector and ngModuleRef options to createComponent().`);\n }\n index = options.index;\n injector = options.injector;\n projectableNodes = options.projectableNodes;\n environmentInjector = options.environmentInjector || options.ngModuleRef;\n }\n const componentFactory = isComponentFactory ?\n componentFactoryOrType :\n new ComponentFactory(getComponentDef(componentFactoryOrType));\n const contextInjector = injector || this.parentInjector;\n // If an `NgModuleRef` is not provided explicitly, try retrieving it from the DI tree.\n if (!environmentInjector && componentFactory.ngModule == null) {\n // For the `ComponentFactory` case, entering this logic is very unlikely, since we expect that\n // an instance of a `ComponentFactory`, resolved via `ComponentFactoryResolver` would have an\n // `ngModule` field. This is possible in some test scenarios and potentially in some JIT-based\n // use-cases. For the `ComponentFactory` case we preserve backwards-compatibility and try\n // using a provided injector first, then fall back to the parent injector of this\n // `ViewContainerRef` instance.\n //\n // For the factory-less case, it's critical to establish a connection with the module\n // injector tree (by retrieving an instance of an `NgModuleRef` and accessing its injector),\n // so that a component can use DI tokens provided in MgModules. For this reason, we can not\n // rely on the provided injector, since it might be detached from the DI tree (for example, if\n // it was created via `Injector.create` without specifying a parent injector, or if an\n // injector is retrieved from an `NgModuleRef` created via `createNgModule` using an\n // NgModule outside of a module tree). Instead, we always use `ViewContainerRef`'s parent\n // injector, which is normally connected to the DI tree, which includes module injector\n // subtree.\n const _injector = isComponentFactory ? contextInjector : this.parentInjector;\n // DO NOT REFACTOR. The code here used to have a `injector.get(NgModuleRef, null) ||\n // undefined` expression which seems to cause internal google apps to fail. This is documented\n // in the following internal bug issue: go/b/142967802\n const result = _injector.get(EnvironmentInjector, null);\n if (result) {\n environmentInjector = result;\n }\n }\n const componentRef = componentFactory.create(contextInjector, projectableNodes, undefined, environmentInjector);\n this.insert(componentRef.hostView, index);\n return componentRef;\n }\n insert(viewRef, index) {\n const lView = viewRef._lView;\n const tView = lView[TVIEW];\n if (ngDevMode && viewRef.destroyed) {\n throw new Error('Cannot insert a destroyed View in a ViewContainer!');\n }\n if (viewAttachedToContainer(lView)) {\n // If view is already attached, detach it first so we clean up references appropriately.\n const prevIdx = this.indexOf(viewRef);\n // A view might be attached either to this or a different container. The `prevIdx` for\n // those cases will be:\n // equal to -1 for views attached to this ViewContainerRef\n // >= 0 for views attached to a different ViewContainerRef\n if (prevIdx !== -1) {\n this.detach(prevIdx);\n }\n else {\n const prevLContainer = lView[PARENT];\n ngDevMode &&\n assertEqual(isLContainer(prevLContainer), true, 'An attached view should have its PARENT point to a container.');\n // We need to re-create a R3ViewContainerRef instance since those are not stored on\n // LView (nor anywhere else).\n const prevVCRef = new R3ViewContainerRef(prevLContainer, prevLContainer[T_HOST], prevLContainer[PARENT]);\n prevVCRef.detach(prevVCRef.indexOf(viewRef));\n }\n }\n // Logical operation of adding `LView` to `LContainer`\n const adjustedIdx = this._adjustIndex(index);\n const lContainer = this._lContainer;\n insertView(tView, lView, lContainer, adjustedIdx);\n // Physical operation of adding the DOM nodes.\n const beforeNode = getBeforeNodeForView(adjustedIdx, lContainer);\n const renderer = lView[RENDERER];\n const parentRNode = nativeParentNode(renderer, lContainer[NATIVE]);\n if (parentRNode !== null) {\n addViewToContainer(tView, lContainer[T_HOST], renderer, lView, parentRNode, beforeNode);\n }\n viewRef.attachToViewContainerRef();\n addToArray(getOrCreateViewRefs(lContainer), adjustedIdx, viewRef);\n return viewRef;\n }\n move(viewRef, newIndex) {\n if (ngDevMode && viewRef.destroyed) {\n throw new Error('Cannot move a destroyed View in a ViewContainer!');\n }\n return this.insert(viewRef, newIndex);\n }\n indexOf(viewRef) {\n const viewRefsArr = getViewRefs(this._lContainer);\n return viewRefsArr !== null ? viewRefsArr.indexOf(viewRef) : -1;\n }\n remove(index) {\n const adjustedIdx = this._adjustIndex(index, -1);\n const detachedView = detachView(this._lContainer, adjustedIdx);\n if (detachedView) {\n // Before destroying the view, remove it from the container's array of `ViewRef`s.\n // This ensures the view container length is updated before calling\n // `destroyLView`, which could recursively call view container methods that\n // rely on an accurate container length.\n // (e.g. a method on this view container being called by a child directive's OnDestroy\n // lifecycle hook)\n removeFromArray(getOrCreateViewRefs(this._lContainer), adjustedIdx);\n destroyLView(detachedView[TVIEW], detachedView);\n }\n }\n detach(index) {\n const adjustedIdx = this._adjustIndex(index, -1);\n const view = detachView(this._lContainer, adjustedIdx);\n const wasDetached = view && removeFromArray(getOrCreateViewRefs(this._lContainer), adjustedIdx) != null;\n return wasDetached ? new ViewRef$1(view) : null;\n }\n _adjustIndex(index, shift = 0) {\n if (index == null) {\n return this.length + shift;\n }\n if (ngDevMode) {\n assertGreaterThan(index, -1, `ViewRef index must be positive, got ${index}`);\n // +1 because it's legal to insert at the end.\n assertLessThan(index, this.length + 1 + shift, 'index');\n }\n return index;\n }\n};\nfunction getViewRefs(lContainer) {\n return lContainer[VIEW_REFS];\n}\nfunction getOrCreateViewRefs(lContainer) {\n return (lContainer[VIEW_REFS] || (lContainer[VIEW_REFS] = []));\n}\n/**\n * Creates a ViewContainerRef and stores it on the injector.\n *\n * @param ViewContainerRefToken The ViewContainerRef type\n * @param ElementRefToken The ElementRef type\n * @param hostTNode The node that is requesting a ViewContainerRef\n * @param hostLView The view to which the node belongs\n * @returns The ViewContainerRef instance to use\n */\nfunction createContainerRef(hostTNode, hostLView) {\n ngDevMode && assertTNodeType(hostTNode, 12 /* TNodeType.AnyContainer */ | 3 /* TNodeType.AnyRNode */);\n let lContainer;\n const slotValue = hostLView[hostTNode.index];\n if (isLContainer(slotValue)) {\n // If the host is a container, we don't need to create a new LContainer\n lContainer = slotValue;\n }\n else {\n let commentNode;\n // If the host is an element container, the native host element is guaranteed to be a\n // comment and we can reuse that comment as anchor element for the new LContainer.\n // The comment node in question is already part of the DOM structure so we don't need to append\n // it again.\n if (hostTNode.type & 8 /* TNodeType.ElementContainer */) {\n commentNode = unwrapRNode(slotValue);\n }\n else {\n // If the host is a regular element, we have to insert a comment node manually which will\n // be used as an anchor when inserting elements. In this specific case we use low-level DOM\n // manipulation to insert it.\n const renderer = hostLView[RENDERER];\n ngDevMode && ngDevMode.rendererCreateComment++;\n commentNode = renderer.createComment(ngDevMode ? 'container' : '');\n const hostNative = getNativeByTNode(hostTNode, hostLView);\n const parentOfHostNative = nativeParentNode(renderer, hostNative);\n nativeInsertBefore(renderer, parentOfHostNative, commentNode, nativeNextSibling(renderer, hostNative), false);\n }\n hostLView[hostTNode.index] = lContainer =\n createLContainer(slotValue, hostLView, commentNode, hostTNode);\n addToViewTree(hostLView, lContainer);\n }\n return new R3ViewContainerRef(lContainer, hostTNode, hostLView);\n}\n\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 isStandalone: !!metadata.standalone,\n };\n compilationDepth++;\n try {\n if (meta.usesInheritance) {\n addDirectiveDefToUndecoratedParents(type);\n }\n ngComponentDef =\n compiler.compileComponent(angularCoreEnv, templateUrl, meta);\n if (metadata.standalone) {\n // Patch the component definition for standalone components with `directiveDefs` and\n // `pipeDefs` functions which lazily compute the directives/pipes available in the\n // standalone component. Also set `dependencies` to the lazily resolved list of imports.\n const imports = flatten(metadata.imports || EMPTY_ARRAY);\n const { directiveDefs, pipeDefs } = getStandaloneDefFunctions(type, imports);\n ngComponentDef.directiveDefs = directiveDefs;\n ngComponentDef.pipeDefs = pipeDefs;\n ngComponentDef.dependencies = () => imports.map(resolveForwardRef);\n }\n }\n finally {\n // Ensure that the compilation depth is decremented even when the compilation failed.\n compilationDepth--;\n }\n if (compilationDepth === 0) {\n // When NgModule decorator executed, we enqueued the module definition such that\n // it would only dequeue and add itself as module scope to all of its declarations,\n // but only if if all of its declarations had resolved. This call runs the check\n // to see if any modules that are in the queue can be dequeued and add scope to\n // their declarations.\n flushModuleScopingQueueAsMuchAsPossible();\n }\n // If component compilation is async, then the @NgModule annotation which declares the\n // component may execute and set an ngSelectorScope property on the component type. This\n // allows the component to patch itself with directiveDefs from the module after it\n // finishes compiling.\n if (hasSelectorScope(type)) {\n const scopes = transitiveScopesFor(type.ngSelectorScope);\n patchComponentDefWithScope(ngComponentDef, scopes);\n }\n if (metadata.schemas) {\n if (metadata.standalone) {\n ngComponentDef.schemas = metadata.schemas;\n }\n else {\n throw new Error(`The 'schemas' was specified for the ${stringifyForError(type)} but is only valid on a component that is standalone.`);\n }\n }\n else if (metadata.standalone) {\n ngComponentDef.schemas = [];\n }\n }\n return ngComponentDef;\n },\n // Make the property configurable in dev mode to allow overriding in tests\n configurable: !!ngDevMode,\n });\n}\nfunction getDependencyTypeForError(type) {\n if (getComponentDef(type))\n return 'component';\n if (getDirectiveDef(type))\n return 'directive';\n if (getPipeDef$1(type))\n return 'pipe';\n return 'type';\n}\nfunction verifyStandaloneImport(depType, importingType) {\n if (isForwardRef(depType)) {\n depType = resolveForwardRef(depType);\n if (!depType) {\n throw new Error(`Expected forwardRef function, imported from \"${stringifyForError(importingType)}\", to return a standalone entity or NgModule but got \"${stringifyForError(depType) || depType}\".`);\n }\n }\n if (getNgModuleDef(depType) == null) {\n const def = getComponentDef(depType) || getDirectiveDef(depType) || getPipeDef$1(depType);\n if (def != null) {\n // if a component, directive or pipe is imported make sure that it is standalone\n if (!def.standalone) {\n throw new Error(`The \"${stringifyForError(depType)}\" ${getDependencyTypeForError(depType)}, imported from \"${stringifyForError(importingType)}\", is not standalone. Did you forget to add the standalone: true flag?`);\n }\n }\n else {\n // it can be either a module with provider or an unknown (not annotated) type\n if (isModuleWithProviders(depType)) {\n throw new Error(`A module with providers was imported from \"${stringifyForError(importingType)}\". Modules with providers are not supported in standalone components imports.`);\n }\n else {\n throw new Error(`The \"${stringifyForError(depType)}\" type, imported from \"${stringifyForError(importingType)}\", must be a standalone component / directive / pipe or an NgModule. Did you forget to add the required @Component / @Directive / @Pipe or @NgModule annotation?`);\n }\n }\n }\n}\n/**\n * Build memoized `directiveDefs` and `pipeDefs` functions for the component definition of a\n * standalone component, which process `imports` and filter out directives and pipes. The use of\n * memoized functions here allows for the delayed resolution of any `forwardRef`s present in the\n * component's `imports`.\n */\nfunction getStandaloneDefFunctions(type, imports) {\n let cachedDirectiveDefs = null;\n let cachedPipeDefs = null;\n const directiveDefs = () => {\n if (cachedDirectiveDefs === null) {\n // Standalone components are always able to self-reference, so include the component's own\n // definition in its `directiveDefs`.\n cachedDirectiveDefs = [getComponentDef(type)];\n const seen = new Set();\n for (const rawDep of imports) {\n ngDevMode && verifyStandaloneImport(rawDep, type);\n const dep = resolveForwardRef(rawDep);\n if (seen.has(dep)) {\n continue;\n }\n seen.add(dep);\n if (!!getNgModuleDef(dep)) {\n const scope = transitiveScopesFor(dep);\n for (const dir of scope.exported.directives) {\n const def = getComponentDef(dir) || getDirectiveDef(dir);\n if (def && !seen.has(dir)) {\n seen.add(dir);\n cachedDirectiveDefs.push(def);\n }\n }\n }\n else {\n const def = getComponentDef(dep) || getDirectiveDef(dep);\n if (def) {\n cachedDirectiveDefs.push(def);\n }\n }\n }\n }\n return cachedDirectiveDefs;\n };\n const pipeDefs = () => {\n if (cachedPipeDefs === null) {\n cachedPipeDefs = [];\n const seen = new Set();\n for (const rawDep of imports) {\n const dep = resolveForwardRef(rawDep);\n if (seen.has(dep)) {\n continue;\n }\n seen.add(dep);\n if (!!getNgModuleDef(dep)) {\n const scope = transitiveScopesFor(dep);\n for (const pipe of scope.exported.pipes) {\n const def = getPipeDef$1(pipe);\n if (def && !seen.has(pipe)) {\n seen.add(pipe);\n cachedPipeDefs.push(def);\n }\n }\n }\n else {\n const def = getPipeDef$1(dep);\n if (def) {\n cachedPipeDefs.push(def);\n }\n }\n }\n }\n return cachedPipeDefs;\n };\n return {\n directiveDefs,\n pipeDefs,\n };\n}\nfunction hasSelectorScope(component) {\n return component.ngSelectorScope !== undefined;\n}\n/**\n * Compile an Angular directive according to its decorator metadata, and patch the resulting\n * directive def onto the component type.\n *\n * In the event that compilation is not immediate, `compileDirective` will return a `Promise` which\n * will resolve when compilation completes and the directive becomes usable.\n */\nfunction compileDirective(type, directive) {\n let ngDirectiveDef = null;\n addDirectiveFactoryDef(type, directive || {});\n Object.defineProperty(type, NG_DIR_DEF, {\n get: () => {\n if (ngDirectiveDef === null) {\n // `directive` can be null in the case of abstract directives as a base class\n // that use `@Directive()` with no selector. In that case, pass empty object to the\n // `directiveMetadata` function instead of null.\n const meta = getDirectiveMetadata(type, directive || {});\n const compiler = getCompilerFacade({ usage: 0 /* JitCompilerUsage.Decorator */, kind: 'directive', type });\n ngDirectiveDef =\n compiler.compileDirective(angularCoreEnv, meta.sourceMapUrl, meta.metadata);\n }\n return ngDirectiveDef;\n },\n // Make the property configurable in dev mode to allow overriding in tests\n configurable: !!ngDevMode,\n });\n}\nfunction getDirectiveMetadata(type, metadata) {\n const name = type && type.name;\n const sourceMapUrl = `ng:///${name}/ɵdir.js`;\n const compiler = getCompilerFacade({ usage: 0 /* JitCompilerUsage.Decorator */, kind: 'directive', type });\n const facade = directiveMetadata(type, metadata);\n facade.typeSourceSpan = compiler.createParseSourceSpan('Directive', name, sourceMapUrl);\n if (facade.usesInheritance) {\n addDirectiveDefToUndecoratedParents(type);\n }\n return { metadata: facade, sourceMapUrl };\n}\nfunction addDirectiveFactoryDef(type, metadata) {\n let ngFactoryDef = null;\n Object.defineProperty(type, NG_FACTORY_DEF, {\n get: () => {\n if (ngFactoryDef === null) {\n const meta = getDirectiveMetadata(type, metadata);\n const compiler = getCompilerFacade({ usage: 0 /* JitCompilerUsage.Decorator */, kind: 'directive', type });\n ngFactoryDef = compiler.compileFactory(angularCoreEnv, `ng:///${type.name}/ɵfac.js`, {\n name: meta.metadata.name,\n type: meta.metadata.type,\n typeArgumentCount: 0,\n deps: reflectDependencies(type),\n target: compiler.FactoryTarget.Directive\n });\n }\n return ngFactoryDef;\n },\n // Make the property configurable in dev mode to allow overriding in tests\n configurable: !!ngDevMode,\n });\n}\nfunction extendsDirectlyFromObject(type) {\n return Object.getPrototypeOf(type.prototype) === Object.prototype;\n}\n/**\n * Extract the `R3DirectiveMetadata` for a particular directive (either a `Directive` or a\n * `Component`).\n */\nfunction directiveMetadata(type, metadata) {\n // Reflect inputs and outputs.\n const reflect = getReflect();\n const propMetadata = reflect.ownPropMetadata(type);\n return {\n name: type.name,\n type: type,\n selector: metadata.selector !== undefined ? metadata.selector : null,\n host: metadata.host || EMPTY_OBJ,\n propMetadata: propMetadata,\n inputs: metadata.inputs || EMPTY_ARRAY,\n outputs: metadata.outputs || EMPTY_ARRAY,\n queries: extractQueriesMetadata(type, propMetadata, isContentQuery),\n lifecycle: { usesOnChanges: reflect.hasLifecycleHook(type, 'ngOnChanges') },\n typeSourceSpan: null,\n usesInheritance: !extendsDirectlyFromObject(type),\n exportAs: extractExportAs(metadata.exportAs),\n providers: metadata.providers || null,\n viewQueries: extractQueriesMetadata(type, propMetadata, isViewQuery),\n isStandalone: !!metadata.standalone,\n hostDirectives: metadata.hostDirectives?.map(directive => typeof directive === 'function' ? { directive } : directive) ||\n null\n };\n}\n/**\n * Adds a directive definition to all parent classes of a type that don't have an Angular decorator.\n */\nfunction addDirectiveDefToUndecoratedParents(type) {\n const objPrototype = Object.prototype;\n let parent = Object.getPrototypeOf(type.prototype).constructor;\n // Go up the prototype until we hit `Object`.\n while (parent && parent !== objPrototype) {\n // Since inheritance works if the class was annotated already, we only need to add\n // the def if there are no annotations and the def hasn't been created already.\n if (!getDirectiveDef(parent) && !getComponentDef(parent) &&\n shouldAddAbstractDirective(parent)) {\n compileDirective(parent, null);\n }\n parent = Object.getPrototypeOf(parent);\n }\n}\nfunction convertToR3QueryPredicate(selector) {\n return typeof selector === 'string' ? splitByComma(selector) : resolveForwardRef(selector);\n}\nfunction convertToR3QueryMetadata(propertyName, ann) {\n return {\n propertyName: propertyName,\n predicate: convertToR3QueryPredicate(ann.selector),\n descendants: ann.descendants,\n first: ann.first,\n read: ann.read ? ann.read : null,\n static: !!ann.static,\n emitDistinctChangesOnly: !!ann.emitDistinctChangesOnly,\n };\n}\nfunction extractQueriesMetadata(type, propMetadata, isQueryAnn) {\n const queriesMeta = [];\n for (const field in propMetadata) {\n if (propMetadata.hasOwnProperty(field)) {\n const annotations = propMetadata[field];\n annotations.forEach(ann => {\n if (isQueryAnn(ann)) {\n if (!ann.selector) {\n throw new Error(`Can't construct a query for the property \"${field}\" of ` +\n `\"${stringifyForError(type)}\" since the query selector wasn't defined.`);\n }\n if (annotations.some(isInputAnnotation)) {\n throw new Error(`Cannot combine @Input decorators with query decorators`);\n }\n queriesMeta.push(convertToR3QueryMetadata(field, ann));\n }\n });\n }\n }\n return queriesMeta;\n}\nfunction extractExportAs(exportAs) {\n return exportAs === undefined ? null : splitByComma(exportAs);\n}\nfunction isContentQuery(value) {\n const name = value.ngMetadataName;\n return name === 'ContentChild' || name === 'ContentChildren';\n}\nfunction isViewQuery(value) {\n const name = value.ngMetadataName;\n return name === 'ViewChild' || name === 'ViewChildren';\n}\nfunction isInputAnnotation(value) {\n return value.ngMetadataName === 'Input';\n}\nfunction splitByComma(value) {\n return value.split(',').map(piece => piece.trim());\n}\nconst LIFECYCLE_HOOKS = [\n 'ngOnChanges', 'ngOnInit', 'ngOnDestroy', 'ngDoCheck', 'ngAfterViewInit', 'ngAfterViewChecked',\n 'ngAfterContentInit', 'ngAfterContentChecked'\n];\nfunction shouldAddAbstractDirective(type) {\n const reflect = getReflect();\n if (LIFECYCLE_HOOKS.some(hookName => reflect.hasLifecycleHook(type, hookName))) {\n return true;\n }\n const propMetadata = reflect.propMetadata(type);\n for (const field in propMetadata) {\n const annotations = propMetadata[field];\n for (let i = 0; i < annotations.length; i++) {\n const current = annotations[i];\n const metadataName = current.ngMetadataName;\n if (isInputAnnotation(current) || isContentQuery(current) || isViewQuery(current) ||\n metadataName === 'Output' || metadataName === 'HostBinding' ||\n metadataName === 'HostListener') {\n return true;\n }\n }\n }\n return false;\n}\n\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 provides a set of callbacks to\n * be called for every component that is bootstrapped.\n *\n * Each callback must take a `ComponentRef` instance and return nothing.\n *\n * `(componentRef: ComponentRef) => void`\n *\n * @publicApi\n */\nconst APP_BOOTSTRAP_LISTENER = new InjectionToken('appBootstrapListener');\n/**\n * A [DI token](guide/glossary#di-token \"DI token definition\") that indicates the root directory of\n * the application\n * @publicApi\n */\nconst PACKAGE_ROOT_URL = new InjectionToken('Application Packages Root URL');\n// We keep this token here, rather than the animations package, so that modules that only care\n// about which animations module is loaded (e.g. the CDK) can retrieve it without having to\n// include extra dependencies. See #44970 for more context.\n/**\n * A [DI token](guide/glossary#di-token \"DI token definition\") that indicates which animations\n * module has been loaded.\n * @publicApi\n */\nconst ANIMATION_MODULE_TYPE = new InjectionToken('AnimationModuleType');\n\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\nlet _platformInjector = null;\n/**\n * Internal token to indicate whether having multiple bootstrapped platform should be allowed (only\n * one bootstrapped platform is allowed by default). This token helps to support SSR scenarios.\n */\nconst ALLOW_MULTIPLE_PLATFORMS = new InjectionToken('AllowMultipleToken');\n/**\n * Internal token that allows to register extra callbacks that should be invoked during the\n * `PlatformRef.destroy` operation. This token is needed to avoid a direct reference to the\n * `PlatformRef` class (i.e. register the callback via `PlatformRef.onDestroy`), thus making the\n * entire class tree-shakeable.\n */\nconst PLATFORM_DESTROY_LISTENERS = new InjectionToken('PlatformDestroyListeners');\nconst NG_DEV_MODE = typeof ngDevMode === 'undefined' || ngDevMode;\nfunction compileNgModuleFactory(injector, options, moduleType) {\n ngDevMode && assertNgModuleType(moduleType);\n const moduleFactory = new NgModuleFactory(moduleType);\n // All of the logic below is irrelevant for AOT-compiled code.\n if (typeof ngJitMode !== 'undefined' && !ngJitMode) {\n return Promise.resolve(moduleFactory);\n }\n const compilerOptions = injector.get(COMPILER_OPTIONS, []).concat(options);\n // Configure the compiler to use the provided options. This call may fail when multiple modules\n // are bootstrapped with incompatible options, as a component can only be compiled according to\n // a single set of options.\n setJitOptions({\n defaultEncapsulation: _lastDefined(compilerOptions.map(opts => opts.defaultEncapsulation)),\n preserveWhitespaces: _lastDefined(compilerOptions.map(opts => opts.preserveWhitespaces)),\n });\n if (isComponentResourceResolutionQueueEmpty()) {\n return Promise.resolve(moduleFactory);\n }\n const compilerProviders = _mergeArrays(compilerOptions.map(o => o.providers));\n // In case there are no compiler providers, we just return the module factory as\n // there won't be any resource loader. This can happen with Ivy, because AOT compiled\n // modules can be still passed through \"bootstrapModule\". In that case we shouldn't\n // unnecessarily require the JIT compiler.\n if (compilerProviders.length === 0) {\n return Promise.resolve(moduleFactory);\n }\n const compiler = getCompilerFacade({\n usage: 0 /* JitCompilerUsage.Decorator */,\n kind: 'NgModule',\n type: moduleType,\n });\n const compilerInjector = Injector.create({ providers: compilerProviders });\n const resourceLoader = compilerInjector.get(compiler.ResourceLoader);\n // The resource loader can also return a string while the \"resolveComponentResources\"\n // always expects a promise. Therefore we need to wrap the returned value in a promise.\n return resolveComponentResources(url => Promise.resolve(resourceLoader.get(url)))\n .then(() => moduleFactory);\n}\nfunction publishDefaultGlobalUtils() {\n ngDevMode && publishDefaultGlobalUtils$1();\n}\nfunction isBoundToModule(cf) {\n return cf.isBoundToModule;\n}\n/**\n * A token for third-party components that can register themselves with NgProbe.\n *\n * @publicApi\n */\nclass NgProbeToken {\n constructor(name, token) {\n this.name = name;\n this.token = token;\n }\n}\n/**\n * Creates a platform.\n * Platforms must be created on launch using this function.\n *\n * @publicApi\n */\nfunction createPlatform(injector) {\n if (_platformInjector && !_platformInjector.get(ALLOW_MULTIPLE_PLATFORMS, false)) {\n throw new RuntimeError(400 /* RuntimeErrorCode.MULTIPLE_PLATFORMS */, ngDevMode &&\n 'There can be only one platform. Destroy the previous one to create a new one.');\n }\n publishDefaultGlobalUtils();\n _platformInjector = injector;\n const platform = injector.get(PlatformRef);\n runPlatformInitializers(injector);\n return platform;\n}\n/**\n * The goal of this function is to bootstrap a platform injector,\n * but avoid referencing `PlatformRef` class.\n * This function is needed for bootstrapping a Standalone Component.\n */\nfunction createOrReusePlatformInjector(providers = []) {\n // If a platform injector already exists, it means that the platform\n // is already bootstrapped and no additional actions are required.\n if (_platformInjector)\n return _platformInjector;\n // Otherwise, setup a new platform injector and run platform initializers.\n const injector = createPlatformInjector(providers);\n _platformInjector = injector;\n publishDefaultGlobalUtils();\n runPlatformInitializers(injector);\n return injector;\n}\nfunction runPlatformInitializers(injector) {\n const inits = injector.get(PLATFORM_INITIALIZER, null);\n if (inits) {\n inits.forEach((init) => init());\n }\n}\n/**\n * Internal create application API that implements the core application creation logic and optional\n * bootstrap logic.\n *\n * Platforms (such as `platform-browser`) may require different set of application and platform\n * providers for an application to function correctly. As a result, platforms may use this function\n * internally and supply the necessary providers during the bootstrap, while exposing\n * platform-specific APIs as a part of their public API.\n *\n * @returns A promise that returns an `ApplicationRef` instance once resolved.\n */\nfunction internalCreateApplication(config) {\n const { rootComponent, appProviders, platformProviders } = config;\n if (NG_DEV_MODE && rootComponent !== undefined) {\n assertStandaloneComponentType(rootComponent);\n }\n const platformInjector = createOrReusePlatformInjector(platformProviders);\n const ngZone = getNgZone('zone.js', getNgZoneOptions());\n return ngZone.run(() => {\n // Create root application injector based on a set of providers configured at the platform\n // bootstrap level as well as providers passed to the bootstrap call by a user.\n const allAppProviders = [\n { provide: NgZone, useValue: ngZone },\n ...(appProviders || []), //\n ];\n const envInjector = createEnvironmentInjector(allAppProviders, platformInjector, 'Environment Injector');\n const exceptionHandler = envInjector.get(ErrorHandler, null);\n if (NG_DEV_MODE && !exceptionHandler) {\n throw new RuntimeError(402 /* RuntimeErrorCode.ERROR_HANDLER_NOT_FOUND */, 'No `ErrorHandler` found in the Dependency Injection tree.');\n }\n let onErrorSubscription;\n ngZone.runOutsideAngular(() => {\n onErrorSubscription = ngZone.onError.subscribe({\n next: (error) => {\n exceptionHandler.handleError(error);\n }\n });\n });\n // If the whole platform is destroyed, invoke the `destroy` method\n // for all bootstrapped applications as well.\n const destroyListener = () => envInjector.destroy();\n const onPlatformDestroyListeners = platformInjector.get(PLATFORM_DESTROY_LISTENERS);\n onPlatformDestroyListeners.add(destroyListener);\n envInjector.onDestroy(() => {\n onErrorSubscription.unsubscribe();\n onPlatformDestroyListeners.delete(destroyListener);\n });\n return _callAndReportToErrorHandler(exceptionHandler, ngZone, () => {\n const initStatus = envInjector.get(ApplicationInitStatus);\n initStatus.runInitializers();\n return initStatus.donePromise.then(() => {\n const localeId = envInjector.get(LOCALE_ID, DEFAULT_LOCALE_ID);\n setLocaleId(localeId || DEFAULT_LOCALE_ID);\n const appRef = envInjector.get(ApplicationRef);\n if (rootComponent !== undefined) {\n appRef.bootstrap(rootComponent);\n }\n return appRef;\n });\n });\n });\n}\n/**\n * Creates a factory for a platform. Can be used to provide or override `Providers` specific to\n * your application's runtime needs, such as `PLATFORM_INITIALIZER` and `PLATFORM_ID`.\n * @param parentPlatformFactory Another platform factory to modify. Allows you to compose factories\n * to build up configurations that might be required by different libraries or parts of the\n * application.\n * @param name Identifies the new platform factory.\n * @param providers A set of dependency providers for platforms created with the new factory.\n *\n * @publicApi\n */\nfunction createPlatformFactory(parentPlatformFactory, name, providers = []) {\n const desc = `Platform: ${name}`;\n const marker = new InjectionToken(desc);\n return (extraProviders = []) => {\n let platform = getPlatform();\n if (!platform || platform.injector.get(ALLOW_MULTIPLE_PLATFORMS, false)) {\n const platformProviders = [\n ...providers,\n ...extraProviders,\n { provide: marker, useValue: true }\n ];\n if (parentPlatformFactory) {\n parentPlatformFactory(platformProviders);\n }\n else {\n createPlatform(createPlatformInjector(platformProviders, desc));\n }\n }\n return assertPlatform(marker);\n };\n}\n/**\n * Checks that there is currently a platform that contains the given token as a provider.\n *\n * @publicApi\n */\nfunction assertPlatform(requiredToken) {\n const platform = getPlatform();\n if (!platform) {\n throw new RuntimeError(401 /* RuntimeErrorCode.PLATFORM_NOT_FOUND */, ngDevMode && 'No platform exists!');\n }\n if ((typeof ngDevMode === 'undefined' || ngDevMode) &&\n !platform.injector.get(requiredToken, null)) {\n throw new RuntimeError(400 /* RuntimeErrorCode.MULTIPLE_PLATFORMS */, 'A platform with a different configuration has been created. Please destroy it first.');\n }\n return platform;\n}\n/**\n * Helper function to create an instance of a platform injector (that maintains the 'platform'\n * scope).\n */\nfunction createPlatformInjector(providers = [], name) {\n return Injector.create({\n name,\n providers: [\n { provide: INJECTOR_SCOPE, useValue: 'platform' },\n { provide: PLATFORM_DESTROY_LISTENERS, useValue: new Set([() => _platformInjector = null]) },\n ...providers\n ],\n });\n}\n/**\n * Destroys the current Angular platform and all Angular applications on the page.\n * Destroys all modules and listeners registered with the platform.\n *\n * @publicApi\n */\nfunction destroyPlatform() {\n getPlatform()?.destroy();\n}\n/**\n * Returns the current platform.\n *\n * @publicApi\n */\nfunction getPlatform() {\n return _platformInjector?.get(PlatformRef) ?? null;\n}\n/**\n * The Angular platform is the entry point for Angular on a web page.\n * Each page has exactly one platform. Services (such as reflection) which are common\n * to every Angular application running on the page are bound in its scope.\n * A page's platform is initialized implicitly when a platform is created using a platform\n * factory such as `PlatformBrowser`, or explicitly by calling the `createPlatform()` function.\n *\n * @publicApi\n */\nclass PlatformRef {\n /** @internal */\n constructor(_injector) {\n this._injector = _injector;\n this._modules = [];\n this._destroyListeners = [];\n this._destroyed = false;\n }\n /**\n * Creates an instance of an `@NgModule` for the given platform.\n *\n * @deprecated Passing NgModule factories as the `PlatformRef.bootstrapModuleFactory` function\n * argument is deprecated. Use the `PlatformRef.bootstrapModule` API instead.\n */\n bootstrapModuleFactory(moduleFactory, options) {\n // Note: We need to create the NgZone _before_ we instantiate the module,\n // as instantiating the module creates some providers eagerly.\n // So we create a mini parent injector that just contains the new NgZone and\n // pass that as parent to the NgModuleFactory.\n const ngZone = getNgZone(options?.ngZone, getNgZoneOptions(options));\n const providers = [{ provide: NgZone, useValue: ngZone }];\n // Note: Create ngZoneInjector within ngZone.run so that all of the instantiated services are\n // created within the Angular zone\n // Do not try to replace ngZone.run with ApplicationRef#run because ApplicationRef would then be\n // created outside of the Angular zone.\n return ngZone.run(() => {\n const ngZoneInjector = Injector.create({ providers: providers, parent: this.injector, name: moduleFactory.moduleType.name });\n const moduleRef = moduleFactory.create(ngZoneInjector);\n const exceptionHandler = moduleRef.injector.get(ErrorHandler, null);\n if (!exceptionHandler) {\n throw new RuntimeError(402 /* RuntimeErrorCode.ERROR_HANDLER_NOT_FOUND */, ngDevMode && 'No ErrorHandler. Is platform module (BrowserModule) included?');\n }\n ngZone.runOutsideAngular(() => {\n const subscription = ngZone.onError.subscribe({\n next: (error) => {\n exceptionHandler.handleError(error);\n }\n });\n moduleRef.onDestroy(() => {\n remove(this._modules, moduleRef);\n subscription.unsubscribe();\n });\n });\n return _callAndReportToErrorHandler(exceptionHandler, ngZone, () => {\n const initStatus = moduleRef.injector.get(ApplicationInitStatus);\n initStatus.runInitializers();\n return initStatus.donePromise.then(() => {\n // If the `LOCALE_ID` provider is defined at bootstrap then we set the value for ivy\n const localeId = moduleRef.injector.get(LOCALE_ID, DEFAULT_LOCALE_ID);\n setLocaleId(localeId || DEFAULT_LOCALE_ID);\n this._moduleDoBootstrap(moduleRef);\n return moduleRef;\n });\n });\n });\n }\n /**\n * Creates an instance of an `@NgModule` for a given platform.\n *\n * @usageNotes\n * ### Simple Example\n *\n * ```typescript\n * @NgModule({\n * imports: [BrowserModule]\n * })\n * class MyModule {}\n *\n * let moduleRef = platformBrowser().bootstrapModule(MyModule);\n * ```\n *\n */\n bootstrapModule(moduleType, compilerOptions = []) {\n const options = optionsReducer({}, compilerOptions);\n return compileNgModuleFactory(this.injector, options, moduleType)\n .then(moduleFactory => this.bootstrapModuleFactory(moduleFactory, options));\n }\n _moduleDoBootstrap(moduleRef) {\n const appRef = moduleRef.injector.get(ApplicationRef);\n if (moduleRef._bootstrapComponents.length > 0) {\n moduleRef._bootstrapComponents.forEach(f => appRef.bootstrap(f));\n }\n else if (moduleRef.instance.ngDoBootstrap) {\n moduleRef.instance.ngDoBootstrap(appRef);\n }\n else {\n throw new RuntimeError(-403 /* RuntimeErrorCode.BOOTSTRAP_COMPONENTS_NOT_FOUND */, ngDevMode &&\n `The module ${stringify(moduleRef.instance.constructor)} was bootstrapped, ` +\n `but it does not declare \"@NgModule.bootstrap\" components nor a \"ngDoBootstrap\" method. ` +\n `Please define one of these.`);\n }\n this._modules.push(moduleRef);\n }\n /**\n * Registers a listener to be called when the platform is destroyed.\n */\n onDestroy(callback) {\n this._destroyListeners.push(callback);\n }\n /**\n * Retrieves the platform {@link Injector}, which is the parent injector for\n * every Angular application on the page and provides singleton providers.\n */\n get injector() {\n return this._injector;\n }\n /**\n * Destroys the current Angular platform and all Angular applications on the page.\n * Destroys all modules and listeners registered with the platform.\n */\n destroy() {\n if (this._destroyed) {\n throw new RuntimeError(404 /* RuntimeErrorCode.PLATFORM_ALREADY_DESTROYED */, ngDevMode && 'The platform has already been destroyed!');\n }\n this._modules.slice().forEach(module => module.destroy());\n this._destroyListeners.forEach(listener => listener());\n const destroyListeners = this._injector.get(PLATFORM_DESTROY_LISTENERS, null);\n if (destroyListeners) {\n destroyListeners.forEach(listener => listener());\n destroyListeners.clear();\n }\n this._destroyed = true;\n }\n /**\n * Indicates whether this instance was destroyed.\n */\n get destroyed() {\n return this._destroyed;\n }\n}\nPlatformRef.ɵfac = function PlatformRef_Factory(t) { return new (t || PlatformRef)(ɵɵinject(Injector)); };\nPlatformRef.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: PlatformRef, factory: PlatformRef.ɵfac, providedIn: 'platform' });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && setClassMetadata(PlatformRef, [{\n type: Injectable,\n args: [{ providedIn: 'platform' }]\n }], function () { return [{ type: Injector }]; }, null); })();\n// Transforms a set of `BootstrapOptions` (supported by the NgModule-based bootstrap APIs) ->\n// `NgZoneOptions` that are recognized by the NgZone constructor. Passing no options will result in\n// a set of default options returned.\nfunction getNgZoneOptions(options) {\n return {\n enableLongStackTrace: typeof ngDevMode === 'undefined' ? false : !!ngDevMode,\n shouldCoalesceEventChangeDetection: !!(options && options.ngZoneEventCoalescing) || false,\n shouldCoalesceRunChangeDetection: !!(options && options.ngZoneRunCoalescing) || false,\n };\n}\nfunction getNgZone(ngZoneToUse, options) {\n let ngZone;\n if (ngZoneToUse === 'noop') {\n ngZone = new NoopNgZone();\n }\n else {\n ngZone = (ngZoneToUse === 'zone.js' ? undefined : ngZoneToUse) || new NgZone(options);\n }\n return ngZone;\n}\nfunction _callAndReportToErrorHandler(errorHandler, ngZone, callback) {\n try {\n const result = callback();\n if (isPromise(result)) {\n return result.catch((e) => {\n ngZone.runOutsideAngular(() => errorHandler.handleError(e));\n // rethrow as the exception handler might not do it\n throw e;\n });\n }\n return result;\n }\n catch (e) {\n ngZone.runOutsideAngular(() => errorHandler.handleError(e));\n // rethrow as the exception handler might not do it\n throw e;\n }\n}\nfunction optionsReducer(dst, objs) {\n if (Array.isArray(objs)) {\n dst = objs.reduce(optionsReducer, dst);\n }\n else {\n dst = { ...dst, ...objs };\n }\n return dst;\n}\n/**\n * A reference to an Angular application running on a page.\n *\n * @usageNotes\n *\n * {@a is-stable-examples}\n * ### isStable examples and caveats\n *\n * Note two important points about `isStable`, demonstrated in the examples below:\n * - the application will never be stable if you start any kind\n * of recurrent asynchronous task when the application starts\n * (for example for a polling process, started with a `setInterval`, a `setTimeout`\n * or using RxJS operators like `interval`);\n * - the `isStable` Observable runs outside of the Angular zone.\n *\n * Let's imagine that you start a recurrent task\n * (here incrementing a counter, using RxJS `interval`),\n * and at the same time subscribe to `isStable`.\n *\n * ```\n * constructor(appRef: ApplicationRef) {\n * appRef.isStable.pipe(\n * filter(stable => stable)\n * ).subscribe(() => console.log('App is stable now');\n * interval(1000).subscribe(counter => console.log(counter));\n * }\n * ```\n * In this example, `isStable` will never emit `true`,\n * and the trace \"App is stable now\" will never get logged.\n *\n * If you want to execute something when the app is stable,\n * you have to wait for the application to be stable\n * before starting your polling process.\n *\n * ```\n * constructor(appRef: ApplicationRef) {\n * appRef.isStable.pipe(\n * first(stable => stable),\n * tap(stable => console.log('App is stable now')),\n * switchMap(() => interval(1000))\n * ).subscribe(counter => console.log(counter));\n * }\n * ```\n * In this example, the trace \"App is stable now\" will be logged\n * and then the counter starts incrementing every second.\n *\n * Note also that this Observable runs outside of the Angular zone,\n * which means that the code in the subscription\n * to this Observable will not trigger the change detection.\n *\n * Let's imagine that instead of logging the counter value,\n * you update a field of your component\n * and display it in its template.\n *\n * ```\n * constructor(appRef: ApplicationRef) {\n * appRef.isStable.pipe(\n * first(stable => stable),\n * switchMap(() => interval(1000))\n * ).subscribe(counter => this.value = counter);\n * }\n * ```\n * As the `isStable` Observable runs outside the zone,\n * the `value` field will be updated properly,\n * but the template will not be refreshed!\n *\n * You'll have to manually trigger the change detection to update the template.\n *\n * ```\n * constructor(appRef: ApplicationRef, cd: ChangeDetectorRef) {\n * appRef.isStable.pipe(\n * first(stable => stable),\n * switchMap(() => interval(1000))\n * ).subscribe(counter => {\n * this.value = counter;\n * cd.detectChanges();\n * });\n * }\n * ```\n *\n * Or make the subscription callback run inside the zone.\n *\n * ```\n * constructor(appRef: ApplicationRef, zone: NgZone) {\n * appRef.isStable.pipe(\n * first(stable => stable),\n * switchMap(() => interval(1000))\n * ).subscribe(counter => zone.run(() => this.value = counter));\n * }\n * ```\n *\n * @publicApi\n */\nclass ApplicationRef {\n /**\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-tree) can be referenced from a component\n * other than the hosting component whose template defines it, or it can be defined\n * independently by a `TemplateRef`.\n *\n * Properties of elements in a view can change, but the structure (number and order) of elements in\n * a view cannot. Change the structure of elements by inserting, moving, or\n * removing nested views in a view container.\n *\n * @see `ViewContainerRef`\n *\n * @usageNotes\n *\n * The following template breaks down into two separate `TemplateRef` instances,\n * an outer one and an inner one.\n *\n * ```\n * Count: {{items.length}}\n * <ul>\n * <li *ngFor=\"let item of items\">{{item}}</li>\n * </ul>\n * ```\n *\n * This is the outer `TemplateRef`:\n *\n * ```\n * Count: {{items.length}}\n * <ul>\n * <ng-template ngFor let-item [ngForOf]=\"items\"></ng-template>\n * </ul>\n * ```\n *\n * This is the inner `TemplateRef`:\n *\n * ```\n * <li>{{item}}</li>\n * ```\n *\n * The outer and inner `TemplateRef` instances are assembled into views as follows:\n *\n * ```\n * <!-- ViewRef: outer-0 -->\n * Count: 2\n * <ul>\n * <ng-template view-container-ref></ng-template>\n * <!-- ViewRef: inner-1 --><li>first</li><!-- /ViewRef: inner-1 -->\n * <!-- ViewRef: inner-2 --><li>second</li><!-- /ViewRef: inner-2 -->\n * </ul>\n * <!-- /ViewRef: outer-0 -->\n * ```\n * @publicApi\n */\nclass EmbeddedViewRef extends ViewRef {\n}\n\n// 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 const eAttrs = element.attributes;\n for (let i = 0; i < eAttrs.length; i++) {\n const attr = eAttrs[i];\n const lowercaseName = attr.name.toLowerCase();\n // Make sure that we don't assign the same attribute both in its\n // case-sensitive form and the lower-cased one from the browser.\n if (lowercaseTNodeAttrs.indexOf(lowercaseName) === -1) {\n // Save the lowercase name to align the behavior between browsers.\n // IE preserves the case, while all other browser convert it to lower case.\n attributes[lowercaseName] = attr.value;\n }\n }\n return attributes;\n }\n /**\n * The inline styles of the DOM element.\n *\n * Will be `null` if there is no `style` property on the underlying DOM element.\n *\n * @see [ElementCSSInlineStyle](https://developer.mozilla.org/en-US/docs/Web/API/ElementCSSInlineStyle/style)\n */\n get styles() {\n if (this.nativeElement && this.nativeElement.style) {\n return this.nativeElement.style;\n }\n return {};\n }\n /**\n * A map containing the class names on the element as keys.\n *\n * This map is derived from the `className` property of the DOM element.\n *\n * Note: The values of this object will always be `true`. The class key will not appear in the KV\n * object if it does not exist on the element.\n *\n * @see [Element.className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className)\n */\n get classes() {\n const result = {};\n const element = this.nativeElement;\n // SVG elements return an `SVGAnimatedString` instead of a plain string for the `className`.\n const className = element.className;\n const classes = typeof className !== 'string' ? className.baseVal.split(' ') : className.split(' ');\n classes.forEach((value) => result[value] = true);\n return result;\n }\n /**\n * The `childNodes` of the DOM element as a `DebugNode` array.\n *\n * @see [Node.childNodes](https://developer.mozilla.org/en-US/docs/Web/API/Node/childNodes)\n */\n get childNodes() {\n const childNodes = this.nativeNode.childNodes;\n const children = [];\n for (let i = 0; i < childNodes.length; i++) {\n const element = childNodes[i];\n children.push(getDebugNode(element));\n }\n return children;\n }\n /**\n * The immediate `DebugElement` children. Walk the tree by descending through `children`.\n */\n get children() {\n const nativeElement = this.nativeElement;\n if (!nativeElement)\n return [];\n const childNodes = nativeElement.children;\n const children = [];\n for (let i = 0; i < childNodes.length; i++) {\n const element = childNodes[i];\n children.push(getDebugNode(element));\n }\n return children;\n }\n /**\n * @returns the first `DebugElement` that matches the predicate at any depth in the subtree.\n */\n query(predicate) {\n const results = this.queryAll(predicate);\n return results[0] || null;\n }\n /**\n * @returns All `DebugElement` matches for the predicate at any depth in the subtree.\n */\n queryAll(predicate) {\n const matches = [];\n _queryAll(this, predicate, matches, true);\n return matches;\n }\n /**\n * @returns All `DebugNode` matches for the predicate at any depth in the subtree.\n */\n queryAllNodes(predicate) {\n const matches = [];\n _queryAll(this, predicate, matches, false);\n return matches;\n }\n /**\n * Triggers the event by its name if there is a corresponding listener in the element's\n * `listeners` collection.\n *\n * If the event lacks a listener or there's some other problem, consider\n * calling `nativeElement.dispatchEvent(eventObject)`.\n *\n * @param eventName The name of the event to trigger\n * @param eventObj The _event object_ expected by the handler\n *\n * @see [Testing components scenarios](guide/testing-components-scenarios#trigger-event-handler)\n */\n triggerEventHandler(eventName, eventObj) {\n const node = this.nativeNode;\n const invokedListeners = [];\n this.listeners.forEach(listener => {\n if (listener.name === eventName) {\n const callback = listener.callback;\n callback.call(node, eventObj);\n invokedListeners.push(callback);\n }\n });\n // We need to check whether `eventListeners` exists, because it's something\n // that Zone.js only adds to `EventTarget` in browser environments.\n if (typeof node.eventListeners === 'function') {\n // Note that in Ivy we wrap event listeners with a call to `event.preventDefault` in some\n // cases. We use '__ngUnwrap__' as a special token that gives us access to the actual event\n // listener.\n node.eventListeners(eventName).forEach((listener) => {\n // In order to ensure that we can detect the special __ngUnwrap__ token described above, we\n // use `toString` on the listener and see if it contains the token. We use this approach to\n // ensure that it still worked with compiled code since it cannot remove or rename string\n // literals. We also considered using a special function name (i.e. if(listener.name ===\n // special)) but that was more cumbersome and we were also concerned the compiled code could\n // strip the name, turning the condition in to (\"\" === \"\") and always returning true.\n if (listener.toString().indexOf('__ngUnwrap__') !== -1) {\n const unwrappedListener = listener('__ngUnwrap__');\n return invokedListeners.indexOf(unwrappedListener) === -1 &&\n unwrappedListener.call(node, eventObj);\n }\n });\n }\n }\n}\nfunction copyDomProperties(element, properties) {\n if (element) {\n // Skip own properties (as those are patched)\n let obj = Object.getPrototypeOf(element);\n const NodePrototype = Node.prototype;\n while (obj !== null && obj !== NodePrototype) {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n for (let key in descriptors) {\n if (!key.startsWith('__') && !key.startsWith('on')) {\n // don't include properties starting with `__` and `on`.\n // `__` are patched values which should not be included.\n // `on` are listeners which also should not be included.\n const value = element[key];\n if (isPrimitiveValue(value)) {\n properties[key] = value;\n }\n }\n }\n obj = Object.getPrototypeOf(obj);\n }\n }\n}\nfunction isPrimitiveValue(value) {\n return typeof value === 'string' || typeof value === 'boolean' || typeof value === 'number' ||\n value === null;\n}\nfunction _queryAll(parentElement, predicate, matches, elementsOnly) {\n const context = getLContext(parentElement.nativeNode);\n const lView = context ? context.lView : null;\n if (lView !== null) {\n const parentTNode = lView[TVIEW].data[context.nodeIndex];\n _queryNodeChildren(parentTNode, lView, predicate, matches, elementsOnly, parentElement.nativeNode);\n }\n else {\n // If the context is null, then `parentElement` was either created with Renderer2 or native DOM\n // APIs.\n _queryNativeNodeDescendants(parentElement.nativeNode, predicate, matches, elementsOnly);\n }\n}\n/**\n * Recursively match the current TNode against the predicate, and goes on with the next ones.\n *\n * @param tNode the current TNode\n * @param lView the LView of this TNode\n * @param predicate the predicate to match\n * @param matches the list of positive matches\n * @param elementsOnly whether only elements should be searched\n * @param rootNativeNode the root native node on which predicate should not be matched\n */\nfunction _queryNodeChildren(tNode, lView, predicate, matches, elementsOnly, rootNativeNode) {\n ngDevMode && assertTNodeForLView(tNode, lView);\n const nativeNode = getNativeByTNodeOrNull(tNode, lView);\n // For each type of TNode, specific logic is executed.\n if (tNode.type & (3 /* TNodeType.AnyRNode */ | 8 /* TNodeType.ElementContainer */)) {\n // Case 1: the TNode is an element\n // The native node has to be checked.\n _addQueryMatch(nativeNode, predicate, matches, elementsOnly, rootNativeNode);\n if (isComponentHost(tNode)) {\n // If the element is the host of a component, then all nodes in its view have to be processed.\n // Note: the component's content (tNode.child) will be processed from the insertion points.\n const componentView = getComponentLViewByIndex(tNode.index, lView);\n if (componentView && componentView[TVIEW].firstChild) {\n _queryNodeChildren(componentView[TVIEW].firstChild, componentView, predicate, matches, elementsOnly, rootNativeNode);\n }\n }\n else {\n if (tNode.child) {\n // Otherwise, its children have to be processed.\n _queryNodeChildren(tNode.child, lView, predicate, matches, elementsOnly, rootNativeNode);\n }\n // We also have to query the DOM directly in order to catch elements inserted through\n // Renderer2. Note that this is __not__ optimal, because we're walking similar trees multiple\n // times. ViewEngine could do it more efficiently, because all the insertions go through\n // Renderer2, however that's not the case in Ivy. This approach is being used because:\n // 1. Matching the ViewEngine behavior would mean potentially introducing a dependency\n // from `Renderer2` to Ivy which could bring Ivy code into ViewEngine.\n // 2. It allows us to capture nodes that were inserted directly via the DOM.\n nativeNode && _queryNativeNodeDescendants(nativeNode, predicate, matches, elementsOnly);\n }\n // In all cases, if a dynamic container exists for this node, each view inside it has to be\n // processed.\n const nodeOrContainer = lView[tNode.index];\n if (isLContainer(nodeOrContainer)) {\n _queryNodeChildrenInContainer(nodeOrContainer, predicate, matches, elementsOnly, rootNativeNode);\n }\n }\n else if (tNode.type & 4 /* TNodeType.Container */) {\n // Case 2: the TNode is a container\n // The native node has to be checked.\n const lContainer = lView[tNode.index];\n _addQueryMatch(lContainer[NATIVE], predicate, matches, elementsOnly, rootNativeNode);\n // Each view inside the container has to be processed.\n _queryNodeChildrenInContainer(lContainer, predicate, matches, elementsOnly, rootNativeNode);\n }\n else if (tNode.type & 16 /* TNodeType.Projection */) {\n // Case 3: the TNode is a projection insertion point (i.e. a <ng-content>).\n // The nodes projected at this location all need to be processed.\n const componentView = lView[DECLARATION_COMPONENT_VIEW];\n const componentHost = componentView[T_HOST];\n const head = componentHost.projection[tNode.projection];\n if (Array.isArray(head)) {\n for (let nativeNode of head) {\n _addQueryMatch(nativeNode, predicate, matches, elementsOnly, rootNativeNode);\n }\n }\n else if (head) {\n const nextLView = componentView[PARENT];\n const nextTNode = nextLView[TVIEW].data[head.index];\n _queryNodeChildren(nextTNode, nextLView, predicate, matches, elementsOnly, rootNativeNode);\n }\n }\n else if (tNode.child) {\n // Case 4: the TNode is a view.\n _queryNodeChildren(tNode.child, lView, predicate, matches, elementsOnly, rootNativeNode);\n }\n // We don't want to go to the next sibling of the root node.\n if (rootNativeNode !== nativeNode) {\n // To determine the next node to be processed, we need to use the next or the projectionNext\n // link, depending on whether the current node has been projected.\n const nextTNode = (tNode.flags & 2 /* TNodeFlags.isProjected */) ? tNode.projectionNext : tNode.next;\n if (nextTNode) {\n _queryNodeChildren(nextTNode, lView, predicate, matches, elementsOnly, rootNativeNode);\n }\n }\n}\n/**\n * Process all TNodes in a given container.\n *\n * @param lContainer the container to be processed\n * @param predicate the predicate to match\n * @param matches the list of positive matches\n * @param elementsOnly whether only elements should be searched\n * @param rootNativeNode the root native node on which predicate should not be matched\n */\nfunction _queryNodeChildrenInContainer(lContainer, predicate, matches, elementsOnly, rootNativeNode) {\n for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n const childView = lContainer[i];\n const firstChild = childView[TVIEW].firstChild;\n if (firstChild) {\n _queryNodeChildren(firstChild, childView, predicate, matches, elementsOnly, rootNativeNode);\n }\n }\n}\n/**\n * Match the current native node against the predicate.\n *\n * @param nativeNode the current native node\n * @param predicate the predicate to match\n * @param matches the list of positive matches\n * @param elementsOnly whether only elements should be searched\n * @param rootNativeNode the root native node on which predicate should not be matched\n */\nfunction _addQueryMatch(nativeNode, predicate, matches, elementsOnly, rootNativeNode) {\n if (rootNativeNode !== nativeNode) {\n const debugNode = getDebugNode(nativeNode);\n if (!debugNode) {\n return;\n }\n // Type of the \"predicate and \"matches\" array are set based on the value of\n // the \"elementsOnly\" parameter. TypeScript is not able to properly infer these\n // types with generics, so we manually cast the parameters accordingly.\n if (elementsOnly && (debugNode instanceof DebugElement) && predicate(debugNode) &&\n matches.indexOf(debugNode) === -1) {\n matches.push(debugNode);\n }\n else if (!elementsOnly && predicate(debugNode) &&\n matches.indexOf(debugNode) === -1) {\n matches.push(debugNode);\n }\n }\n}\n/**\n * Match all the descendants of a DOM node against a predicate.\n *\n * @param nativeNode the current native node\n * @param predicate the predicate to match\n * @param matches the list where matches are stored\n * @param elementsOnly whether only elements should be searched\n */\nfunction _queryNativeNodeDescendants(parentNode, predicate, matches, elementsOnly) {\n const nodes = parentNode.childNodes;\n const length = nodes.length;\n for (let i = 0; i < length; i++) {\n const node = nodes[i];\n const debugNode = getDebugNode(node);\n if (debugNode) {\n if (elementsOnly && (debugNode instanceof DebugElement) && predicate(debugNode) &&\n matches.indexOf(debugNode) === -1) {\n matches.push(debugNode);\n }\n else if (!elementsOnly && predicate(debugNode) &&\n matches.indexOf(debugNode) === -1) {\n matches.push(debugNode);\n }\n _queryNativeNodeDescendants(node, predicate, matches, elementsOnly);\n }\n }\n}\n/**\n * Iterates through the property bindings for a given node and generates\n * a map of property names to values. This map only contains property bindings\n * defined in templates, not in host bindings.\n */\nfunction collectPropertyBindings(properties, tNode, lView, tData) {\n let bindingIndexes = tNode.propertyBindings;\n if (bindingIndexes !== null) {\n for (let i = 0; i < bindingIndexes.length; i++) {\n const bindingIndex = bindingIndexes[i];\n const propMetadata = tData[bindingIndex];\n const metadataParts = propMetadata.split(INTERPOLATION_DELIMITER);\n const propertyName = metadataParts[0];\n if (metadataParts.length > 1) {\n let value = metadataParts[1];\n for (let j = 1; j < metadataParts.length - 1; j++) {\n value += renderStringify(lView[bindingIndex + j - 1]) + metadataParts[j + 1];\n }\n properties[propertyName] = value;\n }\n else {\n properties[propertyName] = lView[bindingIndex];\n }\n }\n }\n}\n// Need to keep the nodes in a global Map so that multiple angular apps are supported.\nconst _nativeNodeToDebugNode = new Map();\nconst NG_DEBUG_PROPERTY = '__ng_debug__';\n/**\n * @publicApi\n */\nfunction getDebugNode(nativeNode) {\n if (nativeNode instanceof Node) {\n if (!(nativeNode.hasOwnProperty(NG_DEBUG_PROPERTY))) {\n nativeNode[NG_DEBUG_PROPERTY] = nativeNode.nodeType == Node.ELEMENT_NODE ?\n new DebugElement(nativeNode) :\n new DebugNode(nativeNode);\n }\n return nativeNode[NG_DEBUG_PROPERTY];\n }\n return null;\n}\n// TODO: cleanup all references to this function and remove it.\nfunction getDebugNodeR2(_nativeNode) {\n return null;\n}\nfunction getAllDebugNodes() {\n return Array.from(_nativeNodeToDebugNode.values());\n}\nfunction indexDebugNode(node) {\n _nativeNodeToDebugNode.set(node.nativeNode, node);\n}\nfunction removeDebugNodeFromIndex(node) {\n _nativeNodeToDebugNode.delete(node.nativeNode);\n}\n\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// TODO(alxhub): allows tests to compile, can be removed when tests have been updated.\nconst ɵivyEnabled = true;\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, ChangeDetectorStatus as ɵChangeDetectorStatus, ComponentFactory$1 as ɵComponentFactory, Console as ɵConsole, DEFAULT_LOCALE_ID as ɵDEFAULT_LOCALE_ID, INJECTOR_SCOPE as ɵINJECTOR_SCOPE, LContext as ɵLContext, LifecycleHooksFeature as ɵLifecycleHooksFeature, LocaleDataIndex as ɵLocaleDataIndex, NG_COMP_DEF as ɵNG_COMP_DEF, NG_DIR_DEF as ɵNG_DIR_DEF, NG_ELEMENT_ID as ɵNG_ELEMENT_ID, NG_INJ_DEF as ɵNG_INJ_DEF, NG_MOD_DEF as ɵNG_MOD_DEF, NG_PIPE_DEF as ɵNG_PIPE_DEF, NG_PROV_DEF as ɵNG_PROV_DEF, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR as ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, NO_CHANGE as ɵNO_CHANGE, NgModuleFactory as ɵNgModuleFactory, NoopNgZone as ɵNoopNgZone, ReflectionCapabilities as ɵReflectionCapabilities, ComponentFactory as ɵRender3ComponentFactory, ComponentRef as ɵRender3ComponentRef, NgModuleRef as ɵRender3NgModuleRef, RuntimeError as ɵRuntimeError, TESTABILITY as ɵTESTABILITY, TESTABILITY_GETTER as ɵTESTABILITY_GETTER, ViewRef$1 as ɵViewRef, XSS_SECURITY_URL as ɵXSS_SECURITY_URL, _sanitizeHtml as ɵ_sanitizeHtml, _sanitizeUrl as ɵ_sanitizeUrl, allowSanitizationBypassAndThrow as ɵallowSanitizationBypassAndThrow, bypassSanitizationTrustHtml as ɵbypassSanitizationTrustHtml, bypassSanitizationTrustResourceUrl as ɵbypassSanitizationTrustResourceUrl, bypassSanitizationTrustScript as ɵbypassSanitizationTrustScript, bypassSanitizationTrustStyle as ɵbypassSanitizationTrustStyle, bypassSanitizationTrustUrl as ɵbypassSanitizationTrustUrl, clearResolutionOfComponentResourcesQueue as ɵclearResolutionOfComponentResourcesQueue, coerceToBoolean as ɵcoerceToBoolean, compileComponent as ɵcompileComponent, compileDirective as ɵcompileDirective, compileNgModule as ɵcompileNgModule, compileNgModuleDefs as ɵcompileNgModuleDefs, compileNgModuleFactory as ɵcompileNgModuleFactory, compilePipe as ɵcompilePipe, convertToBitFlags as ɵconvertToBitFlags, createInjector as ɵcreateInjector, defaultIterableDiffers as ɵdefaultIterableDiffers, defaultKeyValueDiffers as ɵdefaultKeyValueDiffers, detectChanges as ɵdetectChanges, devModeEqual as ɵdevModeEqual, findLocaleData as ɵfindLocaleData, flushModuleScopingQueueAsMuchAsPossible as ɵflushModuleScopingQueueAsMuchAsPossible, formatRuntimeError as ɵformatRuntimeError, getDebugNode as ɵgetDebugNode, getDebugNodeR2 as ɵgetDebugNodeR2, getDirectives as ɵgetDirectives, getHostElement as ɵgetHostElement, getInjectableDef as ɵgetInjectableDef, getLContext as ɵgetLContext, getLocaleCurrencyCode as ɵgetLocaleCurrencyCode, getLocalePluralCase as ɵgetLocalePluralCase, getSanitizationBypassType as ɵgetSanitizationBypassType, ɵgetUnknownElementStrictMode, ɵgetUnknownPropertyStrictMode, _global as ɵglobal, injectChangeDetectorRef as ɵinjectChangeDetectorRef, internalCreateApplication as ɵinternalCreateApplication, isBoundToModule as ɵisBoundToModule, isDefaultChangeDetectionStrategy as ɵisDefaultChangeDetectionStrategy, isEnvironmentProviders as ɵisEnvironmentProviders, isInjectable as ɵisInjectable, isListLikeIterable as ɵisListLikeIterable, isObservable as ɵisObservable, isPromise as ɵisPromise, isSubscribable as ɵisSubscribable, ɵivyEnabled, makeDecorator as ɵmakeDecorator, noSideEffects as ɵnoSideEffects, patchComponentDefWithScope as ɵpatchComponentDefWithScope, publishDefaultGlobalUtils$1 as ɵpublishDefaultGlobalUtils, publishGlobalUtil as ɵpublishGlobalUtil, registerLocaleData as ɵregisterLocaleData, resetCompiledComponents as ɵresetCompiledComponents, resetJitOptions as ɵresetJitOptions, resolveComponentResources as ɵresolveComponentResources, setAllowDuplicateNgModuleIdsForTest as ɵsetAllowDuplicateNgModuleIdsForTest, setClassMetadata as ɵsetClassMetadata, setCurrentInjector as ɵsetCurrentInjector, setDocument as ɵsetDocument, setLocaleId as ɵsetLocaleId, ɵsetUnknownElementStrictMode, ɵsetUnknownPropertyStrictMode, store as ɵstore, stringify as ɵstringify, transitiveScopesFor as ɵtransitiveScopesFor, unregisterAllLocaleData as ɵunregisterLocaleData, unwrapSafeValue as ɵunwrapSafeValue, ɵɵCopyDefinitionFeature, FactoryTarget as ɵɵFactoryTarget, ɵɵHostDirectivesFeature, ɵɵInheritDefinitionFeature, ɵɵNgOnChangesFeature, ɵɵProvidersFeature, ɵɵStandaloneFeature, ɵɵadvance, ɵɵattribute, ɵɵattributeInterpolate1, ɵɵattributeInterpolate2, ɵɵattributeInterpolate3, ɵɵattributeInterpolate4, ɵɵattributeInterpolate5, ɵɵattributeInterpolate6, ɵɵattributeInterpolate7, ɵɵattributeInterpolate8, ɵɵattributeInterpolateV, ɵɵclassMap, ɵɵclassMapInterpolate1, ɵɵclassMapInterpolate2, ɵɵclassMapInterpolate3, ɵɵclassMapInterpolate4, ɵɵclassMapInterpolate5, ɵɵclassMapInterpolate6, ɵɵclassMapInterpolate7, ɵɵclassMapInterpolate8, ɵɵclassMapInterpolateV, ɵɵclassProp, ɵɵcontentQuery, ɵɵdefineComponent, ɵɵdefineDirective, ɵɵdefineInjectable, ɵɵdefineInjector, ɵɵdefineNgModule, ɵɵdefinePipe, ɵɵdirectiveInject, ɵɵdisableBindings, ɵɵelement, ɵɵelementContainer, ɵɵelementContainerEnd, ɵɵelementContainerStart, ɵɵelementEnd, ɵɵelementStart, ɵɵenableBindings, ɵɵgetCurrentView, ɵɵgetInheritedFactory, ɵɵhostProperty, ɵɵi18n, ɵɵi18nApply, ɵɵi18nAttributes, ɵɵi18nEnd, ɵɵi18nExp, ɵɵi18nPostprocess, ɵɵi18nStart, ɵɵinject, ɵɵinjectAttribute, ɵɵinvalidFactory, ɵɵinvalidFactoryDep, ɵɵlistener, ɵɵloadQuery, ɵɵnamespaceHTML, ɵɵnamespaceMathML, ɵɵnamespaceSVG, ɵɵnextContext, ɵɵngDeclareClassMetadata, ɵɵngDeclareComponent, ɵɵngDeclareDirective, ɵɵngDeclareFactory, ɵɵngDeclareInjectable, ɵɵngDeclareInjector, ɵɵngDeclareNgModule, ɵɵngDeclarePipe, ɵɵpipe, ɵɵpipeBind1, ɵɵpipeBind2, ɵɵpipeBind3, ɵɵpipeBind4, ɵɵpipeBindV, ɵɵprojection, ɵɵprojectionDef, ɵɵproperty, ɵɵpropertyInterpolate, ɵɵpropertyInterpolate1, ɵɵpropertyInterpolate2, ɵɵpropertyInterpolate3, ɵɵpropertyInterpolate4, ɵɵpropertyInterpolate5, ɵɵpropertyInterpolate6, ɵɵpropertyInterpolate7, ɵɵpropertyInterpolate8, ɵɵpropertyInterpolateV, ɵɵpureFunction0, ɵɵpureFunction1, ɵɵpureFunction2, ɵɵpureFunction3, ɵɵpureFunction4, ɵɵpureFunction5, ɵɵpureFunction6, ɵɵpureFunction7, ɵɵpureFunction8, ɵɵpureFunctionV, ɵɵqueryRefresh, ɵɵreference, registerNgModuleType as ɵɵregisterNgModuleType, ɵɵresetView, ɵɵresolveBody, ɵɵresolveDocument, ɵɵresolveWindow, ɵɵrestoreView, ɵɵsanitizeHtml, ɵɵsanitizeResourceUrl, ɵɵsanitizeScript, ɵɵsanitizeStyle, ɵɵsanitizeUrl, ɵɵsanitizeUrlOrResourceUrl, ɵɵsetComponentScope, ɵɵsetNgModuleScope, ɵɵstyleMap, ɵɵstyleMapInterpolate1, ɵɵstyleMapInterpolate2, ɵɵstyleMapInterpolate3, ɵɵstyleMapInterpolate4, ɵɵstyleMapInterpolate5, ɵɵstyleMapInterpolate6, ɵɵstyleMapInterpolate7, ɵɵstyleMapInterpolate8, ɵɵstyleMapInterpolateV, ɵɵstyleProp, ɵɵstylePropInterpolate1, ɵɵstylePropInterpolate2, ɵɵstylePropInterpolate3, ɵɵstylePropInterpolate4, ɵɵstylePropInterpolate5, ɵɵstylePropInterpolate6, ɵɵstylePropInterpolate7, ɵɵstylePropInterpolate8, ɵɵstylePropInterpolateV, ɵɵsyntheticHostListener, ɵɵsyntheticHostProperty, ɵɵtemplate, ɵɵtemplateRefExtractor, ɵɵtext, ɵɵtextInterpolate, ɵɵtextInterpolate1, ɵɵtextInterpolate2, ɵɵtextInterpolate3, ɵɵtextInterpolate4, ɵɵtextInterpolate5, ɵɵtextInterpolate6, ɵɵtextInterpolate7, ɵɵtextInterpolate8, ɵɵtextInterpolateV, ɵɵtrustConstantHtml, ɵɵtrustConstantResourceUrl, ɵɵvalidateIframeAttribute, ɵɵviewQuery };\n","import { mergeAll } from '../operators/mergeAll';\nimport { innerFrom } from './innerFrom';\nimport { EMPTY } from './empty';\nimport { popNumber, popScheduler } from '../util/args';\nimport { from } from './from';\nexport function merge(...args) {\n const scheduler = popScheduler(args);\n const concurrent = popNumber(args, Infinity);\n const sources = args;\n return !sources.length\n ?\n EMPTY\n : sources.length === 1\n ?\n innerFrom(sources[0])\n :\n mergeAll(concurrent)(from(sources, scheduler));\n}\n","/**\n * @license Angular v15.1.0\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.1.0\", 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.1.0\", type: BaseControlValueAccessor, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", ngImport: i0, type: BuiltInControlValueAccessor, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nBuiltInControlValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.1.0\", type: BuiltInControlValueAccessor, usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", ngImport: i0, type: CheckboxControlValueAccessor, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nCheckboxControlValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.1.0\", 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.1.0\", 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.1.0\", 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.1.0\", 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.1.0\", 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 // Not using Array.reduce here due to a Chrome 80 bug\n // https://bugs.chromium.org/p/chromium/issues/detail?id=1049982\n arrayOfErrors.forEach((errors) => {\n res = errors != null ? { ...res, ...errors } : res;\n });\n return Object.keys(res).length === 0 ? null : res;\n}\nfunction executeValidators(control, validators) {\n return validators.map(validator => validator(control));\n}\nfunction isValidatorFn(validator) {\n return !validator.validate;\n}\n/**\n * Given the list of validators that may contain both functions as well as classes, return the list\n * of validator functions (convert validator classes into validator functions). This is needed to\n * have consistent structure in validators list before composing them.\n *\n * @param validators The set of validators that may contain validators both in plain function form\n * as well as represented as a validator class.\n */\nfunction normalizeValidators(validators) {\n return validators.map(validator => {\n return isValidatorFn(validator) ?\n validator :\n ((c) => validator.validate(c));\n });\n}\n/**\n * Merges synchronous validators into a single validator function.\n * See `Validators.compose` for additional information.\n */\nfunction compose(validators) {\n if (!validators)\n return null;\n const presentValidators = validators.filter(isPresent);\n if (presentValidators.length == 0)\n return null;\n return function (control) {\n return mergeErrors(executeValidators(control, presentValidators));\n };\n}\n/**\n * Accepts a list of validators of different possible shapes (`Validator` and `ValidatorFn`),\n * normalizes the list (converts everything to `ValidatorFn`) and merges them into a single\n * validator function.\n */\nfunction composeValidators(validators) {\n return validators != null ? compose(normalizeValidators(validators)) : null;\n}\n/**\n * Merges asynchronous validators into a single validator function.\n * See `Validators.composeAsync` for additional information.\n */\nfunction composeAsync(validators) {\n if (!validators)\n return null;\n const presentValidators = validators.filter(isPresent);\n if (presentValidators.length == 0)\n return null;\n return function (control) {\n const observables = executeValidators(control, presentValidators).map(toObservable);\n return forkJoin(observables).pipe(map(mergeErrors));\n };\n}\n/**\n * Accepts a list of async validators of different possible shapes (`AsyncValidator` and\n * `AsyncValidatorFn`), normalizes the list (converts everything to `AsyncValidatorFn`) and merges\n * them into a single validator function.\n */\nfunction composeAsyncValidators(validators) {\n return validators != null ? composeAsync(normalizeValidators(validators)) :\n null;\n}\n/**\n * Merges raw control validators with a given directive validator and returns the combined list of\n * validators as an array.\n */\nfunction mergeValidators(controlValidators, dirValidator) {\n if (controlValidators === null)\n return [dirValidator];\n return Array.isArray(controlValidators) ? [...controlValidators, dirValidator] :\n [controlValidators, dirValidator];\n}\n/**\n * Retrieves the list of raw synchronous validators attached to a given control.\n */\nfunction getControlValidators(control) {\n return control._rawValidators;\n}\n/**\n * Retrieves the list of raw asynchronous validators attached to a given control.\n */\nfunction getControlAsyncValidators(control) {\n return control._rawAsyncValidators;\n}\n/**\n * Accepts a singleton validator, an array, or null, and returns an array type with the provided\n * validators.\n *\n * @param validators A validator, validators, or null.\n * @returns A validators array.\n */\nfunction makeValidatorsArray(validators) {\n if (!validators)\n return [];\n return Array.isArray(validators) ? validators : [validators];\n}\n/**\n * Determines whether a validator or validators array has a given validator.\n *\n * @param validators The validator or validators to compare against.\n * @param validator The validator to check.\n * @returns Whether the validator is present.\n */\nfunction hasValidator(validators, validator) {\n return Array.isArray(validators) ? validators.includes(validator) : validators === validator;\n}\n/**\n * Combines two arrays of validators into one. If duplicates are provided, only one will be added.\n *\n * @param validators The new validators.\n * @param currentValidators The base array of current validators.\n * @returns An array of validators.\n */\nfunction addValidators(validators, currentValidators) {\n const current = makeValidatorsArray(currentValidators);\n const validatorsToAdd = makeValidatorsArray(validators);\n validatorsToAdd.forEach((v) => {\n // Note: if there are duplicate entries in the new validators array,\n // only the first one would be added to the current list of validators.\n // Duplicate ones would be ignored since `hasValidator` would detect\n // the presence of a validator function and we update the current list in place.\n if (!hasValidator(current, v)) {\n current.push(v);\n }\n });\n return current;\n}\nfunction removeValidators(validators, currentValidators) {\n return makeValidatorsArray(currentValidators).filter(v => !hasValidator(validators, v));\n}\n\n/**\n * @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.1.0\", ngImport: i0, type: NgControlStatus, deps: [{ token: NgControl, self: true }], target: i0.ɵɵFactoryTarget.Directive });\nNgControlStatus.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.1.0\", 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.1.0\", 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.1.0\", 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.1.0\", 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.1.0\", 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.1.0\", 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.1.0\", 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.1.0\", 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.1.0\", ngImport: i0, type: AbstractFormGroupDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nAbstractFormGroupDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.1.0\", type: AbstractFormGroupDirective, usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", 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.1.0\", type: NgModelGroup, selector: \"[ngModelGroup]\", inputs: { name: [\"ngModelGroup\", \"name\"] }, providers: [modelGroupProvider], exportAs: [\"ngModelGroup\"], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", 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.1.0\", 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.1.0\", 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.1.0\", ngImport: i0, type: ɵNgNoValidate, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nɵNgNoValidate.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.1.0\", type: ɵNgNoValidate, selector: \"form:not([ngNoForm]):not([ngNativeValidate])\", host: { attributes: { \"novalidate\": \"\" } }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", ngImport: i0, type: NumberValueAccessor, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nNumberValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.1.0\", 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.1.0\", 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.1.0\", ngImport: i0, type: RadioControlRegistryModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nRadioControlRegistryModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.1.0\", ngImport: i0, type: RadioControlRegistryModule });\nRadioControlRegistryModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: RadioControlRegistryModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", ngImport: i0, type: RadioControlRegistry, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nRadioControlRegistry.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: RadioControlRegistry, providedIn: RadioControlRegistryModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: RadioControlRegistry, decorators: [{\n type: Injectable,\n args: [{ providedIn: RadioControlRegistryModule }]\n }] });\n/**\n * @description\n * The `ControlValueAccessor` for writing radio control values and listening to radio control\n * changes. The value accessor is used by the `FormControlDirective`, `FormControlName`, and\n * `NgModel` directives.\n *\n * @usageNotes\n *\n * ### Using radio buttons with reactive form directives\n *\n * The follow example shows how to use radio buttons in a reactive form. When using radio buttons in\n * a reactive form, radio buttons in the same group should have the same `formControlName`.\n * Providing a `name` attribute is optional.\n *\n * {@example forms/ts/reactiveRadioButtons/reactive_radio_button_example.ts region='Reactive'}\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nclass RadioControlValueAccessor extends BuiltInControlValueAccessor {\n constructor(renderer, elementRef, _registry, _injector) {\n super(renderer, elementRef);\n this._registry = _registry;\n this._injector = _injector;\n /**\n * The registered callback function called when a change event occurs on the input element.\n * Note: we declare `onChange` here (also used as host listener) as a function with no arguments\n * to override the `onChange` function (which expects 1 argument) in the parent\n * `BaseControlValueAccessor` class.\n * @nodoc\n */\n this.onChange = () => { };\n }\n /** @nodoc */\n ngOnInit() {\n this._control = this._injector.get(NgControl);\n this._checkName();\n this._registry.add(this._control, this);\n }\n /** @nodoc */\n ngOnDestroy() {\n this._registry.remove(this);\n }\n /**\n * Sets the \"checked\" property value on the radio input element.\n * @nodoc\n */\n writeValue(value) {\n this._state = value === this.value;\n this.setProperty('checked', this._state);\n }\n /**\n * Registers a function called when the control value changes.\n * @nodoc\n */\n registerOnChange(fn) {\n this._fn = fn;\n this.onChange = () => {\n fn(this.value);\n this._registry.select(this);\n };\n }\n /**\n * Sets the \"value\" on the radio input element and unchecks it.\n *\n * @param value\n */\n fireUncheck(value) {\n this.writeValue(value);\n }\n _checkName() {\n if (this.name && this.formControlName && this.name !== this.formControlName &&\n (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throwNameError();\n }\n if (!this.name && this.formControlName)\n this.name = this.formControlName;\n }\n}\nRadioControlValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", 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.1.0\", 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.1.0\", ngImport: i0, type: RangeValueAccessor, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nRangeValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.1.0\", 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.1.0\", 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.1.0\", 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.1.0\", 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.1.0\", 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.1.0\", 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.1.0\", 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.1.0\", 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.1.0\", 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.1.0\", type: FormGroupName, selector: \"[formGroupName]\", inputs: { name: [\"formGroupName\", \"name\"] }, providers: [formGroupNameProvider], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", 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.1.0\", type: FormArrayName, selector: \"[formArrayName]\", inputs: { name: [\"formArrayName\", \"name\"] }, providers: [formArrayNameProvider], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", 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.1.0\", 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.1.0\", 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.1.0\", ngImport: i0, type: SelectControlValueAccessor, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nSelectControlValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.1.0\", 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.1.0\", 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.1.0\", 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.1.0\", type: NgSelectOption, selector: \"option\", inputs: { ngValue: \"ngValue\", value: \"value\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", ngImport: i0, type: SelectMultipleControlValueAccessor, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nSelectMultipleControlValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.1.0\", 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.1.0\", 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.1.0\", 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.1.0\", type: ɵNgSelectMultipleOption, selector: \"option\", inputs: { ngValue: \"ngValue\", value: \"value\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", ngImport: i0, type: AbstractValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nAbstractValidatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.1.0\", type: AbstractValidatorDirective, usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", ngImport: i0, type: MaxValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMaxValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.1.0\", 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.1.0\", 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.1.0\", ngImport: i0, type: MinValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMinValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.1.0\", 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.1.0\", 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.1.0\", ngImport: i0, type: RequiredValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nRequiredValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.1.0\", 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.1.0\", 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.1.0\", ngImport: i0, type: CheckboxRequiredValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nCheckboxRequiredValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.1.0\", 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.1.0\", 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.1.0\", ngImport: i0, type: EmailValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nEmailValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.1.0\", 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.1.0\", 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.1.0\", ngImport: i0, type: MinLengthValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMinLengthValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.1.0\", 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.1.0\", 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.1.0\", ngImport: i0, type: MaxLengthValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMaxLengthValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.1.0\", 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.1.0\", 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.1.0\", ngImport: i0, type: PatternValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nPatternValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.1.0\", 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.1.0\", 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.1.0\", ngImport: i0, type: ɵInternalFormsSharedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nɵInternalFormsSharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.1.0\", 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.1.0\", ngImport: i0, type: ɵInternalFormsSharedModule, imports: [RadioControlRegistryModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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 @see FormControl} elements\n * have `{nonNullable: true}` and are non-nullable.\n *\n * **Constructing non-nullable controls**\n *\n * When constructing a control, it will be non-nullable, and will reset to its initial value.\n *\n * ```ts\n * let nnfb = new FormBuilder().nonNullable;\n * let name = nnfb.control('Alex'); // FormControl<string>\n * name.reset();\n * console.log(name); // 'Alex'\n * ```\n *\n * **Constructing non-nullable groups or arrays**\n *\n * When constructing a group or array, all automatically created inner controls will be\n * non-nullable, and will reset to their initial values.\n *\n * ```ts\n * let nnfb = new FormBuilder().nonNullable;\n * let name = nnfb.group({who: 'Alex'}); // FormGroup<{who: FormControl<string>}>\n * name.reset();\n * console.log(name); // {who: 'Alex'}\n * ```\n * **Constructing *nullable* fields on groups or arrays**\n *\n * It is still possible to have a nullable field. In particular, any `FormControl` which is\n * *already* constructed will not be altered. For example:\n *\n * ```ts\n * let nnfb = new FormBuilder().nonNullable;\n * // FormGroup<{who: FormControl<string|null>}>\n * let name = nnfb.group({who: new FormControl('Alex')});\n * name.reset(); console.log(name); // {who: null}\n * ```\n *\n * Because the inner control is constructed explicitly by the caller, the builder has\n * no control over how it is created, and cannot exclude the `null`.\n */\n get nonNullable() {\n const nnfb = new FormBuilder();\n nnfb.useNonNullable = true;\n return nnfb;\n }\n group(controls, options = null) {\n const reducedControls = this._reduceControls(controls);\n let newOptions = {};\n if (isAbstractControlOptions(options)) {\n // `options` are `AbstractControlOptions`\n newOptions = options;\n }\n else if (options !== null) {\n // `options` are legacy form group options\n newOptions.validators = options.validator;\n newOptions.asyncValidators = options.asyncValidator;\n }\n return new FormGroup(reducedControls, newOptions);\n }\n /**\n * @description\n * Constructs a new `FormRecord` instance. Accepts a single generic argument, which is an object\n * containing all the keys and corresponding inner control types.\n *\n * @param controls A collection of child controls. The key for each child is the name\n * under which it is registered.\n *\n * @param options Configuration options object for the `FormRecord`. The object should have the\n * `AbstractControlOptions` type and might contain the following fields:\n * * `validators`: A synchronous validator function, or an array of validator functions.\n * * `asyncValidators`: A single async validator or array of async validator functions.\n * * `updateOn`: The event upon which the control should be updated (options: 'change' | 'blur'\n * | submit').\n */\n record(controls, options = null) {\n const reducedControls = this._reduceControls(controls);\n // Cast to `any` because the inferred types are not as specific as Element.\n return new FormRecord(reducedControls, options);\n }\n /**\n * @description\n * Constructs a new `FormControl` with the given state, validators and options. Sets\n * `{nonNullable: true}` in the options to get a non-nullable control. Otherwise, the\n * control will be nullable. Accepts a single generic argument, which is the type of the\n * control's value.\n *\n * @param formState Initializes the control with an initial state value, or\n * with an object that contains both a value and a disabled status.\n *\n * @param validatorOrOpts A synchronous validator function, or an array of\n * such functions, or a `FormControlOptions` object that contains\n * validation functions and a validation trigger.\n *\n * @param asyncValidator A single async validator or array of async validator\n * functions.\n *\n * @usageNotes\n *\n * ### Initialize a control as disabled\n *\n * The following example returns a control with an initial value in a disabled state.\n *\n * <code-example path=\"forms/ts/formBuilder/form_builder_example.ts\" region=\"disabled-control\">\n * </code-example>\n */\n control(formState, validatorOrOpts, asyncValidator) {\n let newOptions = {};\n if (!this.useNonNullable) {\n return new FormControl(formState, validatorOrOpts, asyncValidator);\n }\n if (isAbstractControlOptions(validatorOrOpts)) {\n // If the second argument is options, then they are copied.\n newOptions = validatorOrOpts;\n }\n else {\n // If the other arguments are validators, they are copied into an options object.\n newOptions.validators = validatorOrOpts;\n newOptions.asyncValidators = asyncValidator;\n }\n return new FormControl(formState, { ...newOptions, nonNullable: true });\n }\n /**\n * Constructs a new `FormArray` from the given array of configurations,\n * validators and options. Accepts a single generic argument, which is the type of each control\n * inside the array.\n *\n * @param controls An array of child controls or control configs. Each child control is given an\n * index when it is registered.\n *\n * @param validatorOrOpts A synchronous validator function, or an array of such functions, or an\n * `AbstractControlOptions` object that contains\n * validation functions and a validation trigger.\n *\n * @param asyncValidator A single async validator or array of async validator functions.\n */\n array(controls, validatorOrOpts, asyncValidator) {\n const createdControls = controls.map(c => this._createControl(c));\n // Cast to `any` because the inferred types are not as specific as Element.\n return new FormArray(createdControls, validatorOrOpts, asyncValidator);\n }\n /** @internal */\n _reduceControls(controls) {\n const createdControls = {};\n Object.keys(controls).forEach(controlName => {\n createdControls[controlName] = this._createControl(controls[controlName]);\n });\n return createdControls;\n }\n /** @internal */\n _createControl(controls) {\n if (controls instanceof FormControl) {\n return controls;\n }\n else if (controls instanceof AbstractControl) { // A control; just return it\n return controls;\n }\n else if (Array.isArray(controls)) { // ControlConfig Tuple\n const value = controls[0];\n const validator = controls.length > 1 ? controls[1] : null;\n const asyncValidator = controls.length > 2 ? controls[2] : null;\n return this.control(value, validator, asyncValidator);\n }\n else { // T or FormControlState<T>\n return this.control(controls);\n }\n }\n}\nFormBuilder.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: FormBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nFormBuilder.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: FormBuilder, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", ngImport: i0, type: NonNullableFormBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nNonNullableFormBuilder.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: NonNullableFormBuilder, providedIn: 'root', useFactory: () => inject(FormBuilder).nonNullable });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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 @see FormBuilder, but it provides untyped controls.\n */\nclass UntypedFormBuilder extends FormBuilder {\n group(controlsConfig, options = null) {\n return super.group(controlsConfig, options);\n }\n /**\n * Like `FormBuilder#control`, except the resulting control is untyped.\n */\n control(formState, validatorOrOpts, asyncValidator) {\n return super.control(formState, validatorOrOpts, asyncValidator);\n }\n /**\n * Like `FormBuilder#array`, except the resulting array is untyped.\n */\n array(controlsConfig, validatorOrOpts, asyncValidator) {\n return super.array(controlsConfig, validatorOrOpts, asyncValidator);\n }\n}\nUntypedFormBuilder.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: UntypedFormBuilder, deps: null, target: i0.ɵɵFactoryTarget.Injectable });\nUntypedFormBuilder.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: UntypedFormBuilder, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0');\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.1.0\", ngImport: i0, type: FormsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nFormsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.1.0\", ngImport: i0, type: FormsModule, declarations: [NgModel, NgModelGroup, NgForm], exports: [ɵInternalFormsSharedModule, NgModel, NgModelGroup, NgForm] });\nFormsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: FormsModule, imports: [ɵInternalFormsSharedModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", ngImport: i0, type: ReactiveFormsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nReactiveFormsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.1.0\", 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.1.0\", ngImport: i0, type: ReactiveFormsModule, imports: [ɵInternalFormsSharedModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0-rc.0\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.1.0\", ngImport: i0, type: NoopAnimationDriver, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nNoopAnimationDriver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: NoopAnimationDriver });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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._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 invalidNonAnimatableProps = new Set();\n timelines.forEach(({ keyframes }) => {\n const nonAnimatablePropsInitialValues = new Map();\n keyframes.forEach(keyframe => {\n for (const [prop, value] of keyframe.entries()) {\n if (!driver.validateAnimatableStyleProperty(prop)) {\n if (nonAnimatablePropsInitialValues.has(prop) && !invalidNonAnimatableProps.has(prop)) {\n const propInitialValue = nonAnimatablePropsInitialValues.get(prop);\n if (propInitialValue !== value) {\n invalidNonAnimatableProps.add(prop);\n }\n }\n else {\n nonAnimatablePropsInitialValues.set(prop, value);\n }\n }\n }\n });\n });\n if (invalidNonAnimatableProps.size > 0) {\n console.warn(`Warning: The animation trigger \"${triggerName}\" is attempting to animate the following` +\n ' not animatable properties: ' + Array.from(invalidNonAnimatableProps).join(', ') + '\\n' +\n '(to check the list of all animatable properties visit https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_animated_properties)');\n }\n}\nfunction oneOrMoreTransitionsMatch(matchFns, currentState, nextState, element, params) {\n return matchFns.some(fn => fn(currentState, nextState, element, params));\n}\nfunction applyParamDefaults(userParams, defaults) {\n const result = copyObj(defaults);\n for (const key in userParams) {\n if (userParams.hasOwnProperty(key) && userParams[key] != null) {\n result[key] = userParams[key];\n }\n }\n return result;\n}\nclass AnimationStateStyles {\n constructor(styles, defaultParams, normalizer) {\n this.styles = styles;\n this.defaultParams = defaultParams;\n this.normalizer = normalizer;\n }\n buildStyles(params, errors) {\n const finalStyles = new Map();\n const combinedParams = copyObj(this.defaultParams);\n Object.keys(params).forEach(key => {\n const value = params[key];\n if (value !== null) {\n combinedParams[key] = value;\n }\n });\n this.styles.styles.forEach(value => {\n if (typeof value !== 'string') {\n value.forEach((val, prop) => {\n if (val) {\n val = interpolateParams(val, combinedParams, errors);\n }\n const normalizedProp = this.normalizer.normalizePropertyName(prop, errors);\n val = this.normalizer.normalizeStyleValue(prop, normalizedProp, val, errors);\n finalStyles.set(prop, val);\n });\n }\n });\n return finalStyles;\n }\n}\n\nfunction buildTrigger(name, ast, normalizer) {\n return new AnimationTrigger(name, ast, normalizer);\n}\nclass AnimationTrigger {\n constructor(name, ast, _normalizer) {\n this.name = name;\n this.ast = ast;\n this._normalizer = _normalizer;\n this.transitionFactories = [];\n this.states = new Map();\n ast.states.forEach(ast => {\n const defaultParams = (ast.options && ast.options.params) || {};\n this.states.set(ast.name, new AnimationStateStyles(ast.style, defaultParams, _normalizer));\n });\n balanceProperties(this.states, 'true', '1');\n balanceProperties(this.states, 'false', '0');\n ast.transitions.forEach(ast => {\n this.transitionFactories.push(new AnimationTransitionFactory(name, ast, this.states));\n });\n this.fallbackTransition = createFallbackTransition(name, this.states, this._normalizer);\n }\n get containsQueries() {\n return this.ast.queryCount > 0;\n }\n matchTransition(currentState, nextState, element, params) {\n const entry = this.transitionFactories.find(f => f.match(currentState, nextState, element, params));\n return entry || null;\n }\n matchStyles(currentState, params, errors) {\n return this.fallbackTransition.buildStyles(currentState, params, errors);\n }\n}\nfunction createFallbackTransition(triggerName, states, normalizer) {\n const matchers = [(fromState, toState) => true];\n const animation = { type: 2 /* AnimationMetadataType.Sequence */, steps: [], options: null };\n const transition = {\n type: 1 /* AnimationMetadataType.Transition */,\n animation,\n matchers,\n options: null,\n queryCount: 0,\n depCount: 0\n };\n return new AnimationTransitionFactory(triggerName, transition, states);\n}\nfunction balanceProperties(stateMap, key1, key2) {\n if (stateMap.has(key1)) {\n if (!stateMap.has(key2)) {\n stateMap.set(key2, stateMap.get(key1));\n }\n }\n else if (stateMap.has(key2)) {\n stateMap.set(key1, stateMap.get(key2));\n }\n}\n\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.markedForDestroy = false;\n this.disabled = false;\n this.queued = true;\n this.totalTime = 0;\n }\n setRealPlayer(player) {\n if (this._containsRealPlayer)\n return;\n this._player = player;\n this._queuedCallbacks.forEach((callbacks, phase) => {\n callbacks.forEach(callback => listenOnPlayer(player, phase, undefined, callback));\n });\n this._queuedCallbacks.clear();\n this._containsRealPlayer = true;\n this.overrideTotalTime(player.totalTime);\n this.queued = false;\n }\n getRealPlayer() {\n return this._player;\n }\n overrideTotalTime(totalTime) {\n this.totalTime = totalTime;\n }\n syncPlayerEvents(player) {\n const p = this._player;\n if (p.triggerCallback) {\n player.onStart(() => p.triggerCallback('start'));\n }\n player.onDone(() => this.finish());\n player.onDestroy(() => this.destroy());\n }\n _queueEvent(name, callback) {\n getOrSetDefaultValue(this._queuedCallbacks, name, []).push(callback);\n }\n onDone(fn) {\n if (this.queued) {\n this._queueEvent('done', fn);\n }\n this._player.onDone(fn);\n }\n onStart(fn) {\n if (this.queued) {\n this._queueEvent('start', fn);\n }\n this._player.onStart(fn);\n }\n onDestroy(fn) {\n if (this.queued) {\n this._queueEvent('destroy', fn);\n }\n this._player.onDestroy(fn);\n }\n init() {\n this._player.init();\n }\n hasStarted() {\n return this.queued ? false : this._player.hasStarted();\n }\n play() {\n !this.queued && this._player.play();\n }\n pause() {\n !this.queued && this._player.pause();\n }\n restart() {\n !this.queued && this._player.restart();\n }\n finish() {\n this._player.finish();\n }\n destroy() {\n this.destroyed = true;\n this._player.destroy();\n }\n reset() {\n !this.queued && this._player.reset();\n }\n setPosition(p) {\n if (!this.queued) {\n this._player.setPosition(p);\n }\n }\n getPosition() {\n return this.queued ? 0 : this._player.getPosition();\n }\n /** @internal */\n triggerCallback(phaseName) {\n const p = this._player;\n if (p.triggerCallback) {\n p.triggerCallback(phaseName);\n }\n }\n}\nfunction deleteOrUnsetInMap(map, key, value) {\n let currentValues = map.get(key);\n if (currentValues) {\n if (currentValues.length) {\n const index = currentValues.indexOf(value);\n currentValues.splice(index, 1);\n }\n if (currentValues.length == 0) {\n map.delete(key);\n }\n }\n return currentValues;\n}\nfunction normalizeTriggerValue(value) {\n // we use `!= null` here because it's the most simple\n // way to test against a \"falsy\" value without mixing\n // in empty strings or a zero value. DO NOT OPTIMIZE.\n return value != null ? value : null;\n}\nfunction isElementNode(node) {\n return node && node['nodeType'] === 1;\n}\nfunction isTriggerEventValid(eventName) {\n return eventName == 'start' || eventName == 'done';\n}\nfunction cloakElement(element, value) {\n const oldValue = element.style.display;\n element.style.display = value != null ? value : 'none';\n return oldValue;\n}\nfunction cloakAndComputeStyles(valuesMap, driver, elements, elementPropsMap, defaultStyle) {\n const cloakVals = [];\n elements.forEach(element => cloakVals.push(cloakElement(element)));\n const failedElements = [];\n elementPropsMap.forEach((props, element) => {\n const styles = new Map();\n props.forEach(prop => {\n const value = driver.computeStyle(element, prop, defaultStyle);\n styles.set(prop, value);\n // there is no easy way to detect this because a sub element could be removed\n // by a parent animation element being detached.\n if (!value || value.length == 0) {\n element[REMOVAL_FLAG] = NULL_REMOVED_QUERIED_STATE;\n failedElements.push(element);\n }\n });\n valuesMap.set(element, styles);\n });\n // we use a index variable here since Set.forEach(a, i) does not return\n // an index value for the closure (but instead just the value)\n let i = 0;\n elements.forEach(element => cloakElement(element, cloakVals[i++]));\n return failedElements;\n}\n/*\nSince the Angular renderer code will return a collection of inserted\nnodes in all areas of a DOM tree, it's up to this algorithm to figure\nout which nodes are roots for each animation @trigger.\n\nBy placing each inserted node into a Set and traversing upwards, it\nis possible to find the @trigger elements and well any direct *star\ninsertion nodes, if a @trigger root is found then the enter element\nis placed into the Map[@trigger] spot.\n */\nfunction buildRootMap(roots, nodes) {\n const rootMap = new Map();\n roots.forEach(root => rootMap.set(root, []));\n if (nodes.length == 0)\n return rootMap;\n const NULL_NODE = 1;\n const nodeSet = new Set(nodes);\n const localRootMap = new Map();\n function getRoot(node) {\n if (!node)\n return NULL_NODE;\n let root = localRootMap.get(node);\n if (root)\n return root;\n const parent = node.parentNode;\n if (rootMap.has(parent)) { // ngIf inside @trigger\n root = parent;\n }\n else if (nodeSet.has(parent)) { // ngIf inside ngIf\n root = NULL_NODE;\n }\n else { // recurse upwards\n root = getRoot(parent);\n }\n localRootMap.set(node, root);\n return root;\n }\n nodes.forEach(node => {\n const root = getRoot(node);\n if (root !== NULL_NODE) {\n rootMap.get(root).push(node);\n }\n });\n return rootMap;\n}\nfunction addClass(element, className) {\n element.classList?.add(className);\n}\nfunction removeClass(element, className) {\n element.classList?.remove(className);\n}\nfunction removeNodesAfterAnimationDone(engine, element, players) {\n optimizeGroupPlayer(players).onDone(() => engine.processLeaveNode(element));\n}\nfunction flattenGroupPlayers(players) {\n const finalPlayers = [];\n _flattenGroupPlayersRecur(players, finalPlayers);\n return finalPlayers;\n}\nfunction _flattenGroupPlayersRecur(players, finalPlayers) {\n for (let i = 0; i < players.length; i++) {\n const player = players[i];\n if (player instanceof ɵAnimationGroupPlayer) {\n _flattenGroupPlayersRecur(player.players, finalPlayers);\n }\n else {\n finalPlayers.push(player);\n }\n }\n}\nfunction objEquals(a, b) {\n const k1 = Object.keys(a);\n const k2 = Object.keys(b);\n if (k1.length != k2.length)\n return false;\n for (let i = 0; i < k1.length; i++) {\n const prop = k1[i];\n if (!b.hasOwnProperty(prop) || a[prop] !== b[prop])\n return false;\n }\n return true;\n}\nfunction replacePostStylesAsPre(element, allPreStyleElements, allPostStyleElements) {\n const postEntry = allPostStyleElements.get(element);\n if (!postEntry)\n return false;\n let preEntry = allPreStyleElements.get(element);\n if (preEntry) {\n postEntry.forEach(data => preEntry.add(data));\n }\n else {\n allPreStyleElements.set(element, postEntry);\n }\n allPostStyleElements.delete(element);\n return true;\n}\n\nclass AnimationEngine {\n constructor(bodyNode, _driver, _normalizer) {\n this.bodyNode = bodyNode;\n this._driver = _driver;\n this._normalizer = _normalizer;\n this._triggerCache = {};\n // this method is designed to be overridden by the code that uses this engine\n this.onRemovalComplete = (element, context) => { };\n this._transitionEngine = new TransitionAnimationEngine(bodyNode, _driver, _normalizer);\n this._timelineEngine = new TimelineAnimationEngine(bodyNode, _driver, _normalizer);\n this._transitionEngine.onRemovalComplete = (element, context) => this.onRemovalComplete(element, context);\n }\n registerTrigger(componentId, namespaceId, hostElement, name, metadata) {\n const cacheKey = componentId + '-' + name;\n let trigger = this._triggerCache[cacheKey];\n if (!trigger) {\n const errors = [];\n const warnings = [];\n const ast = buildAnimationAst(this._driver, metadata, errors, warnings);\n if (errors.length) {\n throw triggerBuildFailed(name, errors);\n }\n if (warnings.length) {\n warnTriggerBuild(name, warnings);\n }\n trigger = buildTrigger(name, ast, this._normalizer);\n this._triggerCache[cacheKey] = trigger;\n }\n this._transitionEngine.registerTrigger(namespaceId, name, trigger);\n }\n register(namespaceId, hostElement) {\n this._transitionEngine.register(namespaceId, hostElement);\n }\n destroy(namespaceId, context) {\n this._transitionEngine.destroy(namespaceId, context);\n }\n onInsert(namespaceId, element, parent, insertBefore) {\n this._transitionEngine.insertNode(namespaceId, element, parent, insertBefore);\n }\n onRemove(namespaceId, element, context, isHostElement) {\n this._transitionEngine.removeNode(namespaceId, element, isHostElement || false, context);\n }\n disableAnimations(element, disable) {\n this._transitionEngine.markElementAsDisabled(element, disable);\n }\n process(namespaceId, element, property, value) {\n if (property.charAt(0) == '@') {\n const [id, action] = parseTimelineCommand(property);\n const args = value;\n this._timelineEngine.command(id, element, action, args);\n }\n else {\n this._transitionEngine.trigger(namespaceId, element, property, value);\n }\n }\n listen(namespaceId, element, eventName, eventPhase, callback) {\n // @@listen\n if (eventName.charAt(0) == '@') {\n const [id, action] = parseTimelineCommand(eventName);\n return this._timelineEngine.listen(id, element, action, callback);\n }\n return this._transitionEngine.listen(namespaceId, element, eventName, eventPhase, callback);\n }\n flush(microtaskId = -1) {\n this._transitionEngine.flush(microtaskId);\n }\n get players() {\n return this._transitionEngine.players\n .concat(this._timelineEngine.players);\n }\n whenRenderingDone() {\n return this._transitionEngine.whenRenderingDone();\n }\n}\n\n/**\n * Returns an instance of `SpecialCasedStyles` if and when any special (non animateable) styles are\n * detected.\n *\n * In CSS there exist properties that cannot be animated within a keyframe animation\n * (whether it be via CSS keyframes or web-animations) and the animation implementation\n * will ignore them. This function is designed to detect those special cased styles and\n * return a container that will be executed at the start and end of the animation.\n *\n * @returns an instance of `SpecialCasedStyles` if any special styles are detected otherwise `null`\n */\nfunction packageNonAnimatableStyles(element, styles) {\n let startStyles = null;\n let endStyles = null;\n if (Array.isArray(styles) && styles.length) {\n startStyles = filterNonAnimatableStyles(styles[0]);\n if (styles.length > 1) {\n endStyles = filterNonAnimatableStyles(styles[styles.length - 1]);\n }\n }\n else if (styles instanceof Map) {\n startStyles = filterNonAnimatableStyles(styles);\n }\n return (startStyles || endStyles) ? new SpecialCasedStyles(element, startStyles, endStyles) :\n null;\n}\n/**\n * Designed to be executed during a keyframe-based animation to apply any special-cased styles.\n *\n * When started (when the `start()` method is run) then the provided `startStyles`\n * will be applied. When finished (when the `finish()` method is called) the\n * `endStyles` will be applied as well any any starting styles. Finally when\n * `destroy()` is called then all styles will be removed.\n */\nclass SpecialCasedStyles {\n constructor(_element, _startStyles, _endStyles) {\n this._element = _element;\n this._startStyles = _startStyles;\n this._endStyles = _endStyles;\n this._state = 0 /* SpecialCasedStylesState.Pending */;\n let initialStyles = SpecialCasedStyles.initialStylesByElement.get(_element);\n if (!initialStyles) {\n SpecialCasedStyles.initialStylesByElement.set(_element, initialStyles = new Map());\n }\n this._initialStyles = initialStyles;\n }\n start() {\n if (this._state < 1 /* SpecialCasedStylesState.Started */) {\n if (this._startStyles) {\n setStyles(this._element, this._startStyles, this._initialStyles);\n }\n this._state = 1 /* SpecialCasedStylesState.Started */;\n }\n }\n finish() {\n this.start();\n if (this._state < 2 /* SpecialCasedStylesState.Finished */) {\n setStyles(this._element, this._initialStyles);\n if (this._endStyles) {\n setStyles(this._element, this._endStyles);\n this._endStyles = null;\n }\n this._state = 1 /* SpecialCasedStylesState.Started */;\n }\n }\n destroy() {\n this.finish();\n if (this._state < 3 /* SpecialCasedStylesState.Destroyed */) {\n SpecialCasedStyles.initialStylesByElement.delete(this._element);\n if (this._startStyles) {\n eraseStyles(this._element, this._startStyles);\n this._endStyles = null;\n }\n if (this._endStyles) {\n eraseStyles(this._element, this._endStyles);\n this._endStyles = null;\n }\n setStyles(this._element, this._initialStyles);\n this._state = 3 /* SpecialCasedStylesState.Destroyed */;\n }\n }\n}\nSpecialCasedStyles.initialStylesByElement = ( /* @__PURE__ */new WeakMap());\nfunction filterNonAnimatableStyles(styles) {\n let result = null;\n styles.forEach((val, prop) => {\n if (isNonAnimatableStyle(prop)) {\n result = result || new Map();\n result.set(prop, val);\n }\n });\n return result;\n}\nfunction isNonAnimatableStyle(prop) {\n return prop === 'display' || prop === 'position';\n}\n\nclass WebAnimationsPlayer {\n constructor(element, keyframes, options, _specialStyles) {\n this.element = element;\n this.keyframes = keyframes;\n this.options = options;\n this._specialStyles = _specialStyles;\n this._onDoneFns = [];\n this._onStartFns = [];\n this._onDestroyFns = [];\n this._initialized = false;\n this._finished = false;\n this._started = false;\n this._destroyed = false;\n // the following original fns are persistent copies of the _onStartFns and _onDoneFns\n // and are used to reset the fns to their original values upon reset()\n // (since the _onStartFns and _onDoneFns get deleted after they are called)\n this._originalOnDoneFns = [];\n this._originalOnStartFns = [];\n this.time = 0;\n this.parentPlayer = null;\n this.currentSnapshot = new Map();\n this._duration = options['duration'];\n this._delay = options['delay'] || 0;\n this.time = this._duration + this._delay;\n }\n _onFinish() {\n if (!this._finished) {\n this._finished = true;\n this._onDoneFns.forEach(fn => fn());\n this._onDoneFns = [];\n }\n }\n init() {\n this._buildPlayer();\n this._preparePlayerBeforeStart();\n }\n _buildPlayer() {\n if (this._initialized)\n return;\n this._initialized = true;\n const keyframes = this.keyframes;\n this.domPlayer =\n this._triggerWebAnimation(this.element, keyframes, this.options);\n this._finalKeyframe = keyframes.length ? keyframes[keyframes.length - 1] : new Map();\n this.domPlayer.addEventListener('finish', () => this._onFinish());\n }\n _preparePlayerBeforeStart() {\n // this is required so that the player doesn't start to animate right away\n if (this._delay) {\n this._resetDomPlayerState();\n }\n else {\n this.domPlayer.pause();\n }\n }\n _convertKeyframesToObject(keyframes) {\n const kfs = [];\n keyframes.forEach(frame => {\n kfs.push(Object.fromEntries(frame));\n });\n return kfs;\n }\n /** @internal */\n _triggerWebAnimation(element, keyframes, options) {\n // jscompiler doesn't seem to know animate is a native property because it's not fully\n // supported yet across common browsers (we polyfill it for Edge/Safari) [CL #143630929]\n return element['animate'](this._convertKeyframesToObject(keyframes), options);\n }\n onStart(fn) {\n this._originalOnStartFns.push(fn);\n this._onStartFns.push(fn);\n }\n onDone(fn) {\n this._originalOnDoneFns.push(fn);\n this._onDoneFns.push(fn);\n }\n onDestroy(fn) {\n this._onDestroyFns.push(fn);\n }\n play() {\n this._buildPlayer();\n if (!this.hasStarted()) {\n this._onStartFns.forEach(fn => fn());\n this._onStartFns = [];\n this._started = true;\n if (this._specialStyles) {\n this._specialStyles.start();\n }\n }\n this.domPlayer.play();\n }\n pause() {\n this.init();\n this.domPlayer.pause();\n }\n finish() {\n this.init();\n if (this._specialStyles) {\n this._specialStyles.finish();\n }\n this._onFinish();\n this.domPlayer.finish();\n }\n reset() {\n this._resetDomPlayerState();\n this._destroyed = false;\n this._finished = false;\n this._started = false;\n this._onStartFns = this._originalOnStartFns;\n this._onDoneFns = this._originalOnDoneFns;\n }\n _resetDomPlayerState() {\n if (this.domPlayer) {\n this.domPlayer.cancel();\n }\n }\n restart() {\n this.reset();\n this.play();\n }\n hasStarted() {\n return this._started;\n }\n destroy() {\n if (!this._destroyed) {\n this._destroyed = true;\n this._resetDomPlayerState();\n this._onFinish();\n if (this._specialStyles) {\n this._specialStyles.destroy();\n }\n this._onDestroyFns.forEach(fn => fn());\n this._onDestroyFns = [];\n }\n }\n setPosition(p) {\n if (this.domPlayer === undefined) {\n this.init();\n }\n this.domPlayer.currentTime = p * this.time;\n }\n getPosition() {\n return this.domPlayer.currentTime / this.time;\n }\n get totalTime() {\n return this._delay + this._duration;\n }\n beforeDestroy() {\n const styles = new Map();\n if (this.hasStarted()) {\n // note: this code is invoked only when the `play` function was called prior to this\n // (thus `hasStarted` returns true), this implies that the code that initializes\n // `_finalKeyframe` has also been executed and the non-null assertion can be safely used here\n const finalKeyframe = this._finalKeyframe;\n finalKeyframe.forEach((val, prop) => {\n if (prop !== 'offset') {\n styles.set(prop, this._finished ? val : computeStyle(this.element, prop));\n }\n });\n }\n this.currentSnapshot = styles;\n }\n /** @internal */\n triggerCallback(phaseName) {\n const methods = phaseName === 'start' ? this._onStartFns : this._onDoneFns;\n methods.forEach(fn => fn());\n methods.length = 0;\n }\n}\n\nclass WebAnimationsDriver {\n validateStyleProperty(prop) {\n // Perform actual validation in dev mode only, in prod mode this check is a noop.\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n return validateStyleProperty(prop);\n }\n return true;\n }\n validateAnimatableStyleProperty(prop) {\n // Perform actual validation in dev mode only, in prod mode this check is a noop.\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n const cssProp = camelCaseToDashCase(prop);\n return validateWebAnimatableStyleProperty(cssProp);\n }\n return true;\n }\n matchesElement(_element, _selector) {\n // This method is deprecated and no longer in use so we return false.\n return false;\n }\n containsElement(elm1, elm2) {\n return containsElement(elm1, elm2);\n }\n getParentElement(element) {\n return getParentElement(element);\n }\n query(element, selector, multi) {\n return invokeQuery(element, selector, multi);\n }\n computeStyle(element, prop, defaultValue) {\n return window.getComputedStyle(element)[prop];\n }\n animate(element, keyframes, duration, delay, easing, previousPlayers = []) {\n const fill = delay == 0 ? 'both' : 'forwards';\n const playerOptions = { duration, delay, fill };\n // we check for this to avoid having a null|undefined value be present\n // for the easing (which results in an error for certain browsers #9752)\n if (easing) {\n playerOptions['easing'] = easing;\n }\n const previousStyles = new Map();\n const previousWebAnimationPlayers = previousPlayers.filter(player => player instanceof WebAnimationsPlayer);\n if (allowPreviousPlayerStylesMerge(duration, delay)) {\n previousWebAnimationPlayers.forEach(player => {\n player.currentSnapshot.forEach((val, prop) => previousStyles.set(prop, val));\n });\n }\n let _keyframes = normalizeKeyframes(keyframes).map(styles => copyStyles(styles));\n _keyframes = balancePreviousStylesIntoKeyframes(element, _keyframes, previousStyles);\n const specialStyles = packageNonAnimatableStyles(element, _keyframes);\n return new WebAnimationsPlayer(element, _keyframes, playerOptions, specialStyles);\n }\n}\n\n/**\n * @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.1.0\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.1.0\", ngImport: i0, type: BrowserAnimationBuilder, deps: [{ token: i0.RendererFactory2 }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\nBrowserAnimationBuilder.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: BrowserAnimationBuilder });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", 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.1.0\", ngImport: i0, type: AnimationRendererFactory });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", 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.1.0\", ngImport: i0, type: InjectableAnimationEngine });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", ngImport: i0, type: BrowserAnimationsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nBrowserAnimationsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.1.0\", ngImport: i0, type: BrowserAnimationsModule, exports: [BrowserModule] });\nBrowserAnimationsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: BrowserAnimationsModule, providers: BROWSER_ANIMATIONS_PROVIDERS, imports: [BrowserModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", ngImport: i0, type: NoopAnimationsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nNoopAnimationsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.1.0\", ngImport: i0, type: NoopAnimationsModule, exports: [BrowserModule] });\nNoopAnimationsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: NoopAnimationsModule, providers: BROWSER_NOOP_ANIMATIONS_PROVIDERS, imports: [BrowserModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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","/**\n * @license Angular v15.1.0\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.1.0\", ngImport: i0, type: BrowserXhr, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nBrowserXhr.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: BrowserXhr });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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(p => p.manager = this);\n this._plugins = plugins.slice().reverse();\n }\n /**\n * Registers a handler for a specific element and event.\n *\n * @param element The HTML element to receive event notifications.\n * @param eventName The name of the event to listen for.\n * @param handler A function to call when the notification occurs. Receives the\n * event object as an argument.\n * @returns A callback function that can be used to remove the handler.\n */\n addEventListener(element, eventName, handler) {\n const plugin = this._findPluginFor(eventName);\n return plugin.addEventListener(element, eventName, handler);\n }\n /**\n * Registers a global handler for an event in a target view.\n *\n * @param target A target for global event notifications. One of \"window\", \"document\", or \"body\".\n * @param eventName The name of the event to listen for.\n * @param handler A function to call when the notification occurs. Receives the\n * event object as an argument.\n * @returns A callback function that can be used to remove the handler.\n * @deprecated No longer being used in Ivy code. To be removed in version 14.\n */\n addGlobalEventListener(target, eventName, handler) {\n const plugin = this._findPluginFor(eventName);\n return plugin.addGlobalEventListener(target, eventName, handler);\n }\n /**\n * Retrieves the compilation zone in which event listeners are registered.\n */\n getZone() {\n return this._zone;\n }\n /** @internal */\n _findPluginFor(eventName) {\n const plugin = this._eventNameToPlugin.get(eventName);\n if (plugin) {\n return plugin;\n }\n const plugins = this._plugins;\n for (let i = 0; i < plugins.length; i++) {\n const plugin = plugins[i];\n if (plugin.supports(eventName)) {\n this._eventNameToPlugin.set(eventName, plugin);\n return plugin;\n }\n }\n throw new Error(`No event manager plugin found for event ${eventName}`);\n }\n}\nEventManager.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", ngImport: i0, type: EventManager });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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 /** @internal */\n this._stylesSet = new Set();\n }\n addStyles(styles) {\n const additions = new Set();\n styles.forEach(style => {\n if (!this._stylesSet.has(style)) {\n this._stylesSet.add(style);\n additions.add(style);\n }\n });\n this.onStylesAdded(additions);\n }\n onStylesAdded(additions) { }\n getAllStyles() {\n return Array.from(this._stylesSet);\n }\n}\nSharedStylesHost.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: SharedStylesHost, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nSharedStylesHost.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: SharedStylesHost });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: SharedStylesHost, decorators: [{\n type: Injectable\n }] });\nclass DomSharedStylesHost extends SharedStylesHost {\n constructor(_doc) {\n super();\n this._doc = _doc;\n // Maps all registered host nodes to a list of style nodes that have been added to the host node.\n this._hostNodes = new Map();\n this._hostNodes.set(_doc.head, []);\n }\n _addStylesToHost(styles, host, styleNodes) {\n styles.forEach((style) => {\n const styleEl = this._doc.createElement('style');\n styleEl.textContent = style;\n styleNodes.push(host.appendChild(styleEl));\n });\n }\n addHost(hostNode) {\n const styleNodes = [];\n this._addStylesToHost(this._stylesSet, hostNode, styleNodes);\n this._hostNodes.set(hostNode, styleNodes);\n }\n removeHost(hostNode) {\n const styleNodes = this._hostNodes.get(hostNode);\n if (styleNodes) {\n styleNodes.forEach(removeStyle);\n }\n this._hostNodes.delete(hostNode);\n }\n onStylesAdded(additions) {\n this._hostNodes.forEach((styleNodes, hostNode) => {\n this._addStylesToHost(additions, hostNode, styleNodes);\n });\n }\n ngOnDestroy() {\n this._hostNodes.forEach(styleNodes => styleNodes.forEach(removeStyle));\n }\n}\nDomSharedStylesHost.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: DomSharedStylesHost, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\nDomSharedStylesHost.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: DomSharedStylesHost });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: DomSharedStylesHost, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; } });\nfunction removeStyle(styleNode) {\n ɵgetDOM().remove(styleNode);\n}\n\nconst NAMESPACE_URIS = {\n 'svg': 'http://www.w3.org/2000/svg',\n 'xhtml': 'http://www.w3.org/1999/xhtml',\n 'xlink': 'http://www.w3.org/1999/xlink',\n 'xml': 'http://www.w3.org/XML/1998/namespace',\n 'xmlns': 'http://www.w3.org/2000/xmlns/',\n 'math': 'http://www.w3.org/1998/MathML/',\n};\nconst COMPONENT_REGEX = /%COMP%/g;\nconst NG_DEV_MODE$1 = typeof ngDevMode === 'undefined' || !!ngDevMode;\nconst COMPONENT_VARIABLE = '%COMP%';\nconst HOST_ATTR = `_nghost-${COMPONENT_VARIABLE}`;\nconst CONTENT_ATTR = `_ngcontent-${COMPONENT_VARIABLE}`;\nfunction shimContentAttribute(componentShortId) {\n return CONTENT_ATTR.replace(COMPONENT_REGEX, componentShortId);\n}\nfunction shimHostAttribute(componentShortId) {\n return HOST_ATTR.replace(COMPONENT_REGEX, componentShortId);\n}\nfunction flattenStyles(compId, styles) {\n // Cannot use `Infinity` as depth as `infinity` is not a number literal in TypeScript.\n // See: https://github.com/microsoft/TypeScript/issues/32277\n return styles.flat(100).map(s => s.replace(COMPONENT_REGEX, compId));\n}\nfunction decoratePreventDefault(eventHandler) {\n // `DebugNode.triggerEventHandler` needs to know if the listener was created with\n // decoratePreventDefault or is a listener added outside the Angular context so it can handle the\n // two differently. In the first case, the special '__ngUnwrap__' token is passed to the unwrap\n // the listener (see below).\n return (event) => {\n // Ivy uses '__ngUnwrap__' as a special token that allows us to unwrap the function\n // so that it can be invoked programmatically by `DebugNode.triggerEventHandler`. The debug_node\n // can inspect the listener toString contents for the existence of this special token. Because\n // the token is a string literal, it is ensured to not be modified by compiled code.\n if (event === '__ngUnwrap__') {\n return eventHandler;\n }\n const allowDefaultBehavior = eventHandler(event);\n if (allowDefaultBehavior === false) {\n // TODO(tbosch): move preventDefault into event plugins...\n event.preventDefault();\n event.returnValue = false;\n }\n return undefined;\n };\n}\nclass DomRendererFactory2 {\n constructor(eventManager, sharedStylesHost, appId) {\n this.eventManager = eventManager;\n this.sharedStylesHost = sharedStylesHost;\n this.appId = appId;\n this.rendererByCompId = new Map();\n this.defaultRenderer = new DefaultDomRenderer2(eventManager);\n }\n createRenderer(element, type) {\n if (!element || !type) {\n return this.defaultRenderer;\n }\n switch (type.encapsulation) {\n case ViewEncapsulation.Emulated: {\n let renderer = this.rendererByCompId.get(type.id);\n if (!renderer) {\n renderer = new EmulatedEncapsulationDomRenderer2(this.eventManager, this.sharedStylesHost, type, this.appId);\n this.rendererByCompId.set(type.id, renderer);\n }\n renderer.applyToHost(element);\n return renderer;\n }\n case ViewEncapsulation.ShadowDom:\n return new ShadowDomRenderer(this.eventManager, this.sharedStylesHost, element, type);\n default: {\n if (!this.rendererByCompId.has(type.id)) {\n const styles = flattenStyles(type.id, type.styles);\n this.sharedStylesHost.addStyles(styles);\n this.rendererByCompId.set(type.id, this.defaultRenderer);\n }\n return this.defaultRenderer;\n }\n }\n }\n begin() { }\n end() { }\n}\nDomRendererFactory2.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: DomRendererFactory2, deps: [{ token: EventManager }, { token: DomSharedStylesHost }, { token: APP_ID }], target: i0.ɵɵFactoryTarget.Injectable });\nDomRendererFactory2.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: DomRendererFactory2 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: DomRendererFactory2, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: EventManager }, { type: DomSharedStylesHost }, { type: undefined, decorators: [{\n type: Inject,\n args: [APP_ID]\n }] }]; } });\nclass DefaultDomRenderer2 {\n constructor(eventManager) {\n this.eventManager = eventManager;\n this.data = Object.create(null);\n this.destroyNode = null;\n }\n destroy() { }\n createElement(name, namespace) {\n if (namespace) {\n // TODO: `|| namespace` was added in\n // https://github.com/angular/angular/commit/2b9cc8503d48173492c29f5a271b61126104fbdb to\n // support how Ivy passed around the namespace URI rather than short name at the time. It did\n // not, however extend the support to other parts of the system (setAttribute, setAttribute,\n // and the ServerRenderer). We should decide what exactly the semantics for dealing with\n // namespaces should be and make it consistent.\n // Related issues:\n // https://github.com/angular/angular/issues/44028\n // https://github.com/angular/angular/issues/44883\n return document.createElementNS(NAMESPACE_URIS[namespace] || namespace, name);\n }\n return document.createElement(name);\n }\n createComment(value) {\n return document.createComment(value);\n }\n createText(value) {\n return document.createTextNode(value);\n }\n appendChild(parent, newChild) {\n const targetParent = isTemplateNode(parent) ? parent.content : parent;\n targetParent.appendChild(newChild);\n }\n insertBefore(parent, newChild, refChild) {\n if (parent) {\n const targetParent = isTemplateNode(parent) ? parent.content : parent;\n targetParent.insertBefore(newChild, refChild);\n }\n }\n removeChild(parent, oldChild) {\n if (parent) {\n parent.removeChild(oldChild);\n }\n }\n selectRootElement(selectorOrNode, preserveContent) {\n let el = typeof selectorOrNode === 'string' ? document.querySelector(selectorOrNode) :\n selectorOrNode;\n if (!el) {\n throw new Error(`The selector \"${selectorOrNode}\" did not match any elements`);\n }\n if (!preserveContent) {\n el.textContent = '';\n }\n return el;\n }\n parentNode(node) {\n return node.parentNode;\n }\n nextSibling(node) {\n return node.nextSibling;\n }\n setAttribute(el, name, value, namespace) {\n if (namespace) {\n name = namespace + ':' + name;\n const namespaceUri = NAMESPACE_URIS[namespace];\n if (namespaceUri) {\n el.setAttributeNS(namespaceUri, name, value);\n }\n else {\n el.setAttribute(name, value);\n }\n }\n else {\n el.setAttribute(name, value);\n }\n }\n removeAttribute(el, name, namespace) {\n if (namespace) {\n const namespaceUri = NAMESPACE_URIS[namespace];\n if (namespaceUri) {\n el.removeAttributeNS(namespaceUri, name);\n }\n else {\n el.removeAttribute(`${namespace}:${name}`);\n }\n }\n else {\n el.removeAttribute(name);\n }\n }\n addClass(el, name) {\n el.classList.add(name);\n }\n removeClass(el, name) {\n el.classList.remove(name);\n }\n setStyle(el, style, value, flags) {\n if (flags & (RendererStyleFlags2.DashCase | RendererStyleFlags2.Important)) {\n el.style.setProperty(style, value, flags & RendererStyleFlags2.Important ? 'important' : '');\n }\n else {\n el.style[style] = value;\n }\n }\n removeStyle(el, style, flags) {\n if (flags & RendererStyleFlags2.DashCase) {\n el.style.removeProperty(style);\n }\n else {\n // IE requires '' instead of null\n // see https://github.com/angular/angular/issues/7916\n el.style[style] = '';\n }\n }\n setProperty(el, name, value) {\n NG_DEV_MODE$1 && checkNoSyntheticProp(name, 'property');\n el[name] = value;\n }\n setValue(node, value) {\n node.nodeValue = value;\n }\n listen(target, event, callback) {\n NG_DEV_MODE$1 && checkNoSyntheticProp(event, 'listener');\n if (typeof target === 'string') {\n return this.eventManager.addGlobalEventListener(target, event, decoratePreventDefault(callback));\n }\n return this.eventManager.addEventListener(target, event, decoratePreventDefault(callback));\n }\n}\nconst AT_CHARCODE = (() => '@'.charCodeAt(0))();\nfunction checkNoSyntheticProp(name, nameKind) {\n if (name.charCodeAt(0) === AT_CHARCODE) {\n throw new Error(`Unexpected synthetic ${nameKind} ${name} found. Please make sure that:\n - Either \\`BrowserAnimationsModule\\` or \\`NoopAnimationsModule\\` are imported in your application.\n - There is corresponding configuration for the animation named \\`${name}\\` defined in the \\`animations\\` field of the \\`@Component\\` decorator (see https://angular.io/api/core/Component#animations).`);\n }\n}\nfunction isTemplateNode(node) {\n return node.tagName === 'TEMPLATE' && node.content !== undefined;\n}\nclass EmulatedEncapsulationDomRenderer2 extends DefaultDomRenderer2 {\n constructor(eventManager, sharedStylesHost, component, appId) {\n super(eventManager);\n this.component = component;\n const styles = flattenStyles(appId + '-' + component.id, component.styles);\n sharedStylesHost.addStyles(styles);\n this.contentAttr = shimContentAttribute(appId + '-' + component.id);\n this.hostAttr = shimHostAttribute(appId + '-' + component.id);\n }\n applyToHost(element) {\n super.setAttribute(element, this.hostAttr, '');\n }\n createElement(parent, name) {\n const el = super.createElement(parent, name);\n super.setAttribute(el, this.contentAttr, '');\n return el;\n }\n}\nclass ShadowDomRenderer extends DefaultDomRenderer2 {\n constructor(eventManager, sharedStylesHost, hostEl, component) {\n super(eventManager);\n this.sharedStylesHost = sharedStylesHost;\n this.hostEl = hostEl;\n this.shadowRoot = hostEl.attachShadow({ mode: 'open' });\n this.sharedStylesHost.addHost(this.shadowRoot);\n const styles = flattenStyles(component.id, component.styles);\n for (let i = 0; i < styles.length; i++) {\n const styleEl = document.createElement('style');\n styleEl.textContent = styles[i];\n this.shadowRoot.appendChild(styleEl);\n }\n }\n nodeOrShadowRoot(node) {\n return node === this.hostEl ? this.shadowRoot : node;\n }\n destroy() {\n this.sharedStylesHost.removeHost(this.shadowRoot);\n }\n appendChild(parent, newChild) {\n return super.appendChild(this.nodeOrShadowRoot(parent), newChild);\n }\n insertBefore(parent, newChild, refChild) {\n return super.insertBefore(this.nodeOrShadowRoot(parent), newChild, refChild);\n }\n removeChild(parent, oldChild) {\n return super.removeChild(this.nodeOrShadowRoot(parent), oldChild);\n }\n parentNode(node) {\n return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(node)));\n }\n}\n\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.1.0\", ngImport: i0, type: DomEventsPlugin, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\nDomEventsPlugin.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: DomEventsPlugin });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", ngImport: i0, type: KeyEventsPlugin, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\nKeyEventsPlugin.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: KeyEventsPlugin });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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]\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.1.0\", 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.1.0\", ngImport: i0, type: BrowserModule, exports: [CommonModule, ApplicationModule] });\nBrowserModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: BrowserModule, providers: [\n ...BROWSER_MODULE_PROVIDERS,\n ...TESTABILITY_PROVIDERS\n ], imports: [CommonModule, ApplicationModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", ngImport: i0, type: Meta, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\nMeta.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: Meta, providedIn: 'root', useFactory: createMeta, deps: [] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", ngImport: i0, type: Title, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\nTitle.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: Title, providedIn: 'root', useFactory: createTitle, deps: [] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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\nconst CAMEL_CASE_REGEXP = /([A-Z])/g;\nconst DASH_CASE_REGEXP = /-([a-z])/g;\nfunction camelCaseToDashCase(input) {\n return input.replace(CAMEL_CASE_REGEXP, (...m) => '-' + m[1].toLowerCase());\n}\nfunction dashCaseToCamelCase(input) {\n return input.replace(DASH_CASE_REGEXP, (...m) => m[1].toUpperCase());\n}\n/**\n * Exports the value under a given `name` in the global property `ng`. For example `ng.probe` if\n * `name` is `'probe'`.\n * @param name Name under which it will be exported. Keep in mind this will be a property of the\n * global `ng` object.\n * @param value The value to export.\n */\nfunction exportNgVar(name, value) {\n if (typeof COMPILED === 'undefined' || !COMPILED) {\n // Note: we can't export `ng` when using closure enhanced optimization as:\n // - closure declares globals itself for minified names, which sometimes clobber our `ng` global\n // - we can't declare a closure extern as the namespace `ng` is already used within Google\n // for typings for angularJS (via `goog.provide('ng....')`).\n const ng = ɵglobal['ng'] = ɵglobal['ng'] || {};\n ng[name] = value;\n }\n}\n\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 }\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.1.0\", ngImport: i0, type: TransferState, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nTransferState.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: TransferState, providedIn: 'root', useFactory: () => {\n const doc = inject(DOCUMENT);\n const appId = inject(APP_ID);\n const state = new TransferState();\n state.store = retrieveTransferredState(doc, appId);\n return state;\n } });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: TransferState, decorators: [{\n type: Injectable,\n args: [{\n providedIn: 'root',\n useFactory: () => {\n const doc = inject(DOCUMENT);\n const appId = inject(APP_ID);\n const state = new TransferState();\n state.store = retrieveTransferredState(doc, appId);\n return state;\n }\n }]\n }] });\nfunction retrieveTransferredState(doc, appId) {\n // Locate the script tag with the JSON data transferred from the server.\n // The id of the script tag is set to the Angular appId + 'state'.\n const script = doc.getElementById(appId + '-state');\n let initialState = {};\n if (script && script.textContent) {\n try {\n // Avoid using any here as it triggers lint errors in google3 (any is not allowed).\n initialState = JSON.parse(unescapeHtml(script.textContent));\n }\n catch (e) {\n console.warn('Exception while restoring TransferState for app ' + appId, e);\n }\n }\n return initialState;\n}\n/**\n * NgModule to install on the client side while using the `TransferState` to transfer state from\n * server to client.\n *\n * @publicApi\n * @deprecated no longer needed, you can inject the `TransferState` in an app without providing\n * this module.\n */\nclass BrowserTransferStateModule {\n}\nBrowserTransferStateModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: BrowserTransferStateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nBrowserTransferStateModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.1.0\", ngImport: i0, type: BrowserTransferStateModule });\nBrowserTransferStateModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: BrowserTransferStateModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", ngImport: i0, type: HammerGestureConfig, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nHammerGestureConfig.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: HammerGestureConfig });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", 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.1.0\", ngImport: i0, type: HammerGesturesPlugin });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", ngImport: i0, type: HammerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nHammerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.1.0\", ngImport: i0, type: HammerModule });\nHammerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", 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.1.0\", ngImport: i0, type: DomSanitizer, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nDomSanitizer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: DomSanitizer, providedIn: 'root', useExisting: i0.forwardRef(function () { return DomSanitizerImpl; }) });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", ngImport: i0, type: DomSanitizerImpl, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\nDomSanitizerImpl.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: DomSanitizerImpl, providedIn: 'root', useFactory: domSanitizerImplFactory, deps: [{ token: Injector }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0');\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, 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","import { Observable } from '../Observable';\nimport { argsArgArrayOrObject } from '../util/argsArgArrayOrObject';\nimport { from } from './from';\nimport { identity } from '../util/identity';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nimport { popResultSelector, popScheduler } from '../util/args';\nimport { createObject } from '../util/createObject';\nimport { OperatorSubscriber } from '../operators/OperatorSubscriber';\nimport { executeSchedule } from '../util/executeSchedule';\nexport function combineLatest(...args) {\n const scheduler = popScheduler(args);\n const resultSelector = popResultSelector(args);\n const { args: observables, keys } = argsArgArrayOrObject(args);\n if (observables.length === 0) {\n return from([], scheduler);\n }\n const result = new Observable(combineLatestInit(observables, scheduler, keys\n ?\n (values) => createObject(keys, values)\n :\n identity));\n return resultSelector ? result.pipe(mapOneOrManyArgs(resultSelector)) : result;\n}\nexport function combineLatestInit(observables, scheduler, valueTransform = identity) {\n return (subscriber) => {\n maybeSchedule(scheduler, () => {\n const { length } = observables;\n const values = new Array(length);\n let active = length;\n let remainingFirstValues = length;\n for (let i = 0; i < length; i++) {\n maybeSchedule(scheduler, () => {\n const source = from(observables[i], scheduler);\n let hasFirstValue = false;\n source.subscribe(new OperatorSubscriber(subscriber, (value) => {\n values[i] = value;\n if (!hasFirstValue) {\n hasFirstValue = true;\n remainingFirstValues--;\n }\n if (!remainingFirstValues) {\n subscriber.next(valueTransform(values.slice()));\n }\n }, () => {\n if (!--active) {\n subscriber.complete();\n }\n }));\n }, subscriber);\n }\n }, subscriber);\n };\n}\nfunction maybeSchedule(scheduler, execute, subscription) {\n if (scheduler) {\n executeSchedule(subscription, scheduler, execute);\n }\n else {\n execute();\n }\n}\n","import { concatAll } from '../operators/concatAll';\nimport { popScheduler } from '../util/args';\nimport { from } from './from';\nexport function concat(...args) {\n return concatAll()(from(args, popScheduler(args)));\n}\n","import { mergeAll } from './mergeAll';\nexport function concatAll() {\n return mergeAll(1);\n}\n","import { Observable } from '../Observable';\nimport { innerFrom } from './innerFrom';\nexport function defer(observableFactory) {\n return new Observable((subscriber) => {\n innerFrom(observableFactory()).subscribe(subscriber);\n });\n}\n","import { Observable } from '../Observable';\nimport { isFunction } from '../util/isFunction';\nexport function throwError(errorOrErrorFactory, scheduler) {\n const errorFactory = isFunction(errorOrErrorFactory) ? errorOrErrorFactory : () => errorOrErrorFactory;\n const init = (subscriber) => subscriber.error(errorFactory());\n return new Observable(scheduler ? (subscriber) => scheduler.schedule(init, 0, subscriber) : init);\n}\n","import { operate } from '../util/lift';\nimport { OperatorSubscriber } from './OperatorSubscriber';\nexport function refCount() {\n return operate((source, subscriber) => {\n let connection = null;\n source._refCount++;\n const refCounter = new OperatorSubscriber(subscriber, undefined, undefined, undefined, () => {\n if (!source || source._refCount <= 0 || 0 < --source._refCount) {\n connection = null;\n return;\n }\n const sharedConnection = source._connection;\n const conn = connection;\n connection = null;\n if (sharedConnection && (!conn || sharedConnection === conn)) {\n sharedConnection.unsubscribe();\n }\n subscriber.unsubscribe();\n });\n source.subscribe(refCounter);\n if (!refCounter.closed) {\n connection = source.connect();\n }\n });\n}\n","import { Observable } from '../Observable';\nimport { Subscription } from '../Subscription';\nimport { refCount as higherOrderRefCount } from '../operators/refCount';\nimport { OperatorSubscriber } from '../operators/OperatorSubscriber';\nimport { hasLift } from '../util/lift';\nexport class ConnectableObservable extends Observable {\n constructor(source, subjectFactory) {\n super();\n this.source = source;\n this.subjectFactory = subjectFactory;\n this._subject = null;\n this._refCount = 0;\n this._connection = null;\n if (hasLift(source)) {\n this.lift = source.lift;\n }\n }\n _subscribe(subscriber) {\n return this.getSubject().subscribe(subscriber);\n }\n getSubject() {\n const subject = this._subject;\n if (!subject || subject.isStopped) {\n this._subject = this.subjectFactory();\n }\n return this._subject;\n }\n _teardown() {\n this._refCount = 0;\n const { _connection } = this;\n this._subject = this._connection = null;\n _connection === null || _connection === void 0 ? void 0 : _connection.unsubscribe();\n }\n connect() {\n let connection = this._connection;\n if (!connection) {\n connection = this._connection = new Subscription();\n const subject = this.getSubject();\n connection.add(this.source.subscribe(new OperatorSubscriber(subject, undefined, () => {\n this._teardown();\n subject.complete();\n }, (err) => {\n this._teardown();\n subject.error(err);\n }, () => this._teardown())));\n if (connection.closed) {\n this._connection = null;\n connection = Subscription.EMPTY;\n }\n }\n return connection;\n }\n refCount() {\n return higherOrderRefCount()(this);\n }\n}\n","import { innerFrom } from '../observable/innerFrom';\nimport { operate } from '../util/lift';\nimport { OperatorSubscriber } from './OperatorSubscriber';\nexport function switchMap(project, resultSelector) {\n return operate((source, subscriber) => {\n let innerSubscriber = null;\n let index = 0;\n let isComplete = false;\n const checkComplete = () => isComplete && !innerSubscriber && subscriber.complete();\n source.subscribe(new OperatorSubscriber(subscriber, (value) => {\n innerSubscriber === null || innerSubscriber === void 0 ? void 0 : innerSubscriber.unsubscribe();\n let innerIndex = 0;\n const outerIndex = index++;\n innerFrom(project(value, outerIndex)).subscribe((innerSubscriber = new OperatorSubscriber(subscriber, (innerValue) => subscriber.next(resultSelector ? resultSelector(value, innerValue, outerIndex, innerIndex++) : innerValue), () => {\n innerSubscriber = null;\n checkComplete();\n })));\n }, () => {\n isComplete = true;\n checkComplete();\n }));\n });\n}\n","import { operate } from '../util/lift';\nimport { OperatorSubscriber } from './OperatorSubscriber';\nexport function defaultIfEmpty(defaultValue) {\n return operate((source, subscriber) => {\n let hasValue = false;\n source.subscribe(new OperatorSubscriber(subscriber, (value) => {\n hasValue = true;\n subscriber.next(value);\n }, () => {\n if (!hasValue) {\n subscriber.next(defaultValue);\n }\n subscriber.complete();\n }));\n });\n}\n","import { EmptyError } from '../util/EmptyError';\nimport { operate } from '../util/lift';\nimport { OperatorSubscriber } from './OperatorSubscriber';\nexport function throwIfEmpty(errorFactory = defaultErrorFactory) {\n return operate((source, subscriber) => {\n let hasValue = false;\n source.subscribe(new OperatorSubscriber(subscriber, (value) => {\n hasValue = true;\n subscriber.next(value);\n }, () => (hasValue ? subscriber.complete() : subscriber.error(errorFactory()))));\n });\n}\nfunction defaultErrorFactory() {\n return new EmptyError();\n}\n","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 { isFunction } from '../util/isFunction';\nimport { operate } from '../util/lift';\nimport { OperatorSubscriber } from './OperatorSubscriber';\nimport { identity } from '../util/identity';\nexport function tap(observerOrNext, error, complete) {\n const tapObserver = isFunction(observerOrNext) || error || complete\n ?\n { next: observerOrNext, error, complete }\n : observerOrNext;\n return tapObserver\n ? operate((source, subscriber) => {\n var _a;\n (_a = tapObserver.subscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver);\n let isUnsub = true;\n source.subscribe(new OperatorSubscriber(subscriber, (value) => {\n var _a;\n (_a = tapObserver.next) === null || _a === void 0 ? void 0 : _a.call(tapObserver, value);\n subscriber.next(value);\n }, () => {\n var _a;\n isUnsub = false;\n (_a = tapObserver.complete) === null || _a === void 0 ? void 0 : _a.call(tapObserver);\n subscriber.complete();\n }, (err) => {\n var _a;\n isUnsub = false;\n (_a = tapObserver.error) === null || _a === void 0 ? void 0 : _a.call(tapObserver, err);\n subscriber.error(err);\n }, () => {\n var _a, _b;\n if (isUnsub) {\n (_a = tapObserver.unsubscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver);\n }\n (_b = tapObserver.finalize) === null || _b === void 0 ? void 0 : _b.call(tapObserver);\n }));\n })\n :\n identity;\n}\n","import { innerFrom } from '../observable/innerFrom';\nimport { OperatorSubscriber } from './OperatorSubscriber';\nimport { operate } from '../util/lift';\nexport function catchError(selector) {\n return operate((source, subscriber) => {\n let innerSub = null;\n let syncUnsub = false;\n let handledResult;\n innerSub = source.subscribe(new OperatorSubscriber(subscriber, undefined, undefined, (err) => {\n handledResult = innerFrom(selector(err, catchError(selector)(source)));\n if (innerSub) {\n innerSub.unsubscribe();\n innerSub = null;\n handledResult.subscribe(subscriber);\n }\n else {\n syncUnsub = true;\n }\n }));\n if (syncUnsub) {\n innerSub.unsubscribe();\n innerSub = null;\n handledResult.subscribe(subscriber);\n }\n });\n}\n","import { OperatorSubscriber } from './OperatorSubscriber';\nexport function scanInternals(accumulator, seed, hasSeed, emitOnNext, emitBeforeComplete) {\n return (source, subscriber) => {\n let hasState = hasSeed;\n let state = seed;\n let index = 0;\n source.subscribe(new OperatorSubscriber(subscriber, (value) => {\n const i = index++;\n state = hasState\n ?\n accumulator(state, value, i)\n :\n ((hasState = true), value);\n emitOnNext && subscriber.next(state);\n }, emitBeforeComplete &&\n (() => {\n hasState && subscriber.next(state);\n subscriber.complete();\n })));\n };\n}\n","import { operate } from '../util/lift';\nimport { scanInternals } from './scanInternals';\nexport function scan(accumulator, seed) {\n return operate(scanInternals(accumulator, seed, arguments.length >= 2, true));\n}\n","import { EMPTY } from '../observable/empty';\nimport { operate } from '../util/lift';\nimport { OperatorSubscriber } from './OperatorSubscriber';\nexport function takeLast(count) {\n return count <= 0\n ? () => EMPTY\n : operate((source, subscriber) => {\n let buffer = [];\n source.subscribe(new OperatorSubscriber(subscriber, (value) => {\n buffer.push(value);\n count < buffer.length && buffer.shift();\n }, () => {\n for (const value of buffer) {\n subscriber.next(value);\n }\n subscriber.complete();\n }, undefined, () => {\n buffer = null;\n }));\n });\n}\n","import { EmptyError } from '../util/EmptyError';\nimport { filter } from './filter';\nimport { takeLast } from './takeLast';\nimport { throwIfEmpty } from './throwIfEmpty';\nimport { defaultIfEmpty } from './defaultIfEmpty';\nimport { identity } from '../util/identity';\nexport function last(predicate, defaultValue) {\n const hasDefaultValue = arguments.length >= 2;\n return (source) => source.pipe(predicate ? filter((v, i) => predicate(v, i, source)) : identity, takeLast(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(() => new EmptyError()));\n}\n","import { operate } from '../util/lift';\nexport function finalize(callback) {\n return operate((source, subscriber) => {\n try {\n source.subscribe(subscriber);\n }\n finally {\n subscriber.add(callback);\n }\n });\n}\n","/**\n * @license Angular v15.1.0\n * (c) 2010-2022 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport * as i0 from '@angular/core';\nimport { ɵisObservable, ɵisPromise, ɵRuntimeError, Injectable, EventEmitter, inject, ViewContainerRef, ChangeDetectorRef, EnvironmentInjector, Directive, Input, Output, Component, createEnvironmentInjector, isStandalone, ComponentFactoryResolver, ɵisInjectable, InjectionToken, InjectFlags, NgModuleFactory, ɵConsole, NgZone, ɵcoerceToBoolean, ɵɵsanitizeUrlOrResourceUrl, Attribute, HostBinding, HostListener, Optional, ContentChildren, makeEnvironmentProviders, APP_BOOTSTRAP_LISTENER, ENVIRONMENT_INITIALIZER, Injector, ApplicationRef, APP_INITIALIZER, NgProbeToken, SkipSelf, NgModule, Inject, Version } from '@angular/core';\nimport { from, of, BehaviorSubject, EmptyError, combineLatest, concat, defer, pipe, throwError, Observable, EMPTY, ConnectableObservable, Subject } from 'rxjs';\nimport * as i3 from '@angular/common';\nimport { Location, ViewportScroller, LOCATION_INITIALIZED, LocationStrategy, HashLocationStrategy, PathLocationStrategy } from '@angular/common';\nimport { map, switchMap, take, startWith, filter, mergeMap, first, concatMap, tap, catchError, scan, last as last$1, takeWhile, defaultIfEmpty, takeLast, mapTo, finalize, refCount, mergeAll } from 'rxjs/operators';\nimport * as i1 from '@angular/platform-browser';\n\n/**\n * 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.1.0\", ngImport: i0, type: UrlSerializer, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nUrlSerializer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: UrlSerializer, providedIn: 'root', useFactory: () => new DefaultUrlSerializer() });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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 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 return createUrlTree(a, currentUrlTree, commands, queryParams, fragment);\n }\n}\nLegacyCreateUrlTree.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: LegacyCreateUrlTree, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nLegacyCreateUrlTree.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: LegacyCreateUrlTree });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: LegacyCreateUrlTree, decorators: [{\n type: Injectable\n }] });\nclass CreateUrlTreeUsingSnapshot {\n createUrlTree(relativeTo, currentState, currentUrlTree, commands, queryParams, fragment) {\n let relativeToUrlSegmentGroup;\n try {\n const relativeToSnapshot = relativeTo ? relativeTo.snapshot : currentState.snapshot.root;\n relativeToUrlSegmentGroup = createSegmentGroupFromRoute(relativeToSnapshot);\n }\n catch (e) {\n // This is strictly for backwards compatibility with tests that create\n // invalid `ActivatedRoute` mocks.\n // Note: the difference between having this fallback for invalid `ActivatedRoute` setups and\n // just throwing is ~500 test failures. Fixing all of those tests by hand is not feasible at\n // the moment.\n if (NG_DEV_MODE$9) {\n console.warn(`The ActivatedRoute has an invalid structure. This is likely due to an incomplete mock in tests.`);\n }\n if (typeof commands[0] !== 'string' || !commands[0].startsWith('/')) {\n // Navigations that were absolute in the old way of creating UrlTrees\n // would still work because they wouldn't attempt to match the\n // segments in the `ActivatedRoute` to the `currentUrlTree` but\n // instead just replace the root segment with the navigation result.\n // Non-absolute navigations would fail to apply the commands because\n // the logic could not find the segment to replace (so they'd act like there were no\n // commands).\n commands = [];\n }\n relativeToUrlSegmentGroup = currentUrlTree.root;\n }\n return createUrlTreeFromSegmentGroup(relativeToUrlSegmentGroup, commands, queryParams, fragment);\n }\n}\nCreateUrlTreeUsingSnapshot.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: CreateUrlTreeUsingSnapshot, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nCreateUrlTreeUsingSnapshot.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: CreateUrlTreeUsingSnapshot });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: CreateUrlTreeUsingSnapshot, decorators: [{\n type: Injectable\n }] });\nclass CreateUrlTreeStrategy {\n}\nCreateUrlTreeStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: CreateUrlTreeStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nCreateUrlTreeStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: CreateUrlTreeStrategy, providedIn: 'root', useClass: LegacyCreateUrlTree });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", ngImport: i0, type: ChildrenOutletContexts, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nChildrenOutletContexts.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: ChildrenOutletContexts, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", ngImport: i0, type: RouterOutlet, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nRouterOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.1.0\", 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.1.0\", 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.1.0\", ngImport: i0, type: ɵEmptyOutletComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });\nɵEmptyOutletComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.1.0\", 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.1.0\", 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 && !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 && context.outlet) {\n // Destroy the component\n context.outlet.deactivate();\n // Destroy the contexts for all the outlets that were in the component\n context.children.onOutletDeactivated();\n // Clear the information about the attached component on the context but keep the reference to\n // the outlet.\n context.attachRef = null;\n context.resolver = null;\n context.route = null;\n }\n }\n activateChildRoutes(futureNode, currNode, contexts) {\n const children = nodeChildrenAsMap(currNode);\n futureNode.children.forEach(c => {\n this.activateRoutes(c, children[c.value.outlet], contexts);\n this.forwardEvent(new ActivationEnd(c.value.snapshot));\n });\n if (futureNode.children.length) {\n this.forwardEvent(new ChildActivationEnd(futureNode.value.snapshot));\n }\n }\n activateRoutes(futureNode, currNode, parentContexts) {\n const future = futureNode.value;\n const curr = currNode ? currNode.value : null;\n advanceActivatedRoute(future);\n // reusing the node\n if (future === curr) {\n if (future.component) {\n // If we have a normal route, we need to go through an outlet.\n const context = parentContexts.getOrCreateContext(future.outlet);\n this.activateChildRoutes(futureNode, currNode, context.children);\n }\n else {\n // if we have a componentless route, we recurse but keep the same outlet map.\n this.activateChildRoutes(futureNode, currNode, parentContexts);\n }\n }\n else {\n if (future.component) {\n // if we have a normal route, we need to place the component into the outlet and recurse.\n const context = parentContexts.getOrCreateContext(future.outlet);\n if (this.routeReuseStrategy.shouldAttach(future.snapshot)) {\n const stored = this.routeReuseStrategy.retrieve(future.snapshot);\n this.routeReuseStrategy.store(future.snapshot, null);\n context.children.onOutletReAttached(stored.contexts);\n context.attachRef = stored.componentRef;\n context.route = stored.route.value;\n if (context.outlet) {\n // Attach right away when the outlet has already been instantiated\n // Otherwise attach from `RouterOutlet.ngOnInit` when it is instantiated\n context.outlet.attach(stored.componentRef, stored.route.value);\n }\n advanceActivatedRoute(stored.route.value);\n this.activateChildRoutes(futureNode, null, context.children);\n }\n else {\n const injector = getClosestRouteInjector(future.snapshot);\n const cmpFactoryResolver = injector?.get(ComponentFactoryResolver) ?? null;\n context.attachRef = null;\n context.route = future;\n context.resolver = cmpFactoryResolver;\n context.injector = injector;\n if (context.outlet) {\n // Activate the outlet when it has already been instantiated\n // Otherwise it will get activated from its `ngOnInit` when instantiated\n context.outlet.activateWith(future, context.injector);\n }\n this.activateChildRoutes(futureNode, null, context.children);\n }\n }\n else {\n // if we have a componentless route, we recurse but keep the same outlet map.\n this.activateChildRoutes(futureNode, null, parentContexts);\n }\n }\n }\n}\n\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\n// This file exists to support the legacy `loadChildren: string` behavior being patched back into\n// Angular.\nfunction deprecatedLoadChildrenString(injector, loadChildren) {\n return null;\n}\n\nconst NG_DEV_MODE$5 = typeof ngDevMode === 'undefined' || !!ngDevMode;\n/**\n * The [DI token](guide/glossary/#di-token) for a router configuration.\n *\n * `ROUTES` is a low level API for router configuration via dependency injection.\n *\n * We recommend that in almost all cases to use higher level APIs such as `RouterModule.forRoot()`,\n * `provideRouter`, or `Router.resetConfig()`.\n *\n * @publicApi\n */\nconst ROUTES = new InjectionToken('ROUTES');\nclass RouterConfigLoader {\n constructor(injector, compiler) {\n this.injector = injector;\n this.compiler = compiler;\n this.componentLoaders = new WeakMap();\n this.childrenLoaders = new WeakMap();\n }\n loadComponent(route) {\n if (this.componentLoaders.get(route)) {\n return this.componentLoaders.get(route);\n }\n else if (route._loadedComponent) {\n return of(route._loadedComponent);\n }\n if (this.onLoadStartListener) {\n this.onLoadStartListener(route);\n }\n const loadRunner = wrapIntoObservable(route.loadComponent())\n .pipe(map(maybeUnwrapDefaultExport), tap(component => {\n if (this.onLoadEndListener) {\n this.onLoadEndListener(route);\n }\n NG_DEV_MODE$5 && assertStandalone(route.path ?? '', component);\n route._loadedComponent = component;\n }), finalize(() => {\n this.componentLoaders.delete(route);\n }));\n // Use custom ConnectableObservable as share in runners pipe increasing the bundle size too much\n const loader = new ConnectableObservable(loadRunner, () => new Subject()).pipe(refCount());\n this.componentLoaders.set(route, loader);\n return loader;\n }\n loadChildren(parentInjector, route) {\n if (this.childrenLoaders.get(route)) {\n return this.childrenLoaders.get(route);\n }\n else if (route._loadedRoutes) {\n return of({ routes: route._loadedRoutes, injector: route._loadedInjector });\n }\n if (this.onLoadStartListener) {\n this.onLoadStartListener(route);\n }\n const moduleFactoryOrRoutes$ = this.loadModuleFactoryOrRoutes(route.loadChildren);\n const loadRunner = moduleFactoryOrRoutes$.pipe(map((factoryOrRoutes) => {\n if (this.onLoadEndListener) {\n this.onLoadEndListener(route);\n }\n // This injector comes from the `NgModuleRef` when lazy loading an `NgModule`. There is no\n // injector associated with lazy loading a `Route` array.\n let injector;\n let rawRoutes;\n let requireStandaloneComponents = false;\n if (Array.isArray(factoryOrRoutes)) {\n rawRoutes = factoryOrRoutes;\n requireStandaloneComponents = true;\n }\n else {\n injector = factoryOrRoutes.create(parentInjector).injector;\n // When loading a module that doesn't provide `RouterModule.forChild()` preloader\n // will get stuck in an infinite loop. The child module's Injector will look to\n // its parent `Injector` when it doesn't find any ROUTES so it will return routes\n // for it's parent module instead.\n rawRoutes = flatten(injector.get(ROUTES, [], InjectFlags.Self | InjectFlags.Optional));\n }\n const routes = rawRoutes.map(standardizeConfig);\n NG_DEV_MODE$5 && validateConfig(routes, route.path, requireStandaloneComponents);\n return { routes, injector };\n }), finalize(() => {\n this.childrenLoaders.delete(route);\n }));\n // Use custom ConnectableObservable as share in runners pipe increasing the bundle size too much\n const loader = new ConnectableObservable(loadRunner, () => new Subject())\n .pipe(refCount());\n this.childrenLoaders.set(route, loader);\n return loader;\n }\n loadModuleFactoryOrRoutes(loadChildren) {\n const deprecatedResult = deprecatedLoadChildrenString(this.injector, loadChildren);\n if (deprecatedResult) {\n return deprecatedResult;\n }\n return wrapIntoObservable(loadChildren())\n .pipe(map(maybeUnwrapDefaultExport), mergeMap((t) => {\n if (t instanceof NgModuleFactory || Array.isArray(t)) {\n return of(t);\n }\n else {\n return from(this.compiler.compileModuleAsync(t));\n }\n }));\n }\n}\nRouterConfigLoader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: RouterConfigLoader, deps: [{ token: i0.Injector }, { token: i0.Compiler }], target: i0.ɵɵFactoryTarget.Injectable });\nRouterConfigLoader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: RouterConfigLoader, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: RouterConfigLoader, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.Compiler }]; } });\nfunction isWrappedDefaultExport(value) {\n // We use `in` here with a string key `'default'`, because we expect `DefaultExport` objects to be\n // dynamically imported ES modules with a spec-mandated `default` key. Thus we don't expect that\n // `default` will be a renamed property.\n return value && typeof value === 'object' && 'default' in value;\n}\nfunction maybeUnwrapDefaultExport(input) {\n // As per `isWrappedDefaultExport`, the `default` key here is generated by the browser and not\n // subject to property renaming, so we reference it with bracket access.\n return isWrappedDefaultExport(input) ? input['default'] : input;\n}\n\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 */, router);\n return false;\n }\n return true;\n }), \n // --- RESOLVE ---\n switchTap(t => {\n if (t.guards.canActivateChecks.length) {\n return of(t).pipe(tap(t => {\n const resolveStart = new ResolveStart(t.id, this.urlSerializer.serialize(t.extractedUrl), this.urlSerializer.serialize(t.urlAfterRedirects), t.targetSnapshot);\n this.events.next(resolveStart);\n }), switchMap(t => {\n let dataResolved = false;\n return of(t).pipe(resolveData(router.paramsInheritanceStrategy, this.environmentInjector), tap({\n next: () => dataResolved = true,\n complete: () => {\n if (!dataResolved) {\n router.restoreHistory(t);\n this.cancelNavigationTransition(t, NG_DEV_MODE$4 ?\n `At least one route resolver didn't emit any value.` :\n '', 2 /* NavigationCancellationCode.NoDataFromResolver */, router);\n }\n }\n }));\n }), tap(t => {\n const resolveEnd = new ResolveEnd(t.id, this.urlSerializer.serialize(t.extractedUrl), this.urlSerializer.serialize(t.urlAfterRedirects), t.targetSnapshot);\n this.events.next(resolveEnd);\n }));\n }\n return undefined;\n }), \n // --- LOAD COMPONENTS ---\n switchTap((t) => {\n const loadComponents = (route) => {\n const loaders = [];\n if (route.routeConfig?.loadComponent &&\n !route.routeConfig._loadedComponent) {\n loaders.push(this.configLoader.loadComponent(route.routeConfig)\n .pipe(tap(loadedComponent => {\n route.component = loadedComponent;\n }), map(() => void 0)));\n }\n for (const child of route.children) {\n loaders.push(...loadComponents(child));\n }\n return loaders;\n };\n return combineLatest(loadComponents(t.targetSnapshot.root))\n .pipe(defaultIfEmpty(), take(1));\n }), switchTap(() => 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)), tap({\n next: (t) => {\n completed = true;\n this.lastSuccessfulNavigation = this.currentNavigation;\n router.navigated = true;\n this.events.next(new NavigationEnd(t.id, this.urlSerializer.serialize(t.extractedUrl), this.urlSerializer.serialize(router.currentUrlTree)));\n router.titleStrategy?.updateTitle(t.targetRouterState.snapshot);\n t.resolve(true);\n },\n complete: () => {\n completed = true;\n }\n }), finalize(() => {\n /* When the navigation stream finishes either through error or success,\n * we set the `completed` or `errored` flag. However, there are some\n * situations where we could get here without either of those being set.\n * For instance, a redirect during NavigationStart. Therefore, this is a\n * catch-all to make sure the NavigationCancel event is fired when a\n * navigation gets cancelled but not caught by other means. */\n if (!completed && !errored) {\n const cancelationReason = NG_DEV_MODE$4 ?\n `Navigation ID ${overallTransitionState\n .id} is not equal to the current navigation id ${this.navigationId}` :\n '';\n this.cancelNavigationTransition(overallTransitionState, cancelationReason, 1 /* NavigationCancellationCode.SupersededByNewNavigation */, router);\n }\n // Only clear current navigation if it is still set to the one that\n // finalized.\n if (this.currentNavigation?.id === overallTransitionState.id) {\n this.currentNavigation = null;\n }\n }), catchError((e) => {\n errored = true;\n /* This error type is issued during Redirect, and is handled as a\n * cancellation rather than an error. */\n if (isNavigationCancelingError$1(e)) {\n if (!isRedirectingNavigationCancelingError$1(e)) {\n // Set property only if we're not redirecting. If we landed on a page\n // and redirect to `/` route, the new navigation is going to see the\n // `/` isn't a change from the default currentUrlTree and won't\n // navigate. This is only applicable with initial navigation, so\n // setting `navigated` only when not redirecting resolves this\n // scenario.\n router.navigated = true;\n router.restoreHistory(overallTransitionState, true);\n }\n const navCancel = new NavigationCancel(overallTransitionState.id, this.urlSerializer.serialize(overallTransitionState.extractedUrl), e.message, e.cancellationCode);\n this.events.next(navCancel);\n // When redirecting, we need to delay resolving the navigation\n // promise and push it to the redirect navigation\n if (!isRedirectingNavigationCancelingError$1(e)) {\n overallTransitionState.resolve(false);\n }\n else {\n const mergedTree = router.urlHandlingStrategy.merge(e.url, router.rawUrlTree);\n const extras = {\n skipLocationChange: overallTransitionState.extras.skipLocationChange,\n // The URL is already updated at this point if we have 'eager' URL\n // updates or if the navigation was triggered by the browser (back\n // button, URL bar, etc). We want to replace that item in history\n // if the navigation is rejected.\n replaceUrl: router.urlUpdateStrategy === 'eager' ||\n isBrowserTriggeredNavigation(overallTransitionState.source)\n };\n router.scheduleNavigation(mergedTree, IMPERATIVE_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, router) {\n const navCancel = new NavigationCancel(t.id, this.urlSerializer.serialize(t.extractedUrl), reason, code);\n this.events.next(navCancel);\n t.resolve(false);\n }\n}\nNavigationTransitions.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: NavigationTransitions, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nNavigationTransitions.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: NavigationTransitions, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", ngImport: i0, type: TitleStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nTitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: TitleStrategy, providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy) });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", ngImport: i0, type: DefaultTitleStrategy, deps: [{ token: i1.Title }], target: i0.ɵɵFactoryTarget.Injectable });\nDefaultTitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: DefaultTitleStrategy, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", ngImport: i0, type: RouteReuseStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nRouteReuseStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: RouteReuseStrategy, providedIn: 'root', useFactory: () => inject(DefaultRouteReuseStrategy) });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", ngImport: i0, type: DefaultRouteReuseStrategy, deps: null, target: i0.ɵɵFactoryTarget.Injectable });\nDefaultRouteReuseStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: DefaultRouteReuseStrategy, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", ngImport: i0, type: UrlHandlingStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nUrlHandlingStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: UrlHandlingStrategy, providedIn: 'root', useFactory: () => inject(DefaultUrlHandlingStrategy) });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", ngImport: i0, type: DefaultUrlHandlingStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nDefaultUrlHandlingStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: DefaultUrlHandlingStrategy, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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 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 */\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 Configure this through `RouterModule.forRoot` instead:\n * `RouterModule.forRoot(routes, {malformedUriErrorHandler: myHandler})`\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 = t.targetPageId;\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 (typeof ngDevMode === 'undefined' ||\n ngDevMode && this.isNgZoneEnabled && !NgZone.isInAngularZone()) {\n this.console.warn(`Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'?`);\n }\n const urlTree = isUrlTree(url) ? url : this.parseUrl(url);\n const mergedTree = this.urlHandlingStrategy.merge(urlTree, this.rawUrlTree);\n return this.scheduleNavigation(mergedTree, IMPERATIVE_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 // If we're replacing the URL or doing a silent navigation, we do not want to increment the\n // page id because we aren't pushing a new entry to history.\n if (extras.replaceUrl || extras.skipLocationChange) {\n targetPageId = this.browserPageId ?? 0;\n }\n else {\n targetPageId = (this.browserPageId ?? 0) + 1;\n }\n }\n }\n else {\n // This is unused when `canceledNavigationResolution` is not computed.\n targetPageId = 0;\n }\n this.navigationTransitions.handleNavigationRequest({\n targetPageId,\n source,\n restoredState,\n currentUrlTree: this.currentUrlTree,\n currentRawUrl: this.currentUrlTree,\n rawUrl,\n extras,\n resolve,\n reject,\n promise,\n currentSnapshot: this.routerState.snapshot,\n currentRouterState: this.routerState\n });\n // Make sure that the error is propagated even though `processNavigations` catch\n // handler does not rethrow\n return promise.catch((e) => {\n return Promise.reject(e);\n });\n }\n /** @internal */\n setBrowserUrl(url, transition) {\n const path = this.urlSerializer.serialize(url);\n const state = {\n ...transition.extras.state,\n ...this.generateNgRouterState(transition.id, transition.targetPageId)\n };\n if (this.location.isCurrentPathEqualTo(path) || !!transition.extras.replaceUrl) {\n this.location.replaceState(path, '', state);\n }\n else {\n this.location.go(path, '', state);\n }\n }\n /**\n * Performs the necessary rollback action to restore the browser URL to the\n * state before the transition.\n * @internal\n */\n restoreHistory(transition, restoringFromCaughtError = false) {\n if (this.canceledNavigationResolution === 'computed') {\n const targetPagePosition = this.currentPageId - transition.targetPageId;\n // The navigator change the location before triggered the browser event,\n // so we need to go back to the current url if the navigation is canceled.\n // Also, when navigation gets cancelled while using url update strategy eager, then we need to\n // go back. Because, when `urlUpdateStrategy` is `eager`; `setBrowserUrl` method is called\n // before any verification.\n const browserUrlUpdateOccurred = (transition.source === 'popstate' || this.urlUpdateStrategy === 'eager' ||\n this.currentUrlTree === this.getCurrentNavigation()?.finalUrl);\n if (browserUrlUpdateOccurred && targetPagePosition !== 0) {\n this.location.historyGo(targetPagePosition);\n }\n else if (this.currentUrlTree === this.getCurrentNavigation()?.finalUrl &&\n targetPagePosition === 0) {\n // We got to the activation stage (where currentUrlTree is set to the navigation's\n // finalUrl), but we weren't moving anywhere in history (skipLocationChange or replaceUrl).\n // We still need to reset the router state back to what it was when the navigation started.\n this.resetState(transition);\n // TODO(atscott): resetting the `browserUrlTree` should really be done in `resetState`.\n // Investigate if this can be done by running TGP.\n this.browserUrlTree = transition.currentUrlTree;\n this.resetUrlToCurrentUrlTree();\n }\n else {\n // The browser URL and router state was not updated before the navigation cancelled so\n // there's no restoration needed.\n }\n }\n else if (this.canceledNavigationResolution === 'replace') {\n // TODO(atscott): It seems like we should _always_ reset the state here. It would be a no-op\n // for `deferred` navigations that haven't change the internal state yet because guards\n // reject. For 'eager' navigations, it seems like we also really should reset the state\n // because the navigation was cancelled. Investigate if this can be done by running TGP.\n if (restoringFromCaughtError) {\n this.resetState(transition);\n }\n this.resetUrlToCurrentUrlTree();\n }\n }\n resetState(t) {\n this.routerState = t.currentRouterState;\n this.currentUrlTree = t.currentUrlTree;\n // Note here that we use the urlHandlingStrategy to get the reset `rawUrlTree` because it may be\n // configured to handle only part of the navigation URL. This means we would only want to reset\n // the part of the navigation handled by the Angular router rather than the whole URL. In\n // addition, the URLHandlingStrategy may be configured to specifically preserve parts of the URL\n // when merging, such as the query params so they are not lost on a refresh.\n this.rawUrlTree = this.urlHandlingStrategy.merge(this.currentUrlTree, t.rawUrl);\n }\n resetUrlToCurrentUrlTree() {\n this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree), '', this.generateNgRouterState(this.lastSuccessfulId, this.currentPageId));\n }\n generateNgRouterState(navigationId, routerPageId) {\n if (this.canceledNavigationResolution === 'computed') {\n return { navigationId, ɵrouterPageId: routerPageId };\n }\n return { navigationId };\n }\n}\nRouter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: Router, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nRouter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: Router, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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;\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.1.0\", 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.1.0\", 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.1.0\", 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.1.0\", 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.1.0\", 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.1.0\", 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.1.0\", ngImport: i0, type: PreloadAllModules, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nPreloadAllModules.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: PreloadAllModules, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", ngImport: i0, type: NoPreloading, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nNoPreloading.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: NoPreloading, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: NoPreloading, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }] });\n/**\n * The preloader optimistically loads all router configurations to\n * make navigations into lazily-loaded sections of the application faster.\n *\n * The preloader runs in the background. When the router bootstraps, the preloader\n * starts listening to all navigation events. After every such event, the preloader\n * will check if any configurations can be loaded lazily.\n *\n * If a route is protected by `canLoad` guards, the preloaded will not load it.\n *\n * @publicApi\n */\nclass RouterPreloader {\n constructor(router, compiler, injector, preloadingStrategy, loader) {\n this.router = router;\n this.injector = injector;\n this.preloadingStrategy = preloadingStrategy;\n this.loader = loader;\n }\n setUpPreloading() {\n this.subscription =\n this.router.events\n .pipe(filter((e) => e instanceof NavigationEnd), concatMap(() => this.preload()))\n .subscribe(() => { });\n }\n preload() {\n return this.processRoutes(this.injector, this.router.config);\n }\n /** @nodoc */\n ngOnDestroy() {\n if (this.subscription) {\n this.subscription.unsubscribe();\n }\n }\n processRoutes(injector, routes) {\n const res = [];\n for (const route of routes) {\n if (route.providers && !route._injector) {\n route._injector =\n createEnvironmentInjector(route.providers, injector, `Route: ${route.path}`);\n }\n const injectorForCurrentRoute = route._injector ?? injector;\n const injectorForChildren = route._loadedInjector ?? injectorForCurrentRoute;\n // Note that `canLoad` is only checked as a condition that prevents `loadChildren` and not\n // `loadComponent`. `canLoad` guards only block loading of child routes by design. This\n // happens as a consequence of needing to descend into children for route matching immediately\n // while component loading is deferred until route activation. Because `canLoad` guards can\n // have side effects, we cannot execute them here so we instead skip preloading altogether\n // when present. Lastly, it remains to be decided whether `canLoad` should behave this way\n // at all. Code splitting and lazy loading is separate from client-side authorization checks\n // and should not be used as a security measure to prevent loading of code.\n if ((route.loadChildren && !route._loadedRoutes && route.canLoad === undefined) ||\n (route.loadComponent && !route._loadedComponent)) {\n res.push(this.preloadConfig(injectorForCurrentRoute, route));\n }\n else if (route.children || route._loadedRoutes) {\n res.push(this.processRoutes(injectorForChildren, (route.children ?? route._loadedRoutes)));\n }\n }\n return from(res).pipe(mergeAll());\n }\n preloadConfig(injector, route) {\n return this.preloadingStrategy.preload(route, () => {\n let loadedChildren$;\n if (route.loadChildren && route.canLoad === undefined) {\n loadedChildren$ = this.loader.loadChildren(injector, route);\n }\n else {\n loadedChildren$ = of(null);\n }\n const recursiveLoadChildren$ = loadedChildren$.pipe(mergeMap((config) => {\n if (config === null) {\n return of(void 0);\n }\n route._loadedRoutes = config.routes;\n route._loadedInjector = config.injector;\n // If the loaded config was a module, use that as the module/module injector going\n // forward. Otherwise, continue using the current module/module injector.\n return this.processRoutes(config.injector ?? injector, config.routes);\n }));\n if (route.loadComponent && !route._loadedComponent) {\n const loadComponent$ = this.loader.loadComponent(route);\n return from([recursiveLoadChildren$, loadComponent$]).pipe(mergeAll());\n }\n else {\n return recursiveLoadChildren$;\n }\n });\n }\n}\nRouterPreloader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", ngImport: i0, type: RouterPreloader, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0\", ngImport: i0, type: RouterScroller, deps: \"invalid\", target: i0.ɵɵFactoryTarget.Injectable });\nRouterScroller.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: RouterScroller });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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\nconst NG_DEV_MODE$1 = typeof ngDevMode === 'undefined' || ngDevMode;\n/**\n * Sets up providers necessary to enable `Router` functionality for the application.\n * Allows to configure a set of routes as well as extra features that should be enabled.\n *\n * @usageNotes\n *\n * Basic example of how you can add a Router to your application:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent, {\n * providers: [provideRouter(appRoutes)]\n * });\n * ```\n *\n * You can also enable optional features in the Router by adding functions from the `RouterFeatures`\n * type:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n * {\n * providers: [\n * provideRouter(appRoutes,\n * withDebugTracing(),\n * withRouterConfig({paramsInheritanceStrategy: 'always'}))\n * ]\n * }\n * );\n * ```\n *\n * @see `RouterFeatures`\n *\n * @publicApi\n * @param routes A set of `Route`s to use for the application routing table.\n * @param features Optional features to configure additional router behaviors.\n * @returns A set of providers to setup a Router.\n */\nfunction provideRouter(routes, ...features) {\n return makeEnvironmentProviders([\n { provide: ROUTES, multi: true, useValue: routes },\n NG_DEV_MODE$1 ? { provide: ROUTER_IS_PROVIDED, useValue: true } : [],\n { provide: ActivatedRoute, useFactory: rootRoute, deps: [Router] },\n { provide: APP_BOOTSTRAP_LISTENER, multi: true, useFactory: getBootstrapListener },\n features.map(feature => feature.ɵproviders),\n ]);\n}\nfunction rootRoute(router) {\n return router.routerState.root;\n}\n/**\n * Helper function to create an object that represents a Router feature.\n */\nfunction routerFeature(kind, providers) {\n return { ɵkind: kind, ɵproviders: providers };\n}\n/**\n * An Injection token used to indicate whether `provideRouter` or `RouterModule.forRoot` was ever\n * called.\n */\nconst ROUTER_IS_PROVIDED = new InjectionToken('', { providedIn: 'root', factory: () => false });\nconst routerIsProvidedDevModeCheck = {\n provide: ENVIRONMENT_INITIALIZER,\n multi: true,\n useFactory() {\n return () => {\n if (!inject(ROUTER_IS_PROVIDED)) {\n console.warn('`provideRoutes` was called without `provideRouter` or `RouterModule.forRoot`. ' +\n 'This is likely a mistake.');\n }\n };\n }\n};\n/**\n * Registers a [DI provider](guide/glossary#provider) for a set of routes.\n * @param routes The route configuration to provide.\n *\n * @usageNotes\n *\n * ```\n * @NgModule({\n * providers: [provideRoutes(ROUTES)]\n * })\n * class LazyLoadedChildModule {}\n * ```\n *\n * @deprecated If necessary, provide routes using the `ROUTES` `InjectionToken`.\n * @see `ROUTES`\n * @publicApi\n */\nfunction provideRoutes(routes) {\n return [\n { provide: ROUTES, multi: true, useValue: routes },\n NG_DEV_MODE$1 ? routerIsProvidedDevModeCheck : [],\n ];\n}\n/**\n * Enables customizable scrolling behavior for router navigations.\n *\n * @usageNotes\n *\n * Basic example of how you can enable scrolling feature:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n * {\n * providers: [\n * provideRouter(appRoutes, withInMemoryScrolling())\n * ]\n * }\n * );\n * ```\n *\n * @see `provideRouter`\n * @see `ViewportScroller`\n *\n * @publicApi\n * @param options Set of configuration parameters to customize scrolling behavior, see\n * `InMemoryScrollingOptions` for additional information.\n * @returns A set of providers for use with `provideRouter`.\n */\nfunction withInMemoryScrolling(options = {}) {\n const providers = [{\n provide: ROUTER_SCROLLER,\n useFactory: () => {\n const viewportScroller = inject(ViewportScroller);\n const zone = inject(NgZone);\n const transitions = inject(NavigationTransitions);\n const urlSerializer = inject(UrlSerializer);\n return new RouterScroller(urlSerializer, transitions, viewportScroller, zone, options);\n },\n }];\n return routerFeature(4 /* RouterFeatureKind.InMemoryScrollingFeature */, providers);\n}\nfunction getBootstrapListener() {\n const injector = inject(Injector);\n return (bootstrappedComponentRef) => {\n const ref = injector.get(ApplicationRef);\n if (bootstrappedComponentRef !== ref.components[0]) {\n return;\n }\n const router = injector.get(Router);\n const bootstrapDone = injector.get(BOOTSTRAP_DONE);\n if (injector.get(INITIAL_NAVIGATION) === 1 /* InitialNavigation.EnabledNonBlocking */) {\n router.initialNavigation();\n }\n injector.get(ROUTER_PRELOADER, null, InjectFlags.Optional)?.setUpPreloading();\n injector.get(ROUTER_SCROLLER, null, InjectFlags.Optional)?.init();\n router.resetRootComponentType(ref.componentTypes[0]);\n if (!bootstrapDone.closed) {\n bootstrapDone.next();\n bootstrapDone.unsubscribe();\n }\n };\n}\n/**\n * A subject used to indicate that the bootstrapping phase is done. When initial navigation is\n * `enabledBlocking`, the first navigation waits until bootstrapping is finished before continuing\n * to the activation phase.\n */\nconst BOOTSTRAP_DONE = new InjectionToken(NG_DEV_MODE$1 ? 'bootstrap done indicator' : '', {\n factory: () => {\n return new Subject();\n }\n});\nconst INITIAL_NAVIGATION = new InjectionToken(NG_DEV_MODE$1 ? 'initial navigation' : '', { providedIn: 'root', factory: () => 1 /* InitialNavigation.EnabledNonBlocking */ });\n/**\n * Configures initial navigation to start before the root component is created.\n *\n * The bootstrap is blocked until the initial navigation is complete. This value is required for\n * [server-side rendering](guide/universal) to work.\n *\n * @usageNotes\n *\n * Basic example of how you can enable this navigation behavior:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n * {\n * providers: [\n * provideRouter(appRoutes, withEnabledBlockingInitialNavigation())\n * ]\n * }\n * );\n * ```\n *\n * @see `provideRouter`\n *\n * @publicApi\n * @returns A set of providers for use with `provideRouter`.\n */\nfunction withEnabledBlockingInitialNavigation() {\n const providers = [\n { provide: INITIAL_NAVIGATION, useValue: 0 /* InitialNavigation.EnabledBlocking */ },\n {\n provide: APP_INITIALIZER,\n multi: true,\n deps: [Injector],\n useFactory: (injector) => {\n const locationInitialized = injector.get(LOCATION_INITIALIZED, Promise.resolve());\n /**\n * Performs the given action once the router finishes its next/current navigation.\n *\n * If the navigation is canceled or errors without a redirect, the navigation is considered\n * complete. If the `NavigationEnd` event emits, the navigation is also considered complete.\n */\n function afterNextNavigation(action) {\n const router = injector.get(Router);\n router.events\n .pipe(filter((e) => e instanceof NavigationEnd || e instanceof NavigationCancel ||\n e instanceof NavigationError), map(e => {\n if (e instanceof NavigationEnd) {\n // Navigation assumed to succeed if we get `ActivationStart`\n return true;\n }\n const redirecting = e instanceof NavigationCancel ?\n (e.code === 0 /* NavigationCancellationCode.Redirect */ ||\n e.code === 1 /* NavigationCancellationCode.SupersededByNewNavigation */) :\n false;\n return redirecting ? null : false;\n }), filter((result) => result !== null), take(1))\n .subscribe(() => {\n action();\n });\n }\n return () => {\n return locationInitialized.then(() => {\n return new Promise(resolve => {\n const router = injector.get(Router);\n const bootstrapDone = injector.get(BOOTSTRAP_DONE);\n afterNextNavigation(() => {\n // Unblock APP_INITIALIZER in case the initial navigation was canceled or errored\n // without a redirect.\n resolve(true);\n });\n 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\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.1.0\", 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.1.0\", ngImport: i0, type: RouterModule, imports: [RouterOutlet, RouterLink, RouterLinkActive, ɵEmptyOutletComponent], exports: [RouterOutlet, RouterLink, RouterLinkActive, ɵEmptyOutletComponent] });\nRouterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: RouterModule, imports: [ɵEmptyOutletComponent] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", 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.1.0');\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, withPreloading, withRouterConfig, ɵEmptyOutletComponent, ROUTER_PROVIDERS as ɵROUTER_PROVIDERS, flatten as ɵflatten, withPreloading as ɵwithPreloading };\n","import { concat } from '../observable/concat';\nimport { popScheduler } from '../util/args';\nimport { operate } from '../util/lift';\nexport function startWith(...values) {\n const scheduler = popScheduler(values);\n return operate((source, subscriber) => {\n (scheduler ? concat(values, source, scheduler) : concat(values, source)).subscribe(subscriber);\n });\n}\n","import { operate } from '../util/lift';\nimport { OperatorSubscriber } from './OperatorSubscriber';\nexport function takeWhile(predicate, inclusive = false) {\n return operate((source, subscriber) => {\n let index = 0;\n source.subscribe(new OperatorSubscriber(subscriber, (value) => {\n const result = predicate(value, index++);\n (result || inclusive) && subscriber.next(value);\n !result && subscriber.complete();\n }));\n });\n}\n","import { map } from './map';\nexport function mapTo(value) {\n return map(() => value);\n}\n","/*!\n * Chart.js v4.1.2\n * https://www.chartjs.org\n * (c) 2023 Chart.js Contributors\n * Released under the MIT License\n */\nimport { r as requestAnimFrame, a as resolve, e as effects, c as color, i as isObject, d as defaults, b as isArray, v as valueOrDefault, u as unlistenArrayEvents, l as listenArrayEvents, f as resolveObjectKey, g as isNumberFinite, h as defined, s as sign, j as createContext, k as isNullOrUndef, _ as _arrayUnique, t as toRadians, m as toPercentage, n as toDimension, T as TAU, o as formatNumber, p as _angleBetween, H as HALF_PI, P as PI, q as _getStartAndCountOfVisiblePoints, w as _scaleRangesChanged, x as isNumber, y as _parseObjectDataRadialScale, z as getRelativePosition, A as _rlookupByKey, B as _lookupByKey, C as _isPointInArea, D as getAngleFromPoint, E as toPadding, F as each, G as getMaximumSize, I as _getParentNode, J as readUsedSize, K as supportsEventListenerOptions, L as throttled, M as _isDomSupported, N as _factorize, O as finiteOrDefault, Q as callback, R as _addGrace, S as _limitValue, U as toDegrees, V as _measureText, W as _int16Range, X as _alignPixel, Y as clipArea, Z as renderText, $ as unclipArea, a0 as toFont, a1 as _toLeftRightCenter, a2 as _alignStartEnd, a3 as overrides, a4 as merge, a5 as _capitalize, a6 as descriptors, a7 as isFunction, a8 as _attachContext, a9 as _createResolver, aa as _descriptors, ab as mergeIf, ac as uid, ad as debounce, ae as retinaScale, af as clearCanvas, ag as setsEqual, ah as _elementsEqual, ai as _isClickEvent, aj as _isBetween, ak as _readValueToProps, al as _updateBezierControlPoints, am as _computeSegments, an as _boundSegments, ao as _steppedInterpolation, ap as _bezierInterpolation, aq as _pointInLine, ar as _steppedLineTo, as as _bezierCurveTo, at as drawPoint, au as addRoundedRectPath, av as toTRBL, aw as toTRBLCorners, ax as _boundSegment, ay as _normalizeAngle, az as getRtlAdapter, aA as overrideTextDirection, aB as _textX, aC as restoreTextDirection, aD as drawPointLegend, aE as distanceBetweenPoints, aF as noop, aG as _setMinAndMaxByKey, aH as niceNum, aI as almostWhole, aJ as almostEquals, aK as _decimalPlaces, aL as Ticks, aM as log10, aN as _longestText, aO as _filterBetween, aP as _lookup } from './chunks/helpers.segment.js';\nexport { aL as Ticks, d as defaults } from './chunks/helpers.segment.js';\nimport '@kurkle/color';\n\nclass Animator {\n constructor(){\n this._request = null;\n this._charts = new Map();\n this._running = false;\n this._lastDate = undefined;\n }\n _notify(chart, anims, date, type) {\n const callbacks = anims.listeners[type];\n const numSteps = anims.duration;\n callbacks.forEach((fn)=>fn({\n chart,\n initial: anims.initial,\n numSteps,\n currentStep: Math.min(date - anims.start, numSteps)\n }));\n }\n _refresh() {\n if (this._request) {\n return;\n }\n this._running = true;\n this._request = requestAnimFrame.call(window, ()=>{\n this._update();\n this._request = null;\n if (this._running) {\n this._refresh();\n }\n });\n }\n _update(date = Date.now()) {\n let remaining = 0;\n this._charts.forEach((anims, chart)=>{\n if (!anims.running || !anims.items.length) {\n return;\n }\n const items = anims.items;\n let i = items.length - 1;\n let draw = false;\n let item;\n for(; i >= 0; --i){\n item = items[i];\n if (item._active) {\n if (item._total > anims.duration) {\n anims.duration = item._total;\n }\n item.tick(date);\n draw = true;\n } else {\n items[i] = items[items.length - 1];\n items.pop();\n }\n }\n if (draw) {\n chart.draw();\n this._notify(chart, anims, date, 'progress');\n }\n if (!items.length) {\n anims.running = false;\n this._notify(chart, anims, date, 'complete');\n anims.initial = false;\n }\n remaining += items.length;\n });\n this._lastDate = date;\n if (remaining === 0) {\n this._running = false;\n }\n }\n _getAnims(chart) {\n const charts = this._charts;\n let anims = charts.get(chart);\n if (!anims) {\n anims = {\n running: false,\n initial: true,\n items: [],\n listeners: {\n complete: [],\n progress: []\n }\n };\n charts.set(chart, anims);\n }\n return anims;\n }\n listen(chart, event, cb) {\n this._getAnims(chart).listeners[event].push(cb);\n }\n add(chart, items) {\n if (!items || !items.length) {\n return;\n }\n this._getAnims(chart).items.push(...items);\n }\n has(chart) {\n return this._getAnims(chart).items.length > 0;\n }\n start(chart) {\n const anims = this._charts.get(chart);\n if (!anims) {\n return;\n }\n anims.running = true;\n anims.start = Date.now();\n anims.duration = anims.items.reduce((acc, cur)=>Math.max(acc, cur._duration), 0);\n this._refresh();\n }\n running(chart) {\n if (!this._running) {\n return false;\n }\n const anims = this._charts.get(chart);\n if (!anims || !anims.running || !anims.items.length) {\n return false;\n }\n return true;\n }\n stop(chart) {\n const anims = this._charts.get(chart);\n if (!anims || !anims.items.length) {\n return;\n }\n const items = anims.items;\n let i = items.length - 1;\n for(; i >= 0; --i){\n items[i].cancel();\n }\n anims.items = [];\n this._notify(chart, anims, Date.now(), 'complete');\n }\n remove(chart) {\n return this._charts.delete(chart);\n }\n}\nvar animator = /* #__PURE__ */ new Animator();\n\nconst transparent = 'transparent';\nconst interpolators = {\n boolean (from, to, factor) {\n return factor > 0.5 ? to : from;\n },\n color (from, to, factor) {\n const c0 = color(from || transparent);\n const c1 = c0.valid && color(to || transparent);\n return c1 && c1.valid ? c1.mix(c0, factor).hexString() : to;\n },\n number (from, to, factor) {\n return from + (to - from) * factor;\n }\n};\nclass Animation {\n constructor(cfg, target, prop, to){\n const currentValue = target[prop];\n to = resolve([\n cfg.to,\n to,\n currentValue,\n cfg.from\n ]);\n const from = resolve([\n cfg.from,\n currentValue,\n to\n ]);\n this._active = true;\n this._fn = cfg.fn || interpolators[cfg.type || typeof from];\n this._easing = effects[cfg.easing] || effects.linear;\n this._start = Math.floor(Date.now() + (cfg.delay || 0));\n this._duration = this._total = Math.floor(cfg.duration);\n this._loop = !!cfg.loop;\n this._target = target;\n this._prop = prop;\n this._from = from;\n this._to = to;\n this._promises = undefined;\n }\n active() {\n return this._active;\n }\n update(cfg, to, date) {\n if (this._active) {\n this._notify(false);\n const currentValue = this._target[this._prop];\n const elapsed = date - this._start;\n const remain = this._duration - elapsed;\n this._start = date;\n this._duration = Math.floor(Math.max(remain, cfg.duration));\n this._total += elapsed;\n this._loop = !!cfg.loop;\n this._to = resolve([\n cfg.to,\n to,\n currentValue,\n cfg.from\n ]);\n this._from = resolve([\n cfg.from,\n currentValue,\n to\n ]);\n }\n }\n cancel() {\n if (this._active) {\n this.tick(Date.now());\n this._active = false;\n this._notify(false);\n }\n }\n tick(date) {\n const elapsed = date - this._start;\n const duration = this._duration;\n const prop = this._prop;\n const from = this._from;\n const loop = this._loop;\n const to = this._to;\n let factor;\n this._active = from !== to && (loop || elapsed < duration);\n if (!this._active) {\n this._target[prop] = to;\n this._notify(true);\n return;\n }\n if (elapsed < 0) {\n this._target[prop] = from;\n return;\n }\n factor = elapsed / duration % 2;\n factor = loop && factor > 1 ? 2 - factor : factor;\n factor = this._easing(Math.min(1, Math.max(0, factor)));\n this._target[prop] = this._fn(from, to, factor);\n }\n wait() {\n const promises = this._promises || (this._promises = []);\n return new Promise((res, rej)=>{\n promises.push({\n res,\n rej\n });\n });\n }\n _notify(resolved) {\n const method = resolved ? 'res' : 'rej';\n const promises = this._promises || [];\n for(let i = 0; i < promises.length; i++){\n promises[i][method]();\n }\n }\n}\n\nclass Animations {\n constructor(chart, config){\n this._chart = chart;\n this._properties = new Map();\n this.configure(config);\n }\n configure(config) {\n if (!isObject(config)) {\n return;\n }\n const animationOptions = Object.keys(defaults.animation);\n const animatedProps = this._properties;\n Object.getOwnPropertyNames(config).forEach((key)=>{\n const cfg = config[key];\n if (!isObject(cfg)) {\n return;\n }\n const resolved = {};\n for (const option of animationOptions){\n resolved[option] = cfg[option];\n }\n (isArray(cfg.properties) && cfg.properties || [\n key\n ]).forEach((prop)=>{\n if (prop === key || !animatedProps.has(prop)) {\n animatedProps.set(prop, resolved);\n }\n });\n });\n }\n _animateOptions(target, values) {\n const newOptions = values.options;\n const options = resolveTargetOptions(target, newOptions);\n if (!options) {\n return [];\n }\n const animations = this._createAnimations(options, newOptions);\n if (newOptions.$shared) {\n awaitAll(target.options.$animations, newOptions).then(()=>{\n target.options = newOptions;\n }, ()=>{\n });\n }\n return animations;\n }\n _createAnimations(target, values) {\n const animatedProps = this._properties;\n const animations = [];\n const running = target.$animations || (target.$animations = {});\n const props = Object.keys(values);\n const date = Date.now();\n let i;\n for(i = props.length - 1; i >= 0; --i){\n const prop = props[i];\n if (prop.charAt(0) === '$') {\n continue;\n }\n if (prop === 'options') {\n animations.push(...this._animateOptions(target, values));\n continue;\n }\n const value = values[prop];\n let animation = running[prop];\n const cfg = animatedProps.get(prop);\n if (animation) {\n if (cfg && animation.active()) {\n animation.update(cfg, value, date);\n continue;\n } else {\n animation.cancel();\n }\n }\n if (!cfg || !cfg.duration) {\n target[prop] = value;\n continue;\n }\n running[prop] = animation = new Animation(cfg, target, prop, value);\n animations.push(animation);\n }\n return animations;\n }\n update(target, values) {\n if (this._properties.size === 0) {\n Object.assign(target, values);\n return;\n }\n const animations = this._createAnimations(target, values);\n if (animations.length) {\n animator.add(this._chart, animations);\n return true;\n }\n }\n}\nfunction awaitAll(animations, properties) {\n const running = [];\n const keys = Object.keys(properties);\n for(let i = 0; i < keys.length; i++){\n const anim = animations[keys[i]];\n if (anim && anim.active()) {\n running.push(anim.wait());\n }\n }\n return Promise.all(running);\n}\nfunction resolveTargetOptions(target, newOptions) {\n if (!newOptions) {\n return;\n }\n let options = target.options;\n if (!options) {\n target.options = newOptions;\n return;\n }\n if (options.$shared) {\n target.options = options = Object.assign({}, options, {\n $shared: false,\n $animations: {}\n });\n }\n return options;\n}\n\nfunction scaleClip(scale, allowedOverflow) {\n const opts = scale && scale.options || {};\n const reverse = opts.reverse;\n const min = opts.min === undefined ? allowedOverflow : 0;\n const max = opts.max === undefined ? allowedOverflow : 0;\n return {\n start: reverse ? max : min,\n end: reverse ? min : max\n };\n}\nfunction defaultClip(xScale, yScale, allowedOverflow) {\n if (allowedOverflow === false) {\n return false;\n }\n const x = scaleClip(xScale, allowedOverflow);\n const y = scaleClip(yScale, allowedOverflow);\n return {\n top: y.end,\n right: x.end,\n bottom: y.start,\n left: x.start\n };\n}\nfunction toClip(value) {\n let t, r, b, l;\n if (isObject(value)) {\n t = value.top;\n r = value.right;\n b = value.bottom;\n l = value.left;\n } else {\n t = r = b = l = value;\n }\n return {\n top: t,\n right: r,\n bottom: b,\n left: l,\n disabled: value === false\n };\n}\nfunction getSortedDatasetIndices(chart, filterVisible) {\n const keys = [];\n const metasets = chart._getSortedDatasetMetas(filterVisible);\n let i, ilen;\n for(i = 0, ilen = metasets.length; i < ilen; ++i){\n keys.push(metasets[i].index);\n }\n return keys;\n}\nfunction applyStack(stack, value, dsIndex, options = {}) {\n const keys = stack.keys;\n const singleMode = options.mode === 'single';\n let i, ilen, datasetIndex, otherValue;\n if (value === null) {\n return;\n }\n for(i = 0, ilen = keys.length; i < ilen; ++i){\n datasetIndex = +keys[i];\n if (datasetIndex === dsIndex) {\n if (options.all) {\n continue;\n }\n break;\n }\n otherValue = stack.values[datasetIndex];\n if (isNumberFinite(otherValue) && (singleMode || value === 0 || sign(value) === sign(otherValue))) {\n value += otherValue;\n }\n }\n return value;\n}\nfunction convertObjectDataToArray(data) {\n const keys = Object.keys(data);\n const adata = new Array(keys.length);\n let i, ilen, key;\n for(i = 0, ilen = keys.length; i < ilen; ++i){\n key = keys[i];\n adata[i] = {\n x: key,\n y: data[key]\n };\n }\n return adata;\n}\nfunction isStacked(scale, meta) {\n const stacked = scale && scale.options.stacked;\n return stacked || stacked === undefined && meta.stack !== undefined;\n}\nfunction getStackKey(indexScale, valueScale, meta) {\n return `${indexScale.id}.${valueScale.id}.${meta.stack || meta.type}`;\n}\nfunction getUserBounds(scale) {\n const { min , max , minDefined , maxDefined } = scale.getUserBounds();\n return {\n min: minDefined ? min : Number.NEGATIVE_INFINITY,\n max: maxDefined ? max : Number.POSITIVE_INFINITY\n };\n}\nfunction getOrCreateStack(stacks, stackKey, indexValue) {\n const subStack = stacks[stackKey] || (stacks[stackKey] = {});\n return subStack[indexValue] || (subStack[indexValue] = {});\n}\nfunction getLastIndexInStack(stack, vScale, positive, type) {\n for (const meta of vScale.getMatchingVisibleMetas(type).reverse()){\n const value = stack[meta.index];\n if (positive && value > 0 || !positive && value < 0) {\n return meta.index;\n }\n }\n return null;\n}\nfunction updateStacks(controller, parsed) {\n const { chart , _cachedMeta: meta } = controller;\n const stacks = chart._stacks || (chart._stacks = {});\n const { iScale , vScale , index: datasetIndex } = meta;\n const iAxis = iScale.axis;\n const vAxis = vScale.axis;\n const key = getStackKey(iScale, vScale, meta);\n const ilen = parsed.length;\n let stack;\n for(let i = 0; i < ilen; ++i){\n const item = parsed[i];\n const { [iAxis]: index , [vAxis]: value } = item;\n const itemStacks = item._stacks || (item._stacks = {});\n stack = itemStacks[vAxis] = getOrCreateStack(stacks, key, index);\n stack[datasetIndex] = value;\n stack._top = getLastIndexInStack(stack, vScale, true, meta.type);\n stack._bottom = getLastIndexInStack(stack, vScale, false, meta.type);\n const visualValues = stack._visualValues || (stack._visualValues = {});\n visualValues[datasetIndex] = value;\n }\n}\nfunction getFirstScaleId(chart, axis) {\n const scales = chart.scales;\n return Object.keys(scales).filter((key)=>scales[key].axis === axis).shift();\n}\nfunction createDatasetContext(parent, index) {\n return createContext(parent, {\n active: false,\n dataset: undefined,\n datasetIndex: index,\n index,\n mode: 'default',\n type: 'dataset'\n });\n}\nfunction createDataContext(parent, index, element) {\n return createContext(parent, {\n active: false,\n dataIndex: index,\n parsed: undefined,\n raw: undefined,\n element,\n index,\n mode: 'default',\n type: 'data'\n });\n}\nfunction clearStacks(meta, items) {\n const datasetIndex = meta.controller.index;\n const axis = meta.vScale && meta.vScale.axis;\n if (!axis) {\n return;\n }\n items = items || meta._parsed;\n for (const parsed of items){\n const stacks = parsed._stacks;\n if (!stacks || stacks[axis] === undefined || stacks[axis][datasetIndex] === undefined) {\n return;\n }\n delete stacks[axis][datasetIndex];\n if (stacks[axis]._visualValues !== undefined && stacks[axis]._visualValues[datasetIndex] !== undefined) {\n delete stacks[axis]._visualValues[datasetIndex];\n }\n }\n}\nconst isDirectUpdateMode = (mode)=>mode === 'reset' || mode === 'none';\nconst cloneIfNotShared = (cached, shared)=>shared ? cached : Object.assign({}, cached);\nconst createStack = (canStack, meta, chart)=>canStack && !meta.hidden && meta._stacked && {\n keys: getSortedDatasetIndices(chart, true),\n values: null\n };\nclass DatasetController {\n static defaults = {};\n static datasetElementType = null;\n static dataElementType = null;\n constructor(chart, datasetIndex){\n this.chart = chart;\n this._ctx = chart.ctx;\n this.index = datasetIndex;\n this._cachedDataOpts = {};\n this._cachedMeta = this.getMeta();\n this._type = this._cachedMeta.type;\n this.options = undefined;\n this._parsing = false;\n this._data = undefined;\n this._objectData = undefined;\n this._sharedOptions = undefined;\n this._drawStart = undefined;\n this._drawCount = undefined;\n this.enableOptionSharing = false;\n this.supportsDecimation = false;\n this.$context = undefined;\n this._syncList = [];\n this.datasetElementType = new.target.datasetElementType;\n this.dataElementType = new.target.dataElementType;\n this.initialize();\n }\n initialize() {\n const meta = this._cachedMeta;\n this.configure();\n this.linkScales();\n meta._stacked = isStacked(meta.vScale, meta);\n this.addElements();\n if (this.options.fill && !this.chart.isPluginEnabled('filler')) {\n console.warn(\"Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options\");\n }\n }\n updateIndex(datasetIndex) {\n if (this.index !== datasetIndex) {\n clearStacks(this._cachedMeta);\n }\n this.index = datasetIndex;\n }\n linkScales() {\n const chart = this.chart;\n const meta = this._cachedMeta;\n const dataset = this.getDataset();\n const chooseId = (axis, x, y, r)=>axis === 'x' ? x : axis === 'r' ? r : y;\n const xid = meta.xAxisID = valueOrDefault(dataset.xAxisID, getFirstScaleId(chart, 'x'));\n const yid = meta.yAxisID = valueOrDefault(dataset.yAxisID, getFirstScaleId(chart, 'y'));\n const rid = meta.rAxisID = valueOrDefault(dataset.rAxisID, getFirstScaleId(chart, 'r'));\n const indexAxis = meta.indexAxis;\n const iid = meta.iAxisID = chooseId(indexAxis, xid, yid, rid);\n const vid = meta.vAxisID = chooseId(indexAxis, yid, xid, rid);\n meta.xScale = this.getScaleForId(xid);\n meta.yScale = this.getScaleForId(yid);\n meta.rScale = this.getScaleForId(rid);\n meta.iScale = this.getScaleForId(iid);\n meta.vScale = this.getScaleForId(vid);\n }\n getDataset() {\n return this.chart.data.datasets[this.index];\n }\n getMeta() {\n return this.chart.getDatasetMeta(this.index);\n }\n getScaleForId(scaleID) {\n return this.chart.scales[scaleID];\n }\n _getOtherScale(scale) {\n const meta = this._cachedMeta;\n return scale === meta.iScale ? meta.vScale : meta.iScale;\n }\n reset() {\n this._update('reset');\n }\n _destroy() {\n const meta = this._cachedMeta;\n if (this._data) {\n unlistenArrayEvents(this._data, this);\n }\n if (meta._stacked) {\n clearStacks(meta);\n }\n }\n _dataCheck() {\n const dataset = this.getDataset();\n const data = dataset.data || (dataset.data = []);\n const _data = this._data;\n if (isObject(data)) {\n this._data = convertObjectDataToArray(data);\n } else if (_data !== data) {\n if (_data) {\n unlistenArrayEvents(_data, this);\n const meta = this._cachedMeta;\n clearStacks(meta);\n meta._parsed = [];\n }\n if (data && Object.isExtensible(data)) {\n listenArrayEvents(data, this);\n }\n this._syncList = [];\n this._data = data;\n }\n }\n addElements() {\n const meta = this._cachedMeta;\n this._dataCheck();\n if (this.datasetElementType) {\n meta.dataset = new this.datasetElementType();\n }\n }\n buildOrUpdateElements(resetNewElements) {\n const meta = this._cachedMeta;\n const dataset = this.getDataset();\n let stackChanged = false;\n this._dataCheck();\n const oldStacked = meta._stacked;\n meta._stacked = isStacked(meta.vScale, meta);\n if (meta.stack !== dataset.stack) {\n stackChanged = true;\n clearStacks(meta);\n meta.stack = dataset.stack;\n }\n this._resyncElements(resetNewElements);\n if (stackChanged || oldStacked !== meta._stacked) {\n updateStacks(this, meta._parsed);\n }\n }\n configure() {\n const config = this.chart.config;\n const scopeKeys = config.datasetScopeKeys(this._type);\n const scopes = config.getOptionScopes(this.getDataset(), scopeKeys, true);\n this.options = config.createResolver(scopes, this.getContext());\n this._parsing = this.options.parsing;\n this._cachedDataOpts = {};\n }\n parse(start, count) {\n const { _cachedMeta: meta , _data: data } = this;\n const { iScale , _stacked } = meta;\n const iAxis = iScale.axis;\n let sorted = start === 0 && count === data.length ? true : meta._sorted;\n let prev = start > 0 && meta._parsed[start - 1];\n let i, cur, parsed;\n if (this._parsing === false) {\n meta._parsed = data;\n meta._sorted = true;\n parsed = data;\n } else {\n if (isArray(data[start])) {\n parsed = this.parseArrayData(meta, data, start, count);\n } else if (isObject(data[start])) {\n parsed = this.parseObjectData(meta, data, start, count);\n } else {\n parsed = this.parsePrimitiveData(meta, data, start, count);\n }\n const isNotInOrderComparedToPrev = ()=>cur[iAxis] === null || prev && cur[iAxis] < prev[iAxis];\n for(i = 0; i < count; ++i){\n meta._parsed[i + start] = cur = parsed[i];\n if (sorted) {\n if (isNotInOrderComparedToPrev()) {\n sorted = false;\n }\n prev = cur;\n }\n }\n meta._sorted = sorted;\n }\n if (_stacked) {\n updateStacks(this, parsed);\n }\n }\n parsePrimitiveData(meta, data, start, count) {\n const { iScale , vScale } = meta;\n const iAxis = iScale.axis;\n const vAxis = vScale.axis;\n const labels = iScale.getLabels();\n const singleScale = iScale === vScale;\n const parsed = new Array(count);\n let i, ilen, index;\n for(i = 0, ilen = count; i < ilen; ++i){\n index = i + start;\n parsed[i] = {\n [iAxis]: singleScale || iScale.parse(labels[index], index),\n [vAxis]: vScale.parse(data[index], index)\n };\n }\n return parsed;\n }\n parseArrayData(meta, data, start, count) {\n const { xScale , yScale } = meta;\n const parsed = new Array(count);\n let i, ilen, index, item;\n for(i = 0, ilen = count; i < ilen; ++i){\n index = i + start;\n item = data[index];\n parsed[i] = {\n x: xScale.parse(item[0], index),\n y: yScale.parse(item[1], index)\n };\n }\n return parsed;\n }\n parseObjectData(meta, data, start, count) {\n const { xScale , yScale } = meta;\n const { xAxisKey ='x' , yAxisKey ='y' } = this._parsing;\n const parsed = new Array(count);\n let i, ilen, index, item;\n for(i = 0, ilen = count; i < ilen; ++i){\n index = i + start;\n item = data[index];\n parsed[i] = {\n x: xScale.parse(resolveObjectKey(item, xAxisKey), index),\n y: yScale.parse(resolveObjectKey(item, yAxisKey), index)\n };\n }\n return parsed;\n }\n getParsed(index) {\n return this._cachedMeta._parsed[index];\n }\n getDataElement(index) {\n return this._cachedMeta.data[index];\n }\n applyStack(scale, parsed, mode) {\n const chart = this.chart;\n const meta = this._cachedMeta;\n const value = parsed[scale.axis];\n const stack = {\n keys: getSortedDatasetIndices(chart, true),\n values: parsed._stacks[scale.axis]._visualValues\n };\n return applyStack(stack, value, meta.index, {\n mode\n });\n }\n updateRangeFromParsed(range, scale, parsed, stack) {\n const parsedValue = parsed[scale.axis];\n let value = parsedValue === null ? NaN : parsedValue;\n const values = stack && parsed._stacks[scale.axis];\n if (stack && values) {\n stack.values = values;\n value = applyStack(stack, parsedValue, this._cachedMeta.index);\n }\n range.min = Math.min(range.min, value);\n range.max = Math.max(range.max, value);\n }\n getMinMax(scale, canStack) {\n const meta = this._cachedMeta;\n const _parsed = meta._parsed;\n const sorted = meta._sorted && scale === meta.iScale;\n const ilen = _parsed.length;\n const otherScale = this._getOtherScale(scale);\n const stack = createStack(canStack, meta, this.chart);\n const range = {\n min: Number.POSITIVE_INFINITY,\n max: Number.NEGATIVE_INFINITY\n };\n const { min: otherMin , max: otherMax } = getUserBounds(otherScale);\n let i, parsed;\n function _skip() {\n parsed = _parsed[i];\n const otherValue = parsed[otherScale.axis];\n return !isNumberFinite(parsed[scale.axis]) || otherMin > otherValue || otherMax < otherValue;\n }\n for(i = 0; i < ilen; ++i){\n if (_skip()) {\n continue;\n }\n this.updateRangeFromParsed(range, scale, parsed, stack);\n if (sorted) {\n break;\n }\n }\n if (sorted) {\n for(i = ilen - 1; i >= 0; --i){\n if (_skip()) {\n continue;\n }\n this.updateRangeFromParsed(range, scale, parsed, stack);\n break;\n }\n }\n return range;\n }\n getAllParsedValues(scale) {\n const parsed = this._cachedMeta._parsed;\n const values = [];\n let i, ilen, value;\n for(i = 0, ilen = parsed.length; i < ilen; ++i){\n value = parsed[i][scale.axis];\n if (isNumberFinite(value)) {\n values.push(value);\n }\n }\n return values;\n }\n getMaxOverflow() {\n return false;\n }\n getLabelAndValue(index) {\n const meta = this._cachedMeta;\n const iScale = meta.iScale;\n const vScale = meta.vScale;\n const parsed = this.getParsed(index);\n return {\n label: iScale ? '' + iScale.getLabelForValue(parsed[iScale.axis]) : '',\n value: vScale ? '' + vScale.getLabelForValue(parsed[vScale.axis]) : ''\n };\n }\n _update(mode) {\n const meta = this._cachedMeta;\n this.update(mode || 'default');\n meta._clip = toClip(valueOrDefault(this.options.clip, defaultClip(meta.xScale, meta.yScale, this.getMaxOverflow())));\n }\n update(mode) {}\n draw() {\n const ctx = this._ctx;\n const chart = this.chart;\n const meta = this._cachedMeta;\n const elements = meta.data || [];\n const area = chart.chartArea;\n const active = [];\n const start = this._drawStart || 0;\n const count = this._drawCount || elements.length - start;\n const drawActiveElementsOnTop = this.options.drawActiveElementsOnTop;\n let i;\n if (meta.dataset) {\n meta.dataset.draw(ctx, area, start, count);\n }\n for(i = start; i < start + count; ++i){\n const element = elements[i];\n if (element.hidden) {\n continue;\n }\n if (element.active && drawActiveElementsOnTop) {\n active.push(element);\n } else {\n element.draw(ctx, area);\n }\n }\n for(i = 0; i < active.length; ++i){\n active[i].draw(ctx, area);\n }\n }\n getStyle(index, active) {\n const mode = active ? 'active' : 'default';\n return index === undefined && this._cachedMeta.dataset ? this.resolveDatasetElementOptions(mode) : this.resolveDataElementOptions(index || 0, mode);\n }\n getContext(index, active, mode) {\n const dataset = this.getDataset();\n let context;\n if (index >= 0 && index < this._cachedMeta.data.length) {\n const element = this._cachedMeta.data[index];\n context = element.$context || (element.$context = createDataContext(this.getContext(), index, element));\n context.parsed = this.getParsed(index);\n context.raw = dataset.data[index];\n context.index = context.dataIndex = index;\n } else {\n context = this.$context || (this.$context = createDatasetContext(this.chart.getContext(), this.index));\n context.dataset = dataset;\n context.index = context.datasetIndex = this.index;\n }\n context.active = !!active;\n context.mode = mode;\n return context;\n }\n resolveDatasetElementOptions(mode) {\n return this._resolveElementOptions(this.datasetElementType.id, mode);\n }\n resolveDataElementOptions(index, mode) {\n return this._resolveElementOptions(this.dataElementType.id, mode, index);\n }\n _resolveElementOptions(elementType, mode = 'default', index) {\n const active = mode === 'active';\n const cache = this._cachedDataOpts;\n const cacheKey = elementType + '-' + mode;\n const cached = cache[cacheKey];\n const sharing = this.enableOptionSharing && defined(index);\n if (cached) {\n return cloneIfNotShared(cached, sharing);\n }\n const config = this.chart.config;\n const scopeKeys = config.datasetElementScopeKeys(this._type, elementType);\n const prefixes = active ? [\n `${elementType}Hover`,\n 'hover',\n elementType,\n ''\n ] : [\n elementType,\n ''\n ];\n const scopes = config.getOptionScopes(this.getDataset(), scopeKeys);\n const names = Object.keys(defaults.elements[elementType]);\n const context = ()=>this.getContext(index, active, mode);\n const values = config.resolveNamedOptions(scopes, names, context, prefixes);\n if (values.$shared) {\n values.$shared = sharing;\n cache[cacheKey] = Object.freeze(cloneIfNotShared(values, sharing));\n }\n return values;\n }\n _resolveAnimations(index, transition, active) {\n const chart = this.chart;\n const cache = this._cachedDataOpts;\n const cacheKey = `animation-${transition}`;\n const cached = cache[cacheKey];\n if (cached) {\n return cached;\n }\n let options;\n if (chart.options.animation !== false) {\n const config = this.chart.config;\n const scopeKeys = config.datasetAnimationScopeKeys(this._type, transition);\n const scopes = config.getOptionScopes(this.getDataset(), scopeKeys);\n options = config.createResolver(scopes, this.getContext(index, active, transition));\n }\n const animations = new Animations(chart, options && options.animations);\n if (options && options._cacheable) {\n cache[cacheKey] = Object.freeze(animations);\n }\n return animations;\n }\n getSharedOptions(options) {\n if (!options.$shared) {\n return;\n }\n return this._sharedOptions || (this._sharedOptions = Object.assign({}, options));\n }\n includeOptions(mode, sharedOptions) {\n return !sharedOptions || isDirectUpdateMode(mode) || this.chart._animationsDisabled;\n }\n _getSharedOptions(start, mode) {\n const firstOpts = this.resolveDataElementOptions(start, mode);\n const previouslySharedOptions = this._sharedOptions;\n const sharedOptions = this.getSharedOptions(firstOpts);\n const includeOptions = this.includeOptions(mode, sharedOptions) || sharedOptions !== previouslySharedOptions;\n this.updateSharedOptions(sharedOptions, mode, firstOpts);\n return {\n sharedOptions,\n includeOptions\n };\n }\n updateElement(element, index, properties, mode) {\n if (isDirectUpdateMode(mode)) {\n Object.assign(element, properties);\n } else {\n this._resolveAnimations(index, mode).update(element, properties);\n }\n }\n updateSharedOptions(sharedOptions, mode, newOptions) {\n if (sharedOptions && !isDirectUpdateMode(mode)) {\n this._resolveAnimations(undefined, mode).update(sharedOptions, newOptions);\n }\n }\n _setStyle(element, index, mode, active) {\n element.active = active;\n const options = this.getStyle(index, active);\n this._resolveAnimations(index, mode, active).update(element, {\n options: !active && this.getSharedOptions(options) || options\n });\n }\n removeHoverStyle(element, datasetIndex, index) {\n this._setStyle(element, index, 'active', false);\n }\n setHoverStyle(element, datasetIndex, index) {\n this._setStyle(element, index, 'active', true);\n }\n _removeDatasetHoverStyle() {\n const element = this._cachedMeta.dataset;\n if (element) {\n this._setStyle(element, undefined, 'active', false);\n }\n }\n _setDatasetHoverStyle() {\n const element = this._cachedMeta.dataset;\n if (element) {\n this._setStyle(element, undefined, 'active', true);\n }\n }\n _resyncElements(resetNewElements) {\n const data = this._data;\n const elements = this._cachedMeta.data;\n for (const [method, arg1, arg2] of this._syncList){\n this[method](arg1, arg2);\n }\n this._syncList = [];\n const numMeta = elements.length;\n const numData = data.length;\n const count = Math.min(numData, numMeta);\n if (count) {\n this.parse(0, count);\n }\n if (numData > numMeta) {\n this._insertElements(numMeta, numData - numMeta, resetNewElements);\n } else if (numData < numMeta) {\n this._removeElements(numData, numMeta - numData);\n }\n }\n _insertElements(start, count, resetNewElements = true) {\n const meta = this._cachedMeta;\n const data = meta.data;\n const end = start + count;\n let i;\n const move = (arr)=>{\n arr.length += count;\n for(i = arr.length - 1; i >= end; i--){\n arr[i] = arr[i - count];\n }\n };\n move(data);\n for(i = start; i < end; ++i){\n data[i] = new this.dataElementType();\n }\n if (this._parsing) {\n move(meta._parsed);\n }\n this.parse(start, count);\n if (resetNewElements) {\n this.updateElements(data, start, count, 'reset');\n }\n }\n updateElements(element, start, count, mode) {}\n _removeElements(start, count) {\n const meta = this._cachedMeta;\n if (this._parsing) {\n const removed = meta._parsed.splice(start, count);\n if (meta._stacked) {\n clearStacks(meta, removed);\n }\n }\n meta.data.splice(start, count);\n }\n _sync(args) {\n if (this._parsing) {\n this._syncList.push(args);\n } else {\n const [method, arg1, arg2] = args;\n this[method](arg1, arg2);\n }\n this.chart._dataChanges.push([\n this.index,\n ...args\n ]);\n }\n _onDataPush() {\n const count = arguments.length;\n this._sync([\n '_insertElements',\n this.getDataset().data.length - count,\n count\n ]);\n }\n _onDataPop() {\n this._sync([\n '_removeElements',\n this._cachedMeta.data.length - 1,\n 1\n ]);\n }\n _onDataShift() {\n this._sync([\n '_removeElements',\n 0,\n 1\n ]);\n }\n _onDataSplice(start, count) {\n if (count) {\n this._sync([\n '_removeElements',\n start,\n count\n ]);\n }\n const newCount = arguments.length - 2;\n if (newCount) {\n this._sync([\n '_insertElements',\n start,\n newCount\n ]);\n }\n }\n _onDataUnshift() {\n this._sync([\n '_insertElements',\n 0,\n arguments.length\n ]);\n }\n}\n\nfunction getAllScaleValues(scale, type) {\n if (!scale._cache.$bar) {\n const visibleMetas = scale.getMatchingVisibleMetas(type);\n let values = [];\n for(let i = 0, ilen = visibleMetas.length; i < ilen; i++){\n values = values.concat(visibleMetas[i].controller.getAllParsedValues(scale));\n }\n scale._cache.$bar = _arrayUnique(values.sort((a, b)=>a - b));\n }\n return scale._cache.$bar;\n}\n function computeMinSampleSize(meta) {\n const scale = meta.iScale;\n const values = getAllScaleValues(scale, meta.type);\n let min = scale._length;\n let i, ilen, curr, prev;\n const updateMinAndPrev = ()=>{\n if (curr === 32767 || curr === -32768) {\n return;\n }\n if (defined(prev)) {\n min = Math.min(min, Math.abs(curr - prev) || min);\n }\n prev = curr;\n };\n for(i = 0, ilen = values.length; i < ilen; ++i){\n curr = scale.getPixelForValue(values[i]);\n updateMinAndPrev();\n }\n prev = undefined;\n for(i = 0, ilen = scale.ticks.length; i < ilen; ++i){\n curr = scale.getPixelForTick(i);\n updateMinAndPrev();\n }\n return min;\n}\n function computeFitCategoryTraits(index, ruler, options, stackCount) {\n const thickness = options.barThickness;\n let size, ratio;\n if (isNullOrUndef(thickness)) {\n size = ruler.min * options.categoryPercentage;\n ratio = options.barPercentage;\n } else {\n size = thickness * stackCount;\n ratio = 1;\n }\n return {\n chunk: size / stackCount,\n ratio,\n start: ruler.pixels[index] - size / 2\n };\n}\n function computeFlexCategoryTraits(index, ruler, options, stackCount) {\n const pixels = ruler.pixels;\n const curr = pixels[index];\n let prev = index > 0 ? pixels[index - 1] : null;\n let next = index < pixels.length - 1 ? pixels[index + 1] : null;\n const percent = options.categoryPercentage;\n if (prev === null) {\n prev = curr - (next === null ? ruler.end - ruler.start : next - curr);\n }\n if (next === null) {\n next = curr + curr - prev;\n }\n const start = curr - (curr - Math.min(prev, next)) / 2 * percent;\n const size = Math.abs(next - prev) / 2 * percent;\n return {\n chunk: size / stackCount,\n ratio: options.barPercentage,\n start\n };\n}\nfunction parseFloatBar(entry, item, vScale, i) {\n const startValue = vScale.parse(entry[0], i);\n const endValue = vScale.parse(entry[1], i);\n const min = Math.min(startValue, endValue);\n const max = Math.max(startValue, endValue);\n let barStart = min;\n let barEnd = max;\n if (Math.abs(min) > Math.abs(max)) {\n barStart = max;\n barEnd = min;\n }\n item[vScale.axis] = barEnd;\n item._custom = {\n barStart,\n barEnd,\n start: startValue,\n end: endValue,\n min,\n max\n };\n}\nfunction parseValue(entry, item, vScale, i) {\n if (isArray(entry)) {\n parseFloatBar(entry, item, vScale, i);\n } else {\n item[vScale.axis] = vScale.parse(entry, i);\n }\n return item;\n}\nfunction parseArrayOrPrimitive(meta, data, start, count) {\n const iScale = meta.iScale;\n const vScale = meta.vScale;\n const labels = iScale.getLabels();\n const singleScale = iScale === vScale;\n const parsed = [];\n let i, ilen, item, entry;\n for(i = start, ilen = start + count; i < ilen; ++i){\n entry = data[i];\n item = {};\n item[iScale.axis] = singleScale || iScale.parse(labels[i], i);\n parsed.push(parseValue(entry, item, vScale, i));\n }\n return parsed;\n}\nfunction isFloatBar(custom) {\n return custom && custom.barStart !== undefined && custom.barEnd !== undefined;\n}\nfunction barSign(size, vScale, actualBase) {\n if (size !== 0) {\n return sign(size);\n }\n return (vScale.isHorizontal() ? 1 : -1) * (vScale.min >= actualBase ? 1 : -1);\n}\nfunction borderProps(properties) {\n let reverse, start, end, top, bottom;\n if (properties.horizontal) {\n reverse = properties.base > properties.x;\n start = 'left';\n end = 'right';\n } else {\n reverse = properties.base < properties.y;\n start = 'bottom';\n end = 'top';\n }\n if (reverse) {\n top = 'end';\n bottom = 'start';\n } else {\n top = 'start';\n bottom = 'end';\n }\n return {\n start,\n end,\n reverse,\n top,\n bottom\n };\n}\nfunction setBorderSkipped(properties, options, stack, index) {\n let edge = options.borderSkipped;\n const res = {};\n if (!edge) {\n properties.borderSkipped = res;\n return;\n }\n if (edge === true) {\n properties.borderSkipped = {\n top: true,\n right: true,\n bottom: true,\n left: true\n };\n return;\n }\n const { start , end , reverse , top , bottom } = borderProps(properties);\n if (edge === 'middle' && stack) {\n properties.enableBorderRadius = true;\n if ((stack._top || 0) === index) {\n edge = top;\n } else if ((stack._bottom || 0) === index) {\n edge = bottom;\n } else {\n res[parseEdge(bottom, start, end, reverse)] = true;\n edge = top;\n }\n }\n res[parseEdge(edge, start, end, reverse)] = true;\n properties.borderSkipped = res;\n}\nfunction parseEdge(edge, a, b, reverse) {\n if (reverse) {\n edge = swap(edge, a, b);\n edge = startEnd(edge, b, a);\n } else {\n edge = startEnd(edge, a, b);\n }\n return edge;\n}\nfunction swap(orig, v1, v2) {\n return orig === v1 ? v2 : orig === v2 ? v1 : orig;\n}\nfunction startEnd(v, start, end) {\n return v === 'start' ? start : v === 'end' ? end : v;\n}\nfunction setInflateAmount(properties, { inflateAmount }, ratio) {\n properties.inflateAmount = inflateAmount === 'auto' ? ratio === 1 ? 0.33 : 0 : inflateAmount;\n}\nclass BarController extends DatasetController {\n static id = 'bar';\n static defaults = {\n datasetElementType: false,\n dataElementType: 'bar',\n categoryPercentage: 0.8,\n barPercentage: 0.9,\n grouped: true,\n animations: {\n numbers: {\n type: 'number',\n properties: [\n 'x',\n 'y',\n 'base',\n 'width',\n 'height'\n ]\n }\n }\n };\n static overrides = {\n scales: {\n _index_: {\n type: 'category',\n offset: true,\n grid: {\n offset: true\n }\n },\n _value_: {\n type: 'linear',\n beginAtZero: true\n }\n }\n };\n parsePrimitiveData(meta, data, start, count) {\n return parseArrayOrPrimitive(meta, data, start, count);\n }\n parseArrayData(meta, data, start, count) {\n return parseArrayOrPrimitive(meta, data, start, count);\n }\n parseObjectData(meta, data, start, count) {\n const { iScale , vScale } = meta;\n const { xAxisKey ='x' , yAxisKey ='y' } = this._parsing;\n const iAxisKey = iScale.axis === 'x' ? xAxisKey : yAxisKey;\n const vAxisKey = vScale.axis === 'x' ? xAxisKey : yAxisKey;\n const parsed = [];\n let i, ilen, item, obj;\n for(i = start, ilen = start + count; i < ilen; ++i){\n obj = data[i];\n item = {};\n item[iScale.axis] = iScale.parse(resolveObjectKey(obj, iAxisKey), i);\n parsed.push(parseValue(resolveObjectKey(obj, vAxisKey), item, vScale, i));\n }\n return parsed;\n }\n updateRangeFromParsed(range, scale, parsed, stack) {\n super.updateRangeFromParsed(range, scale, parsed, stack);\n const custom = parsed._custom;\n if (custom && scale === this._cachedMeta.vScale) {\n range.min = Math.min(range.min, custom.min);\n range.max = Math.max(range.max, custom.max);\n }\n }\n getMaxOverflow() {\n return 0;\n }\n getLabelAndValue(index) {\n const meta = this._cachedMeta;\n const { iScale , vScale } = meta;\n const parsed = this.getParsed(index);\n const custom = parsed._custom;\n const value = isFloatBar(custom) ? '[' + custom.start + ', ' + custom.end + ']' : '' + vScale.getLabelForValue(parsed[vScale.axis]);\n return {\n label: '' + iScale.getLabelForValue(parsed[iScale.axis]),\n value\n };\n }\n initialize() {\n this.enableOptionSharing = true;\n super.initialize();\n const meta = this._cachedMeta;\n meta.stack = this.getDataset().stack;\n }\n update(mode) {\n const meta = this._cachedMeta;\n this.updateElements(meta.data, 0, meta.data.length, mode);\n }\n updateElements(bars, start, count, mode) {\n const reset = mode === 'reset';\n const { index , _cachedMeta: { vScale } } = this;\n const base = vScale.getBasePixel();\n const horizontal = vScale.isHorizontal();\n const ruler = this._getRuler();\n const { sharedOptions , includeOptions } = this._getSharedOptions(start, mode);\n for(let i = start; i < start + count; i++){\n const parsed = this.getParsed(i);\n const vpixels = reset || isNullOrUndef(parsed[vScale.axis]) ? {\n base,\n head: base\n } : this._calculateBarValuePixels(i);\n const ipixels = this._calculateBarIndexPixels(i, ruler);\n const stack = (parsed._stacks || {})[vScale.axis];\n const properties = {\n horizontal,\n base: vpixels.base,\n enableBorderRadius: !stack || isFloatBar(parsed._custom) || index === stack._top || index === stack._bottom,\n x: horizontal ? vpixels.head : ipixels.center,\n y: horizontal ? ipixels.center : vpixels.head,\n height: horizontal ? ipixels.size : Math.abs(vpixels.size),\n width: horizontal ? Math.abs(vpixels.size) : ipixels.size\n };\n if (includeOptions) {\n properties.options = sharedOptions || this.resolveDataElementOptions(i, bars[i].active ? 'active' : mode);\n }\n const options = properties.options || bars[i].options;\n setBorderSkipped(properties, options, stack, index);\n setInflateAmount(properties, options, ruler.ratio);\n this.updateElement(bars[i], i, properties, mode);\n }\n }\n _getStacks(last, dataIndex) {\n const { iScale } = this._cachedMeta;\n const metasets = iScale.getMatchingVisibleMetas(this._type).filter((meta)=>meta.controller.options.grouped);\n const stacked = iScale.options.stacked;\n const stacks = [];\n const skipNull = (meta)=>{\n const parsed = meta.controller.getParsed(dataIndex);\n const val = parsed && parsed[meta.vScale.axis];\n if (isNullOrUndef(val) || isNaN(val)) {\n return true;\n }\n };\n for (const meta of metasets){\n if (dataIndex !== undefined && skipNull(meta)) {\n continue;\n }\n if (stacked === false || stacks.indexOf(meta.stack) === -1 || stacked === undefined && meta.stack === undefined) {\n stacks.push(meta.stack);\n }\n if (meta.index === last) {\n break;\n }\n }\n if (!stacks.length) {\n stacks.push(undefined);\n }\n return stacks;\n }\n _getStackCount(index) {\n return this._getStacks(undefined, index).length;\n }\n _getStackIndex(datasetIndex, name, dataIndex) {\n const stacks = this._getStacks(datasetIndex, dataIndex);\n const index = name !== undefined ? stacks.indexOf(name) : -1;\n return index === -1 ? stacks.length - 1 : index;\n }\n _getRuler() {\n const opts = this.options;\n const meta = this._cachedMeta;\n const iScale = meta.iScale;\n const pixels = [];\n let i, ilen;\n for(i = 0, ilen = meta.data.length; i < ilen; ++i){\n pixels.push(iScale.getPixelForValue(this.getParsed(i)[iScale.axis], i));\n }\n const barThickness = opts.barThickness;\n const min = barThickness || computeMinSampleSize(meta);\n return {\n min,\n pixels,\n start: iScale._startPixel,\n end: iScale._endPixel,\n stackCount: this._getStackCount(),\n scale: iScale,\n grouped: opts.grouped,\n ratio: barThickness ? 1 : opts.categoryPercentage * opts.barPercentage\n };\n }\n _calculateBarValuePixels(index) {\n const { _cachedMeta: { vScale , _stacked , index: datasetIndex } , options: { base: baseValue , minBarLength } } = this;\n const actualBase = baseValue || 0;\n const parsed = this.getParsed(index);\n const custom = parsed._custom;\n const floating = isFloatBar(custom);\n let value = parsed[vScale.axis];\n let start = 0;\n let length = _stacked ? this.applyStack(vScale, parsed, _stacked) : value;\n let head, size;\n if (length !== value) {\n start = length - value;\n length = value;\n }\n if (floating) {\n value = custom.barStart;\n length = custom.barEnd - custom.barStart;\n if (value !== 0 && sign(value) !== sign(custom.barEnd)) {\n start = 0;\n }\n start += value;\n }\n const startValue = !isNullOrUndef(baseValue) && !floating ? baseValue : start;\n let base = vScale.getPixelForValue(startValue);\n if (this.chart.getDataVisibility(index)) {\n head = vScale.getPixelForValue(start + length);\n } else {\n head = base;\n }\n size = head - base;\n if (Math.abs(size) < minBarLength) {\n size = barSign(size, vScale, actualBase) * minBarLength;\n if (value === actualBase) {\n base -= size / 2;\n }\n const startPixel = vScale.getPixelForDecimal(0);\n const endPixel = vScale.getPixelForDecimal(1);\n const min = Math.min(startPixel, endPixel);\n const max = Math.max(startPixel, endPixel);\n base = Math.max(Math.min(base, max), min);\n head = base + size;\n if (_stacked && !floating) {\n parsed._stacks[vScale.axis]._visualValues[datasetIndex] = vScale.getValueForPixel(head) - vScale.getValueForPixel(base);\n }\n }\n if (base === vScale.getPixelForValue(actualBase)) {\n const halfGrid = sign(size) * vScale.getLineWidthForValue(actualBase) / 2;\n base += halfGrid;\n size -= halfGrid;\n }\n return {\n size,\n base,\n head,\n center: head + size / 2\n };\n }\n _calculateBarIndexPixels(index, ruler) {\n const scale = ruler.scale;\n const options = this.options;\n const skipNull = options.skipNull;\n const maxBarThickness = valueOrDefault(options.maxBarThickness, Infinity);\n let center, size;\n if (ruler.grouped) {\n const stackCount = skipNull ? this._getStackCount(index) : ruler.stackCount;\n const range = options.barThickness === 'flex' ? computeFlexCategoryTraits(index, ruler, options, stackCount) : computeFitCategoryTraits(index, ruler, options, stackCount);\n const stackIndex = this._getStackIndex(this.index, this._cachedMeta.stack, skipNull ? index : undefined);\n center = range.start + range.chunk * stackIndex + range.chunk / 2;\n size = Math.min(maxBarThickness, range.chunk * range.ratio);\n } else {\n center = scale.getPixelForValue(this.getParsed(index)[scale.axis], index);\n size = Math.min(maxBarThickness, ruler.min * ruler.ratio);\n }\n return {\n base: center - size / 2,\n head: center + size / 2,\n center,\n size\n };\n }\n draw() {\n const meta = this._cachedMeta;\n const vScale = meta.vScale;\n const rects = meta.data;\n const ilen = rects.length;\n let i = 0;\n for(; i < ilen; ++i){\n if (this.getParsed(i)[vScale.axis] !== null) {\n rects[i].draw(this._ctx);\n }\n }\n }\n}\n\nclass BubbleController extends DatasetController {\n static id = 'bubble';\n static defaults = {\n datasetElementType: false,\n dataElementType: 'point',\n animations: {\n numbers: {\n type: 'number',\n properties: [\n 'x',\n 'y',\n 'borderWidth',\n 'radius'\n ]\n }\n }\n };\n static overrides = {\n scales: {\n x: {\n type: 'linear'\n },\n y: {\n type: 'linear'\n }\n }\n };\n initialize() {\n this.enableOptionSharing = true;\n super.initialize();\n }\n parsePrimitiveData(meta, data, start, count) {\n const parsed = super.parsePrimitiveData(meta, data, start, count);\n for(let i = 0; i < parsed.length; i++){\n parsed[i]._custom = this.resolveDataElementOptions(i + start).radius;\n }\n return parsed;\n }\n parseArrayData(meta, data, start, count) {\n const parsed = super.parseArrayData(meta, data, start, count);\n for(let i = 0; i < parsed.length; i++){\n const item = data[start + i];\n parsed[i]._custom = valueOrDefault(item[2], this.resolveDataElementOptions(i + start).radius);\n }\n return parsed;\n }\n parseObjectData(meta, data, start, count) {\n const parsed = super.parseObjectData(meta, data, start, count);\n for(let i = 0; i < parsed.length; i++){\n const item = data[start + i];\n parsed[i]._custom = valueOrDefault(item && item.r && +item.r, this.resolveDataElementOptions(i + start).radius);\n }\n return parsed;\n }\n getMaxOverflow() {\n const data = this._cachedMeta.data;\n let max = 0;\n for(let i = data.length - 1; i >= 0; --i){\n max = Math.max(max, data[i].size(this.resolveDataElementOptions(i)) / 2);\n }\n return max > 0 && max;\n }\n getLabelAndValue(index) {\n const meta = this._cachedMeta;\n const labels = this.chart.data.labels || [];\n const { xScale , yScale } = meta;\n const parsed = this.getParsed(index);\n const x = xScale.getLabelForValue(parsed.x);\n const y = yScale.getLabelForValue(parsed.y);\n const r = parsed._custom;\n return {\n label: labels[index] || '',\n value: '(' + x + ', ' + y + (r ? ', ' + r : '') + ')'\n };\n }\n update(mode) {\n const points = this._cachedMeta.data;\n this.updateElements(points, 0, points.length, mode);\n }\n updateElements(points, start, count, mode) {\n const reset = mode === 'reset';\n const { iScale , vScale } = this._cachedMeta;\n const { sharedOptions , includeOptions } = this._getSharedOptions(start, mode);\n const iAxis = iScale.axis;\n const vAxis = vScale.axis;\n for(let i = start; i < start + count; i++){\n const point = points[i];\n const parsed = !reset && this.getParsed(i);\n const properties = {};\n const iPixel = properties[iAxis] = reset ? iScale.getPixelForDecimal(0.5) : iScale.getPixelForValue(parsed[iAxis]);\n const vPixel = properties[vAxis] = reset ? vScale.getBasePixel() : vScale.getPixelForValue(parsed[vAxis]);\n properties.skip = isNaN(iPixel) || isNaN(vPixel);\n if (includeOptions) {\n properties.options = sharedOptions || this.resolveDataElementOptions(i, point.active ? 'active' : mode);\n if (reset) {\n properties.options.radius = 0;\n }\n }\n this.updateElement(point, i, properties, mode);\n }\n }\n resolveDataElementOptions(index, mode) {\n const parsed = this.getParsed(index);\n let values = super.resolveDataElementOptions(index, mode);\n if (values.$shared) {\n values = Object.assign({}, values, {\n $shared: false\n });\n }\n const radius = values.radius;\n if (mode !== 'active') {\n values.radius = 0;\n }\n values.radius += valueOrDefault(parsed && parsed._custom, radius);\n return values;\n }\n}\n\nfunction getRatioAndOffset(rotation, circumference, cutout) {\n let ratioX = 1;\n let ratioY = 1;\n let offsetX = 0;\n let offsetY = 0;\n if (circumference < TAU) {\n const startAngle = rotation;\n const endAngle = startAngle + circumference;\n const startX = Math.cos(startAngle);\n const startY = Math.sin(startAngle);\n const endX = Math.cos(endAngle);\n const endY = Math.sin(endAngle);\n const calcMax = (angle, a, b)=>_angleBetween(angle, startAngle, endAngle, true) ? 1 : Math.max(a, a * cutout, b, b * cutout);\n const calcMin = (angle, a, b)=>_angleBetween(angle, startAngle, endAngle, true) ? -1 : Math.min(a, a * cutout, b, b * cutout);\n const maxX = calcMax(0, startX, endX);\n const maxY = calcMax(HALF_PI, startY, endY);\n const minX = calcMin(PI, startX, endX);\n const minY = calcMin(PI + HALF_PI, startY, endY);\n ratioX = (maxX - minX) / 2;\n ratioY = (maxY - minY) / 2;\n offsetX = -(maxX + minX) / 2;\n offsetY = -(maxY + minY) / 2;\n }\n return {\n ratioX,\n ratioY,\n offsetX,\n offsetY\n };\n}\nclass DoughnutController extends DatasetController {\n static id = 'doughnut';\n static defaults = {\n datasetElementType: false,\n dataElementType: 'arc',\n animation: {\n animateRotate: true,\n animateScale: false\n },\n animations: {\n numbers: {\n type: 'number',\n properties: [\n 'circumference',\n 'endAngle',\n 'innerRadius',\n 'outerRadius',\n 'startAngle',\n 'x',\n 'y',\n 'offset',\n 'borderWidth',\n 'spacing'\n ]\n }\n },\n cutout: '50%',\n rotation: 0,\n circumference: 360,\n radius: '100%',\n spacing: 0,\n indexAxis: 'r'\n };\n static descriptors = {\n _scriptable: (name)=>name !== 'spacing',\n _indexable: (name)=>name !== 'spacing'\n };\n static overrides = {\n aspectRatio: 1,\n plugins: {\n legend: {\n labels: {\n generateLabels (chart) {\n const data = chart.data;\n if (data.labels.length && data.datasets.length) {\n const { labels: { pointStyle , color } } = chart.legend.options;\n return data.labels.map((label, i)=>{\n const meta = chart.getDatasetMeta(0);\n const style = meta.controller.getStyle(i);\n return {\n text: label,\n fillStyle: style.backgroundColor,\n strokeStyle: style.borderColor,\n fontColor: color,\n lineWidth: style.borderWidth,\n pointStyle: pointStyle,\n hidden: !chart.getDataVisibility(i),\n index: i\n };\n });\n }\n return [];\n }\n },\n onClick (e, legendItem, legend) {\n legend.chart.toggleDataVisibility(legendItem.index);\n legend.chart.update();\n }\n }\n }\n };\n constructor(chart, datasetIndex){\n super(chart, datasetIndex);\n this.enableOptionSharing = true;\n this.innerRadius = undefined;\n this.outerRadius = undefined;\n this.offsetX = undefined;\n this.offsetY = undefined;\n }\n linkScales() {}\n parse(start, count) {\n const data = this.getDataset().data;\n const meta = this._cachedMeta;\n if (this._parsing === false) {\n meta._parsed = data;\n } else {\n let getter = (i)=>+data[i];\n if (isObject(data[start])) {\n const { key ='value' } = this._parsing;\n getter = (i)=>+resolveObjectKey(data[i], key);\n }\n let i, ilen;\n for(i = start, ilen = start + count; i < ilen; ++i){\n meta._parsed[i] = getter(i);\n }\n }\n }\n _getRotation() {\n return toRadians(this.options.rotation - 90);\n }\n _getCircumference() {\n return toRadians(this.options.circumference);\n }\n _getRotationExtents() {\n let min = TAU;\n let max = -TAU;\n for(let i = 0; i < this.chart.data.datasets.length; ++i){\n if (this.chart.isDatasetVisible(i) && this.chart.getDatasetMeta(i).type === this._type) {\n const controller = this.chart.getDatasetMeta(i).controller;\n const rotation = controller._getRotation();\n const circumference = controller._getCircumference();\n min = Math.min(min, rotation);\n max = Math.max(max, rotation + circumference);\n }\n }\n return {\n rotation: min,\n circumference: max - min\n };\n }\n update(mode) {\n const chart = this.chart;\n const { chartArea } = chart;\n const meta = this._cachedMeta;\n const arcs = meta.data;\n const spacing = this.getMaxBorderWidth() + this.getMaxOffset(arcs) + this.options.spacing;\n const maxSize = Math.max((Math.min(chartArea.width, chartArea.height) - spacing) / 2, 0);\n const cutout = Math.min(toPercentage(this.options.cutout, maxSize), 1);\n const chartWeight = this._getRingWeight(this.index);\n const { circumference , rotation } = this._getRotationExtents();\n const { ratioX , ratioY , offsetX , offsetY } = getRatioAndOffset(rotation, circumference, cutout);\n const maxWidth = (chartArea.width - spacing) / ratioX;\n const maxHeight = (chartArea.height - spacing) / ratioY;\n const maxRadius = Math.max(Math.min(maxWidth, maxHeight) / 2, 0);\n const outerRadius = toDimension(this.options.radius, maxRadius);\n const innerRadius = Math.max(outerRadius * cutout, 0);\n const radiusLength = (outerRadius - innerRadius) / this._getVisibleDatasetWeightTotal();\n this.offsetX = offsetX * outerRadius;\n this.offsetY = offsetY * outerRadius;\n meta.total = this.calculateTotal();\n this.outerRadius = outerRadius - radiusLength * this._getRingWeightOffset(this.index);\n this.innerRadius = Math.max(this.outerRadius - radiusLength * chartWeight, 0);\n this.updateElements(arcs, 0, arcs.length, mode);\n }\n _circumference(i, reset) {\n const opts = this.options;\n const meta = this._cachedMeta;\n const circumference = this._getCircumference();\n if (reset && opts.animation.animateRotate || !this.chart.getDataVisibility(i) || meta._parsed[i] === null || meta.data[i].hidden) {\n return 0;\n }\n return this.calculateCircumference(meta._parsed[i] * circumference / TAU);\n }\n updateElements(arcs, start, count, mode) {\n const reset = mode === 'reset';\n const chart = this.chart;\n const chartArea = chart.chartArea;\n const opts = chart.options;\n const animationOpts = opts.animation;\n const centerX = (chartArea.left + chartArea.right) / 2;\n const centerY = (chartArea.top + chartArea.bottom) / 2;\n const animateScale = reset && animationOpts.animateScale;\n const innerRadius = animateScale ? 0 : this.innerRadius;\n const outerRadius = animateScale ? 0 : this.outerRadius;\n const { sharedOptions , includeOptions } = this._getSharedOptions(start, mode);\n let startAngle = this._getRotation();\n let i;\n for(i = 0; i < start; ++i){\n startAngle += this._circumference(i, reset);\n }\n for(i = start; i < start + count; ++i){\n const circumference = this._circumference(i, reset);\n const arc = arcs[i];\n const properties = {\n x: centerX + this.offsetX,\n y: centerY + this.offsetY,\n startAngle,\n endAngle: startAngle + circumference,\n circumference,\n outerRadius,\n innerRadius\n };\n if (includeOptions) {\n properties.options = sharedOptions || this.resolveDataElementOptions(i, arc.active ? 'active' : mode);\n }\n startAngle += circumference;\n this.updateElement(arc, i, properties, mode);\n }\n }\n calculateTotal() {\n const meta = this._cachedMeta;\n const metaData = meta.data;\n let total = 0;\n let i;\n for(i = 0; i < metaData.length; i++){\n const value = meta._parsed[i];\n if (value !== null && !isNaN(value) && this.chart.getDataVisibility(i) && !metaData[i].hidden) {\n total += Math.abs(value);\n }\n }\n return total;\n }\n calculateCircumference(value) {\n const total = this._cachedMeta.total;\n if (total > 0 && !isNaN(value)) {\n return TAU * (Math.abs(value) / total);\n }\n return 0;\n }\n getLabelAndValue(index) {\n const meta = this._cachedMeta;\n const chart = this.chart;\n const labels = chart.data.labels || [];\n const value = formatNumber(meta._parsed[index], chart.options.locale);\n return {\n label: labels[index] || '',\n value\n };\n }\n getMaxBorderWidth(arcs) {\n let max = 0;\n const chart = this.chart;\n let i, ilen, meta, controller, options;\n if (!arcs) {\n for(i = 0, ilen = chart.data.datasets.length; i < ilen; ++i){\n if (chart.isDatasetVisible(i)) {\n meta = chart.getDatasetMeta(i);\n arcs = meta.data;\n controller = meta.controller;\n break;\n }\n }\n }\n if (!arcs) {\n return 0;\n }\n for(i = 0, ilen = arcs.length; i < ilen; ++i){\n options = controller.resolveDataElementOptions(i);\n if (options.borderAlign !== 'inner') {\n max = Math.max(max, options.borderWidth || 0, options.hoverBorderWidth || 0);\n }\n }\n return max;\n }\n getMaxOffset(arcs) {\n let max = 0;\n for(let i = 0, ilen = arcs.length; i < ilen; ++i){\n const options = this.resolveDataElementOptions(i);\n max = Math.max(max, options.offset || 0, options.hoverOffset || 0);\n }\n return max;\n }\n _getRingWeightOffset(datasetIndex) {\n let ringWeightOffset = 0;\n for(let i = 0; i < datasetIndex; ++i){\n if (this.chart.isDatasetVisible(i)) {\n ringWeightOffset += this._getRingWeight(i);\n }\n }\n return ringWeightOffset;\n }\n _getRingWeight(datasetIndex) {\n return Math.max(valueOrDefault(this.chart.data.datasets[datasetIndex].weight, 1), 0);\n }\n _getVisibleDatasetWeightTotal() {\n return this._getRingWeightOffset(this.chart.data.datasets.length) || 1;\n }\n}\n\nclass LineController extends DatasetController {\n static id = 'line';\n static defaults = {\n datasetElementType: 'line',\n dataElementType: 'point',\n showLine: true,\n spanGaps: false\n };\n static overrides = {\n scales: {\n _index_: {\n type: 'category'\n },\n _value_: {\n type: 'linear'\n }\n }\n };\n initialize() {\n this.enableOptionSharing = true;\n this.supportsDecimation = true;\n super.initialize();\n }\n update(mode) {\n const meta = this._cachedMeta;\n const { dataset: line , data: points = [] , _dataset } = meta;\n const animationsDisabled = this.chart._animationsDisabled;\n let { start , count } = _getStartAndCountOfVisiblePoints(meta, points, animationsDisabled);\n this._drawStart = start;\n this._drawCount = count;\n if (_scaleRangesChanged(meta)) {\n start = 0;\n count = points.length;\n }\n line._chart = this.chart;\n line._datasetIndex = this.index;\n line._decimated = !!_dataset._decimated;\n line.points = points;\n const options = this.resolveDatasetElementOptions(mode);\n if (!this.options.showLine) {\n options.borderWidth = 0;\n }\n options.segment = this.options.segment;\n this.updateElement(line, undefined, {\n animated: !animationsDisabled,\n options\n }, mode);\n this.updateElements(points, start, count, mode);\n }\n updateElements(points, start, count, mode) {\n const reset = mode === 'reset';\n const { iScale , vScale , _stacked , _dataset } = this._cachedMeta;\n const { sharedOptions , includeOptions } = this._getSharedOptions(start, mode);\n const iAxis = iScale.axis;\n const vAxis = vScale.axis;\n const { spanGaps , segment } = this.options;\n const maxGapLength = isNumber(spanGaps) ? spanGaps : Number.POSITIVE_INFINITY;\n const directUpdate = this.chart._animationsDisabled || reset || mode === 'none';\n const end = start + count;\n const pointsCount = points.length;\n let prevParsed = start > 0 && this.getParsed(start - 1);\n for(let i = 0; i < pointsCount; ++i){\n const point = points[i];\n const properties = directUpdate ? point : {};\n if (i < start || i >= end) {\n properties.skip = true;\n continue;\n }\n const parsed = this.getParsed(i);\n const nullData = isNullOrUndef(parsed[vAxis]);\n const iPixel = properties[iAxis] = iScale.getPixelForValue(parsed[iAxis], i);\n const vPixel = properties[vAxis] = reset || nullData ? vScale.getBasePixel() : vScale.getPixelForValue(_stacked ? this.applyStack(vScale, parsed, _stacked) : parsed[vAxis], i);\n properties.skip = isNaN(iPixel) || isNaN(vPixel) || nullData;\n properties.stop = i > 0 && Math.abs(parsed[iAxis] - prevParsed[iAxis]) > maxGapLength;\n if (segment) {\n properties.parsed = parsed;\n properties.raw = _dataset.data[i];\n }\n if (includeOptions) {\n properties.options = sharedOptions || this.resolveDataElementOptions(i, point.active ? 'active' : mode);\n }\n if (!directUpdate) {\n this.updateElement(point, i, properties, mode);\n }\n prevParsed = parsed;\n }\n }\n getMaxOverflow() {\n const meta = this._cachedMeta;\n const dataset = meta.dataset;\n const border = dataset.options && dataset.options.borderWidth || 0;\n const data = meta.data || [];\n if (!data.length) {\n return border;\n }\n const firstPoint = data[0].size(this.resolveDataElementOptions(0));\n const lastPoint = data[data.length - 1].size(this.resolveDataElementOptions(data.length - 1));\n return Math.max(border, firstPoint, lastPoint) / 2;\n }\n draw() {\n const meta = this._cachedMeta;\n meta.dataset.updateControlPoints(this.chart.chartArea, meta.iScale.axis);\n super.draw();\n }\n}\n\nclass PolarAreaController extends DatasetController {\n static id = 'polarArea';\n static defaults = {\n dataElementType: 'arc',\n animation: {\n animateRotate: true,\n animateScale: true\n },\n animations: {\n numbers: {\n type: 'number',\n properties: [\n 'x',\n 'y',\n 'startAngle',\n 'endAngle',\n 'innerRadius',\n 'outerRadius'\n ]\n }\n },\n indexAxis: 'r',\n startAngle: 0\n };\n static overrides = {\n aspectRatio: 1,\n plugins: {\n legend: {\n labels: {\n generateLabels (chart) {\n const data = chart.data;\n if (data.labels.length && data.datasets.length) {\n const { labels: { pointStyle , color } } = chart.legend.options;\n return data.labels.map((label, i)=>{\n const meta = chart.getDatasetMeta(0);\n const style = meta.controller.getStyle(i);\n return {\n text: label,\n fillStyle: style.backgroundColor,\n strokeStyle: style.borderColor,\n fontColor: color,\n lineWidth: style.borderWidth,\n pointStyle: pointStyle,\n hidden: !chart.getDataVisibility(i),\n index: i\n };\n });\n }\n return [];\n }\n },\n onClick (e, legendItem, legend) {\n legend.chart.toggleDataVisibility(legendItem.index);\n legend.chart.update();\n }\n }\n },\n scales: {\n r: {\n type: 'radialLinear',\n angleLines: {\n display: false\n },\n beginAtZero: true,\n grid: {\n circular: true\n },\n pointLabels: {\n display: false\n },\n startAngle: 0\n }\n }\n };\n constructor(chart, datasetIndex){\n super(chart, datasetIndex);\n this.innerRadius = undefined;\n this.outerRadius = undefined;\n }\n getLabelAndValue(index) {\n const meta = this._cachedMeta;\n const chart = this.chart;\n const labels = chart.data.labels || [];\n const value = formatNumber(meta._parsed[index].r, chart.options.locale);\n return {\n label: labels[index] || '',\n value\n };\n }\n parseObjectData(meta, data, start, count) {\n return _parseObjectDataRadialScale.bind(this)(meta, data, start, count);\n }\n update(mode) {\n const arcs = this._cachedMeta.data;\n this._updateRadius();\n this.updateElements(arcs, 0, arcs.length, mode);\n }\n getMinMax() {\n const meta = this._cachedMeta;\n const range = {\n min: Number.POSITIVE_INFINITY,\n max: Number.NEGATIVE_INFINITY\n };\n meta.data.forEach((element, index)=>{\n const parsed = this.getParsed(index).r;\n if (!isNaN(parsed) && this.chart.getDataVisibility(index)) {\n if (parsed < range.min) {\n range.min = parsed;\n }\n if (parsed > range.max) {\n range.max = parsed;\n }\n }\n });\n return range;\n }\n _updateRadius() {\n const chart = this.chart;\n const chartArea = chart.chartArea;\n const opts = chart.options;\n const minSize = Math.min(chartArea.right - chartArea.left, chartArea.bottom - chartArea.top);\n const outerRadius = Math.max(minSize / 2, 0);\n const innerRadius = Math.max(opts.cutoutPercentage ? outerRadius / 100 * opts.cutoutPercentage : 1, 0);\n const radiusLength = (outerRadius - innerRadius) / chart.getVisibleDatasetCount();\n this.outerRadius = outerRadius - radiusLength * this.index;\n this.innerRadius = this.outerRadius - radiusLength;\n }\n updateElements(arcs, start, count, mode) {\n const reset = mode === 'reset';\n const chart = this.chart;\n const opts = chart.options;\n const animationOpts = opts.animation;\n const scale = this._cachedMeta.rScale;\n const centerX = scale.xCenter;\n const centerY = scale.yCenter;\n const datasetStartAngle = scale.getIndexAngle(0) - 0.5 * PI;\n let angle = datasetStartAngle;\n let i;\n const defaultAngle = 360 / this.countVisibleElements();\n for(i = 0; i < start; ++i){\n angle += this._computeAngle(i, mode, defaultAngle);\n }\n for(i = start; i < start + count; i++){\n const arc = arcs[i];\n let startAngle = angle;\n let endAngle = angle + this._computeAngle(i, mode, defaultAngle);\n let outerRadius = chart.getDataVisibility(i) ? scale.getDistanceFromCenterForValue(this.getParsed(i).r) : 0;\n angle = endAngle;\n if (reset) {\n if (animationOpts.animateScale) {\n outerRadius = 0;\n }\n if (animationOpts.animateRotate) {\n startAngle = endAngle = datasetStartAngle;\n }\n }\n const properties = {\n x: centerX,\n y: centerY,\n innerRadius: 0,\n outerRadius,\n startAngle,\n endAngle,\n options: this.resolveDataElementOptions(i, arc.active ? 'active' : mode)\n };\n this.updateElement(arc, i, properties, mode);\n }\n }\n countVisibleElements() {\n const meta = this._cachedMeta;\n let count = 0;\n meta.data.forEach((element, index)=>{\n if (!isNaN(this.getParsed(index).r) && this.chart.getDataVisibility(index)) {\n count++;\n }\n });\n return count;\n }\n _computeAngle(index, mode, defaultAngle) {\n return this.chart.getDataVisibility(index) ? toRadians(this.resolveDataElementOptions(index, mode).angle || defaultAngle) : 0;\n }\n}\n\nclass PieController extends DoughnutController {\n static id = 'pie';\n static defaults = {\n cutout: 0,\n rotation: 0,\n circumference: 360,\n radius: '100%'\n };\n}\n\nclass RadarController extends DatasetController {\n static id = 'radar';\n static defaults = {\n datasetElementType: 'line',\n dataElementType: 'point',\n indexAxis: 'r',\n showLine: true,\n elements: {\n line: {\n fill: 'start'\n }\n }\n };\n static overrides = {\n aspectRatio: 1,\n scales: {\n r: {\n type: 'radialLinear'\n }\n }\n };\n getLabelAndValue(index) {\n const vScale = this._cachedMeta.vScale;\n const parsed = this.getParsed(index);\n return {\n label: vScale.getLabels()[index],\n value: '' + vScale.getLabelForValue(parsed[vScale.axis])\n };\n }\n parseObjectData(meta, data, start, count) {\n return _parseObjectDataRadialScale.bind(this)(meta, data, start, count);\n }\n update(mode) {\n const meta = this._cachedMeta;\n const line = meta.dataset;\n const points = meta.data || [];\n const labels = meta.iScale.getLabels();\n line.points = points;\n if (mode !== 'resize') {\n const options = this.resolveDatasetElementOptions(mode);\n if (!this.options.showLine) {\n options.borderWidth = 0;\n }\n const properties = {\n _loop: true,\n _fullLoop: labels.length === points.length,\n options\n };\n this.updateElement(line, undefined, properties, mode);\n }\n this.updateElements(points, 0, points.length, mode);\n }\n updateElements(points, start, count, mode) {\n const scale = this._cachedMeta.rScale;\n const reset = mode === 'reset';\n for(let i = start; i < start + count; i++){\n const point = points[i];\n const options = this.resolveDataElementOptions(i, point.active ? 'active' : mode);\n const pointPosition = scale.getPointPositionForValue(i, this.getParsed(i).r);\n const x = reset ? scale.xCenter : pointPosition.x;\n const y = reset ? scale.yCenter : pointPosition.y;\n const properties = {\n x,\n y,\n angle: pointPosition.angle,\n skip: isNaN(x) || isNaN(y),\n options\n };\n this.updateElement(point, i, properties, mode);\n }\n }\n}\n\nclass ScatterController extends DatasetController {\n static id = 'scatter';\n static defaults = {\n datasetElementType: false,\n dataElementType: 'point',\n showLine: false,\n fill: false\n };\n static overrides = {\n interaction: {\n mode: 'point'\n },\n scales: {\n x: {\n type: 'linear'\n },\n y: {\n type: 'linear'\n }\n }\n };\n getLabelAndValue(index) {\n const meta = this._cachedMeta;\n const labels = this.chart.data.labels || [];\n const { xScale , yScale } = meta;\n const parsed = this.getParsed(index);\n const x = xScale.getLabelForValue(parsed.x);\n const y = yScale.getLabelForValue(parsed.y);\n return {\n label: labels[index] || '',\n value: '(' + x + ', ' + y + ')'\n };\n }\n update(mode) {\n const meta = this._cachedMeta;\n const { data: points = [] } = meta;\n const animationsDisabled = this.chart._animationsDisabled;\n let { start , count } = _getStartAndCountOfVisiblePoints(meta, points, animationsDisabled);\n this._drawStart = start;\n this._drawCount = count;\n if (_scaleRangesChanged(meta)) {\n start = 0;\n count = points.length;\n }\n if (this.options.showLine) {\n const { dataset: line , _dataset } = meta;\n line._chart = this.chart;\n line._datasetIndex = this.index;\n line._decimated = !!_dataset._decimated;\n line.points = points;\n const options = this.resolveDatasetElementOptions(mode);\n options.segment = this.options.segment;\n this.updateElement(line, undefined, {\n animated: !animationsDisabled,\n options\n }, mode);\n }\n this.updateElements(points, start, count, mode);\n }\n addElements() {\n const { showLine } = this.options;\n if (!this.datasetElementType && showLine) {\n this.datasetElementType = this.chart.registry.getElement('line');\n }\n super.addElements();\n }\n updateElements(points, start, count, mode) {\n const reset = mode === 'reset';\n const { iScale , vScale , _stacked , _dataset } = this._cachedMeta;\n const firstOpts = this.resolveDataElementOptions(start, mode);\n const sharedOptions = this.getSharedOptions(firstOpts);\n const includeOptions = this.includeOptions(mode, sharedOptions);\n const iAxis = iScale.axis;\n const vAxis = vScale.axis;\n const { spanGaps , segment } = this.options;\n const maxGapLength = isNumber(spanGaps) ? spanGaps : Number.POSITIVE_INFINITY;\n const directUpdate = this.chart._animationsDisabled || reset || mode === 'none';\n let prevParsed = start > 0 && this.getParsed(start - 1);\n for(let i = start; i < start + count; ++i){\n const point = points[i];\n const parsed = this.getParsed(i);\n const properties = directUpdate ? point : {};\n const nullData = isNullOrUndef(parsed[vAxis]);\n const iPixel = properties[iAxis] = iScale.getPixelForValue(parsed[iAxis], i);\n const vPixel = properties[vAxis] = reset || nullData ? vScale.getBasePixel() : vScale.getPixelForValue(_stacked ? this.applyStack(vScale, parsed, _stacked) : parsed[vAxis], i);\n properties.skip = isNaN(iPixel) || isNaN(vPixel) || nullData;\n properties.stop = i > 0 && Math.abs(parsed[iAxis] - prevParsed[iAxis]) > maxGapLength;\n if (segment) {\n properties.parsed = parsed;\n properties.raw = _dataset.data[i];\n }\n if (includeOptions) {\n properties.options = sharedOptions || this.resolveDataElementOptions(i, point.active ? 'active' : mode);\n }\n if (!directUpdate) {\n this.updateElement(point, i, properties, mode);\n }\n prevParsed = parsed;\n }\n this.updateSharedOptions(sharedOptions, mode, firstOpts);\n }\n getMaxOverflow() {\n const meta = this._cachedMeta;\n const data = meta.data || [];\n if (!this.options.showLine) {\n let max = 0;\n for(let i = data.length - 1; i >= 0; --i){\n max = Math.max(max, data[i].size(this.resolveDataElementOptions(i)) / 2);\n }\n return max > 0 && max;\n }\n const dataset = meta.dataset;\n const border = dataset.options && dataset.options.borderWidth || 0;\n if (!data.length) {\n return border;\n }\n const firstPoint = data[0].size(this.resolveDataElementOptions(0));\n const lastPoint = data[data.length - 1].size(this.resolveDataElementOptions(data.length - 1));\n return Math.max(border, firstPoint, lastPoint) / 2;\n }\n}\n\nvar controllers = /*#__PURE__*/Object.freeze({\n__proto__: null,\nBarController: BarController,\nBubbleController: BubbleController,\nDoughnutController: DoughnutController,\nLineController: LineController,\nPolarAreaController: PolarAreaController,\nPieController: PieController,\nRadarController: RadarController,\nScatterController: ScatterController\n});\n\n/**\n * @namespace Chart._adapters\n * @since 2.8.0\n * @private\n */ function abstract() {\n throw new Error('This method is not implemented: Check that a complete date adapter is provided.');\n}\n/**\n * Date adapter (current used by the time scale)\n * @namespace Chart._adapters._date\n * @memberof Chart._adapters\n * @private\n */ class DateAdapterBase {\n /**\n * Override default date adapter methods.\n * Accepts type parameter to define options type.\n * @example\n * Chart._adapters._date.override<{myAdapterOption: string}>({\n * init() {\n * console.log(this.options.myAdapterOption);\n * }\n * })\n */ static override(members) {\n Object.assign(DateAdapterBase.prototype, members);\n }\n constructor(options){\n this.options = options || {};\n }\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n init() {}\n formats() {\n return abstract();\n }\n parse() {\n return abstract();\n }\n format() {\n return abstract();\n }\n add() {\n return abstract();\n }\n diff() {\n return abstract();\n }\n startOf() {\n return abstract();\n }\n endOf() {\n return abstract();\n }\n}\nvar adapters = {\n _date: DateAdapterBase\n};\n\nfunction binarySearch(metaset, axis, value, intersect) {\n const { controller , data , _sorted } = metaset;\n const iScale = controller._cachedMeta.iScale;\n if (iScale && axis === iScale.axis && axis !== 'r' && _sorted && data.length) {\n const lookupMethod = iScale._reversePixels ? _rlookupByKey : _lookupByKey;\n if (!intersect) {\n return lookupMethod(data, axis, value);\n } else if (controller._sharedOptions) {\n const el = data[0];\n const range = typeof el.getRange === 'function' && el.getRange(axis);\n if (range) {\n const start = lookupMethod(data, axis, value - range);\n const end = lookupMethod(data, axis, value + range);\n return {\n lo: start.lo,\n hi: end.hi\n };\n }\n }\n }\n return {\n lo: 0,\n hi: data.length - 1\n };\n}\n function evaluateInteractionItems(chart, axis, position, handler, intersect) {\n const metasets = chart.getSortedVisibleDatasetMetas();\n const value = position[axis];\n for(let i = 0, ilen = metasets.length; i < ilen; ++i){\n const { index , data } = metasets[i];\n const { lo , hi } = binarySearch(metasets[i], axis, value, intersect);\n for(let j = lo; j <= hi; ++j){\n const element = data[j];\n if (!element.skip) {\n handler(element, index, j);\n }\n }\n }\n}\n function getDistanceMetricForAxis(axis) {\n const useX = axis.indexOf('x') !== -1;\n const useY = axis.indexOf('y') !== -1;\n return function(pt1, pt2) {\n const deltaX = useX ? Math.abs(pt1.x - pt2.x) : 0;\n const deltaY = useY ? Math.abs(pt1.y - pt2.y) : 0;\n return Math.sqrt(Math.pow(deltaX, 2) + Math.pow(deltaY, 2));\n };\n}\n function getIntersectItems(chart, position, axis, useFinalPosition, includeInvisible) {\n const items = [];\n if (!includeInvisible && !chart.isPointInArea(position)) {\n return items;\n }\n const evaluationFunc = function(element, datasetIndex, index) {\n if (!includeInvisible && !_isPointInArea(element, chart.chartArea, 0)) {\n return;\n }\n if (element.inRange(position.x, position.y, useFinalPosition)) {\n items.push({\n element,\n datasetIndex,\n index\n });\n }\n };\n evaluateInteractionItems(chart, axis, position, evaluationFunc, true);\n return items;\n}\n function getNearestRadialItems(chart, position, axis, useFinalPosition) {\n let items = [];\n function evaluationFunc(element, datasetIndex, index) {\n const { startAngle , endAngle } = element.getProps([\n 'startAngle',\n 'endAngle'\n ], useFinalPosition);\n const { angle } = getAngleFromPoint(element, {\n x: position.x,\n y: position.y\n });\n if (_angleBetween(angle, startAngle, endAngle)) {\n items.push({\n element,\n datasetIndex,\n index\n });\n }\n }\n evaluateInteractionItems(chart, axis, position, evaluationFunc);\n return items;\n}\n function getNearestCartesianItems(chart, position, axis, intersect, useFinalPosition, includeInvisible) {\n let items = [];\n const distanceMetric = getDistanceMetricForAxis(axis);\n let minDistance = Number.POSITIVE_INFINITY;\n function evaluationFunc(element, datasetIndex, index) {\n const inRange = element.inRange(position.x, position.y, useFinalPosition);\n if (intersect && !inRange) {\n return;\n }\n const center = element.getCenterPoint(useFinalPosition);\n const pointInArea = !!includeInvisible || chart.isPointInArea(center);\n if (!pointInArea && !inRange) {\n return;\n }\n const distance = distanceMetric(position, center);\n if (distance < minDistance) {\n items = [\n {\n element,\n datasetIndex,\n index\n }\n ];\n minDistance = distance;\n } else if (distance === minDistance) {\n items.push({\n element,\n datasetIndex,\n index\n });\n }\n }\n evaluateInteractionItems(chart, axis, position, evaluationFunc);\n return items;\n}\n function getNearestItems(chart, position, axis, intersect, useFinalPosition, includeInvisible) {\n if (!includeInvisible && !chart.isPointInArea(position)) {\n return [];\n }\n return axis === 'r' && !intersect ? getNearestRadialItems(chart, position, axis, useFinalPosition) : getNearestCartesianItems(chart, position, axis, intersect, useFinalPosition, includeInvisible);\n}\n function getAxisItems(chart, position, axis, intersect, useFinalPosition) {\n const items = [];\n const rangeMethod = axis === 'x' ? 'inXRange' : 'inYRange';\n let intersectsItem = false;\n evaluateInteractionItems(chart, axis, position, (element, datasetIndex, index)=>{\n if (element[rangeMethod](position[axis], useFinalPosition)) {\n items.push({\n element,\n datasetIndex,\n index\n });\n intersectsItem = intersectsItem || element.inRange(position.x, position.y, useFinalPosition);\n }\n });\n if (intersect && !intersectsItem) {\n return [];\n }\n return items;\n}\n var Interaction = {\n evaluateInteractionItems,\n modes: {\n index (chart, e, options, useFinalPosition) {\n const position = getRelativePosition(e, chart);\n const axis = options.axis || 'x';\n const includeInvisible = options.includeInvisible || false;\n const items = options.intersect ? getIntersectItems(chart, position, axis, useFinalPosition, includeInvisible) : getNearestItems(chart, position, axis, false, useFinalPosition, includeInvisible);\n const elements = [];\n if (!items.length) {\n return [];\n }\n chart.getSortedVisibleDatasetMetas().forEach((meta)=>{\n const index = items[0].index;\n const element = meta.data[index];\n if (element && !element.skip) {\n elements.push({\n element,\n datasetIndex: meta.index,\n index\n });\n }\n });\n return elements;\n },\n dataset (chart, e, options, useFinalPosition) {\n const position = getRelativePosition(e, chart);\n const axis = options.axis || 'xy';\n const includeInvisible = options.includeInvisible || false;\n let items = options.intersect ? getIntersectItems(chart, position, axis, useFinalPosition, includeInvisible) : getNearestItems(chart, position, axis, false, useFinalPosition, includeInvisible);\n if (items.length > 0) {\n const datasetIndex = items[0].datasetIndex;\n const data = chart.getDatasetMeta(datasetIndex).data;\n items = [];\n for(let i = 0; i < data.length; ++i){\n items.push({\n element: data[i],\n datasetIndex,\n index: i\n });\n }\n }\n return items;\n },\n point (chart, e, options, useFinalPosition) {\n const position = getRelativePosition(e, chart);\n const axis = options.axis || 'xy';\n const includeInvisible = options.includeInvisible || false;\n return getIntersectItems(chart, position, axis, useFinalPosition, includeInvisible);\n },\n nearest (chart, e, options, useFinalPosition) {\n const position = getRelativePosition(e, chart);\n const axis = options.axis || 'xy';\n const includeInvisible = options.includeInvisible || false;\n return getNearestItems(chart, position, axis, options.intersect, useFinalPosition, includeInvisible);\n },\n x (chart, e, options, useFinalPosition) {\n const position = getRelativePosition(e, chart);\n return getAxisItems(chart, position, 'x', options.intersect, useFinalPosition);\n },\n y (chart, e, options, useFinalPosition) {\n const position = getRelativePosition(e, chart);\n return getAxisItems(chart, position, 'y', options.intersect, useFinalPosition);\n }\n }\n};\n\nconst STATIC_POSITIONS = [\n 'left',\n 'top',\n 'right',\n 'bottom'\n];\nfunction filterByPosition(array, position) {\n return array.filter((v)=>v.pos === position);\n}\nfunction filterDynamicPositionByAxis(array, axis) {\n return array.filter((v)=>STATIC_POSITIONS.indexOf(v.pos) === -1 && v.box.axis === axis);\n}\nfunction sortByWeight(array, reverse) {\n return array.sort((a, b)=>{\n const v0 = reverse ? b : a;\n const v1 = reverse ? a : b;\n return v0.weight === v1.weight ? v0.index - v1.index : v0.weight - v1.weight;\n });\n}\nfunction wrapBoxes(boxes) {\n const layoutBoxes = [];\n let i, ilen, box, pos, stack, stackWeight;\n for(i = 0, ilen = (boxes || []).length; i < ilen; ++i){\n box = boxes[i];\n ({ position: pos , options: { stack , stackWeight =1 } } = box);\n layoutBoxes.push({\n index: i,\n box,\n pos,\n horizontal: box.isHorizontal(),\n weight: box.weight,\n stack: stack && pos + stack,\n stackWeight\n });\n }\n return layoutBoxes;\n}\nfunction buildStacks(layouts) {\n const stacks = {};\n for (const wrap of layouts){\n const { stack , pos , stackWeight } = wrap;\n if (!stack || !STATIC_POSITIONS.includes(pos)) {\n continue;\n }\n const _stack = stacks[stack] || (stacks[stack] = {\n count: 0,\n placed: 0,\n weight: 0,\n size: 0\n });\n _stack.count++;\n _stack.weight += stackWeight;\n }\n return stacks;\n}\n function setLayoutDims(layouts, params) {\n const stacks = buildStacks(layouts);\n const { vBoxMaxWidth , hBoxMaxHeight } = params;\n let i, ilen, layout;\n for(i = 0, ilen = layouts.length; i < ilen; ++i){\n layout = layouts[i];\n const { fullSize } = layout.box;\n const stack = stacks[layout.stack];\n const factor = stack && layout.stackWeight / stack.weight;\n if (layout.horizontal) {\n layout.width = factor ? factor * vBoxMaxWidth : fullSize && params.availableWidth;\n layout.height = hBoxMaxHeight;\n } else {\n layout.width = vBoxMaxWidth;\n layout.height = factor ? factor * hBoxMaxHeight : fullSize && params.availableHeight;\n }\n }\n return stacks;\n}\nfunction buildLayoutBoxes(boxes) {\n const layoutBoxes = wrapBoxes(boxes);\n const fullSize = sortByWeight(layoutBoxes.filter((wrap)=>wrap.box.fullSize), true);\n const left = sortByWeight(filterByPosition(layoutBoxes, 'left'), true);\n const right = sortByWeight(filterByPosition(layoutBoxes, 'right'));\n const top = sortByWeight(filterByPosition(layoutBoxes, 'top'), true);\n const bottom = sortByWeight(filterByPosition(layoutBoxes, 'bottom'));\n const centerHorizontal = filterDynamicPositionByAxis(layoutBoxes, 'x');\n const centerVertical = filterDynamicPositionByAxis(layoutBoxes, 'y');\n return {\n fullSize,\n leftAndTop: left.concat(top),\n rightAndBottom: right.concat(centerVertical).concat(bottom).concat(centerHorizontal),\n chartArea: filterByPosition(layoutBoxes, 'chartArea'),\n vertical: left.concat(right).concat(centerVertical),\n horizontal: top.concat(bottom).concat(centerHorizontal)\n };\n}\nfunction getCombinedMax(maxPadding, chartArea, a, b) {\n return Math.max(maxPadding[a], chartArea[a]) + Math.max(maxPadding[b], chartArea[b]);\n}\nfunction updateMaxPadding(maxPadding, boxPadding) {\n maxPadding.top = Math.max(maxPadding.top, boxPadding.top);\n maxPadding.left = Math.max(maxPadding.left, boxPadding.left);\n maxPadding.bottom = Math.max(maxPadding.bottom, boxPadding.bottom);\n maxPadding.right = Math.max(maxPadding.right, boxPadding.right);\n}\nfunction updateDims(chartArea, params, layout, stacks) {\n const { pos , box } = layout;\n const maxPadding = chartArea.maxPadding;\n if (!isObject(pos)) {\n if (layout.size) {\n chartArea[pos] -= layout.size;\n }\n const stack = stacks[layout.stack] || {\n size: 0,\n count: 1\n };\n stack.size = Math.max(stack.size, layout.horizontal ? box.height : box.width);\n layout.size = stack.size / stack.count;\n chartArea[pos] += layout.size;\n }\n if (box.getPadding) {\n updateMaxPadding(maxPadding, box.getPadding());\n }\n const newWidth = Math.max(0, params.outerWidth - getCombinedMax(maxPadding, chartArea, 'left', 'right'));\n const newHeight = Math.max(0, params.outerHeight - getCombinedMax(maxPadding, chartArea, 'top', 'bottom'));\n const widthChanged = newWidth !== chartArea.w;\n const heightChanged = newHeight !== chartArea.h;\n chartArea.w = newWidth;\n chartArea.h = newHeight;\n return layout.horizontal ? {\n same: widthChanged,\n other: heightChanged\n } : {\n same: heightChanged,\n other: widthChanged\n };\n}\nfunction handleMaxPadding(chartArea) {\n const maxPadding = chartArea.maxPadding;\n function updatePos(pos) {\n const change = Math.max(maxPadding[pos] - chartArea[pos], 0);\n chartArea[pos] += change;\n return change;\n }\n chartArea.y += updatePos('top');\n chartArea.x += updatePos('left');\n updatePos('right');\n updatePos('bottom');\n}\nfunction getMargins(horizontal, chartArea) {\n const maxPadding = chartArea.maxPadding;\n function marginForPositions(positions) {\n const margin = {\n left: 0,\n top: 0,\n right: 0,\n bottom: 0\n };\n positions.forEach((pos)=>{\n margin[pos] = Math.max(chartArea[pos], maxPadding[pos]);\n });\n return margin;\n }\n return horizontal ? marginForPositions([\n 'left',\n 'right'\n ]) : marginForPositions([\n 'top',\n 'bottom'\n ]);\n}\nfunction fitBoxes(boxes, chartArea, params, stacks) {\n const refitBoxes = [];\n let i, ilen, layout, box, refit, changed;\n for(i = 0, ilen = boxes.length, refit = 0; i < ilen; ++i){\n layout = boxes[i];\n box = layout.box;\n box.update(layout.width || chartArea.w, layout.height || chartArea.h, getMargins(layout.horizontal, chartArea));\n const { same , other } = updateDims(chartArea, params, layout, stacks);\n refit |= same && refitBoxes.length;\n changed = changed || other;\n if (!box.fullSize) {\n refitBoxes.push(layout);\n }\n }\n return refit && fitBoxes(refitBoxes, chartArea, params, stacks) || changed;\n}\nfunction setBoxDims(box, left, top, width, height) {\n box.top = top;\n box.left = left;\n box.right = left + width;\n box.bottom = top + height;\n box.width = width;\n box.height = height;\n}\nfunction placeBoxes(boxes, chartArea, params, stacks) {\n const userPadding = params.padding;\n let { x , y } = chartArea;\n for (const layout of boxes){\n const box = layout.box;\n const stack = stacks[layout.stack] || {\n count: 1,\n placed: 0,\n weight: 1\n };\n const weight = layout.stackWeight / stack.weight || 1;\n if (layout.horizontal) {\n const width = chartArea.w * weight;\n const height = stack.size || box.height;\n if (defined(stack.start)) {\n y = stack.start;\n }\n if (box.fullSize) {\n setBoxDims(box, userPadding.left, y, params.outerWidth - userPadding.right - userPadding.left, height);\n } else {\n setBoxDims(box, chartArea.left + stack.placed, y, width, height);\n }\n stack.start = y;\n stack.placed += width;\n y = box.bottom;\n } else {\n const height1 = chartArea.h * weight;\n const width1 = stack.size || box.width;\n if (defined(stack.start)) {\n x = stack.start;\n }\n if (box.fullSize) {\n setBoxDims(box, x, userPadding.top, width1, params.outerHeight - userPadding.bottom - userPadding.top);\n } else {\n setBoxDims(box, x, chartArea.top + stack.placed, width1, height1);\n }\n stack.start = x;\n stack.placed += height1;\n x = box.right;\n }\n }\n chartArea.x = x;\n chartArea.y = y;\n}\nvar layouts = {\n addBox (chart, item) {\n if (!chart.boxes) {\n chart.boxes = [];\n }\n item.fullSize = item.fullSize || false;\n item.position = item.position || 'top';\n item.weight = item.weight || 0;\n item._layers = item._layers || function() {\n return [\n {\n z: 0,\n draw (chartArea) {\n item.draw(chartArea);\n }\n }\n ];\n };\n chart.boxes.push(item);\n },\n removeBox (chart, layoutItem) {\n const index = chart.boxes ? chart.boxes.indexOf(layoutItem) : -1;\n if (index !== -1) {\n chart.boxes.splice(index, 1);\n }\n },\n configure (chart, item, options) {\n item.fullSize = options.fullSize;\n item.position = options.position;\n item.weight = options.weight;\n },\n update (chart, width, height, minPadding) {\n if (!chart) {\n return;\n }\n const padding = toPadding(chart.options.layout.padding);\n const availableWidth = Math.max(width - padding.width, 0);\n const availableHeight = Math.max(height - padding.height, 0);\n const boxes = buildLayoutBoxes(chart.boxes);\n const verticalBoxes = boxes.vertical;\n const horizontalBoxes = boxes.horizontal;\n each(chart.boxes, (box)=>{\n if (typeof box.beforeLayout === 'function') {\n box.beforeLayout();\n }\n });\n const visibleVerticalBoxCount = verticalBoxes.reduce((total, wrap)=>wrap.box.options && wrap.box.options.display === false ? total : total + 1, 0) || 1;\n const params = Object.freeze({\n outerWidth: width,\n outerHeight: height,\n padding,\n availableWidth,\n availableHeight,\n vBoxMaxWidth: availableWidth / 2 / visibleVerticalBoxCount,\n hBoxMaxHeight: availableHeight / 2\n });\n const maxPadding = Object.assign({}, padding);\n updateMaxPadding(maxPadding, toPadding(minPadding));\n const chartArea = Object.assign({\n maxPadding,\n w: availableWidth,\n h: availableHeight,\n x: padding.left,\n y: padding.top\n }, padding);\n const stacks = setLayoutDims(verticalBoxes.concat(horizontalBoxes), params);\n fitBoxes(boxes.fullSize, chartArea, params, stacks);\n fitBoxes(verticalBoxes, chartArea, params, stacks);\n if (fitBoxes(horizontalBoxes, chartArea, params, stacks)) {\n fitBoxes(verticalBoxes, chartArea, params, stacks);\n }\n handleMaxPadding(chartArea);\n placeBoxes(boxes.leftAndTop, chartArea, params, stacks);\n chartArea.x += chartArea.w;\n chartArea.y += chartArea.h;\n placeBoxes(boxes.rightAndBottom, chartArea, params, stacks);\n chart.chartArea = {\n left: chartArea.left,\n top: chartArea.top,\n right: chartArea.left + chartArea.w,\n bottom: chartArea.top + chartArea.h,\n height: chartArea.h,\n width: chartArea.w\n };\n each(boxes.chartArea, (layout)=>{\n const box = layout.box;\n Object.assign(box, chart.chartArea);\n box.update(chartArea.w, chartArea.h, {\n left: 0,\n top: 0,\n right: 0,\n bottom: 0\n });\n });\n }\n};\n\nclass BasePlatform {\n acquireContext(canvas, aspectRatio) {}\n releaseContext(context) {\n return false;\n }\n addEventListener(chart, type, listener) {}\n removeEventListener(chart, type, listener) {}\n getDevicePixelRatio() {\n return 1;\n }\n getMaximumSize(element, width, height, aspectRatio) {\n width = Math.max(0, width || element.width);\n height = height || element.height;\n return {\n width,\n height: Math.max(0, aspectRatio ? Math.floor(width / aspectRatio) : height)\n };\n }\n isAttached(canvas) {\n return true;\n }\n updateConfig(config) {\n }\n}\n\nclass BasicPlatform extends BasePlatform {\n acquireContext(item) {\n return item && item.getContext && item.getContext('2d') || null;\n }\n updateConfig(config) {\n config.options.animation = false;\n }\n}\n\nconst EXPANDO_KEY = '$chartjs';\n const EVENT_TYPES = {\n touchstart: 'mousedown',\n touchmove: 'mousemove',\n touchend: 'mouseup',\n pointerenter: 'mouseenter',\n pointerdown: 'mousedown',\n pointermove: 'mousemove',\n pointerup: 'mouseup',\n pointerleave: 'mouseout',\n pointerout: 'mouseout'\n};\nconst isNullOrEmpty = (value)=>value === null || value === '';\n function initCanvas(canvas, aspectRatio) {\n const style = canvas.style;\n const renderHeight = canvas.getAttribute('height');\n const renderWidth = canvas.getAttribute('width');\n canvas[EXPANDO_KEY] = {\n initial: {\n height: renderHeight,\n width: renderWidth,\n style: {\n display: style.display,\n height: style.height,\n width: style.width\n }\n }\n };\n style.display = style.display || 'block';\n style.boxSizing = style.boxSizing || 'border-box';\n if (isNullOrEmpty(renderWidth)) {\n const displayWidth = readUsedSize(canvas, 'width');\n if (displayWidth !== undefined) {\n canvas.width = displayWidth;\n }\n }\n if (isNullOrEmpty(renderHeight)) {\n if (canvas.style.height === '') {\n canvas.height = canvas.width / (aspectRatio || 2);\n } else {\n const displayHeight = readUsedSize(canvas, 'height');\n if (displayHeight !== undefined) {\n canvas.height = displayHeight;\n }\n }\n }\n return canvas;\n}\nconst eventListenerOptions = supportsEventListenerOptions ? {\n passive: true\n} : false;\nfunction addListener(node, type, listener) {\n node.addEventListener(type, listener, eventListenerOptions);\n}\nfunction removeListener(chart, type, listener) {\n chart.canvas.removeEventListener(type, listener, eventListenerOptions);\n}\nfunction fromNativeEvent(event, chart) {\n const type = EVENT_TYPES[event.type] || event.type;\n const { x , y } = getRelativePosition(event, chart);\n return {\n type,\n chart,\n native: event,\n x: x !== undefined ? x : null,\n y: y !== undefined ? y : null\n };\n}\nfunction nodeListContains(nodeList, canvas) {\n for (const node of nodeList){\n if (node === canvas || node.contains(canvas)) {\n return true;\n }\n }\n}\nfunction createAttachObserver(chart, type, listener) {\n const canvas = chart.canvas;\n const observer = new MutationObserver((entries)=>{\n let trigger = false;\n for (const entry of entries){\n trigger = trigger || nodeListContains(entry.addedNodes, canvas);\n trigger = trigger && !nodeListContains(entry.removedNodes, canvas);\n }\n if (trigger) {\n listener();\n }\n });\n observer.observe(document, {\n childList: true,\n subtree: true\n });\n return observer;\n}\nfunction createDetachObserver(chart, type, listener) {\n const canvas = chart.canvas;\n const observer = new MutationObserver((entries)=>{\n let trigger = false;\n for (const entry of entries){\n trigger = trigger || nodeListContains(entry.removedNodes, canvas);\n trigger = trigger && !nodeListContains(entry.addedNodes, canvas);\n }\n if (trigger) {\n listener();\n }\n });\n observer.observe(document, {\n childList: true,\n subtree: true\n });\n return observer;\n}\nconst drpListeningCharts = new Map();\nlet oldDevicePixelRatio = 0;\nfunction onWindowResize() {\n const dpr = window.devicePixelRatio;\n if (dpr === oldDevicePixelRatio) {\n return;\n }\n oldDevicePixelRatio = dpr;\n drpListeningCharts.forEach((resize, chart)=>{\n if (chart.currentDevicePixelRatio !== dpr) {\n resize();\n }\n });\n}\nfunction listenDevicePixelRatioChanges(chart, resize) {\n if (!drpListeningCharts.size) {\n window.addEventListener('resize', onWindowResize);\n }\n drpListeningCharts.set(chart, resize);\n}\nfunction unlistenDevicePixelRatioChanges(chart) {\n drpListeningCharts.delete(chart);\n if (!drpListeningCharts.size) {\n window.removeEventListener('resize', onWindowResize);\n }\n}\nfunction createResizeObserver(chart, type, listener) {\n const canvas = chart.canvas;\n const container = canvas && _getParentNode(canvas);\n if (!container) {\n return;\n }\n const resize = throttled((width, height)=>{\n const w = container.clientWidth;\n listener(width, height);\n if (w < container.clientWidth) {\n listener();\n }\n }, window);\n const observer = new ResizeObserver((entries)=>{\n const entry = entries[0];\n const width = entry.contentRect.width;\n const height = entry.contentRect.height;\n if (width === 0 && height === 0) {\n return;\n }\n resize(width, height);\n });\n observer.observe(container);\n listenDevicePixelRatioChanges(chart, resize);\n return observer;\n}\nfunction releaseObserver(chart, type, observer) {\n if (observer) {\n observer.disconnect();\n }\n if (type === 'resize') {\n unlistenDevicePixelRatioChanges(chart);\n }\n}\nfunction createProxyAndListen(chart, type, listener) {\n const canvas = chart.canvas;\n const proxy = throttled((event)=>{\n if (chart.ctx !== null) {\n listener(fromNativeEvent(event, chart));\n }\n }, chart);\n addListener(canvas, type, proxy);\n return proxy;\n}\n class DomPlatform extends BasePlatform {\n acquireContext(canvas, aspectRatio) {\n const context = canvas && canvas.getContext && canvas.getContext('2d');\n if (context && context.canvas === canvas) {\n initCanvas(canvas, aspectRatio);\n return context;\n }\n return null;\n }\n releaseContext(context) {\n const canvas = context.canvas;\n if (!canvas[EXPANDO_KEY]) {\n return false;\n }\n const initial = canvas[EXPANDO_KEY].initial;\n [\n 'height',\n 'width'\n ].forEach((prop)=>{\n const value = initial[prop];\n if (isNullOrUndef(value)) {\n canvas.removeAttribute(prop);\n } else {\n canvas.setAttribute(prop, value);\n }\n });\n const style = initial.style || {};\n Object.keys(style).forEach((key)=>{\n canvas.style[key] = style[key];\n });\n canvas.width = canvas.width;\n delete canvas[EXPANDO_KEY];\n return true;\n }\n addEventListener(chart, type, listener) {\n this.removeEventListener(chart, type);\n const proxies = chart.$proxies || (chart.$proxies = {});\n const handlers = {\n attach: createAttachObserver,\n detach: createDetachObserver,\n resize: createResizeObserver\n };\n const handler = handlers[type] || createProxyAndListen;\n proxies[type] = handler(chart, type, listener);\n }\n removeEventListener(chart, type) {\n const proxies = chart.$proxies || (chart.$proxies = {});\n const proxy = proxies[type];\n if (!proxy) {\n return;\n }\n const handlers = {\n attach: releaseObserver,\n detach: releaseObserver,\n resize: releaseObserver\n };\n const handler = handlers[type] || removeListener;\n handler(chart, type, proxy);\n proxies[type] = undefined;\n }\n getDevicePixelRatio() {\n return window.devicePixelRatio;\n }\n getMaximumSize(canvas, width, height, aspectRatio) {\n return getMaximumSize(canvas, width, height, aspectRatio);\n }\n isAttached(canvas) {\n const container = _getParentNode(canvas);\n return !!(container && container.isConnected);\n }\n}\n\nfunction _detectPlatform(canvas) {\n if (!_isDomSupported() || typeof OffscreenCanvas !== 'undefined' && canvas instanceof OffscreenCanvas) {\n return BasicPlatform;\n }\n return DomPlatform;\n}\n\nclass Element {\n static defaults = {};\n static defaultRoutes = undefined;\n active = false;\n tooltipPosition(useFinalPosition) {\n const { x , y } = this.getProps([\n 'x',\n 'y'\n ], useFinalPosition);\n return {\n x,\n y\n };\n }\n hasValue() {\n return isNumber(this.x) && isNumber(this.y);\n }\n getProps(props, final) {\n const anims = this.$animations;\n if (!final || !anims) {\n // let's not create an object, if not needed\n return this;\n }\n const ret = {};\n props.forEach((prop)=>{\n ret[prop] = anims[prop] && anims[prop].active() ? anims[prop]._to : this[prop];\n });\n return ret;\n }\n}\n\nfunction autoSkip(scale, ticks) {\n const tickOpts = scale.options.ticks;\n const determinedMaxTicks = determineMaxTicks(scale);\n const ticksLimit = Math.min(tickOpts.maxTicksLimit || determinedMaxTicks, determinedMaxTicks);\n const majorIndices = tickOpts.major.enabled ? getMajorIndices(ticks) : [];\n const numMajorIndices = majorIndices.length;\n const first = majorIndices[0];\n const last = majorIndices[numMajorIndices - 1];\n const newTicks = [];\n if (numMajorIndices > ticksLimit) {\n skipMajors(ticks, newTicks, majorIndices, numMajorIndices / ticksLimit);\n return newTicks;\n }\n const spacing = calculateSpacing(majorIndices, ticks, ticksLimit);\n if (numMajorIndices > 0) {\n let i, ilen;\n const avgMajorSpacing = numMajorIndices > 1 ? Math.round((last - first) / (numMajorIndices - 1)) : null;\n skip(ticks, newTicks, spacing, isNullOrUndef(avgMajorSpacing) ? 0 : first - avgMajorSpacing, first);\n for(i = 0, ilen = numMajorIndices - 1; i < ilen; i++){\n skip(ticks, newTicks, spacing, majorIndices[i], majorIndices[i + 1]);\n }\n skip(ticks, newTicks, spacing, last, isNullOrUndef(avgMajorSpacing) ? ticks.length : last + avgMajorSpacing);\n return newTicks;\n }\n skip(ticks, newTicks, spacing);\n return newTicks;\n}\nfunction determineMaxTicks(scale) {\n const offset = scale.options.offset;\n const tickLength = scale._tickSize();\n const maxScale = scale._length / tickLength + (offset ? 0 : 1);\n const maxChart = scale._maxLength / tickLength;\n return Math.floor(Math.min(maxScale, maxChart));\n}\n function calculateSpacing(majorIndices, ticks, ticksLimit) {\n const evenMajorSpacing = getEvenSpacing(majorIndices);\n const spacing = ticks.length / ticksLimit;\n if (!evenMajorSpacing) {\n return Math.max(spacing, 1);\n }\n const factors = _factorize(evenMajorSpacing);\n for(let i = 0, ilen = factors.length - 1; i < ilen; i++){\n const factor = factors[i];\n if (factor > spacing) {\n return factor;\n }\n }\n return Math.max(spacing, 1);\n}\n function getMajorIndices(ticks) {\n const result = [];\n let i, ilen;\n for(i = 0, ilen = ticks.length; i < ilen; i++){\n if (ticks[i].major) {\n result.push(i);\n }\n }\n return result;\n}\n function skipMajors(ticks, newTicks, majorIndices, spacing) {\n let count = 0;\n let next = majorIndices[0];\n let i;\n spacing = Math.ceil(spacing);\n for(i = 0; i < ticks.length; i++){\n if (i === next) {\n newTicks.push(ticks[i]);\n count++;\n next = majorIndices[count * spacing];\n }\n }\n}\n function skip(ticks, newTicks, spacing, majorStart, majorEnd) {\n const start = valueOrDefault(majorStart, 0);\n const end = Math.min(valueOrDefault(majorEnd, ticks.length), ticks.length);\n let count = 0;\n let length, i, next;\n spacing = Math.ceil(spacing);\n if (majorEnd) {\n length = majorEnd - majorStart;\n spacing = length / Math.floor(length / spacing);\n }\n next = start;\n while(next < 0){\n count++;\n next = Math.round(start + count * spacing);\n }\n for(i = Math.max(start, 0); i < end; i++){\n if (i === next) {\n newTicks.push(ticks[i]);\n count++;\n next = Math.round(start + count * spacing);\n }\n }\n}\n function getEvenSpacing(arr) {\n const len = arr.length;\n let i, diff;\n if (len < 2) {\n return false;\n }\n for(diff = arr[0], i = 1; i < len; ++i){\n if (arr[i] - arr[i - 1] !== diff) {\n return false;\n }\n }\n return diff;\n}\n\nconst reverseAlign = (align)=>align === 'left' ? 'right' : align === 'right' ? 'left' : align;\nconst offsetFromEdge = (scale, edge, offset)=>edge === 'top' || edge === 'left' ? scale[edge] + offset : scale[edge] - offset;\n function sample(arr, numItems) {\n const result = [];\n const increment = arr.length / numItems;\n const len = arr.length;\n let i = 0;\n for(; i < len; i += increment){\n result.push(arr[Math.floor(i)]);\n }\n return result;\n}\n function getPixelForGridLine(scale, index, offsetGridLines) {\n const length = scale.ticks.length;\n const validIndex = Math.min(index, length - 1);\n const start = scale._startPixel;\n const end = scale._endPixel;\n const epsilon = 1e-6;\n let lineValue = scale.getPixelForTick(validIndex);\n let offset;\n if (offsetGridLines) {\n if (length === 1) {\n offset = Math.max(lineValue - start, end - lineValue);\n } else if (index === 0) {\n offset = (scale.getPixelForTick(1) - lineValue) / 2;\n } else {\n offset = (lineValue - scale.getPixelForTick(validIndex - 1)) / 2;\n }\n lineValue += validIndex < index ? offset : -offset;\n if (lineValue < start - epsilon || lineValue > end + epsilon) {\n return;\n }\n }\n return lineValue;\n}\n function garbageCollect(caches, length) {\n each(caches, (cache)=>{\n const gc = cache.gc;\n const gcLen = gc.length / 2;\n let i;\n if (gcLen > length) {\n for(i = 0; i < gcLen; ++i){\n delete cache.data[gc[i]];\n }\n gc.splice(0, gcLen);\n }\n });\n}\n function getTickMarkLength(options) {\n return options.drawTicks ? options.tickLength : 0;\n}\n function getTitleHeight(options, fallback) {\n if (!options.display) {\n return 0;\n }\n const font = toFont(options.font, fallback);\n const padding = toPadding(options.padding);\n const lines = isArray(options.text) ? options.text.length : 1;\n return lines * font.lineHeight + padding.height;\n}\nfunction createScaleContext(parent, scale) {\n return createContext(parent, {\n scale,\n type: 'scale'\n });\n}\nfunction createTickContext(parent, index, tick) {\n return createContext(parent, {\n tick,\n index,\n type: 'tick'\n });\n}\nfunction titleAlign(align, position, reverse) {\n let ret = _toLeftRightCenter(align);\n if (reverse && position !== 'right' || !reverse && position === 'right') {\n ret = reverseAlign(ret);\n }\n return ret;\n}\nfunction titleArgs(scale, offset, position, align) {\n const { top , left , bottom , right , chart } = scale;\n const { chartArea , scales } = chart;\n let rotation = 0;\n let maxWidth, titleX, titleY;\n const height = bottom - top;\n const width = right - left;\n if (scale.isHorizontal()) {\n titleX = _alignStartEnd(align, left, right);\n if (isObject(position)) {\n const positionAxisID = Object.keys(position)[0];\n const value = position[positionAxisID];\n titleY = scales[positionAxisID].getPixelForValue(value) + height - offset;\n } else if (position === 'center') {\n titleY = (chartArea.bottom + chartArea.top) / 2 + height - offset;\n } else {\n titleY = offsetFromEdge(scale, position, offset);\n }\n maxWidth = right - left;\n } else {\n if (isObject(position)) {\n const positionAxisID1 = Object.keys(position)[0];\n const value1 = position[positionAxisID1];\n titleX = scales[positionAxisID1].getPixelForValue(value1) - width + offset;\n } else if (position === 'center') {\n titleX = (chartArea.left + chartArea.right) / 2 - width + offset;\n } else {\n titleX = offsetFromEdge(scale, position, offset);\n }\n titleY = _alignStartEnd(align, bottom, top);\n rotation = position === 'left' ? -HALF_PI : HALF_PI;\n }\n return {\n titleX,\n titleY,\n maxWidth,\n rotation\n };\n}\nclass Scale extends Element {\n constructor(cfg){\n super();\n this.id = cfg.id;\n this.type = cfg.type;\n this.options = undefined;\n this.ctx = cfg.ctx;\n this.chart = cfg.chart;\n this.top = undefined;\n this.bottom = undefined;\n this.left = undefined;\n this.right = undefined;\n this.width = undefined;\n this.height = undefined;\n this._margins = {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0\n };\n this.maxWidth = undefined;\n this.maxHeight = undefined;\n this.paddingTop = undefined;\n this.paddingBottom = undefined;\n this.paddingLeft = undefined;\n this.paddingRight = undefined;\n this.axis = undefined;\n this.labelRotation = undefined;\n this.min = undefined;\n this.max = undefined;\n this._range = undefined;\n this.ticks = [];\n this._gridLineItems = null;\n this._labelItems = null;\n this._labelSizes = null;\n this._length = 0;\n this._maxLength = 0;\n this._longestTextCache = {};\n this._startPixel = undefined;\n this._endPixel = undefined;\n this._reversePixels = false;\n this._userMax = undefined;\n this._userMin = undefined;\n this._suggestedMax = undefined;\n this._suggestedMin = undefined;\n this._ticksLength = 0;\n this._borderValue = 0;\n this._cache = {};\n this._dataLimitsCached = false;\n this.$context = undefined;\n }\n init(options) {\n this.options = options.setContext(this.getContext());\n this.axis = options.axis;\n this._userMin = this.parse(options.min);\n this._userMax = this.parse(options.max);\n this._suggestedMin = this.parse(options.suggestedMin);\n this._suggestedMax = this.parse(options.suggestedMax);\n }\n parse(raw, index) {\n return raw;\n }\n getUserBounds() {\n let { _userMin , _userMax , _suggestedMin , _suggestedMax } = this;\n _userMin = finiteOrDefault(_userMin, Number.POSITIVE_INFINITY);\n _userMax = finiteOrDefault(_userMax, Number.NEGATIVE_INFINITY);\n _suggestedMin = finiteOrDefault(_suggestedMin, Number.POSITIVE_INFINITY);\n _suggestedMax = finiteOrDefault(_suggestedMax, Number.NEGATIVE_INFINITY);\n return {\n min: finiteOrDefault(_userMin, _suggestedMin),\n max: finiteOrDefault(_userMax, _suggestedMax),\n minDefined: isNumberFinite(_userMin),\n maxDefined: isNumberFinite(_userMax)\n };\n }\n getMinMax(canStack) {\n let { min , max , minDefined , maxDefined } = this.getUserBounds();\n let range;\n if (minDefined && maxDefined) {\n return {\n min,\n max\n };\n }\n const metas = this.getMatchingVisibleMetas();\n for(let i = 0, ilen = metas.length; i < ilen; ++i){\n range = metas[i].controller.getMinMax(this, canStack);\n if (!minDefined) {\n min = Math.min(min, range.min);\n }\n if (!maxDefined) {\n max = Math.max(max, range.max);\n }\n }\n min = maxDefined && min > max ? max : min;\n max = minDefined && min > max ? min : max;\n return {\n min: finiteOrDefault(min, finiteOrDefault(max, min)),\n max: finiteOrDefault(max, finiteOrDefault(min, max))\n };\n }\n getPadding() {\n return {\n left: this.paddingLeft || 0,\n top: this.paddingTop || 0,\n right: this.paddingRight || 0,\n bottom: this.paddingBottom || 0\n };\n }\n getTicks() {\n return this.ticks;\n }\n getLabels() {\n const data = this.chart.data;\n return this.options.labels || (this.isHorizontal() ? data.xLabels : data.yLabels) || data.labels || [];\n }\n getLabelItems(chartArea = this.chart.chartArea) {\n const items = this._labelItems || (this._labelItems = this._computeLabelItems(chartArea));\n return items;\n }\n beforeLayout() {\n this._cache = {};\n this._dataLimitsCached = false;\n }\n beforeUpdate() {\n callback(this.options.beforeUpdate, [\n this\n ]);\n }\n update(maxWidth, maxHeight, margins) {\n const { beginAtZero , grace , ticks: tickOpts } = this.options;\n const sampleSize = tickOpts.sampleSize;\n this.beforeUpdate();\n this.maxWidth = maxWidth;\n this.maxHeight = maxHeight;\n this._margins = margins = Object.assign({\n left: 0,\n right: 0,\n top: 0,\n bottom: 0\n }, margins);\n this.ticks = null;\n this._labelSizes = null;\n this._gridLineItems = null;\n this._labelItems = null;\n this.beforeSetDimensions();\n this.setDimensions();\n this.afterSetDimensions();\n this._maxLength = this.isHorizontal() ? this.width + margins.left + margins.right : this.height + margins.top + margins.bottom;\n if (!this._dataLimitsCached) {\n this.beforeDataLimits();\n this.determineDataLimits();\n this.afterDataLimits();\n this._range = _addGrace(this, grace, beginAtZero);\n this._dataLimitsCached = true;\n }\n this.beforeBuildTicks();\n this.ticks = this.buildTicks() || [];\n this.afterBuildTicks();\n const samplingEnabled = sampleSize < this.ticks.length;\n this._convertTicksToLabels(samplingEnabled ? sample(this.ticks, sampleSize) : this.ticks);\n this.configure();\n this.beforeCalculateLabelRotation();\n this.calculateLabelRotation();\n this.afterCalculateLabelRotation();\n if (tickOpts.display && (tickOpts.autoSkip || tickOpts.source === 'auto')) {\n this.ticks = autoSkip(this, this.ticks);\n this._labelSizes = null;\n this.afterAutoSkip();\n }\n if (samplingEnabled) {\n this._convertTicksToLabels(this.ticks);\n }\n this.beforeFit();\n this.fit();\n this.afterFit();\n this.afterUpdate();\n }\n configure() {\n let reversePixels = this.options.reverse;\n let startPixel, endPixel;\n if (this.isHorizontal()) {\n startPixel = this.left;\n endPixel = this.right;\n } else {\n startPixel = this.top;\n endPixel = this.bottom;\n reversePixels = !reversePixels;\n }\n this._startPixel = startPixel;\n this._endPixel = endPixel;\n this._reversePixels = reversePixels;\n this._length = endPixel - startPixel;\n this._alignToPixels = this.options.alignToPixels;\n }\n afterUpdate() {\n callback(this.options.afterUpdate, [\n this\n ]);\n }\n beforeSetDimensions() {\n callback(this.options.beforeSetDimensions, [\n this\n ]);\n }\n setDimensions() {\n if (this.isHorizontal()) {\n this.width = this.maxWidth;\n this.left = 0;\n this.right = this.width;\n } else {\n this.height = this.maxHeight;\n this.top = 0;\n this.bottom = this.height;\n }\n this.paddingLeft = 0;\n this.paddingTop = 0;\n this.paddingRight = 0;\n this.paddingBottom = 0;\n }\n afterSetDimensions() {\n callback(this.options.afterSetDimensions, [\n this\n ]);\n }\n _callHooks(name) {\n this.chart.notifyPlugins(name, this.getContext());\n callback(this.options[name], [\n this\n ]);\n }\n beforeDataLimits() {\n this._callHooks('beforeDataLimits');\n }\n determineDataLimits() {}\n afterDataLimits() {\n this._callHooks('afterDataLimits');\n }\n beforeBuildTicks() {\n this._callHooks('beforeBuildTicks');\n }\n buildTicks() {\n return [];\n }\n afterBuildTicks() {\n this._callHooks('afterBuildTicks');\n }\n beforeTickToLabelConversion() {\n callback(this.options.beforeTickToLabelConversion, [\n this\n ]);\n }\n generateTickLabels(ticks) {\n const tickOpts = this.options.ticks;\n let i, ilen, tick;\n for(i = 0, ilen = ticks.length; i < ilen; i++){\n tick = ticks[i];\n tick.label = callback(tickOpts.callback, [\n tick.value,\n i,\n ticks\n ], this);\n }\n }\n afterTickToLabelConversion() {\n callback(this.options.afterTickToLabelConversion, [\n this\n ]);\n }\n beforeCalculateLabelRotation() {\n callback(this.options.beforeCalculateLabelRotation, [\n this\n ]);\n }\n calculateLabelRotation() {\n const options = this.options;\n const tickOpts = options.ticks;\n const numTicks = this.ticks.length;\n const minRotation = tickOpts.minRotation || 0;\n const maxRotation = tickOpts.maxRotation;\n let labelRotation = minRotation;\n let tickWidth, maxHeight, maxLabelDiagonal;\n if (!this._isVisible() || !tickOpts.display || minRotation >= maxRotation || numTicks <= 1 || !this.isHorizontal()) {\n this.labelRotation = minRotation;\n return;\n }\n const labelSizes = this._getLabelSizes();\n const maxLabelWidth = labelSizes.widest.width;\n const maxLabelHeight = labelSizes.highest.height;\n const maxWidth = _limitValue(this.chart.width - maxLabelWidth, 0, this.maxWidth);\n tickWidth = options.offset ? this.maxWidth / numTicks : maxWidth / (numTicks - 1);\n if (maxLabelWidth + 6 > tickWidth) {\n tickWidth = maxWidth / (numTicks - (options.offset ? 0.5 : 1));\n maxHeight = this.maxHeight - getTickMarkLength(options.grid) - tickOpts.padding - getTitleHeight(options.title, this.chart.options.font);\n maxLabelDiagonal = Math.sqrt(maxLabelWidth * maxLabelWidth + maxLabelHeight * maxLabelHeight);\n labelRotation = toDegrees(Math.min(Math.asin(_limitValue((labelSizes.highest.height + 6) / tickWidth, -1, 1)), Math.asin(_limitValue(maxHeight / maxLabelDiagonal, -1, 1)) - Math.asin(_limitValue(maxLabelHeight / maxLabelDiagonal, -1, 1))));\n labelRotation = Math.max(minRotation, Math.min(maxRotation, labelRotation));\n }\n this.labelRotation = labelRotation;\n }\n afterCalculateLabelRotation() {\n callback(this.options.afterCalculateLabelRotation, [\n this\n ]);\n }\n afterAutoSkip() {}\n beforeFit() {\n callback(this.options.beforeFit, [\n this\n ]);\n }\n fit() {\n const minSize = {\n width: 0,\n height: 0\n };\n const { chart , options: { ticks: tickOpts , title: titleOpts , grid: gridOpts } } = this;\n const display = this._isVisible();\n const isHorizontal = this.isHorizontal();\n if (display) {\n const titleHeight = getTitleHeight(titleOpts, chart.options.font);\n if (isHorizontal) {\n minSize.width = this.maxWidth;\n minSize.height = getTickMarkLength(gridOpts) + titleHeight;\n } else {\n minSize.height = this.maxHeight;\n minSize.width = getTickMarkLength(gridOpts) + titleHeight;\n }\n if (tickOpts.display && this.ticks.length) {\n const { first , last , widest , highest } = this._getLabelSizes();\n const tickPadding = tickOpts.padding * 2;\n const angleRadians = toRadians(this.labelRotation);\n const cos = Math.cos(angleRadians);\n const sin = Math.sin(angleRadians);\n if (isHorizontal) {\n const labelHeight = tickOpts.mirror ? 0 : sin * widest.width + cos * highest.height;\n minSize.height = Math.min(this.maxHeight, minSize.height + labelHeight + tickPadding);\n } else {\n const labelWidth = tickOpts.mirror ? 0 : cos * widest.width + sin * highest.height;\n minSize.width = Math.min(this.maxWidth, minSize.width + labelWidth + tickPadding);\n }\n this._calculatePadding(first, last, sin, cos);\n }\n }\n this._handleMargins();\n if (isHorizontal) {\n this.width = this._length = chart.width - this._margins.left - this._margins.right;\n this.height = minSize.height;\n } else {\n this.width = minSize.width;\n this.height = this._length = chart.height - this._margins.top - this._margins.bottom;\n }\n }\n _calculatePadding(first, last, sin, cos) {\n const { ticks: { align , padding } , position } = this.options;\n const isRotated = this.labelRotation !== 0;\n const labelsBelowTicks = position !== 'top' && this.axis === 'x';\n if (this.isHorizontal()) {\n const offsetLeft = this.getPixelForTick(0) - this.left;\n const offsetRight = this.right - this.getPixelForTick(this.ticks.length - 1);\n let paddingLeft = 0;\n let paddingRight = 0;\n if (isRotated) {\n if (labelsBelowTicks) {\n paddingLeft = cos * first.width;\n paddingRight = sin * last.height;\n } else {\n paddingLeft = sin * first.height;\n paddingRight = cos * last.width;\n }\n } else if (align === 'start') {\n paddingRight = last.width;\n } else if (align === 'end') {\n paddingLeft = first.width;\n } else if (align !== 'inner') {\n paddingLeft = first.width / 2;\n paddingRight = last.width / 2;\n }\n this.paddingLeft = Math.max((paddingLeft - offsetLeft + padding) * this.width / (this.width - offsetLeft), 0);\n this.paddingRight = Math.max((paddingRight - offsetRight + padding) * this.width / (this.width - offsetRight), 0);\n } else {\n let paddingTop = last.height / 2;\n let paddingBottom = first.height / 2;\n if (align === 'start') {\n paddingTop = 0;\n paddingBottom = first.height;\n } else if (align === 'end') {\n paddingTop = last.height;\n paddingBottom = 0;\n }\n this.paddingTop = paddingTop + padding;\n this.paddingBottom = paddingBottom + padding;\n }\n }\n _handleMargins() {\n if (this._margins) {\n this._margins.left = Math.max(this.paddingLeft, this._margins.left);\n this._margins.top = Math.max(this.paddingTop, this._margins.top);\n this._margins.right = Math.max(this.paddingRight, this._margins.right);\n this._margins.bottom = Math.max(this.paddingBottom, this._margins.bottom);\n }\n }\n afterFit() {\n callback(this.options.afterFit, [\n this\n ]);\n }\n isHorizontal() {\n const { axis , position } = this.options;\n return position === 'top' || position === 'bottom' || axis === 'x';\n }\n isFullSize() {\n return this.options.fullSize;\n }\n _convertTicksToLabels(ticks) {\n this.beforeTickToLabelConversion();\n this.generateTickLabels(ticks);\n let i, ilen;\n for(i = 0, ilen = ticks.length; i < ilen; i++){\n if (isNullOrUndef(ticks[i].label)) {\n ticks.splice(i, 1);\n ilen--;\n i--;\n }\n }\n this.afterTickToLabelConversion();\n }\n _getLabelSizes() {\n let labelSizes = this._labelSizes;\n if (!labelSizes) {\n const sampleSize = this.options.ticks.sampleSize;\n let ticks = this.ticks;\n if (sampleSize < ticks.length) {\n ticks = sample(ticks, sampleSize);\n }\n this._labelSizes = labelSizes = this._computeLabelSizes(ticks, ticks.length);\n }\n return labelSizes;\n }\n _computeLabelSizes(ticks, length) {\n const { ctx , _longestTextCache: caches } = this;\n const widths = [];\n const heights = [];\n let widestLabelSize = 0;\n let highestLabelSize = 0;\n let i, j, jlen, label, tickFont, fontString, cache, lineHeight, width, height, nestedLabel;\n for(i = 0; i < length; ++i){\n label = ticks[i].label;\n tickFont = this._resolveTickFontOptions(i);\n ctx.font = fontString = tickFont.string;\n cache = caches[fontString] = caches[fontString] || {\n data: {},\n gc: []\n };\n lineHeight = tickFont.lineHeight;\n width = height = 0;\n if (!isNullOrUndef(label) && !isArray(label)) {\n width = _measureText(ctx, cache.data, cache.gc, width, label);\n height = lineHeight;\n } else if (isArray(label)) {\n for(j = 0, jlen = label.length; j < jlen; ++j){\n nestedLabel = label[j];\n if (!isNullOrUndef(nestedLabel) && !isArray(nestedLabel)) {\n width = _measureText(ctx, cache.data, cache.gc, width, nestedLabel);\n height += lineHeight;\n }\n }\n }\n widths.push(width);\n heights.push(height);\n widestLabelSize = Math.max(width, widestLabelSize);\n highestLabelSize = Math.max(height, highestLabelSize);\n }\n garbageCollect(caches, length);\n const widest = widths.indexOf(widestLabelSize);\n const highest = heights.indexOf(highestLabelSize);\n const valueAt = (idx)=>({\n width: widths[idx] || 0,\n height: heights[idx] || 0\n });\n return {\n first: valueAt(0),\n last: valueAt(length - 1),\n widest: valueAt(widest),\n highest: valueAt(highest),\n widths,\n heights\n };\n }\n getLabelForValue(value) {\n return value;\n }\n getPixelForValue(value, index) {\n return NaN;\n }\n getValueForPixel(pixel) {}\n getPixelForTick(index) {\n const ticks = this.ticks;\n if (index < 0 || index > ticks.length - 1) {\n return null;\n }\n return this.getPixelForValue(ticks[index].value);\n }\n getPixelForDecimal(decimal) {\n if (this._reversePixels) {\n decimal = 1 - decimal;\n }\n const pixel = this._startPixel + decimal * this._length;\n return _int16Range(this._alignToPixels ? _alignPixel(this.chart, pixel, 0) : pixel);\n }\n getDecimalForPixel(pixel) {\n const decimal = (pixel - this._startPixel) / this._length;\n return this._reversePixels ? 1 - decimal : decimal;\n }\n getBasePixel() {\n return this.getPixelForValue(this.getBaseValue());\n }\n getBaseValue() {\n const { min , max } = this;\n return min < 0 && max < 0 ? max : min > 0 && max > 0 ? min : 0;\n }\n getContext(index) {\n const ticks = this.ticks || [];\n if (index >= 0 && index < ticks.length) {\n const tick = ticks[index];\n return tick.$context || (tick.$context = createTickContext(this.getContext(), index, tick));\n }\n return this.$context || (this.$context = createScaleContext(this.chart.getContext(), this));\n }\n _tickSize() {\n const optionTicks = this.options.ticks;\n const rot = toRadians(this.labelRotation);\n const cos = Math.abs(Math.cos(rot));\n const sin = Math.abs(Math.sin(rot));\n const labelSizes = this._getLabelSizes();\n const padding = optionTicks.autoSkipPadding || 0;\n const w = labelSizes ? labelSizes.widest.width + padding : 0;\n const h = labelSizes ? labelSizes.highest.height + padding : 0;\n return this.isHorizontal() ? h * cos > w * sin ? w / cos : h / sin : h * sin < w * cos ? h / cos : w / sin;\n }\n _isVisible() {\n const display = this.options.display;\n if (display !== 'auto') {\n return !!display;\n }\n return this.getMatchingVisibleMetas().length > 0;\n }\n _computeGridLineItems(chartArea) {\n const axis = this.axis;\n const chart = this.chart;\n const options = this.options;\n const { grid , position , border } = options;\n const offset = grid.offset;\n const isHorizontal = this.isHorizontal();\n const ticks = this.ticks;\n const ticksLength = ticks.length + (offset ? 1 : 0);\n const tl = getTickMarkLength(grid);\n const items = [];\n const borderOpts = border.setContext(this.getContext());\n const axisWidth = borderOpts.display ? borderOpts.width : 0;\n const axisHalfWidth = axisWidth / 2;\n const alignBorderValue = function(pixel) {\n return _alignPixel(chart, pixel, axisWidth);\n };\n let borderValue, i, lineValue, alignedLineValue;\n let tx1, ty1, tx2, ty2, x1, y1, x2, y2;\n if (position === 'top') {\n borderValue = alignBorderValue(this.bottom);\n ty1 = this.bottom - tl;\n ty2 = borderValue - axisHalfWidth;\n y1 = alignBorderValue(chartArea.top) + axisHalfWidth;\n y2 = chartArea.bottom;\n } else if (position === 'bottom') {\n borderValue = alignBorderValue(this.top);\n y1 = chartArea.top;\n y2 = alignBorderValue(chartArea.bottom) - axisHalfWidth;\n ty1 = borderValue + axisHalfWidth;\n ty2 = this.top + tl;\n } else if (position === 'left') {\n borderValue = alignBorderValue(this.right);\n tx1 = this.right - tl;\n tx2 = borderValue - axisHalfWidth;\n x1 = alignBorderValue(chartArea.left) + axisHalfWidth;\n x2 = chartArea.right;\n } else if (position === 'right') {\n borderValue = alignBorderValue(this.left);\n x1 = chartArea.left;\n x2 = alignBorderValue(chartArea.right) - axisHalfWidth;\n tx1 = borderValue + axisHalfWidth;\n tx2 = this.left + tl;\n } else if (axis === 'x') {\n if (position === 'center') {\n borderValue = alignBorderValue((chartArea.top + chartArea.bottom) / 2 + 0.5);\n } else if (isObject(position)) {\n const positionAxisID = Object.keys(position)[0];\n const value = position[positionAxisID];\n borderValue = alignBorderValue(this.chart.scales[positionAxisID].getPixelForValue(value));\n }\n y1 = chartArea.top;\n y2 = chartArea.bottom;\n ty1 = borderValue + axisHalfWidth;\n ty2 = ty1 + tl;\n } else if (axis === 'y') {\n if (position === 'center') {\n borderValue = alignBorderValue((chartArea.left + chartArea.right) / 2);\n } else if (isObject(position)) {\n const positionAxisID1 = Object.keys(position)[0];\n const value1 = position[positionAxisID1];\n borderValue = alignBorderValue(this.chart.scales[positionAxisID1].getPixelForValue(value1));\n }\n tx1 = borderValue - axisHalfWidth;\n tx2 = tx1 - tl;\n x1 = chartArea.left;\n x2 = chartArea.right;\n }\n const limit = valueOrDefault(options.ticks.maxTicksLimit, ticksLength);\n const step = Math.max(1, Math.ceil(ticksLength / limit));\n for(i = 0; i < ticksLength; i += step){\n const context = this.getContext(i);\n const optsAtIndex = grid.setContext(context);\n const optsAtIndexBorder = border.setContext(context);\n const lineWidth = optsAtIndex.lineWidth;\n const lineColor = optsAtIndex.color;\n const borderDash = optsAtIndexBorder.dash || [];\n const borderDashOffset = optsAtIndexBorder.dashOffset;\n const tickWidth = optsAtIndex.tickWidth;\n const tickColor = optsAtIndex.tickColor;\n const tickBorderDash = optsAtIndex.tickBorderDash || [];\n const tickBorderDashOffset = optsAtIndex.tickBorderDashOffset;\n lineValue = getPixelForGridLine(this, i, offset);\n if (lineValue === undefined) {\n continue;\n }\n alignedLineValue = _alignPixel(chart, lineValue, lineWidth);\n if (isHorizontal) {\n tx1 = tx2 = x1 = x2 = alignedLineValue;\n } else {\n ty1 = ty2 = y1 = y2 = alignedLineValue;\n }\n items.push({\n tx1,\n ty1,\n tx2,\n ty2,\n x1,\n y1,\n x2,\n y2,\n width: lineWidth,\n color: lineColor,\n borderDash,\n borderDashOffset,\n tickWidth,\n tickColor,\n tickBorderDash,\n tickBorderDashOffset\n });\n }\n this._ticksLength = ticksLength;\n this._borderValue = borderValue;\n return items;\n }\n _computeLabelItems(chartArea) {\n const axis = this.axis;\n const options = this.options;\n const { position , ticks: optionTicks } = options;\n const isHorizontal = this.isHorizontal();\n const ticks = this.ticks;\n const { align , crossAlign , padding , mirror } = optionTicks;\n const tl = getTickMarkLength(options.grid);\n const tickAndPadding = tl + padding;\n const hTickAndPadding = mirror ? -padding : tickAndPadding;\n const rotation = -toRadians(this.labelRotation);\n const items = [];\n let i, ilen, tick, label, x, y, textAlign, pixel, font, lineHeight, lineCount, textOffset;\n let textBaseline = 'middle';\n if (position === 'top') {\n y = this.bottom - hTickAndPadding;\n textAlign = this._getXAxisLabelAlignment();\n } else if (position === 'bottom') {\n y = this.top + hTickAndPadding;\n textAlign = this._getXAxisLabelAlignment();\n } else if (position === 'left') {\n const ret = this._getYAxisLabelAlignment(tl);\n textAlign = ret.textAlign;\n x = ret.x;\n } else if (position === 'right') {\n const ret1 = this._getYAxisLabelAlignment(tl);\n textAlign = ret1.textAlign;\n x = ret1.x;\n } else if (axis === 'x') {\n if (position === 'center') {\n y = (chartArea.top + chartArea.bottom) / 2 + tickAndPadding;\n } else if (isObject(position)) {\n const positionAxisID = Object.keys(position)[0];\n const value = position[positionAxisID];\n y = this.chart.scales[positionAxisID].getPixelForValue(value) + tickAndPadding;\n }\n textAlign = this._getXAxisLabelAlignment();\n } else if (axis === 'y') {\n if (position === 'center') {\n x = (chartArea.left + chartArea.right) / 2 - tickAndPadding;\n } else if (isObject(position)) {\n const positionAxisID1 = Object.keys(position)[0];\n const value1 = position[positionAxisID1];\n x = this.chart.scales[positionAxisID1].getPixelForValue(value1);\n }\n textAlign = this._getYAxisLabelAlignment(tl).textAlign;\n }\n if (axis === 'y') {\n if (align === 'start') {\n textBaseline = 'top';\n } else if (align === 'end') {\n textBaseline = 'bottom';\n }\n }\n const labelSizes = this._getLabelSizes();\n for(i = 0, ilen = ticks.length; i < ilen; ++i){\n tick = ticks[i];\n label = tick.label;\n const optsAtIndex = optionTicks.setContext(this.getContext(i));\n pixel = this.getPixelForTick(i) + optionTicks.labelOffset;\n font = this._resolveTickFontOptions(i);\n lineHeight = font.lineHeight;\n lineCount = isArray(label) ? label.length : 1;\n const halfCount = lineCount / 2;\n const color = optsAtIndex.color;\n const strokeColor = optsAtIndex.textStrokeColor;\n const strokeWidth = optsAtIndex.textStrokeWidth;\n let tickTextAlign = textAlign;\n if (isHorizontal) {\n x = pixel;\n if (textAlign === 'inner') {\n if (i === ilen - 1) {\n tickTextAlign = !this.options.reverse ? 'right' : 'left';\n } else if (i === 0) {\n tickTextAlign = !this.options.reverse ? 'left' : 'right';\n } else {\n tickTextAlign = 'center';\n }\n }\n if (position === 'top') {\n if (crossAlign === 'near' || rotation !== 0) {\n textOffset = -lineCount * lineHeight + lineHeight / 2;\n } else if (crossAlign === 'center') {\n textOffset = -labelSizes.highest.height / 2 - halfCount * lineHeight + lineHeight;\n } else {\n textOffset = -labelSizes.highest.height + lineHeight / 2;\n }\n } else {\n if (crossAlign === 'near' || rotation !== 0) {\n textOffset = lineHeight / 2;\n } else if (crossAlign === 'center') {\n textOffset = labelSizes.highest.height / 2 - halfCount * lineHeight;\n } else {\n textOffset = labelSizes.highest.height - lineCount * lineHeight;\n }\n }\n if (mirror) {\n textOffset *= -1;\n }\n if (rotation !== 0 && !optsAtIndex.showLabelBackdrop) {\n x += lineHeight / 2 * Math.sin(rotation);\n }\n } else {\n y = pixel;\n textOffset = (1 - lineCount) * lineHeight / 2;\n }\n let backdrop;\n if (optsAtIndex.showLabelBackdrop) {\n const labelPadding = toPadding(optsAtIndex.backdropPadding);\n const height = labelSizes.heights[i];\n const width = labelSizes.widths[i];\n let top = textOffset - labelPadding.top;\n let left = 0 - labelPadding.left;\n switch(textBaseline){\n case 'middle':\n top -= height / 2;\n break;\n case 'bottom':\n top -= height;\n break;\n }\n switch(textAlign){\n case 'center':\n left -= width / 2;\n break;\n case 'right':\n left -= width;\n break;\n }\n backdrop = {\n left,\n top,\n width: width + labelPadding.width,\n height: height + labelPadding.height,\n color: optsAtIndex.backdropColor\n };\n }\n items.push({\n label,\n font,\n textOffset,\n options: {\n rotation,\n color,\n strokeColor,\n strokeWidth,\n textAlign: tickTextAlign,\n textBaseline,\n translation: [\n x,\n y\n ],\n backdrop\n }\n });\n }\n return items;\n }\n _getXAxisLabelAlignment() {\n const { position , ticks } = this.options;\n const rotation = -toRadians(this.labelRotation);\n if (rotation) {\n return position === 'top' ? 'left' : 'right';\n }\n let align = 'center';\n if (ticks.align === 'start') {\n align = 'left';\n } else if (ticks.align === 'end') {\n align = 'right';\n } else if (ticks.align === 'inner') {\n align = 'inner';\n }\n return align;\n }\n _getYAxisLabelAlignment(tl) {\n const { position , ticks: { crossAlign , mirror , padding } } = this.options;\n const labelSizes = this._getLabelSizes();\n const tickAndPadding = tl + padding;\n const widest = labelSizes.widest.width;\n let textAlign;\n let x;\n if (position === 'left') {\n if (mirror) {\n x = this.right + padding;\n if (crossAlign === 'near') {\n textAlign = 'left';\n } else if (crossAlign === 'center') {\n textAlign = 'center';\n x += widest / 2;\n } else {\n textAlign = 'right';\n x += widest;\n }\n } else {\n x = this.right - tickAndPadding;\n if (crossAlign === 'near') {\n textAlign = 'right';\n } else if (crossAlign === 'center') {\n textAlign = 'center';\n x -= widest / 2;\n } else {\n textAlign = 'left';\n x = this.left;\n }\n }\n } else if (position === 'right') {\n if (mirror) {\n x = this.left + padding;\n if (crossAlign === 'near') {\n textAlign = 'right';\n } else if (crossAlign === 'center') {\n textAlign = 'center';\n x -= widest / 2;\n } else {\n textAlign = 'left';\n x -= widest;\n }\n } else {\n x = this.left + tickAndPadding;\n if (crossAlign === 'near') {\n textAlign = 'left';\n } else if (crossAlign === 'center') {\n textAlign = 'center';\n x += widest / 2;\n } else {\n textAlign = 'right';\n x = this.right;\n }\n }\n } else {\n textAlign = 'right';\n }\n return {\n textAlign,\n x\n };\n }\n _computeLabelArea() {\n if (this.options.ticks.mirror) {\n return;\n }\n const chart = this.chart;\n const position = this.options.position;\n if (position === 'left' || position === 'right') {\n return {\n top: 0,\n left: this.left,\n bottom: chart.height,\n right: this.right\n };\n }\n if (position === 'top' || position === 'bottom') {\n return {\n top: this.top,\n left: 0,\n bottom: this.bottom,\n right: chart.width\n };\n }\n }\n drawBackground() {\n const { ctx , options: { backgroundColor } , left , top , width , height } = this;\n if (backgroundColor) {\n ctx.save();\n ctx.fillStyle = backgroundColor;\n ctx.fillRect(left, top, width, height);\n ctx.restore();\n }\n }\n getLineWidthForValue(value) {\n const grid = this.options.grid;\n if (!this._isVisible() || !grid.display) {\n return 0;\n }\n const ticks = this.ticks;\n const index = ticks.findIndex((t)=>t.value === value);\n if (index >= 0) {\n const opts = grid.setContext(this.getContext(index));\n return opts.lineWidth;\n }\n return 0;\n }\n drawGrid(chartArea) {\n const grid = this.options.grid;\n const ctx = this.ctx;\n const items = this._gridLineItems || (this._gridLineItems = this._computeGridLineItems(chartArea));\n let i, ilen;\n const drawLine = (p1, p2, style)=>{\n if (!style.width || !style.color) {\n return;\n }\n ctx.save();\n ctx.lineWidth = style.width;\n ctx.strokeStyle = style.color;\n ctx.setLineDash(style.borderDash || []);\n ctx.lineDashOffset = style.borderDashOffset;\n ctx.beginPath();\n ctx.moveTo(p1.x, p1.y);\n ctx.lineTo(p2.x, p2.y);\n ctx.stroke();\n ctx.restore();\n };\n if (grid.display) {\n for(i = 0, ilen = items.length; i < ilen; ++i){\n const item = items[i];\n if (grid.drawOnChartArea) {\n drawLine({\n x: item.x1,\n y: item.y1\n }, {\n x: item.x2,\n y: item.y2\n }, item);\n }\n if (grid.drawTicks) {\n drawLine({\n x: item.tx1,\n y: item.ty1\n }, {\n x: item.tx2,\n y: item.ty2\n }, {\n color: item.tickColor,\n width: item.tickWidth,\n borderDash: item.tickBorderDash,\n borderDashOffset: item.tickBorderDashOffset\n });\n }\n }\n }\n }\n drawBorder() {\n const { chart , ctx , options: { border , grid } } = this;\n const borderOpts = border.setContext(this.getContext());\n const axisWidth = border.display ? borderOpts.width : 0;\n if (!axisWidth) {\n return;\n }\n const lastLineWidth = grid.setContext(this.getContext(0)).lineWidth;\n const borderValue = this._borderValue;\n let x1, x2, y1, y2;\n if (this.isHorizontal()) {\n x1 = _alignPixel(chart, this.left, axisWidth) - axisWidth / 2;\n x2 = _alignPixel(chart, this.right, lastLineWidth) + lastLineWidth / 2;\n y1 = y2 = borderValue;\n } else {\n y1 = _alignPixel(chart, this.top, axisWidth) - axisWidth / 2;\n y2 = _alignPixel(chart, this.bottom, lastLineWidth) + lastLineWidth / 2;\n x1 = x2 = borderValue;\n }\n ctx.save();\n ctx.lineWidth = borderOpts.width;\n ctx.strokeStyle = borderOpts.color;\n ctx.beginPath();\n ctx.moveTo(x1, y1);\n ctx.lineTo(x2, y2);\n ctx.stroke();\n ctx.restore();\n }\n drawLabels(chartArea) {\n const optionTicks = this.options.ticks;\n if (!optionTicks.display) {\n return;\n }\n const ctx = this.ctx;\n const area = this._computeLabelArea();\n if (area) {\n clipArea(ctx, area);\n }\n const items = this.getLabelItems(chartArea);\n for (const item of items){\n const renderTextOptions = item.options;\n const tickFont = item.font;\n const label = item.label;\n const y = item.textOffset;\n renderText(ctx, label, 0, y, tickFont, renderTextOptions);\n }\n if (area) {\n unclipArea(ctx);\n }\n }\n drawTitle() {\n const { ctx , options: { position , title , reverse } } = this;\n if (!title.display) {\n return;\n }\n const font = toFont(title.font);\n const padding = toPadding(title.padding);\n const align = title.align;\n let offset = font.lineHeight / 2;\n if (position === 'bottom' || position === 'center' || isObject(position)) {\n offset += padding.bottom;\n if (isArray(title.text)) {\n offset += font.lineHeight * (title.text.length - 1);\n }\n } else {\n offset += padding.top;\n }\n const { titleX , titleY , maxWidth , rotation } = titleArgs(this, offset, position, align);\n renderText(ctx, title.text, 0, 0, font, {\n color: title.color,\n maxWidth,\n rotation,\n textAlign: titleAlign(align, position, reverse),\n textBaseline: 'middle',\n translation: [\n titleX,\n titleY\n ]\n });\n }\n draw(chartArea) {\n if (!this._isVisible()) {\n return;\n }\n this.drawBackground();\n this.drawGrid(chartArea);\n this.drawBorder();\n this.drawTitle();\n this.drawLabels(chartArea);\n }\n _layers() {\n const opts = this.options;\n const tz = opts.ticks && opts.ticks.z || 0;\n const gz = valueOrDefault(opts.grid && opts.grid.z, -1);\n const bz = valueOrDefault(opts.border && opts.border.z, 0);\n if (!this._isVisible() || this.draw !== Scale.prototype.draw) {\n return [\n {\n z: tz,\n draw: (chartArea)=>{\n this.draw(chartArea);\n }\n }\n ];\n }\n return [\n {\n z: gz,\n draw: (chartArea)=>{\n this.drawBackground();\n this.drawGrid(chartArea);\n this.drawTitle();\n }\n },\n {\n z: bz,\n draw: ()=>{\n this.drawBorder();\n }\n },\n {\n z: tz,\n draw: (chartArea)=>{\n this.drawLabels(chartArea);\n }\n }\n ];\n }\n getMatchingVisibleMetas(type) {\n const metas = this.chart.getSortedVisibleDatasetMetas();\n const axisID = this.axis + 'AxisID';\n const result = [];\n let i, ilen;\n for(i = 0, ilen = metas.length; i < ilen; ++i){\n const meta = metas[i];\n if (meta[axisID] === this.id && (!type || meta.type === type)) {\n result.push(meta);\n }\n }\n return result;\n }\n _resolveTickFontOptions(index) {\n const opts = this.options.ticks.setContext(this.getContext(index));\n return toFont(opts.font);\n }\n _maxDigits() {\n const fontSize = this._resolveTickFontOptions(0).lineHeight;\n return (this.isHorizontal() ? this.width : this.height) / fontSize;\n }\n}\n\nclass TypedRegistry {\n constructor(type, scope, override){\n this.type = type;\n this.scope = scope;\n this.override = override;\n this.items = Object.create(null);\n }\n isForType(type) {\n return Object.prototype.isPrototypeOf.call(this.type.prototype, type.prototype);\n }\n register(item) {\n const proto = Object.getPrototypeOf(item);\n let parentScope;\n if (isIChartComponent(proto)) {\n parentScope = this.register(proto);\n }\n const items = this.items;\n const id = item.id;\n const scope = this.scope + '.' + id;\n if (!id) {\n throw new Error('class does not have id: ' + item);\n }\n if (id in items) {\n return scope;\n }\n items[id] = item;\n registerDefaults(item, scope, parentScope);\n if (this.override) {\n defaults.override(item.id, item.overrides);\n }\n return scope;\n }\n get(id) {\n return this.items[id];\n }\n unregister(item) {\n const items = this.items;\n const id = item.id;\n const scope = this.scope;\n if (id in items) {\n delete items[id];\n }\n if (scope && id in defaults[scope]) {\n delete defaults[scope][id];\n if (this.override) {\n delete overrides[id];\n }\n }\n }\n}\nfunction registerDefaults(item, scope, parentScope) {\n const itemDefaults = merge(Object.create(null), [\n parentScope ? defaults.get(parentScope) : {},\n defaults.get(scope),\n item.defaults\n ]);\n defaults.set(scope, itemDefaults);\n if (item.defaultRoutes) {\n routeDefaults(scope, item.defaultRoutes);\n }\n if (item.descriptors) {\n defaults.describe(scope, item.descriptors);\n }\n}\nfunction routeDefaults(scope, routes) {\n Object.keys(routes).forEach((property)=>{\n const propertyParts = property.split('.');\n const sourceName = propertyParts.pop();\n const sourceScope = [\n scope\n ].concat(propertyParts).join('.');\n const parts = routes[property].split('.');\n const targetName = parts.pop();\n const targetScope = parts.join('.');\n defaults.route(sourceScope, sourceName, targetScope, targetName);\n });\n}\nfunction isIChartComponent(proto) {\n return 'id' in proto && 'defaults' in proto;\n}\n\nclass Registry {\n constructor(){\n this.controllers = new TypedRegistry(DatasetController, 'datasets', true);\n this.elements = new TypedRegistry(Element, 'elements');\n this.plugins = new TypedRegistry(Object, 'plugins');\n this.scales = new TypedRegistry(Scale, 'scales');\n this._typedRegistries = [\n this.controllers,\n this.scales,\n this.elements\n ];\n }\n add(...args) {\n this._each('register', args);\n }\n remove(...args) {\n this._each('unregister', args);\n }\n addControllers(...args) {\n this._each('register', args, this.controllers);\n }\n addElements(...args) {\n this._each('register', args, this.elements);\n }\n addPlugins(...args) {\n this._each('register', args, this.plugins);\n }\n addScales(...args) {\n this._each('register', args, this.scales);\n }\n getController(id) {\n return this._get(id, this.controllers, 'controller');\n }\n getElement(id) {\n return this._get(id, this.elements, 'element');\n }\n getPlugin(id) {\n return this._get(id, this.plugins, 'plugin');\n }\n getScale(id) {\n return this._get(id, this.scales, 'scale');\n }\n removeControllers(...args) {\n this._each('unregister', args, this.controllers);\n }\n removeElements(...args) {\n this._each('unregister', args, this.elements);\n }\n removePlugins(...args) {\n this._each('unregister', args, this.plugins);\n }\n removeScales(...args) {\n this._each('unregister', args, this.scales);\n }\n _each(method, args, typedRegistry) {\n [\n ...args\n ].forEach((arg)=>{\n const reg = typedRegistry || this._getRegistryForType(arg);\n if (typedRegistry || reg.isForType(arg) || reg === this.plugins && arg.id) {\n this._exec(method, reg, arg);\n } else {\n each(arg, (item)=>{\n const itemReg = typedRegistry || this._getRegistryForType(item);\n this._exec(method, itemReg, item);\n });\n }\n });\n }\n _exec(method, registry, component) {\n const camelMethod = _capitalize(method);\n callback(component['before' + camelMethod], [], component);\n registry[method](component);\n callback(component['after' + camelMethod], [], component);\n }\n _getRegistryForType(type) {\n for(let i = 0; i < this._typedRegistries.length; i++){\n const reg = this._typedRegistries[i];\n if (reg.isForType(type)) {\n return reg;\n }\n }\n return this.plugins;\n }\n _get(id, typedRegistry, type) {\n const item = typedRegistry.get(id);\n if (item === undefined) {\n throw new Error('\"' + id + '\" is not a registered ' + type + '.');\n }\n return item;\n }\n}\nvar registry = /* #__PURE__ */ new Registry();\n\nclass PluginService {\n constructor(){\n this._init = [];\n }\n notify(chart, hook, args, filter) {\n if (hook === 'beforeInit') {\n this._init = this._createDescriptors(chart, true);\n this._notify(this._init, chart, 'install');\n }\n const descriptors = filter ? this._descriptors(chart).filter(filter) : this._descriptors(chart);\n const result = this._notify(descriptors, chart, hook, args);\n if (hook === 'afterDestroy') {\n this._notify(descriptors, chart, 'stop');\n this._notify(this._init, chart, 'uninstall');\n }\n return result;\n }\n _notify(descriptors, chart, hook, args) {\n args = args || {};\n for (const descriptor of descriptors){\n const plugin = descriptor.plugin;\n const method = plugin[hook];\n const params = [\n chart,\n args,\n descriptor.options\n ];\n if (callback(method, params, plugin) === false && args.cancelable) {\n return false;\n }\n }\n return true;\n }\n invalidate() {\n if (!isNullOrUndef(this._cache)) {\n this._oldCache = this._cache;\n this._cache = undefined;\n }\n }\n _descriptors(chart) {\n if (this._cache) {\n return this._cache;\n }\n const descriptors = this._cache = this._createDescriptors(chart);\n this._notifyStateChanges(chart);\n return descriptors;\n }\n _createDescriptors(chart, all) {\n const config = chart && chart.config;\n const options = valueOrDefault(config.options && config.options.plugins, {});\n const plugins = allPlugins(config);\n return options === false && !all ? [] : createDescriptors(chart, plugins, options, all);\n }\n _notifyStateChanges(chart) {\n const previousDescriptors = this._oldCache || [];\n const descriptors = this._cache;\n const diff = (a, b)=>a.filter((x)=>!b.some((y)=>x.plugin.id === y.plugin.id));\n this._notify(diff(previousDescriptors, descriptors), chart, 'stop');\n this._notify(diff(descriptors, previousDescriptors), chart, 'start');\n }\n}\n function allPlugins(config) {\n const localIds = {};\n const plugins = [];\n const keys = Object.keys(registry.plugins.items);\n for(let i = 0; i < keys.length; i++){\n plugins.push(registry.getPlugin(keys[i]));\n }\n const local = config.plugins || [];\n for(let i1 = 0; i1 < local.length; i1++){\n const plugin = local[i1];\n if (plugins.indexOf(plugin) === -1) {\n plugins.push(plugin);\n localIds[plugin.id] = true;\n }\n }\n return {\n plugins,\n localIds\n };\n}\nfunction getOpts(options, all) {\n if (!all && options === false) {\n return null;\n }\n if (options === true) {\n return {};\n }\n return options;\n}\nfunction createDescriptors(chart, { plugins , localIds }, options, all) {\n const result = [];\n const context = chart.getContext();\n for (const plugin of plugins){\n const id = plugin.id;\n const opts = getOpts(options[id], all);\n if (opts === null) {\n continue;\n }\n result.push({\n plugin,\n options: pluginOpts(chart.config, {\n plugin,\n local: localIds[id]\n }, opts, context)\n });\n }\n return result;\n}\nfunction pluginOpts(config, { plugin , local }, opts, context) {\n const keys = config.pluginScopeKeys(plugin);\n const scopes = config.getOptionScopes(opts, keys);\n if (local && plugin.defaults) {\n scopes.push(plugin.defaults);\n }\n return config.createResolver(scopes, context, [\n ''\n ], {\n scriptable: false,\n indexable: false,\n allKeys: true\n });\n}\n\nfunction getIndexAxis(type, options) {\n const datasetDefaults = defaults.datasets[type] || {};\n const datasetOptions = (options.datasets || {})[type] || {};\n return datasetOptions.indexAxis || options.indexAxis || datasetDefaults.indexAxis || 'x';\n}\nfunction getAxisFromDefaultScaleID(id, indexAxis) {\n let axis = id;\n if (id === '_index_') {\n axis = indexAxis;\n } else if (id === '_value_') {\n axis = indexAxis === 'x' ? 'y' : 'x';\n }\n return axis;\n}\nfunction getDefaultScaleIDFromAxis(axis, indexAxis) {\n return axis === indexAxis ? '_index_' : '_value_';\n}\nfunction axisFromPosition(position) {\n if (position === 'top' || position === 'bottom') {\n return 'x';\n }\n if (position === 'left' || position === 'right') {\n return 'y';\n }\n}\nfunction determineAxis(id, scaleOptions) {\n if (id === 'x' || id === 'y' || id === 'r') {\n return id;\n }\n id = scaleOptions.axis || axisFromPosition(scaleOptions.position) || id.length > 1 && determineAxis(id[0].toLowerCase(), scaleOptions);\n if (id) {\n return id;\n }\n throw new Error(`Cannot determine type of '${name}' axis. Please provide 'axis' or 'position' option.`);\n}\nfunction mergeScaleConfig(config, options) {\n const chartDefaults = overrides[config.type] || {\n scales: {}\n };\n const configScales = options.scales || {};\n const chartIndexAxis = getIndexAxis(config.type, options);\n const scales = Object.create(null);\n Object.keys(configScales).forEach((id)=>{\n const scaleConf = configScales[id];\n if (!isObject(scaleConf)) {\n return console.error(`Invalid scale configuration for scale: ${id}`);\n }\n if (scaleConf._proxy) {\n return console.warn(`Ignoring resolver passed as options for scale: ${id}`);\n }\n const axis = determineAxis(id, scaleConf);\n const defaultId = getDefaultScaleIDFromAxis(axis, chartIndexAxis);\n const defaultScaleOptions = chartDefaults.scales || {};\n scales[id] = mergeIf(Object.create(null), [\n {\n axis\n },\n scaleConf,\n defaultScaleOptions[axis],\n defaultScaleOptions[defaultId]\n ]);\n });\n config.data.datasets.forEach((dataset)=>{\n const type = dataset.type || config.type;\n const indexAxis = dataset.indexAxis || getIndexAxis(type, options);\n const datasetDefaults = overrides[type] || {};\n const defaultScaleOptions = datasetDefaults.scales || {};\n Object.keys(defaultScaleOptions).forEach((defaultID)=>{\n const axis = getAxisFromDefaultScaleID(defaultID, indexAxis);\n const id = dataset[axis + 'AxisID'] || axis;\n scales[id] = scales[id] || Object.create(null);\n mergeIf(scales[id], [\n {\n axis\n },\n configScales[id],\n defaultScaleOptions[defaultID]\n ]);\n });\n });\n Object.keys(scales).forEach((key)=>{\n const scale = scales[key];\n mergeIf(scale, [\n defaults.scales[scale.type],\n defaults.scale\n ]);\n });\n return scales;\n}\nfunction initOptions(config) {\n const options = config.options || (config.options = {});\n options.plugins = valueOrDefault(options.plugins, {});\n options.scales = mergeScaleConfig(config, options);\n}\nfunction initData(data) {\n data = data || {};\n data.datasets = data.datasets || [];\n data.labels = data.labels || [];\n return data;\n}\nfunction initConfig(config) {\n config = config || {};\n config.data = initData(config.data);\n initOptions(config);\n return config;\n}\nconst keyCache = new Map();\nconst keysCached = new Set();\nfunction cachedKeys(cacheKey, generate) {\n let keys = keyCache.get(cacheKey);\n if (!keys) {\n keys = generate();\n keyCache.set(cacheKey, keys);\n keysCached.add(keys);\n }\n return keys;\n}\nconst addIfFound = (set, obj, key)=>{\n const opts = resolveObjectKey(obj, key);\n if (opts !== undefined) {\n set.add(opts);\n }\n};\nclass Config {\n constructor(config){\n this._config = initConfig(config);\n this._scopeCache = new Map();\n this._resolverCache = new Map();\n }\n get platform() {\n return this._config.platform;\n }\n get type() {\n return this._config.type;\n }\n set type(type) {\n this._config.type = type;\n }\n get data() {\n return this._config.data;\n }\n set data(data) {\n this._config.data = initData(data);\n }\n get options() {\n return this._config.options;\n }\n set options(options) {\n this._config.options = options;\n }\n get plugins() {\n return this._config.plugins;\n }\n update() {\n const config = this._config;\n this.clearCache();\n initOptions(config);\n }\n clearCache() {\n this._scopeCache.clear();\n this._resolverCache.clear();\n }\n datasetScopeKeys(datasetType) {\n return cachedKeys(datasetType, ()=>[\n [\n `datasets.${datasetType}`,\n ''\n ]\n ]);\n }\n datasetAnimationScopeKeys(datasetType, transition) {\n return cachedKeys(`${datasetType}.transition.${transition}`, ()=>[\n [\n `datasets.${datasetType}.transitions.${transition}`,\n `transitions.${transition}`\n ],\n [\n `datasets.${datasetType}`,\n ''\n ]\n ]);\n }\n datasetElementScopeKeys(datasetType, elementType) {\n return cachedKeys(`${datasetType}-${elementType}`, ()=>[\n [\n `datasets.${datasetType}.elements.${elementType}`,\n `datasets.${datasetType}`,\n `elements.${elementType}`,\n ''\n ]\n ]);\n }\n pluginScopeKeys(plugin) {\n const id = plugin.id;\n const type = this.type;\n return cachedKeys(`${type}-plugin-${id}`, ()=>[\n [\n `plugins.${id}`,\n ...plugin.additionalOptionScopes || []\n ]\n ]);\n }\n _cachedScopes(mainScope, resetCache) {\n const _scopeCache = this._scopeCache;\n let cache = _scopeCache.get(mainScope);\n if (!cache || resetCache) {\n cache = new Map();\n _scopeCache.set(mainScope, cache);\n }\n return cache;\n }\n getOptionScopes(mainScope, keyLists, resetCache) {\n const { options , type } = this;\n const cache = this._cachedScopes(mainScope, resetCache);\n const cached = cache.get(keyLists);\n if (cached) {\n return cached;\n }\n const scopes = new Set();\n keyLists.forEach((keys)=>{\n if (mainScope) {\n scopes.add(mainScope);\n keys.forEach((key)=>addIfFound(scopes, mainScope, key));\n }\n keys.forEach((key)=>addIfFound(scopes, options, key));\n keys.forEach((key)=>addIfFound(scopes, overrides[type] || {}, key));\n keys.forEach((key)=>addIfFound(scopes, defaults, key));\n keys.forEach((key)=>addIfFound(scopes, descriptors, key));\n });\n const array = Array.from(scopes);\n if (array.length === 0) {\n array.push(Object.create(null));\n }\n if (keysCached.has(keyLists)) {\n cache.set(keyLists, array);\n }\n return array;\n }\n chartOptionScopes() {\n const { options , type } = this;\n return [\n options,\n overrides[type] || {},\n defaults.datasets[type] || {},\n {\n type\n },\n defaults,\n descriptors\n ];\n }\n resolveNamedOptions(scopes, names, context, prefixes = [\n ''\n ]) {\n const result = {\n $shared: true\n };\n const { resolver , subPrefixes } = getResolver(this._resolverCache, scopes, prefixes);\n let options = resolver;\n if (needContext(resolver, names)) {\n result.$shared = false;\n context = isFunction(context) ? context() : context;\n const subResolver = this.createResolver(scopes, context, subPrefixes);\n options = _attachContext(resolver, context, subResolver);\n }\n for (const prop of names){\n result[prop] = options[prop];\n }\n return result;\n }\n createResolver(scopes, context, prefixes = [\n ''\n ], descriptorDefaults) {\n const { resolver } = getResolver(this._resolverCache, scopes, prefixes);\n return isObject(context) ? _attachContext(resolver, context, undefined, descriptorDefaults) : resolver;\n }\n}\nfunction getResolver(resolverCache, scopes, prefixes) {\n let cache = resolverCache.get(scopes);\n if (!cache) {\n cache = new Map();\n resolverCache.set(scopes, cache);\n }\n const cacheKey = prefixes.join();\n let cached = cache.get(cacheKey);\n if (!cached) {\n const resolver = _createResolver(scopes, prefixes);\n cached = {\n resolver,\n subPrefixes: prefixes.filter((p)=>!p.toLowerCase().includes('hover'))\n };\n cache.set(cacheKey, cached);\n }\n return cached;\n}\nconst hasFunction = (value)=>isObject(value) && Object.getOwnPropertyNames(value).reduce((acc, key)=>acc || isFunction(value[key]), false);\nfunction needContext(proxy, names) {\n const { isScriptable , isIndexable } = _descriptors(proxy);\n for (const prop of names){\n const scriptable = isScriptable(prop);\n const indexable = isIndexable(prop);\n const value = (indexable || scriptable) && proxy[prop];\n if (scriptable && (isFunction(value) || hasFunction(value)) || indexable && isArray(value)) {\n return true;\n }\n }\n return false;\n}\n\nvar version = \"4.1.2\";\n\nconst KNOWN_POSITIONS = [\n 'top',\n 'bottom',\n 'left',\n 'right',\n 'chartArea'\n];\nfunction positionIsHorizontal(position, axis) {\n return position === 'top' || position === 'bottom' || KNOWN_POSITIONS.indexOf(position) === -1 && axis === 'x';\n}\nfunction compare2Level(l1, l2) {\n return function(a, b) {\n return a[l1] === b[l1] ? a[l2] - b[l2] : a[l1] - b[l1];\n };\n}\nfunction onAnimationsComplete(context) {\n const chart = context.chart;\n const animationOptions = chart.options.animation;\n chart.notifyPlugins('afterRender');\n callback(animationOptions && animationOptions.onComplete, [\n context\n ], chart);\n}\nfunction onAnimationProgress(context) {\n const chart = context.chart;\n const animationOptions = chart.options.animation;\n callback(animationOptions && animationOptions.onProgress, [\n context\n ], chart);\n}\n function getCanvas(item) {\n if (_isDomSupported() && typeof item === 'string') {\n item = document.getElementById(item);\n } else if (item && item.length) {\n item = item[0];\n }\n if (item && item.canvas) {\n item = item.canvas;\n }\n return item;\n}\nconst instances = {};\nconst getChart = (key)=>{\n const canvas = getCanvas(key);\n return Object.values(instances).filter((c)=>c.canvas === canvas).pop();\n};\nfunction moveNumericKeys(obj, start, move) {\n const keys = Object.keys(obj);\n for (const key of keys){\n const intKey = +key;\n if (intKey >= start) {\n const value = obj[key];\n delete obj[key];\n if (move > 0 || intKey > start) {\n obj[intKey + move] = value;\n }\n }\n }\n}\n function determineLastEvent(e, lastEvent, inChartArea, isClick) {\n if (!inChartArea || e.type === 'mouseout') {\n return null;\n }\n if (isClick) {\n return lastEvent;\n }\n return e;\n}\nfunction getDatasetArea(meta) {\n const { xScale , yScale } = meta;\n if (xScale && yScale) {\n return {\n left: xScale.left,\n right: xScale.right,\n top: yScale.top,\n bottom: yScale.bottom\n };\n }\n}\nclass Chart {\n static defaults = defaults;\n static instances = instances;\n static overrides = overrides;\n static registry = registry;\n static version = version;\n static getChart = getChart;\n static register(...items) {\n registry.add(...items);\n invalidatePlugins();\n }\n static unregister(...items) {\n registry.remove(...items);\n invalidatePlugins();\n }\n constructor(item, userConfig){\n const config = this.config = new Config(userConfig);\n const initialCanvas = getCanvas(item);\n const existingChart = getChart(initialCanvas);\n if (existingChart) {\n throw new Error('Canvas is already in use. Chart with ID \\'' + existingChart.id + '\\'' + ' must be destroyed before the canvas with ID \\'' + existingChart.canvas.id + '\\' can be reused.');\n }\n const options = config.createResolver(config.chartOptionScopes(), this.getContext());\n this.platform = new (config.platform || _detectPlatform(initialCanvas))();\n this.platform.updateConfig(config);\n const context = this.platform.acquireContext(initialCanvas, options.aspectRatio);\n const canvas = context && context.canvas;\n const height = canvas && canvas.height;\n const width = canvas && canvas.width;\n this.id = uid();\n this.ctx = context;\n this.canvas = canvas;\n this.width = width;\n this.height = height;\n this._options = options;\n this._aspectRatio = this.aspectRatio;\n this._layers = [];\n this._metasets = [];\n this._stacks = undefined;\n this.boxes = [];\n this.currentDevicePixelRatio = undefined;\n this.chartArea = undefined;\n this._active = [];\n this._lastEvent = undefined;\n this._listeners = {};\n this._responsiveListeners = undefined;\n this._sortedMetasets = [];\n this.scales = {};\n this._plugins = new PluginService();\n this.$proxies = {};\n this._hiddenIndices = {};\n this.attached = false;\n this._animationsDisabled = undefined;\n this.$context = undefined;\n this._doResize = debounce((mode)=>this.update(mode), options.resizeDelay || 0);\n this._dataChanges = [];\n instances[this.id] = this;\n if (!context || !canvas) {\n console.error(\"Failed to create chart: can't acquire context from the given item\");\n return;\n }\n animator.listen(this, 'complete', onAnimationsComplete);\n animator.listen(this, 'progress', onAnimationProgress);\n this._initialize();\n if (this.attached) {\n this.update();\n }\n }\n get aspectRatio() {\n const { options: { aspectRatio , maintainAspectRatio } , width , height , _aspectRatio } = this;\n if (!isNullOrUndef(aspectRatio)) {\n return aspectRatio;\n }\n if (maintainAspectRatio && _aspectRatio) {\n return _aspectRatio;\n }\n return height ? width / height : null;\n }\n get data() {\n return this.config.data;\n }\n set data(data) {\n this.config.data = data;\n }\n get options() {\n return this._options;\n }\n set options(options) {\n this.config.options = options;\n }\n get registry() {\n return registry;\n }\n _initialize() {\n this.notifyPlugins('beforeInit');\n if (this.options.responsive) {\n this.resize();\n } else {\n retinaScale(this, this.options.devicePixelRatio);\n }\n this.bindEvents();\n this.notifyPlugins('afterInit');\n return this;\n }\n clear() {\n clearCanvas(this.canvas, this.ctx);\n return this;\n }\n stop() {\n animator.stop(this);\n return this;\n }\n resize(width, height) {\n if (!animator.running(this)) {\n this._resize(width, height);\n } else {\n this._resizeBeforeDraw = {\n width,\n height\n };\n }\n }\n _resize(width, height) {\n const options = this.options;\n const canvas = this.canvas;\n const aspectRatio = options.maintainAspectRatio && this.aspectRatio;\n const newSize = this.platform.getMaximumSize(canvas, width, height, aspectRatio);\n const newRatio = options.devicePixelRatio || this.platform.getDevicePixelRatio();\n const mode = this.width ? 'resize' : 'attach';\n this.width = newSize.width;\n this.height = newSize.height;\n this._aspectRatio = this.aspectRatio;\n if (!retinaScale(this, newRatio, true)) {\n return;\n }\n this.notifyPlugins('resize', {\n size: newSize\n });\n callback(options.onResize, [\n this,\n newSize\n ], this);\n if (this.attached) {\n if (this._doResize(mode)) {\n this.render();\n }\n }\n }\n ensureScalesHaveIDs() {\n const options = this.options;\n const scalesOptions = options.scales || {};\n each(scalesOptions, (axisOptions, axisID)=>{\n axisOptions.id = axisID;\n });\n }\n buildOrUpdateScales() {\n const options = this.options;\n const scaleOpts = options.scales;\n const scales = this.scales;\n const updated = Object.keys(scales).reduce((obj, id)=>{\n obj[id] = false;\n return obj;\n }, {});\n let items = [];\n if (scaleOpts) {\n items = items.concat(Object.keys(scaleOpts).map((id)=>{\n const scaleOptions = scaleOpts[id];\n const axis = determineAxis(id, scaleOptions);\n const isRadial = axis === 'r';\n const isHorizontal = axis === 'x';\n return {\n options: scaleOptions,\n dposition: isRadial ? 'chartArea' : isHorizontal ? 'bottom' : 'left',\n dtype: isRadial ? 'radialLinear' : isHorizontal ? 'category' : 'linear'\n };\n }));\n }\n each(items, (item)=>{\n const scaleOptions = item.options;\n const id = scaleOptions.id;\n const axis = determineAxis(id, scaleOptions);\n const scaleType = valueOrDefault(scaleOptions.type, item.dtype);\n if (scaleOptions.position === undefined || positionIsHorizontal(scaleOptions.position, axis) !== positionIsHorizontal(item.dposition)) {\n scaleOptions.position = item.dposition;\n }\n updated[id] = true;\n let scale = null;\n if (id in scales && scales[id].type === scaleType) {\n scale = scales[id];\n } else {\n const scaleClass = registry.getScale(scaleType);\n scale = new scaleClass({\n id,\n type: scaleType,\n ctx: this.ctx,\n chart: this\n });\n scales[scale.id] = scale;\n }\n scale.init(scaleOptions, options);\n });\n each(updated, (hasUpdated, id)=>{\n if (!hasUpdated) {\n delete scales[id];\n }\n });\n each(scales, (scale)=>{\n layouts.configure(this, scale, scale.options);\n layouts.addBox(this, scale);\n });\n }\n _updateMetasets() {\n const metasets = this._metasets;\n const numData = this.data.datasets.length;\n const numMeta = metasets.length;\n metasets.sort((a, b)=>a.index - b.index);\n if (numMeta > numData) {\n for(let i = numData; i < numMeta; ++i){\n this._destroyDatasetMeta(i);\n }\n metasets.splice(numData, numMeta - numData);\n }\n this._sortedMetasets = metasets.slice(0).sort(compare2Level('order', 'index'));\n }\n _removeUnreferencedMetasets() {\n const { _metasets: metasets , data: { datasets } } = this;\n if (metasets.length > datasets.length) {\n delete this._stacks;\n }\n metasets.forEach((meta, index)=>{\n if (datasets.filter((x)=>x === meta._dataset).length === 0) {\n this._destroyDatasetMeta(index);\n }\n });\n }\n buildOrUpdateControllers() {\n const newControllers = [];\n const datasets = this.data.datasets;\n let i, ilen;\n this._removeUnreferencedMetasets();\n for(i = 0, ilen = datasets.length; i < ilen; i++){\n const dataset = datasets[i];\n let meta = this.getDatasetMeta(i);\n const type = dataset.type || this.config.type;\n if (meta.type && meta.type !== type) {\n this._destroyDatasetMeta(i);\n meta = this.getDatasetMeta(i);\n }\n meta.type = type;\n meta.indexAxis = dataset.indexAxis || getIndexAxis(type, this.options);\n meta.order = dataset.order || 0;\n meta.index = i;\n meta.label = '' + dataset.label;\n meta.visible = this.isDatasetVisible(i);\n if (meta.controller) {\n meta.controller.updateIndex(i);\n meta.controller.linkScales();\n } else {\n const ControllerClass = registry.getController(type);\n const { datasetElementType , dataElementType } = defaults.datasets[type];\n Object.assign(ControllerClass, {\n dataElementType: registry.getElement(dataElementType),\n datasetElementType: datasetElementType && registry.getElement(datasetElementType)\n });\n meta.controller = new ControllerClass(this, i);\n newControllers.push(meta.controller);\n }\n }\n this._updateMetasets();\n return newControllers;\n }\n _resetElements() {\n each(this.data.datasets, (dataset, datasetIndex)=>{\n this.getDatasetMeta(datasetIndex).controller.reset();\n }, this);\n }\n reset() {\n this._resetElements();\n this.notifyPlugins('reset');\n }\n update(mode) {\n const config = this.config;\n config.update();\n const options = this._options = config.createResolver(config.chartOptionScopes(), this.getContext());\n const animsDisabled = this._animationsDisabled = !options.animation;\n this._updateScales();\n this._checkEventBindings();\n this._updateHiddenIndices();\n this._plugins.invalidate();\n if (this.notifyPlugins('beforeUpdate', {\n mode,\n cancelable: true\n }) === false) {\n return;\n }\n const newControllers = this.buildOrUpdateControllers();\n this.notifyPlugins('beforeElementsUpdate');\n let minPadding = 0;\n for(let i = 0, ilen = this.data.datasets.length; i < ilen; i++){\n const { controller } = this.getDatasetMeta(i);\n const reset = !animsDisabled && newControllers.indexOf(controller) === -1;\n controller.buildOrUpdateElements(reset);\n minPadding = Math.max(+controller.getMaxOverflow(), minPadding);\n }\n minPadding = this._minPadding = options.layout.autoPadding ? minPadding : 0;\n this._updateLayout(minPadding);\n if (!animsDisabled) {\n each(newControllers, (controller)=>{\n controller.reset();\n });\n }\n this._updateDatasets(mode);\n this.notifyPlugins('afterUpdate', {\n mode\n });\n this._layers.sort(compare2Level('z', '_idx'));\n const { _active , _lastEvent } = this;\n if (_lastEvent) {\n this._eventHandler(_lastEvent, true);\n } else if (_active.length) {\n this._updateHoverStyles(_active, _active, true);\n }\n this.render();\n }\n _updateScales() {\n each(this.scales, (scale)=>{\n layouts.removeBox(this, scale);\n });\n this.ensureScalesHaveIDs();\n this.buildOrUpdateScales();\n }\n _checkEventBindings() {\n const options = this.options;\n const existingEvents = new Set(Object.keys(this._listeners));\n const newEvents = new Set(options.events);\n if (!setsEqual(existingEvents, newEvents) || !!this._responsiveListeners !== options.responsive) {\n this.unbindEvents();\n this.bindEvents();\n }\n }\n _updateHiddenIndices() {\n const { _hiddenIndices } = this;\n const changes = this._getUniformDataChanges() || [];\n for (const { method , start , count } of changes){\n const move = method === '_removeElements' ? -count : count;\n moveNumericKeys(_hiddenIndices, start, move);\n }\n }\n _getUniformDataChanges() {\n const _dataChanges = this._dataChanges;\n if (!_dataChanges || !_dataChanges.length) {\n return;\n }\n this._dataChanges = [];\n const datasetCount = this.data.datasets.length;\n const makeSet = (idx)=>new Set(_dataChanges.filter((c)=>c[0] === idx).map((c, i)=>i + ',' + c.splice(1).join(',')));\n const changeSet = makeSet(0);\n for(let i = 1; i < datasetCount; i++){\n if (!setsEqual(changeSet, makeSet(i))) {\n return;\n }\n }\n return Array.from(changeSet).map((c)=>c.split(',')).map((a)=>({\n method: a[1],\n start: +a[2],\n count: +a[3]\n }));\n }\n _updateLayout(minPadding) {\n if (this.notifyPlugins('beforeLayout', {\n cancelable: true\n }) === false) {\n return;\n }\n layouts.update(this, this.width, this.height, minPadding);\n const area = this.chartArea;\n const noArea = area.width <= 0 || area.height <= 0;\n this._layers = [];\n each(this.boxes, (box)=>{\n if (noArea && box.position === 'chartArea') {\n return;\n }\n if (box.configure) {\n box.configure();\n }\n this._layers.push(...box._layers());\n }, this);\n this._layers.forEach((item, index)=>{\n item._idx = index;\n });\n this.notifyPlugins('afterLayout');\n }\n _updateDatasets(mode) {\n if (this.notifyPlugins('beforeDatasetsUpdate', {\n mode,\n cancelable: true\n }) === false) {\n return;\n }\n for(let i = 0, ilen = this.data.datasets.length; i < ilen; ++i){\n this.getDatasetMeta(i).controller.configure();\n }\n for(let i1 = 0, ilen1 = this.data.datasets.length; i1 < ilen1; ++i1){\n this._updateDataset(i1, isFunction(mode) ? mode({\n datasetIndex: i1\n }) : mode);\n }\n this.notifyPlugins('afterDatasetsUpdate', {\n mode\n });\n }\n _updateDataset(index, mode) {\n const meta = this.getDatasetMeta(index);\n const args = {\n meta,\n index,\n mode,\n cancelable: true\n };\n if (this.notifyPlugins('beforeDatasetUpdate', args) === false) {\n return;\n }\n meta.controller._update(mode);\n args.cancelable = false;\n this.notifyPlugins('afterDatasetUpdate', args);\n }\n render() {\n if (this.notifyPlugins('beforeRender', {\n cancelable: true\n }) === false) {\n return;\n }\n if (animator.has(this)) {\n if (this.attached && !animator.running(this)) {\n animator.start(this);\n }\n } else {\n this.draw();\n onAnimationsComplete({\n chart: this\n });\n }\n }\n draw() {\n let i;\n if (this._resizeBeforeDraw) {\n const { width , height } = this._resizeBeforeDraw;\n this._resize(width, height);\n this._resizeBeforeDraw = null;\n }\n this.clear();\n if (this.width <= 0 || this.height <= 0) {\n return;\n }\n if (this.notifyPlugins('beforeDraw', {\n cancelable: true\n }) === false) {\n return;\n }\n const layers = this._layers;\n for(i = 0; i < layers.length && layers[i].z <= 0; ++i){\n layers[i].draw(this.chartArea);\n }\n this._drawDatasets();\n for(; i < layers.length; ++i){\n layers[i].draw(this.chartArea);\n }\n this.notifyPlugins('afterDraw');\n }\n _getSortedDatasetMetas(filterVisible) {\n const metasets = this._sortedMetasets;\n const result = [];\n let i, ilen;\n for(i = 0, ilen = metasets.length; i < ilen; ++i){\n const meta = metasets[i];\n if (!filterVisible || meta.visible) {\n result.push(meta);\n }\n }\n return result;\n }\n getSortedVisibleDatasetMetas() {\n return this._getSortedDatasetMetas(true);\n }\n _drawDatasets() {\n if (this.notifyPlugins('beforeDatasetsDraw', {\n cancelable: true\n }) === false) {\n return;\n }\n const metasets = this.getSortedVisibleDatasetMetas();\n for(let i = metasets.length - 1; i >= 0; --i){\n this._drawDataset(metasets[i]);\n }\n this.notifyPlugins('afterDatasetsDraw');\n }\n _drawDataset(meta) {\n const ctx = this.ctx;\n const clip = meta._clip;\n const useClip = !clip.disabled;\n const area = getDatasetArea(meta) || this.chartArea;\n const args = {\n meta,\n index: meta.index,\n cancelable: true\n };\n if (this.notifyPlugins('beforeDatasetDraw', args) === false) {\n return;\n }\n if (useClip) {\n clipArea(ctx, {\n left: clip.left === false ? 0 : area.left - clip.left,\n right: clip.right === false ? this.width : area.right + clip.right,\n top: clip.top === false ? 0 : area.top - clip.top,\n bottom: clip.bottom === false ? this.height : area.bottom + clip.bottom\n });\n }\n meta.controller.draw();\n if (useClip) {\n unclipArea(ctx);\n }\n args.cancelable = false;\n this.notifyPlugins('afterDatasetDraw', args);\n }\n isPointInArea(point) {\n return _isPointInArea(point, this.chartArea, this._minPadding);\n }\n getElementsAtEventForMode(e, mode, options, useFinalPosition) {\n const method = Interaction.modes[mode];\n if (typeof method === 'function') {\n return method(this, e, options, useFinalPosition);\n }\n return [];\n }\n getDatasetMeta(datasetIndex) {\n const dataset = this.data.datasets[datasetIndex];\n const metasets = this._metasets;\n let meta = metasets.filter((x)=>x && x._dataset === dataset).pop();\n if (!meta) {\n meta = {\n type: null,\n data: [],\n dataset: null,\n controller: null,\n hidden: null,\n xAxisID: null,\n yAxisID: null,\n order: dataset && dataset.order || 0,\n index: datasetIndex,\n _dataset: dataset,\n _parsed: [],\n _sorted: false\n };\n metasets.push(meta);\n }\n return meta;\n }\n getContext() {\n return this.$context || (this.$context = createContext(null, {\n chart: this,\n type: 'chart'\n }));\n }\n getVisibleDatasetCount() {\n return this.getSortedVisibleDatasetMetas().length;\n }\n isDatasetVisible(datasetIndex) {\n const dataset = this.data.datasets[datasetIndex];\n if (!dataset) {\n return false;\n }\n const meta = this.getDatasetMeta(datasetIndex);\n return typeof meta.hidden === 'boolean' ? !meta.hidden : !dataset.hidden;\n }\n setDatasetVisibility(datasetIndex, visible) {\n const meta = this.getDatasetMeta(datasetIndex);\n meta.hidden = !visible;\n }\n toggleDataVisibility(index) {\n this._hiddenIndices[index] = !this._hiddenIndices[index];\n }\n getDataVisibility(index) {\n return !this._hiddenIndices[index];\n }\n _updateVisibility(datasetIndex, dataIndex, visible) {\n const mode = visible ? 'show' : 'hide';\n const meta = this.getDatasetMeta(datasetIndex);\n const anims = meta.controller._resolveAnimations(undefined, mode);\n if (defined(dataIndex)) {\n meta.data[dataIndex].hidden = !visible;\n this.update();\n } else {\n this.setDatasetVisibility(datasetIndex, visible);\n anims.update(meta, {\n visible\n });\n this.update((ctx)=>ctx.datasetIndex === datasetIndex ? mode : undefined);\n }\n }\n hide(datasetIndex, dataIndex) {\n this._updateVisibility(datasetIndex, dataIndex, false);\n }\n show(datasetIndex, dataIndex) {\n this._updateVisibility(datasetIndex, dataIndex, true);\n }\n _destroyDatasetMeta(datasetIndex) {\n const meta = this._metasets[datasetIndex];\n if (meta && meta.controller) {\n meta.controller._destroy();\n }\n delete this._metasets[datasetIndex];\n }\n _stop() {\n let i, ilen;\n this.stop();\n animator.remove(this);\n for(i = 0, ilen = this.data.datasets.length; i < ilen; ++i){\n this._destroyDatasetMeta(i);\n }\n }\n destroy() {\n this.notifyPlugins('beforeDestroy');\n const { canvas , ctx } = this;\n this._stop();\n this.config.clearCache();\n if (canvas) {\n this.unbindEvents();\n clearCanvas(canvas, ctx);\n this.platform.releaseContext(ctx);\n this.canvas = null;\n this.ctx = null;\n }\n delete instances[this.id];\n this.notifyPlugins('afterDestroy');\n }\n toBase64Image(...args) {\n return this.canvas.toDataURL(...args);\n }\n bindEvents() {\n this.bindUserEvents();\n if (this.options.responsive) {\n this.bindResponsiveEvents();\n } else {\n this.attached = true;\n }\n }\n bindUserEvents() {\n const listeners = this._listeners;\n const platform = this.platform;\n const _add = (type, listener)=>{\n platform.addEventListener(this, type, listener);\n listeners[type] = listener;\n };\n const listener = (e, x, y)=>{\n e.offsetX = x;\n e.offsetY = y;\n this._eventHandler(e);\n };\n each(this.options.events, (type)=>_add(type, listener));\n }\n bindResponsiveEvents() {\n if (!this._responsiveListeners) {\n this._responsiveListeners = {};\n }\n const listeners = this._responsiveListeners;\n const platform = this.platform;\n const _add = (type, listener)=>{\n platform.addEventListener(this, type, listener);\n listeners[type] = listener;\n };\n const _remove = (type, listener)=>{\n if (listeners[type]) {\n platform.removeEventListener(this, type, listener);\n delete listeners[type];\n }\n };\n const listener = (width, height)=>{\n if (this.canvas) {\n this.resize(width, height);\n }\n };\n let detached;\n const attached = ()=>{\n _remove('attach', attached);\n this.attached = true;\n this.resize();\n _add('resize', listener);\n _add('detach', detached);\n };\n detached = ()=>{\n this.attached = false;\n _remove('resize', listener);\n this._stop();\n this._resize(0, 0);\n _add('attach', attached);\n };\n if (platform.isAttached(this.canvas)) {\n attached();\n } else {\n detached();\n }\n }\n unbindEvents() {\n each(this._listeners, (listener, type)=>{\n this.platform.removeEventListener(this, type, listener);\n });\n this._listeners = {};\n each(this._responsiveListeners, (listener, type)=>{\n this.platform.removeEventListener(this, type, listener);\n });\n this._responsiveListeners = undefined;\n }\n updateHoverStyle(items, mode, enabled) {\n const prefix = enabled ? 'set' : 'remove';\n let meta, item, i, ilen;\n if (mode === 'dataset') {\n meta = this.getDatasetMeta(items[0].datasetIndex);\n meta.controller['_' + prefix + 'DatasetHoverStyle']();\n }\n for(i = 0, ilen = items.length; i < ilen; ++i){\n item = items[i];\n const controller = item && this.getDatasetMeta(item.datasetIndex).controller;\n if (controller) {\n controller[prefix + 'HoverStyle'](item.element, item.datasetIndex, item.index);\n }\n }\n }\n getActiveElements() {\n return this._active || [];\n }\n setActiveElements(activeElements) {\n const lastActive = this._active || [];\n const active = activeElements.map(({ datasetIndex , index })=>{\n const meta = this.getDatasetMeta(datasetIndex);\n if (!meta) {\n throw new Error('No dataset found at index ' + datasetIndex);\n }\n return {\n datasetIndex,\n element: meta.data[index],\n index\n };\n });\n const changed = !_elementsEqual(active, lastActive);\n if (changed) {\n this._active = active;\n this._lastEvent = null;\n this._updateHoverStyles(active, lastActive);\n }\n }\n notifyPlugins(hook, args, filter) {\n return this._plugins.notify(this, hook, args, filter);\n }\n isPluginEnabled(pluginId) {\n return this._plugins._cache.filter((p)=>p.plugin.id === pluginId).length === 1;\n }\n _updateHoverStyles(active, lastActive, replay) {\n const hoverOptions = this.options.hover;\n const diff = (a, b)=>a.filter((x)=>!b.some((y)=>x.datasetIndex === y.datasetIndex && x.index === y.index));\n const deactivated = diff(lastActive, active);\n const activated = replay ? active : diff(active, lastActive);\n if (deactivated.length) {\n this.updateHoverStyle(deactivated, hoverOptions.mode, false);\n }\n if (activated.length && hoverOptions.mode) {\n this.updateHoverStyle(activated, hoverOptions.mode, true);\n }\n }\n _eventHandler(e, replay) {\n const args = {\n event: e,\n replay,\n cancelable: true,\n inChartArea: this.isPointInArea(e)\n };\n const eventFilter = (plugin)=>(plugin.options.events || this.options.events).includes(e.native.type);\n if (this.notifyPlugins('beforeEvent', args, eventFilter) === false) {\n return;\n }\n const changed = this._handleEvent(e, replay, args.inChartArea);\n args.cancelable = false;\n this.notifyPlugins('afterEvent', args, eventFilter);\n if (changed || args.changed) {\n this.render();\n }\n return this;\n }\n _handleEvent(e, replay, inChartArea) {\n const { _active: lastActive = [] , options } = this;\n const useFinalPosition = replay;\n const active = this._getActiveElements(e, lastActive, inChartArea, useFinalPosition);\n const isClick = _isClickEvent(e);\n const lastEvent = determineLastEvent(e, this._lastEvent, inChartArea, isClick);\n if (inChartArea) {\n this._lastEvent = null;\n callback(options.onHover, [\n e,\n active,\n this\n ], this);\n if (isClick) {\n callback(options.onClick, [\n e,\n active,\n this\n ], this);\n }\n }\n const changed = !_elementsEqual(active, lastActive);\n if (changed || replay) {\n this._active = active;\n this._updateHoverStyles(active, lastActive, replay);\n }\n this._lastEvent = lastEvent;\n return changed;\n }\n _getActiveElements(e, lastActive, inChartArea, useFinalPosition) {\n if (e.type === 'mouseout') {\n return [];\n }\n if (!inChartArea) {\n return lastActive;\n }\n const hoverOptions = this.options.hover;\n return this.getElementsAtEventForMode(e, hoverOptions.mode, hoverOptions, useFinalPosition);\n }\n}\nfunction invalidatePlugins() {\n return each(Chart.instances, (chart)=>chart._plugins.invalidate());\n}\n\nfunction clipArc(ctx, element, endAngle) {\n const { startAngle , pixelMargin , x , y , outerRadius , innerRadius } = element;\n let angleMargin = pixelMargin / outerRadius;\n // Draw an inner border by clipping the arc and drawing a double-width border\n // Enlarge the clipping arc by 0.33 pixels to eliminate glitches between borders\n ctx.beginPath();\n ctx.arc(x, y, outerRadius, startAngle - angleMargin, endAngle + angleMargin);\n if (innerRadius > pixelMargin) {\n angleMargin = pixelMargin / innerRadius;\n ctx.arc(x, y, innerRadius, endAngle + angleMargin, startAngle - angleMargin, true);\n } else {\n ctx.arc(x, y, pixelMargin, endAngle + HALF_PI, startAngle - HALF_PI);\n }\n ctx.closePath();\n ctx.clip();\n}\nfunction toRadiusCorners(value) {\n return _readValueToProps(value, [\n 'outerStart',\n 'outerEnd',\n 'innerStart',\n 'innerEnd'\n ]);\n}\n/**\n * Parse border radius from the provided options\n */ function parseBorderRadius$1(arc, innerRadius, outerRadius, angleDelta) {\n const o = toRadiusCorners(arc.options.borderRadius);\n const halfThickness = (outerRadius - innerRadius) / 2;\n const innerLimit = Math.min(halfThickness, angleDelta * innerRadius / 2);\n // Outer limits are complicated. We want to compute the available angular distance at\n // a radius of outerRadius - borderRadius because for small angular distances, this term limits.\n // We compute at r = outerRadius - borderRadius because this circle defines the center of the border corners.\n //\n // If the borderRadius is large, that value can become negative.\n // This causes the outer borders to lose their radius entirely, which is rather unexpected. To solve that, if borderRadius > outerRadius\n // we know that the thickness term will dominate and compute the limits at that point\n const computeOuterLimit = (val)=>{\n const outerArcLimit = (outerRadius - Math.min(halfThickness, val)) * angleDelta / 2;\n return _limitValue(val, 0, Math.min(halfThickness, outerArcLimit));\n };\n return {\n outerStart: computeOuterLimit(o.outerStart),\n outerEnd: computeOuterLimit(o.outerEnd),\n innerStart: _limitValue(o.innerStart, 0, innerLimit),\n innerEnd: _limitValue(o.innerEnd, 0, innerLimit)\n };\n}\n/**\n * Convert (r, 𝜃) to (x, y)\n */ function rThetaToXY(r, theta, x, y) {\n return {\n x: x + r * Math.cos(theta),\n y: y + r * Math.sin(theta)\n };\n}\n/**\n * Path the arc, respecting border radius by separating into left and right halves.\n *\n * Start End\n *\n * 1--->a--->2 Outer\n * / \\\n * 8 3\n * | |\n * | |\n * 7 4\n * \\ /\n * 6<---b<---5 Inner\n */ function pathArc(ctx, element, offset, spacing, end, circular) {\n const { x , y , startAngle: start , pixelMargin , innerRadius: innerR } = element;\n const outerRadius = Math.max(element.outerRadius + spacing + offset - pixelMargin, 0);\n const innerRadius = innerR > 0 ? innerR + spacing + offset + pixelMargin : 0;\n let spacingOffset = 0;\n const alpha = end - start;\n if (spacing) {\n // When spacing is present, it is the same for all items\n // So we adjust the start and end angle of the arc such that\n // the distance is the same as it would be without the spacing\n const noSpacingInnerRadius = innerR > 0 ? innerR - spacing : 0;\n const noSpacingOuterRadius = outerRadius > 0 ? outerRadius - spacing : 0;\n const avNogSpacingRadius = (noSpacingInnerRadius + noSpacingOuterRadius) / 2;\n const adjustedAngle = avNogSpacingRadius !== 0 ? alpha * avNogSpacingRadius / (avNogSpacingRadius + spacing) : alpha;\n spacingOffset = (alpha - adjustedAngle) / 2;\n }\n const beta = Math.max(0.001, alpha * outerRadius - offset / PI) / outerRadius;\n const angleOffset = (alpha - beta) / 2;\n const startAngle = start + angleOffset + spacingOffset;\n const endAngle = end - angleOffset - spacingOffset;\n const { outerStart , outerEnd , innerStart , innerEnd } = parseBorderRadius$1(element, innerRadius, outerRadius, endAngle - startAngle);\n const outerStartAdjustedRadius = outerRadius - outerStart;\n const outerEndAdjustedRadius = outerRadius - outerEnd;\n const outerStartAdjustedAngle = startAngle + outerStart / outerStartAdjustedRadius;\n const outerEndAdjustedAngle = endAngle - outerEnd / outerEndAdjustedRadius;\n const innerStartAdjustedRadius = innerRadius + innerStart;\n const innerEndAdjustedRadius = innerRadius + innerEnd;\n const innerStartAdjustedAngle = startAngle + innerStart / innerStartAdjustedRadius;\n const innerEndAdjustedAngle = endAngle - innerEnd / innerEndAdjustedRadius;\n ctx.beginPath();\n if (circular) {\n // The first arc segments from point 1 to point a to point 2\n const outerMidAdjustedAngle = (outerStartAdjustedAngle + outerEndAdjustedAngle) / 2;\n ctx.arc(x, y, outerRadius, outerStartAdjustedAngle, outerMidAdjustedAngle);\n ctx.arc(x, y, outerRadius, outerMidAdjustedAngle, outerEndAdjustedAngle);\n // The corner segment from point 2 to point 3\n if (outerEnd > 0) {\n const pCenter = rThetaToXY(outerEndAdjustedRadius, outerEndAdjustedAngle, x, y);\n ctx.arc(pCenter.x, pCenter.y, outerEnd, outerEndAdjustedAngle, endAngle + HALF_PI);\n }\n // The line from point 3 to point 4\n const p4 = rThetaToXY(innerEndAdjustedRadius, endAngle, x, y);\n ctx.lineTo(p4.x, p4.y);\n // The corner segment from point 4 to point 5\n if (innerEnd > 0) {\n const pCenter1 = rThetaToXY(innerEndAdjustedRadius, innerEndAdjustedAngle, x, y);\n ctx.arc(pCenter1.x, pCenter1.y, innerEnd, endAngle + HALF_PI, innerEndAdjustedAngle + Math.PI);\n }\n // The inner arc from point 5 to point b to point 6\n const innerMidAdjustedAngle = (endAngle - innerEnd / innerRadius + (startAngle + innerStart / innerRadius)) / 2;\n ctx.arc(x, y, innerRadius, endAngle - innerEnd / innerRadius, innerMidAdjustedAngle, true);\n ctx.arc(x, y, innerRadius, innerMidAdjustedAngle, startAngle + innerStart / innerRadius, true);\n // The corner segment from point 6 to point 7\n if (innerStart > 0) {\n const pCenter2 = rThetaToXY(innerStartAdjustedRadius, innerStartAdjustedAngle, x, y);\n ctx.arc(pCenter2.x, pCenter2.y, innerStart, innerStartAdjustedAngle + Math.PI, startAngle - HALF_PI);\n }\n // The line from point 7 to point 8\n const p8 = rThetaToXY(outerStartAdjustedRadius, startAngle, x, y);\n ctx.lineTo(p8.x, p8.y);\n // The corner segment from point 8 to point 1\n if (outerStart > 0) {\n const pCenter3 = rThetaToXY(outerStartAdjustedRadius, outerStartAdjustedAngle, x, y);\n ctx.arc(pCenter3.x, pCenter3.y, outerStart, startAngle - HALF_PI, outerStartAdjustedAngle);\n }\n } else {\n ctx.moveTo(x, y);\n const outerStartX = Math.cos(outerStartAdjustedAngle) * outerRadius + x;\n const outerStartY = Math.sin(outerStartAdjustedAngle) * outerRadius + y;\n ctx.lineTo(outerStartX, outerStartY);\n const outerEndX = Math.cos(outerEndAdjustedAngle) * outerRadius + x;\n const outerEndY = Math.sin(outerEndAdjustedAngle) * outerRadius + y;\n ctx.lineTo(outerEndX, outerEndY);\n }\n ctx.closePath();\n}\nfunction drawArc(ctx, element, offset, spacing, circular) {\n const { fullCircles , startAngle , circumference } = element;\n let endAngle = element.endAngle;\n if (fullCircles) {\n pathArc(ctx, element, offset, spacing, endAngle, circular);\n for(let i = 0; i < fullCircles; ++i){\n ctx.fill();\n }\n if (!isNaN(circumference)) {\n endAngle = startAngle + (circumference % TAU || TAU);\n }\n }\n pathArc(ctx, element, offset, spacing, endAngle, circular);\n ctx.fill();\n return endAngle;\n}\nfunction drawBorder(ctx, element, offset, spacing, circular) {\n const { fullCircles , startAngle , circumference , options } = element;\n const { borderWidth , borderJoinStyle } = options;\n const inner = options.borderAlign === 'inner';\n if (!borderWidth) {\n return;\n }\n if (inner) {\n ctx.lineWidth = borderWidth * 2;\n ctx.lineJoin = borderJoinStyle || 'round';\n } else {\n ctx.lineWidth = borderWidth;\n ctx.lineJoin = borderJoinStyle || 'bevel';\n }\n let endAngle = element.endAngle;\n if (fullCircles) {\n pathArc(ctx, element, offset, spacing, endAngle, circular);\n for(let i = 0; i < fullCircles; ++i){\n ctx.stroke();\n }\n if (!isNaN(circumference)) {\n endAngle = startAngle + (circumference % TAU || TAU);\n }\n }\n if (inner) {\n clipArc(ctx, element, endAngle);\n }\n if (!fullCircles) {\n pathArc(ctx, element, offset, spacing, endAngle, circular);\n ctx.stroke();\n }\n}\nclass ArcElement extends Element {\n static id = 'arc';\n static defaults = {\n borderAlign: 'center',\n borderColor: '#fff',\n borderJoinStyle: undefined,\n borderRadius: 0,\n borderWidth: 2,\n offset: 0,\n spacing: 0,\n angle: undefined,\n circular: true\n };\n static defaultRoutes = {\n backgroundColor: 'backgroundColor'\n };\n constructor(cfg){\n super();\n this.options = undefined;\n this.circumference = undefined;\n this.startAngle = undefined;\n this.endAngle = undefined;\n this.innerRadius = undefined;\n this.outerRadius = undefined;\n this.pixelMargin = 0;\n this.fullCircles = 0;\n if (cfg) {\n Object.assign(this, cfg);\n }\n }\n inRange(chartX, chartY, useFinalPosition) {\n const point = this.getProps([\n 'x',\n 'y'\n ], useFinalPosition);\n const { angle , distance } = getAngleFromPoint(point, {\n x: chartX,\n y: chartY\n });\n const { startAngle , endAngle , innerRadius , outerRadius , circumference } = this.getProps([\n 'startAngle',\n 'endAngle',\n 'innerRadius',\n 'outerRadius',\n 'circumference'\n ], useFinalPosition);\n const rAdjust = this.options.spacing / 2;\n const _circumference = valueOrDefault(circumference, endAngle - startAngle);\n const betweenAngles = _circumference >= TAU || _angleBetween(angle, startAngle, endAngle);\n const withinRadius = _isBetween(distance, innerRadius + rAdjust, outerRadius + rAdjust);\n return betweenAngles && withinRadius;\n }\n getCenterPoint(useFinalPosition) {\n const { x , y , startAngle , endAngle , innerRadius , outerRadius } = this.getProps([\n 'x',\n 'y',\n 'startAngle',\n 'endAngle',\n 'innerRadius',\n 'outerRadius',\n 'circumference'\n ], useFinalPosition);\n const { offset , spacing } = this.options;\n const halfAngle = (startAngle + endAngle) / 2;\n const halfRadius = (innerRadius + outerRadius + spacing + offset) / 2;\n return {\n x: x + Math.cos(halfAngle) * halfRadius,\n y: y + Math.sin(halfAngle) * halfRadius\n };\n }\n tooltipPosition(useFinalPosition) {\n return this.getCenterPoint(useFinalPosition);\n }\n draw(ctx) {\n const { options , circumference } = this;\n const offset = (options.offset || 0) / 4;\n const spacing = (options.spacing || 0) / 2;\n const circular = options.circular;\n this.pixelMargin = options.borderAlign === 'inner' ? 0.33 : 0;\n this.fullCircles = circumference > TAU ? Math.floor(circumference / TAU) : 0;\n if (circumference === 0 || this.innerRadius < 0 || this.outerRadius < 0) {\n return;\n }\n ctx.save();\n const halfAngle = (this.startAngle + this.endAngle) / 2;\n ctx.translate(Math.cos(halfAngle) * offset, Math.sin(halfAngle) * offset);\n const fix = 1 - Math.sin(Math.min(PI, circumference || 0));\n const radiusOffset = offset * fix;\n ctx.fillStyle = options.backgroundColor;\n ctx.strokeStyle = options.borderColor;\n drawArc(ctx, this, radiusOffset, spacing, circular);\n drawBorder(ctx, this, radiusOffset, spacing, circular);\n ctx.restore();\n }\n}\n\nfunction setStyle(ctx, options, style = options) {\n ctx.lineCap = valueOrDefault(style.borderCapStyle, options.borderCapStyle);\n ctx.setLineDash(valueOrDefault(style.borderDash, options.borderDash));\n ctx.lineDashOffset = valueOrDefault(style.borderDashOffset, options.borderDashOffset);\n ctx.lineJoin = valueOrDefault(style.borderJoinStyle, options.borderJoinStyle);\n ctx.lineWidth = valueOrDefault(style.borderWidth, options.borderWidth);\n ctx.strokeStyle = valueOrDefault(style.borderColor, options.borderColor);\n}\nfunction lineTo(ctx, previous, target) {\n ctx.lineTo(target.x, target.y);\n}\nfunction getLineMethod(options) {\n if (options.stepped) {\n return _steppedLineTo;\n }\n if (options.tension || options.cubicInterpolationMode === 'monotone') {\n return _bezierCurveTo;\n }\n return lineTo;\n}\nfunction pathVars(points, segment, params = {}) {\n const count = points.length;\n const { start: paramsStart = 0 , end: paramsEnd = count - 1 } = params;\n const { start: segmentStart , end: segmentEnd } = segment;\n const start = Math.max(paramsStart, segmentStart);\n const end = Math.min(paramsEnd, segmentEnd);\n const outside = paramsStart < segmentStart && paramsEnd < segmentStart || paramsStart > segmentEnd && paramsEnd > segmentEnd;\n return {\n count,\n start,\n loop: segment.loop,\n ilen: end < start && !outside ? count + end - start : end - start\n };\n}\n function pathSegment(ctx, line, segment, params) {\n const { points , options } = line;\n const { count , start , loop , ilen } = pathVars(points, segment, params);\n const lineMethod = getLineMethod(options);\n let { move =true , reverse } = params || {};\n let i, point, prev;\n for(i = 0; i <= ilen; ++i){\n point = points[(start + (reverse ? ilen - i : i)) % count];\n if (point.skip) {\n continue;\n } else if (move) {\n ctx.moveTo(point.x, point.y);\n move = false;\n } else {\n lineMethod(ctx, prev, point, reverse, options.stepped);\n }\n prev = point;\n }\n if (loop) {\n point = points[(start + (reverse ? ilen : 0)) % count];\n lineMethod(ctx, prev, point, reverse, options.stepped);\n }\n return !!loop;\n}\n function fastPathSegment(ctx, line, segment, params) {\n const points = line.points;\n const { count , start , ilen } = pathVars(points, segment, params);\n const { move =true , reverse } = params || {};\n let avgX = 0;\n let countX = 0;\n let i, point, prevX, minY, maxY, lastY;\n const pointIndex = (index)=>(start + (reverse ? ilen - index : index)) % count;\n const drawX = ()=>{\n if (minY !== maxY) {\n ctx.lineTo(avgX, maxY);\n ctx.lineTo(avgX, minY);\n ctx.lineTo(avgX, lastY);\n }\n };\n if (move) {\n point = points[pointIndex(0)];\n ctx.moveTo(point.x, point.y);\n }\n for(i = 0; i <= ilen; ++i){\n point = points[pointIndex(i)];\n if (point.skip) {\n continue;\n }\n const x = point.x;\n const y = point.y;\n const truncX = x | 0;\n if (truncX === prevX) {\n if (y < minY) {\n minY = y;\n } else if (y > maxY) {\n maxY = y;\n }\n avgX = (countX * avgX + x) / ++countX;\n } else {\n drawX();\n ctx.lineTo(x, y);\n prevX = truncX;\n countX = 0;\n minY = maxY = y;\n }\n lastY = y;\n }\n drawX();\n}\n function _getSegmentMethod(line) {\n const opts = line.options;\n const borderDash = opts.borderDash && opts.borderDash.length;\n const useFastPath = !line._decimated && !line._loop && !opts.tension && opts.cubicInterpolationMode !== 'monotone' && !opts.stepped && !borderDash;\n return useFastPath ? fastPathSegment : pathSegment;\n}\n function _getInterpolationMethod(options) {\n if (options.stepped) {\n return _steppedInterpolation;\n }\n if (options.tension || options.cubicInterpolationMode === 'monotone') {\n return _bezierInterpolation;\n }\n return _pointInLine;\n}\nfunction strokePathWithCache(ctx, line, start, count) {\n let path = line._path;\n if (!path) {\n path = line._path = new Path2D();\n if (line.path(path, start, count)) {\n path.closePath();\n }\n }\n setStyle(ctx, line.options);\n ctx.stroke(path);\n}\nfunction strokePathDirect(ctx, line, start, count) {\n const { segments , options } = line;\n const segmentMethod = _getSegmentMethod(line);\n for (const segment of segments){\n setStyle(ctx, options, segment.style);\n ctx.beginPath();\n if (segmentMethod(ctx, line, segment, {\n start,\n end: start + count - 1\n })) {\n ctx.closePath();\n }\n ctx.stroke();\n }\n}\nconst usePath2D = typeof Path2D === 'function';\nfunction draw(ctx, line, start, count) {\n if (usePath2D && !line.options.segment) {\n strokePathWithCache(ctx, line, start, count);\n } else {\n strokePathDirect(ctx, line, start, count);\n }\n}\nclass LineElement extends Element {\n static id = 'line';\n static defaults = {\n borderCapStyle: 'butt',\n borderDash: [],\n borderDashOffset: 0,\n borderJoinStyle: 'miter',\n borderWidth: 3,\n capBezierPoints: true,\n cubicInterpolationMode: 'default',\n fill: false,\n spanGaps: false,\n stepped: false,\n tension: 0\n };\n static defaultRoutes = {\n backgroundColor: 'backgroundColor',\n borderColor: 'borderColor'\n };\n static descriptors = {\n _scriptable: true,\n _indexable: (name)=>name !== 'borderDash' && name !== 'fill'\n };\n constructor(cfg){\n super();\n this.animated = true;\n this.options = undefined;\n this._chart = undefined;\n this._loop = undefined;\n this._fullLoop = undefined;\n this._path = undefined;\n this._points = undefined;\n this._segments = undefined;\n this._decimated = false;\n this._pointsUpdated = false;\n this._datasetIndex = undefined;\n if (cfg) {\n Object.assign(this, cfg);\n }\n }\n updateControlPoints(chartArea, indexAxis) {\n const options = this.options;\n if ((options.tension || options.cubicInterpolationMode === 'monotone') && !options.stepped && !this._pointsUpdated) {\n const loop = options.spanGaps ? this._loop : this._fullLoop;\n _updateBezierControlPoints(this._points, options, chartArea, loop, indexAxis);\n this._pointsUpdated = true;\n }\n }\n set points(points) {\n this._points = points;\n delete this._segments;\n delete this._path;\n this._pointsUpdated = false;\n }\n get points() {\n return this._points;\n }\n get segments() {\n return this._segments || (this._segments = _computeSegments(this, this.options.segment));\n }\n first() {\n const segments = this.segments;\n const points = this.points;\n return segments.length && points[segments[0].start];\n }\n last() {\n const segments = this.segments;\n const points = this.points;\n const count = segments.length;\n return count && points[segments[count - 1].end];\n }\n interpolate(point, property) {\n const options = this.options;\n const value = point[property];\n const points = this.points;\n const segments = _boundSegments(this, {\n property,\n start: value,\n end: value\n });\n if (!segments.length) {\n return;\n }\n const result = [];\n const _interpolate = _getInterpolationMethod(options);\n let i, ilen;\n for(i = 0, ilen = segments.length; i < ilen; ++i){\n const { start , end } = segments[i];\n const p1 = points[start];\n const p2 = points[end];\n if (p1 === p2) {\n result.push(p1);\n continue;\n }\n const t = Math.abs((value - p1[property]) / (p2[property] - p1[property]));\n const interpolated = _interpolate(p1, p2, t, options.stepped);\n interpolated[property] = point[property];\n result.push(interpolated);\n }\n return result.length === 1 ? result[0] : result;\n }\n pathSegment(ctx, segment, params) {\n const segmentMethod = _getSegmentMethod(this);\n return segmentMethod(ctx, this, segment, params);\n }\n path(ctx, start, count) {\n const segments = this.segments;\n const segmentMethod = _getSegmentMethod(this);\n let loop = this._loop;\n start = start || 0;\n count = count || this.points.length - start;\n for (const segment of segments){\n loop &= segmentMethod(ctx, this, segment, {\n start,\n end: start + count - 1\n });\n }\n return !!loop;\n }\n draw(ctx, chartArea, start, count) {\n const options = this.options || {};\n const points = this.points || [];\n if (points.length && options.borderWidth) {\n ctx.save();\n draw(ctx, this, start, count);\n ctx.restore();\n }\n if (this.animated) {\n this._pointsUpdated = false;\n this._path = undefined;\n }\n }\n}\n\nfunction inRange$1(el, pos, axis, useFinalPosition) {\n const options = el.options;\n const { [axis]: value } = el.getProps([\n axis\n ], useFinalPosition);\n return Math.abs(pos - value) < options.radius + options.hitRadius;\n}\nclass PointElement extends Element {\n static id = 'point';\n /**\n * @type {any}\n */ static defaults = {\n borderWidth: 1,\n hitRadius: 1,\n hoverBorderWidth: 1,\n hoverRadius: 4,\n pointStyle: 'circle',\n radius: 3,\n rotation: 0\n };\n /**\n * @type {any}\n */ static defaultRoutes = {\n backgroundColor: 'backgroundColor',\n borderColor: 'borderColor'\n };\n constructor(cfg){\n super();\n this.options = undefined;\n this.parsed = undefined;\n this.skip = undefined;\n this.stop = undefined;\n if (cfg) {\n Object.assign(this, cfg);\n }\n }\n inRange(mouseX, mouseY, useFinalPosition) {\n const options = this.options;\n const { x , y } = this.getProps([\n 'x',\n 'y'\n ], useFinalPosition);\n return Math.pow(mouseX - x, 2) + Math.pow(mouseY - y, 2) < Math.pow(options.hitRadius + options.radius, 2);\n }\n inXRange(mouseX, useFinalPosition) {\n return inRange$1(this, mouseX, 'x', useFinalPosition);\n }\n inYRange(mouseY, useFinalPosition) {\n return inRange$1(this, mouseY, 'y', useFinalPosition);\n }\n getCenterPoint(useFinalPosition) {\n const { x , y } = this.getProps([\n 'x',\n 'y'\n ], useFinalPosition);\n return {\n x,\n y\n };\n }\n size(options) {\n options = options || this.options || {};\n let radius = options.radius || 0;\n radius = Math.max(radius, radius && options.hoverRadius || 0);\n const borderWidth = radius && options.borderWidth || 0;\n return (radius + borderWidth) * 2;\n }\n draw(ctx, area) {\n const options = this.options;\n if (this.skip || options.radius < 0.1 || !_isPointInArea(this, area, this.size(options) / 2)) {\n return;\n }\n ctx.strokeStyle = options.borderColor;\n ctx.lineWidth = options.borderWidth;\n ctx.fillStyle = options.backgroundColor;\n drawPoint(ctx, options, this.x, this.y);\n }\n getRange() {\n const options = this.options || {};\n // @ts-expect-error Fallbacks should never be hit in practice\n return options.radius + options.hitRadius;\n }\n}\n\nfunction getBarBounds(bar, useFinalPosition) {\n const { x , y , base , width , height } = bar.getProps([\n 'x',\n 'y',\n 'base',\n 'width',\n 'height'\n ], useFinalPosition);\n let left, right, top, bottom, half;\n if (bar.horizontal) {\n half = height / 2;\n left = Math.min(x, base);\n right = Math.max(x, base);\n top = y - half;\n bottom = y + half;\n } else {\n half = width / 2;\n left = x - half;\n right = x + half;\n top = Math.min(y, base);\n bottom = Math.max(y, base);\n }\n return {\n left,\n top,\n right,\n bottom\n };\n}\nfunction skipOrLimit(skip, value, min, max) {\n return skip ? 0 : _limitValue(value, min, max);\n}\nfunction parseBorderWidth(bar, maxW, maxH) {\n const value = bar.options.borderWidth;\n const skip = bar.borderSkipped;\n const o = toTRBL(value);\n return {\n t: skipOrLimit(skip.top, o.top, 0, maxH),\n r: skipOrLimit(skip.right, o.right, 0, maxW),\n b: skipOrLimit(skip.bottom, o.bottom, 0, maxH),\n l: skipOrLimit(skip.left, o.left, 0, maxW)\n };\n}\nfunction parseBorderRadius(bar, maxW, maxH) {\n const { enableBorderRadius } = bar.getProps([\n 'enableBorderRadius'\n ]);\n const value = bar.options.borderRadius;\n const o = toTRBLCorners(value);\n const maxR = Math.min(maxW, maxH);\n const skip = bar.borderSkipped;\n const enableBorder = enableBorderRadius || isObject(value);\n return {\n topLeft: skipOrLimit(!enableBorder || skip.top || skip.left, o.topLeft, 0, maxR),\n topRight: skipOrLimit(!enableBorder || skip.top || skip.right, o.topRight, 0, maxR),\n bottomLeft: skipOrLimit(!enableBorder || skip.bottom || skip.left, o.bottomLeft, 0, maxR),\n bottomRight: skipOrLimit(!enableBorder || skip.bottom || skip.right, o.bottomRight, 0, maxR)\n };\n}\nfunction boundingRects(bar) {\n const bounds = getBarBounds(bar);\n const width = bounds.right - bounds.left;\n const height = bounds.bottom - bounds.top;\n const border = parseBorderWidth(bar, width / 2, height / 2);\n const radius = parseBorderRadius(bar, width / 2, height / 2);\n return {\n outer: {\n x: bounds.left,\n y: bounds.top,\n w: width,\n h: height,\n radius\n },\n inner: {\n x: bounds.left + border.l,\n y: bounds.top + border.t,\n w: width - border.l - border.r,\n h: height - border.t - border.b,\n radius: {\n topLeft: Math.max(0, radius.topLeft - Math.max(border.t, border.l)),\n topRight: Math.max(0, radius.topRight - Math.max(border.t, border.r)),\n bottomLeft: Math.max(0, radius.bottomLeft - Math.max(border.b, border.l)),\n bottomRight: Math.max(0, radius.bottomRight - Math.max(border.b, border.r))\n }\n }\n };\n}\nfunction inRange(bar, x, y, useFinalPosition) {\n const skipX = x === null;\n const skipY = y === null;\n const skipBoth = skipX && skipY;\n const bounds = bar && !skipBoth && getBarBounds(bar, useFinalPosition);\n return bounds && (skipX || _isBetween(x, bounds.left, bounds.right)) && (skipY || _isBetween(y, bounds.top, bounds.bottom));\n}\nfunction hasRadius(radius) {\n return radius.topLeft || radius.topRight || radius.bottomLeft || radius.bottomRight;\n}\n function addNormalRectPath(ctx, rect) {\n ctx.rect(rect.x, rect.y, rect.w, rect.h);\n}\nfunction inflateRect(rect, amount, refRect = {}) {\n const x = rect.x !== refRect.x ? -amount : 0;\n const y = rect.y !== refRect.y ? -amount : 0;\n const w = (rect.x + rect.w !== refRect.x + refRect.w ? amount : 0) - x;\n const h = (rect.y + rect.h !== refRect.y + refRect.h ? amount : 0) - y;\n return {\n x: rect.x + x,\n y: rect.y + y,\n w: rect.w + w,\n h: rect.h + h,\n radius: rect.radius\n };\n}\nclass BarElement extends Element {\n static id = 'bar';\n static defaults = {\n borderSkipped: 'start',\n borderWidth: 0,\n borderRadius: 0,\n inflateAmount: 'auto',\n pointStyle: undefined\n };\n static defaultRoutes = {\n backgroundColor: 'backgroundColor',\n borderColor: 'borderColor'\n };\n constructor(cfg){\n super();\n this.options = undefined;\n this.horizontal = undefined;\n this.base = undefined;\n this.width = undefined;\n this.height = undefined;\n this.inflateAmount = undefined;\n if (cfg) {\n Object.assign(this, cfg);\n }\n }\n draw(ctx) {\n const { inflateAmount , options: { borderColor , backgroundColor } } = this;\n const { inner , outer } = boundingRects(this);\n const addRectPath = hasRadius(outer.radius) ? addRoundedRectPath : addNormalRectPath;\n ctx.save();\n if (outer.w !== inner.w || outer.h !== inner.h) {\n ctx.beginPath();\n addRectPath(ctx, inflateRect(outer, inflateAmount, inner));\n ctx.clip();\n addRectPath(ctx, inflateRect(inner, -inflateAmount, outer));\n ctx.fillStyle = borderColor;\n ctx.fill('evenodd');\n }\n ctx.beginPath();\n addRectPath(ctx, inflateRect(inner, inflateAmount));\n ctx.fillStyle = backgroundColor;\n ctx.fill();\n ctx.restore();\n }\n inRange(mouseX, mouseY, useFinalPosition) {\n return inRange(this, mouseX, mouseY, useFinalPosition);\n }\n inXRange(mouseX, useFinalPosition) {\n return inRange(this, mouseX, null, useFinalPosition);\n }\n inYRange(mouseY, useFinalPosition) {\n return inRange(this, null, mouseY, useFinalPosition);\n }\n getCenterPoint(useFinalPosition) {\n const { x , y , base , horizontal } = this.getProps([\n 'x',\n 'y',\n 'base',\n 'horizontal'\n ], useFinalPosition);\n return {\n x: horizontal ? (x + base) / 2 : x,\n y: horizontal ? y : (y + base) / 2\n };\n }\n getRange(axis) {\n return axis === 'x' ? this.width / 2 : this.height / 2;\n }\n}\n\nvar elements = /*#__PURE__*/Object.freeze({\n__proto__: null,\nArcElement: ArcElement,\nLineElement: LineElement,\nPointElement: PointElement,\nBarElement: BarElement\n});\n\nconst BORDER_COLORS = [\n 'rgb(54, 162, 235)',\n 'rgb(255, 99, 132)',\n 'rgb(255, 159, 64)',\n 'rgb(255, 205, 86)',\n 'rgb(75, 192, 192)',\n 'rgb(153, 102, 255)',\n 'rgb(201, 203, 207)' // grey\n];\n// Border colors with 50% transparency\nconst BACKGROUND_COLORS = /* #__PURE__ */ BORDER_COLORS.map((color)=>color.replace('rgb(', 'rgba(').replace(')', ', 0.5)'));\nfunction getBorderColor(i) {\n return BORDER_COLORS[i % BORDER_COLORS.length];\n}\nfunction getBackgroundColor(i) {\n return BACKGROUND_COLORS[i % BACKGROUND_COLORS.length];\n}\nfunction colorizeDefaultDataset(dataset, i) {\n dataset.borderColor = getBorderColor(i);\n dataset.backgroundColor = getBackgroundColor(i);\n return ++i;\n}\nfunction colorizeDoughnutDataset(dataset, i) {\n dataset.backgroundColor = dataset.data.map(()=>getBorderColor(i++));\n return i;\n}\nfunction colorizePolarAreaDataset(dataset, i) {\n dataset.backgroundColor = dataset.data.map(()=>getBackgroundColor(i++));\n return i;\n}\nfunction getColorizer(chart) {\n let i = 0;\n return (dataset, datasetIndex)=>{\n const controller = chart.getDatasetMeta(datasetIndex).controller;\n if (controller instanceof DoughnutController) {\n i = colorizeDoughnutDataset(dataset, i);\n } else if (controller instanceof PolarAreaController) {\n i = colorizePolarAreaDataset(dataset, i);\n } else if (controller) {\n i = colorizeDefaultDataset(dataset, i);\n }\n };\n}\nfunction containsColorsDefinitions(descriptors) {\n let k;\n for(k in descriptors){\n if (descriptors[k].borderColor || descriptors[k].backgroundColor) {\n return true;\n }\n }\n return false;\n}\nvar plugin_colors = {\n id: 'colors',\n defaults: {\n enabled: true,\n forceOverride: false\n },\n beforeLayout (chart, _args, options) {\n if (!options.enabled) {\n return;\n }\n const { options: { elements } , data: { datasets } } = chart.config;\n if (!options.forceOverride && (containsColorsDefinitions(datasets) || elements && containsColorsDefinitions(elements))) {\n return;\n }\n const colorizer = getColorizer(chart);\n datasets.forEach(colorizer);\n }\n};\n\nfunction lttbDecimation(data, start, count, availableWidth, options) {\n const samples = options.samples || availableWidth;\n if (samples >= count) {\n return data.slice(start, start + count);\n }\n const decimated = [];\n const bucketWidth = (count - 2) / (samples - 2);\n let sampledIndex = 0;\n const endIndex = start + count - 1;\n let a = start;\n let i, maxAreaPoint, maxArea, area, nextA;\n decimated[sampledIndex++] = data[a];\n for(i = 0; i < samples - 2; i++){\n let avgX = 0;\n let avgY = 0;\n let j;\n const avgRangeStart = Math.floor((i + 1) * bucketWidth) + 1 + start;\n const avgRangeEnd = Math.min(Math.floor((i + 2) * bucketWidth) + 1, count) + start;\n const avgRangeLength = avgRangeEnd - avgRangeStart;\n for(j = avgRangeStart; j < avgRangeEnd; j++){\n avgX += data[j].x;\n avgY += data[j].y;\n }\n avgX /= avgRangeLength;\n avgY /= avgRangeLength;\n const rangeOffs = Math.floor(i * bucketWidth) + 1 + start;\n const rangeTo = Math.min(Math.floor((i + 1) * bucketWidth) + 1, count) + start;\n const { x: pointAx , y: pointAy } = data[a];\n maxArea = area = -1;\n for(j = rangeOffs; j < rangeTo; j++){\n area = 0.5 * Math.abs((pointAx - avgX) * (data[j].y - pointAy) - (pointAx - data[j].x) * (avgY - pointAy));\n if (area > maxArea) {\n maxArea = area;\n maxAreaPoint = data[j];\n nextA = j;\n }\n }\n decimated[sampledIndex++] = maxAreaPoint;\n a = nextA;\n }\n decimated[sampledIndex++] = data[endIndex];\n return decimated;\n}\nfunction minMaxDecimation(data, start, count, availableWidth) {\n let avgX = 0;\n let countX = 0;\n let i, point, x, y, prevX, minIndex, maxIndex, startIndex, minY, maxY;\n const decimated = [];\n const endIndex = start + count - 1;\n const xMin = data[start].x;\n const xMax = data[endIndex].x;\n const dx = xMax - xMin;\n for(i = start; i < start + count; ++i){\n point = data[i];\n x = (point.x - xMin) / dx * availableWidth;\n y = point.y;\n const truncX = x | 0;\n if (truncX === prevX) {\n if (y < minY) {\n minY = y;\n minIndex = i;\n } else if (y > maxY) {\n maxY = y;\n maxIndex = i;\n }\n avgX = (countX * avgX + point.x) / ++countX;\n } else {\n const lastIndex = i - 1;\n if (!isNullOrUndef(minIndex) && !isNullOrUndef(maxIndex)) {\n const intermediateIndex1 = Math.min(minIndex, maxIndex);\n const intermediateIndex2 = Math.max(minIndex, maxIndex);\n if (intermediateIndex1 !== startIndex && intermediateIndex1 !== lastIndex) {\n decimated.push({\n ...data[intermediateIndex1],\n x: avgX\n });\n }\n if (intermediateIndex2 !== startIndex && intermediateIndex2 !== lastIndex) {\n decimated.push({\n ...data[intermediateIndex2],\n x: avgX\n });\n }\n }\n if (i > 0 && lastIndex !== startIndex) {\n decimated.push(data[lastIndex]);\n }\n decimated.push(point);\n prevX = truncX;\n countX = 0;\n minY = maxY = y;\n minIndex = maxIndex = startIndex = i;\n }\n }\n return decimated;\n}\nfunction cleanDecimatedDataset(dataset) {\n if (dataset._decimated) {\n const data = dataset._data;\n delete dataset._decimated;\n delete dataset._data;\n Object.defineProperty(dataset, 'data', {\n value: data\n });\n }\n}\nfunction cleanDecimatedData(chart) {\n chart.data.datasets.forEach((dataset)=>{\n cleanDecimatedDataset(dataset);\n });\n}\nfunction getStartAndCountOfVisiblePointsSimplified(meta, points) {\n const pointCount = points.length;\n let start = 0;\n let count;\n const { iScale } = meta;\n const { min , max , minDefined , maxDefined } = iScale.getUserBounds();\n if (minDefined) {\n start = _limitValue(_lookupByKey(points, iScale.axis, min).lo, 0, pointCount - 1);\n }\n if (maxDefined) {\n count = _limitValue(_lookupByKey(points, iScale.axis, max).hi + 1, start, pointCount) - start;\n } else {\n count = pointCount - start;\n }\n return {\n start,\n count\n };\n}\nvar plugin_decimation = {\n id: 'decimation',\n defaults: {\n algorithm: 'min-max',\n enabled: false\n },\n beforeElementsUpdate: (chart, args, options)=>{\n if (!options.enabled) {\n cleanDecimatedData(chart);\n return;\n }\n const availableWidth = chart.width;\n chart.data.datasets.forEach((dataset, datasetIndex)=>{\n const { _data , indexAxis } = dataset;\n const meta = chart.getDatasetMeta(datasetIndex);\n const data = _data || dataset.data;\n if (resolve([\n indexAxis,\n chart.options.indexAxis\n ]) === 'y') {\n return;\n }\n if (!meta.controller.supportsDecimation) {\n return;\n }\n const xAxis = chart.scales[meta.xAxisID];\n if (xAxis.type !== 'linear' && xAxis.type !== 'time') {\n return;\n }\n if (chart.options.parsing) {\n return;\n }\n let { start , count } = getStartAndCountOfVisiblePointsSimplified(meta, data);\n const threshold = options.threshold || 4 * availableWidth;\n if (count <= threshold) {\n cleanDecimatedDataset(dataset);\n return;\n }\n if (isNullOrUndef(_data)) {\n dataset._data = data;\n delete dataset.data;\n Object.defineProperty(dataset, 'data', {\n configurable: true,\n enumerable: true,\n get: function() {\n return this._decimated;\n },\n set: function(d) {\n this._data = d;\n }\n });\n }\n let decimated;\n switch(options.algorithm){\n case 'lttb':\n decimated = lttbDecimation(data, start, count, availableWidth, options);\n break;\n case 'min-max':\n decimated = minMaxDecimation(data, start, count, availableWidth);\n break;\n default:\n throw new Error(`Unsupported decimation algorithm '${options.algorithm}'`);\n }\n dataset._decimated = decimated;\n });\n },\n destroy (chart) {\n cleanDecimatedData(chart);\n }\n};\n\nfunction _segments(line, target, property) {\n const segments = line.segments;\n const points = line.points;\n const tpoints = target.points;\n const parts = [];\n for (const segment of segments){\n let { start , end } = segment;\n end = _findSegmentEnd(start, end, points);\n const bounds = _getBounds(property, points[start], points[end], segment.loop);\n if (!target.segments) {\n parts.push({\n source: segment,\n target: bounds,\n start: points[start],\n end: points[end]\n });\n continue;\n }\n const targetSegments = _boundSegments(target, bounds);\n for (const tgt of targetSegments){\n const subBounds = _getBounds(property, tpoints[tgt.start], tpoints[tgt.end], tgt.loop);\n const fillSources = _boundSegment(segment, points, subBounds);\n for (const fillSource of fillSources){\n parts.push({\n source: fillSource,\n target: tgt,\n start: {\n [property]: _getEdge(bounds, subBounds, 'start', Math.max)\n },\n end: {\n [property]: _getEdge(bounds, subBounds, 'end', Math.min)\n }\n });\n }\n }\n }\n return parts;\n}\nfunction _getBounds(property, first, last, loop) {\n if (loop) {\n return;\n }\n let start = first[property];\n let end = last[property];\n if (property === 'angle') {\n start = _normalizeAngle(start);\n end = _normalizeAngle(end);\n }\n return {\n property,\n start,\n end\n };\n}\nfunction _pointsFromSegments(boundary, line) {\n const { x =null , y =null } = boundary || {};\n const linePoints = line.points;\n const points = [];\n line.segments.forEach(({ start , end })=>{\n end = _findSegmentEnd(start, end, linePoints);\n const first = linePoints[start];\n const last = linePoints[end];\n if (y !== null) {\n points.push({\n x: first.x,\n y\n });\n points.push({\n x: last.x,\n y\n });\n } else if (x !== null) {\n points.push({\n x,\n y: first.y\n });\n points.push({\n x,\n y: last.y\n });\n }\n });\n return points;\n}\nfunction _findSegmentEnd(start, end, points) {\n for(; end > start; end--){\n const point = points[end];\n if (!isNaN(point.x) && !isNaN(point.y)) {\n break;\n }\n }\n return end;\n}\nfunction _getEdge(a, b, prop, fn) {\n if (a && b) {\n return fn(a[prop], b[prop]);\n }\n return a ? a[prop] : b ? b[prop] : 0;\n}\n\nfunction _createBoundaryLine(boundary, line) {\n let points = [];\n let _loop = false;\n if (isArray(boundary)) {\n _loop = true;\n points = boundary;\n } else {\n points = _pointsFromSegments(boundary, line);\n }\n return points.length ? new LineElement({\n points,\n options: {\n tension: 0\n },\n _loop,\n _fullLoop: _loop\n }) : null;\n}\nfunction _shouldApplyFill(source) {\n return source && source.fill !== false;\n}\n\nfunction _resolveTarget(sources, index, propagate) {\n const source = sources[index];\n let fill = source.fill;\n const visited = [\n index\n ];\n let target;\n if (!propagate) {\n return fill;\n }\n while(fill !== false && visited.indexOf(fill) === -1){\n if (!isNumberFinite(fill)) {\n return fill;\n }\n target = sources[fill];\n if (!target) {\n return false;\n }\n if (target.visible) {\n return fill;\n }\n visited.push(fill);\n fill = target.fill;\n }\n return false;\n}\n function _decodeFill(line, index, count) {\n const fill = parseFillOption(line);\n if (isObject(fill)) {\n return isNaN(fill.value) ? false : fill;\n }\n let target = parseFloat(fill);\n if (isNumberFinite(target) && Math.floor(target) === target) {\n return decodeTargetIndex(fill[0], index, target, count);\n }\n return [\n 'origin',\n 'start',\n 'end',\n 'stack',\n 'shape'\n ].indexOf(fill) >= 0 && fill;\n}\nfunction decodeTargetIndex(firstCh, index, target, count) {\n if (firstCh === '-' || firstCh === '+') {\n target = index + target;\n }\n if (target === index || target < 0 || target >= count) {\n return false;\n }\n return target;\n}\n function _getTargetPixel(fill, scale) {\n let pixel = null;\n if (fill === 'start') {\n pixel = scale.bottom;\n } else if (fill === 'end') {\n pixel = scale.top;\n } else if (isObject(fill)) {\n pixel = scale.getPixelForValue(fill.value);\n } else if (scale.getBasePixel) {\n pixel = scale.getBasePixel();\n }\n return pixel;\n}\n function _getTargetValue(fill, scale, startValue) {\n let value;\n if (fill === 'start') {\n value = startValue;\n } else if (fill === 'end') {\n value = scale.options.reverse ? scale.min : scale.max;\n } else if (isObject(fill)) {\n value = fill.value;\n } else {\n value = scale.getBaseValue();\n }\n return value;\n}\n function parseFillOption(line) {\n const options = line.options;\n const fillOption = options.fill;\n let fill = valueOrDefault(fillOption && fillOption.target, fillOption);\n if (fill === undefined) {\n fill = !!options.backgroundColor;\n }\n if (fill === false || fill === null) {\n return false;\n }\n if (fill === true) {\n return 'origin';\n }\n return fill;\n}\n\nfunction _buildStackLine(source) {\n const { scale , index , line } = source;\n const points = [];\n const segments = line.segments;\n const sourcePoints = line.points;\n const linesBelow = getLinesBelow(scale, index);\n linesBelow.push(_createBoundaryLine({\n x: null,\n y: scale.bottom\n }, line));\n for(let i = 0; i < segments.length; i++){\n const segment = segments[i];\n for(let j = segment.start; j <= segment.end; j++){\n addPointsBelow(points, sourcePoints[j], linesBelow);\n }\n }\n return new LineElement({\n points,\n options: {}\n });\n}\n function getLinesBelow(scale, index) {\n const below = [];\n const metas = scale.getMatchingVisibleMetas('line');\n for(let i = 0; i < metas.length; i++){\n const meta = metas[i];\n if (meta.index === index) {\n break;\n }\n if (!meta.hidden) {\n below.unshift(meta.dataset);\n }\n }\n return below;\n}\n function addPointsBelow(points, sourcePoint, linesBelow) {\n const postponed = [];\n for(let j = 0; j < linesBelow.length; j++){\n const line = linesBelow[j];\n const { first , last , point } = findPoint(line, sourcePoint, 'x');\n if (!point || first && last) {\n continue;\n }\n if (first) {\n postponed.unshift(point);\n } else {\n points.push(point);\n if (!last) {\n break;\n }\n }\n }\n points.push(...postponed);\n}\n function findPoint(line, sourcePoint, property) {\n const point = line.interpolate(sourcePoint, property);\n if (!point) {\n return {};\n }\n const pointValue = point[property];\n const segments = line.segments;\n const linePoints = line.points;\n let first = false;\n let last = false;\n for(let i = 0; i < segments.length; i++){\n const segment = segments[i];\n const firstValue = linePoints[segment.start][property];\n const lastValue = linePoints[segment.end][property];\n if (_isBetween(pointValue, firstValue, lastValue)) {\n first = pointValue === firstValue;\n last = pointValue === lastValue;\n break;\n }\n }\n return {\n first,\n last,\n point\n };\n}\n\nclass simpleArc {\n constructor(opts){\n this.x = opts.x;\n this.y = opts.y;\n this.radius = opts.radius;\n }\n pathSegment(ctx, bounds, opts) {\n const { x , y , radius } = this;\n bounds = bounds || {\n start: 0,\n end: TAU\n };\n ctx.arc(x, y, radius, bounds.end, bounds.start, true);\n return !opts.bounds;\n }\n interpolate(point) {\n const { x , y , radius } = this;\n const angle = point.angle;\n return {\n x: x + Math.cos(angle) * radius,\n y: y + Math.sin(angle) * radius,\n angle\n };\n }\n}\n\nfunction _getTarget(source) {\n const { chart , fill , line } = source;\n if (isNumberFinite(fill)) {\n return getLineByIndex(chart, fill);\n }\n if (fill === 'stack') {\n return _buildStackLine(source);\n }\n if (fill === 'shape') {\n return true;\n }\n const boundary = computeBoundary(source);\n if (boundary instanceof simpleArc) {\n return boundary;\n }\n return _createBoundaryLine(boundary, line);\n}\n function getLineByIndex(chart, index) {\n const meta = chart.getDatasetMeta(index);\n const visible = meta && chart.isDatasetVisible(index);\n return visible ? meta.dataset : null;\n}\nfunction computeBoundary(source) {\n const scale = source.scale || {};\n if (scale.getPointPositionForValue) {\n return computeCircularBoundary(source);\n }\n return computeLinearBoundary(source);\n}\nfunction computeLinearBoundary(source) {\n const { scale ={} , fill } = source;\n const pixel = _getTargetPixel(fill, scale);\n if (isNumberFinite(pixel)) {\n const horizontal = scale.isHorizontal();\n return {\n x: horizontal ? pixel : null,\n y: horizontal ? null : pixel\n };\n }\n return null;\n}\nfunction computeCircularBoundary(source) {\n const { scale , fill } = source;\n const options = scale.options;\n const length = scale.getLabels().length;\n const start = options.reverse ? scale.max : scale.min;\n const value = _getTargetValue(fill, scale, start);\n const target = [];\n if (options.grid.circular) {\n const center = scale.getPointPositionForValue(0, start);\n return new simpleArc({\n x: center.x,\n y: center.y,\n radius: scale.getDistanceFromCenterForValue(value)\n });\n }\n for(let i = 0; i < length; ++i){\n target.push(scale.getPointPositionForValue(i, value));\n }\n return target;\n}\n\nfunction _drawfill(ctx, source, area) {\n const target = _getTarget(source);\n const { line , scale , axis } = source;\n const lineOpts = line.options;\n const fillOption = lineOpts.fill;\n const color = lineOpts.backgroundColor;\n const { above =color , below =color } = fillOption || {};\n if (target && line.points.length) {\n clipArea(ctx, area);\n doFill(ctx, {\n line,\n target,\n above,\n below,\n area,\n scale,\n axis\n });\n unclipArea(ctx);\n }\n}\nfunction doFill(ctx, cfg) {\n const { line , target , above , below , area , scale } = cfg;\n const property = line._loop ? 'angle' : cfg.axis;\n ctx.save();\n if (property === 'x' && below !== above) {\n clipVertical(ctx, target, area.top);\n fill(ctx, {\n line,\n target,\n color: above,\n scale,\n property\n });\n ctx.restore();\n ctx.save();\n clipVertical(ctx, target, area.bottom);\n }\n fill(ctx, {\n line,\n target,\n color: below,\n scale,\n property\n });\n ctx.restore();\n}\nfunction clipVertical(ctx, target, clipY) {\n const { segments , points } = target;\n let first = true;\n let lineLoop = false;\n ctx.beginPath();\n for (const segment of segments){\n const { start , end } = segment;\n const firstPoint = points[start];\n const lastPoint = points[_findSegmentEnd(start, end, points)];\n if (first) {\n ctx.moveTo(firstPoint.x, firstPoint.y);\n first = false;\n } else {\n ctx.lineTo(firstPoint.x, clipY);\n ctx.lineTo(firstPoint.x, firstPoint.y);\n }\n lineLoop = !!target.pathSegment(ctx, segment, {\n move: lineLoop\n });\n if (lineLoop) {\n ctx.closePath();\n } else {\n ctx.lineTo(lastPoint.x, clipY);\n }\n }\n ctx.lineTo(target.first().x, clipY);\n ctx.closePath();\n ctx.clip();\n}\nfunction fill(ctx, cfg) {\n const { line , target , property , color , scale } = cfg;\n const segments = _segments(line, target, property);\n for (const { source: src , target: tgt , start , end } of segments){\n const { style: { backgroundColor =color } = {} } = src;\n const notShape = target !== true;\n ctx.save();\n ctx.fillStyle = backgroundColor;\n clipBounds(ctx, scale, notShape && _getBounds(property, start, end));\n ctx.beginPath();\n const lineLoop = !!line.pathSegment(ctx, src);\n let loop;\n if (notShape) {\n if (lineLoop) {\n ctx.closePath();\n } else {\n interpolatedLineTo(ctx, target, end, property);\n }\n const targetLoop = !!target.pathSegment(ctx, tgt, {\n move: lineLoop,\n reverse: true\n });\n loop = lineLoop && targetLoop;\n if (!loop) {\n interpolatedLineTo(ctx, target, start, property);\n }\n }\n ctx.closePath();\n ctx.fill(loop ? 'evenodd' : 'nonzero');\n ctx.restore();\n }\n}\nfunction clipBounds(ctx, scale, bounds) {\n const { top , bottom } = scale.chart.chartArea;\n const { property , start , end } = bounds || {};\n if (property === 'x') {\n ctx.beginPath();\n ctx.rect(start, top, end - start, bottom - top);\n ctx.clip();\n }\n}\nfunction interpolatedLineTo(ctx, target, point, property) {\n const interpolatedPoint = target.interpolate(point, property);\n if (interpolatedPoint) {\n ctx.lineTo(interpolatedPoint.x, interpolatedPoint.y);\n }\n}\n\nvar index = {\n id: 'filler',\n afterDatasetsUpdate (chart, _args, options) {\n const count = (chart.data.datasets || []).length;\n const sources = [];\n let meta, i, line, source;\n for(i = 0; i < count; ++i){\n meta = chart.getDatasetMeta(i);\n line = meta.dataset;\n source = null;\n if (line && line.options && line instanceof LineElement) {\n source = {\n visible: chart.isDatasetVisible(i),\n index: i,\n fill: _decodeFill(line, i, count),\n chart,\n axis: meta.controller.options.indexAxis,\n scale: meta.vScale,\n line\n };\n }\n meta.$filler = source;\n sources.push(source);\n }\n for(i = 0; i < count; ++i){\n source = sources[i];\n if (!source || source.fill === false) {\n continue;\n }\n source.fill = _resolveTarget(sources, i, options.propagate);\n }\n },\n beforeDraw (chart, _args, options) {\n const draw = options.drawTime === 'beforeDraw';\n const metasets = chart.getSortedVisibleDatasetMetas();\n const area = chart.chartArea;\n for(let i = metasets.length - 1; i >= 0; --i){\n const source = metasets[i].$filler;\n if (!source) {\n continue;\n }\n source.line.updateControlPoints(area, source.axis);\n if (draw && source.fill) {\n _drawfill(chart.ctx, source, area);\n }\n }\n },\n beforeDatasetsDraw (chart, _args, options) {\n if (options.drawTime !== 'beforeDatasetsDraw') {\n return;\n }\n const metasets = chart.getSortedVisibleDatasetMetas();\n for(let i = metasets.length - 1; i >= 0; --i){\n const source = metasets[i].$filler;\n if (_shouldApplyFill(source)) {\n _drawfill(chart.ctx, source, chart.chartArea);\n }\n }\n },\n beforeDatasetDraw (chart, args, options) {\n const source = args.meta.$filler;\n if (!_shouldApplyFill(source) || options.drawTime !== 'beforeDatasetDraw') {\n return;\n }\n _drawfill(chart.ctx, source, chart.chartArea);\n },\n defaults: {\n propagate: true,\n drawTime: 'beforeDatasetDraw'\n }\n};\n\nconst getBoxSize = (labelOpts, fontSize)=>{\n let { boxHeight =fontSize , boxWidth =fontSize } = labelOpts;\n if (labelOpts.usePointStyle) {\n boxHeight = Math.min(boxHeight, fontSize);\n boxWidth = labelOpts.pointStyleWidth || Math.min(boxWidth, fontSize);\n }\n return {\n boxWidth,\n boxHeight,\n itemHeight: Math.max(fontSize, boxHeight)\n };\n};\nconst itemsEqual = (a, b)=>a !== null && b !== null && a.datasetIndex === b.datasetIndex && a.index === b.index;\nclass Legend extends Element {\n constructor(config){\n super();\n this._added = false;\n this.legendHitBoxes = [];\n this._hoveredItem = null;\n this.doughnutMode = false;\n this.chart = config.chart;\n this.options = config.options;\n this.ctx = config.ctx;\n this.legendItems = undefined;\n this.columnSizes = undefined;\n this.lineWidths = undefined;\n this.maxHeight = undefined;\n this.maxWidth = undefined;\n this.top = undefined;\n this.bottom = undefined;\n this.left = undefined;\n this.right = undefined;\n this.height = undefined;\n this.width = undefined;\n this._margins = undefined;\n this.position = undefined;\n this.weight = undefined;\n this.fullSize = undefined;\n }\n update(maxWidth, maxHeight, margins) {\n this.maxWidth = maxWidth;\n this.maxHeight = maxHeight;\n this._margins = margins;\n this.setDimensions();\n this.buildLabels();\n this.fit();\n }\n setDimensions() {\n if (this.isHorizontal()) {\n this.width = this.maxWidth;\n this.left = this._margins.left;\n this.right = this.width;\n } else {\n this.height = this.maxHeight;\n this.top = this._margins.top;\n this.bottom = this.height;\n }\n }\n buildLabels() {\n const labelOpts = this.options.labels || {};\n let legendItems = callback(labelOpts.generateLabels, [\n this.chart\n ], this) || [];\n if (labelOpts.filter) {\n legendItems = legendItems.filter((item)=>labelOpts.filter(item, this.chart.data));\n }\n if (labelOpts.sort) {\n legendItems = legendItems.sort((a, b)=>labelOpts.sort(a, b, this.chart.data));\n }\n if (this.options.reverse) {\n legendItems.reverse();\n }\n this.legendItems = legendItems;\n }\n fit() {\n const { options , ctx } = this;\n if (!options.display) {\n this.width = this.height = 0;\n return;\n }\n const labelOpts = options.labels;\n const labelFont = toFont(labelOpts.font);\n const fontSize = labelFont.size;\n const titleHeight = this._computeTitleHeight();\n const { boxWidth , itemHeight } = getBoxSize(labelOpts, fontSize);\n let width, height;\n ctx.font = labelFont.string;\n if (this.isHorizontal()) {\n width = this.maxWidth;\n height = this._fitRows(titleHeight, fontSize, boxWidth, itemHeight) + 10;\n } else {\n height = this.maxHeight;\n width = this._fitCols(titleHeight, labelFont, boxWidth, itemHeight) + 10;\n }\n this.width = Math.min(width, options.maxWidth || this.maxWidth);\n this.height = Math.min(height, options.maxHeight || this.maxHeight);\n }\n _fitRows(titleHeight, fontSize, boxWidth, itemHeight) {\n const { ctx , maxWidth , options: { labels: { padding } } } = this;\n const hitboxes = this.legendHitBoxes = [];\n const lineWidths = this.lineWidths = [\n 0\n ];\n const lineHeight = itemHeight + padding;\n let totalHeight = titleHeight;\n ctx.textAlign = 'left';\n ctx.textBaseline = 'middle';\n let row = -1;\n let top = -lineHeight;\n this.legendItems.forEach((legendItem, i)=>{\n const itemWidth = boxWidth + fontSize / 2 + ctx.measureText(legendItem.text).width;\n if (i === 0 || lineWidths[lineWidths.length - 1] + itemWidth + 2 * padding > maxWidth) {\n totalHeight += lineHeight;\n lineWidths[lineWidths.length - (i > 0 ? 0 : 1)] = 0;\n top += lineHeight;\n row++;\n }\n hitboxes[i] = {\n left: 0,\n top,\n row,\n width: itemWidth,\n height: itemHeight\n };\n lineWidths[lineWidths.length - 1] += itemWidth + padding;\n });\n return totalHeight;\n }\n _fitCols(titleHeight, labelFont, boxWidth, _itemHeight) {\n const { ctx , maxHeight , options: { labels: { padding } } } = this;\n const hitboxes = this.legendHitBoxes = [];\n const columnSizes = this.columnSizes = [];\n const heightLimit = maxHeight - titleHeight;\n let totalWidth = padding;\n let currentColWidth = 0;\n let currentColHeight = 0;\n let left = 0;\n let col = 0;\n this.legendItems.forEach((legendItem, i)=>{\n const { itemWidth , itemHeight } = calculateItemSize(boxWidth, labelFont, ctx, legendItem, _itemHeight);\n if (i > 0 && currentColHeight + itemHeight + 2 * padding > heightLimit) {\n totalWidth += currentColWidth + padding;\n columnSizes.push({\n width: currentColWidth,\n height: currentColHeight\n });\n left += currentColWidth + padding;\n col++;\n currentColWidth = currentColHeight = 0;\n }\n hitboxes[i] = {\n left,\n top: currentColHeight,\n col,\n width: itemWidth,\n height: itemHeight\n };\n currentColWidth = Math.max(currentColWidth, itemWidth);\n currentColHeight += itemHeight + padding;\n });\n totalWidth += currentColWidth;\n columnSizes.push({\n width: currentColWidth,\n height: currentColHeight\n });\n return totalWidth;\n }\n adjustHitBoxes() {\n if (!this.options.display) {\n return;\n }\n const titleHeight = this._computeTitleHeight();\n const { legendHitBoxes: hitboxes , options: { align , labels: { padding } , rtl } } = this;\n const rtlHelper = getRtlAdapter(rtl, this.left, this.width);\n if (this.isHorizontal()) {\n let row = 0;\n let left = _alignStartEnd(align, this.left + padding, this.right - this.lineWidths[row]);\n for (const hitbox of hitboxes){\n if (row !== hitbox.row) {\n row = hitbox.row;\n left = _alignStartEnd(align, this.left + padding, this.right - this.lineWidths[row]);\n }\n hitbox.top += this.top + titleHeight + padding;\n hitbox.left = rtlHelper.leftForLtr(rtlHelper.x(left), hitbox.width);\n left += hitbox.width + padding;\n }\n } else {\n let col = 0;\n let top = _alignStartEnd(align, this.top + titleHeight + padding, this.bottom - this.columnSizes[col].height);\n for (const hitbox1 of hitboxes){\n if (hitbox1.col !== col) {\n col = hitbox1.col;\n top = _alignStartEnd(align, this.top + titleHeight + padding, this.bottom - this.columnSizes[col].height);\n }\n hitbox1.top = top;\n hitbox1.left += this.left + padding;\n hitbox1.left = rtlHelper.leftForLtr(rtlHelper.x(hitbox1.left), hitbox1.width);\n top += hitbox1.height + padding;\n }\n }\n }\n isHorizontal() {\n return this.options.position === 'top' || this.options.position === 'bottom';\n }\n draw() {\n if (this.options.display) {\n const ctx = this.ctx;\n clipArea(ctx, this);\n this._draw();\n unclipArea(ctx);\n }\n }\n _draw() {\n const { options: opts , columnSizes , lineWidths , ctx } = this;\n const { align , labels: labelOpts } = opts;\n const defaultColor = defaults.color;\n const rtlHelper = getRtlAdapter(opts.rtl, this.left, this.width);\n const labelFont = toFont(labelOpts.font);\n const { padding } = labelOpts;\n const fontSize = labelFont.size;\n const halfFontSize = fontSize / 2;\n let cursor;\n this.drawTitle();\n ctx.textAlign = rtlHelper.textAlign('left');\n ctx.textBaseline = 'middle';\n ctx.lineWidth = 0.5;\n ctx.font = labelFont.string;\n const { boxWidth , boxHeight , itemHeight } = getBoxSize(labelOpts, fontSize);\n const drawLegendBox = function(x, y, legendItem) {\n if (isNaN(boxWidth) || boxWidth <= 0 || isNaN(boxHeight) || boxHeight < 0) {\n return;\n }\n ctx.save();\n const lineWidth = valueOrDefault(legendItem.lineWidth, 1);\n ctx.fillStyle = valueOrDefault(legendItem.fillStyle, defaultColor);\n ctx.lineCap = valueOrDefault(legendItem.lineCap, 'butt');\n ctx.lineDashOffset = valueOrDefault(legendItem.lineDashOffset, 0);\n ctx.lineJoin = valueOrDefault(legendItem.lineJoin, 'miter');\n ctx.lineWidth = lineWidth;\n ctx.strokeStyle = valueOrDefault(legendItem.strokeStyle, defaultColor);\n ctx.setLineDash(valueOrDefault(legendItem.lineDash, []));\n if (labelOpts.usePointStyle) {\n const drawOptions = {\n radius: boxHeight * Math.SQRT2 / 2,\n pointStyle: legendItem.pointStyle,\n rotation: legendItem.rotation,\n borderWidth: lineWidth\n };\n const centerX = rtlHelper.xPlus(x, boxWidth / 2);\n const centerY = y + halfFontSize;\n drawPointLegend(ctx, drawOptions, centerX, centerY, labelOpts.pointStyleWidth && boxWidth);\n } else {\n const yBoxTop = y + Math.max((fontSize - boxHeight) / 2, 0);\n const xBoxLeft = rtlHelper.leftForLtr(x, boxWidth);\n const borderRadius = toTRBLCorners(legendItem.borderRadius);\n ctx.beginPath();\n if (Object.values(borderRadius).some((v)=>v !== 0)) {\n addRoundedRectPath(ctx, {\n x: xBoxLeft,\n y: yBoxTop,\n w: boxWidth,\n h: boxHeight,\n radius: borderRadius\n });\n } else {\n ctx.rect(xBoxLeft, yBoxTop, boxWidth, boxHeight);\n }\n ctx.fill();\n if (lineWidth !== 0) {\n ctx.stroke();\n }\n }\n ctx.restore();\n };\n const fillText = function(x, y, legendItem) {\n renderText(ctx, legendItem.text, x, y + itemHeight / 2, labelFont, {\n strikethrough: legendItem.hidden,\n textAlign: rtlHelper.textAlign(legendItem.textAlign)\n });\n };\n const isHorizontal = this.isHorizontal();\n const titleHeight = this._computeTitleHeight();\n if (isHorizontal) {\n cursor = {\n x: _alignStartEnd(align, this.left + padding, this.right - lineWidths[0]),\n y: this.top + padding + titleHeight,\n line: 0\n };\n } else {\n cursor = {\n x: this.left + padding,\n y: _alignStartEnd(align, this.top + titleHeight + padding, this.bottom - columnSizes[0].height),\n line: 0\n };\n }\n overrideTextDirection(this.ctx, opts.textDirection);\n const lineHeight = itemHeight + padding;\n this.legendItems.forEach((legendItem, i)=>{\n ctx.strokeStyle = legendItem.fontColor;\n ctx.fillStyle = legendItem.fontColor;\n const textWidth = ctx.measureText(legendItem.text).width;\n const textAlign = rtlHelper.textAlign(legendItem.textAlign || (legendItem.textAlign = labelOpts.textAlign));\n const width = boxWidth + halfFontSize + textWidth;\n let x = cursor.x;\n let y = cursor.y;\n rtlHelper.setWidth(this.width);\n if (isHorizontal) {\n if (i > 0 && x + width + padding > this.right) {\n y = cursor.y += lineHeight;\n cursor.line++;\n x = cursor.x = _alignStartEnd(align, this.left + padding, this.right - lineWidths[cursor.line]);\n }\n } else if (i > 0 && y + lineHeight > this.bottom) {\n x = cursor.x = x + columnSizes[cursor.line].width + padding;\n cursor.line++;\n y = cursor.y = _alignStartEnd(align, this.top + titleHeight + padding, this.bottom - columnSizes[cursor.line].height);\n }\n const realX = rtlHelper.x(x);\n drawLegendBox(realX, y, legendItem);\n x = _textX(textAlign, x + boxWidth + halfFontSize, isHorizontal ? x + width : this.right, opts.rtl);\n fillText(rtlHelper.x(x), y, legendItem);\n if (isHorizontal) {\n cursor.x += width + padding;\n } else if (typeof legendItem.text !== 'string') {\n const fontLineHeight = labelFont.lineHeight;\n cursor.y += calculateLegendItemHeight(legendItem, fontLineHeight);\n } else {\n cursor.y += lineHeight;\n }\n });\n restoreTextDirection(this.ctx, opts.textDirection);\n }\n drawTitle() {\n const opts = this.options;\n const titleOpts = opts.title;\n const titleFont = toFont(titleOpts.font);\n const titlePadding = toPadding(titleOpts.padding);\n if (!titleOpts.display) {\n return;\n }\n const rtlHelper = getRtlAdapter(opts.rtl, this.left, this.width);\n const ctx = this.ctx;\n const position = titleOpts.position;\n const halfFontSize = titleFont.size / 2;\n const topPaddingPlusHalfFontSize = titlePadding.top + halfFontSize;\n let y;\n let left = this.left;\n let maxWidth = this.width;\n if (this.isHorizontal()) {\n maxWidth = Math.max(...this.lineWidths);\n y = this.top + topPaddingPlusHalfFontSize;\n left = _alignStartEnd(opts.align, left, this.right - maxWidth);\n } else {\n const maxHeight = this.columnSizes.reduce((acc, size)=>Math.max(acc, size.height), 0);\n y = topPaddingPlusHalfFontSize + _alignStartEnd(opts.align, this.top, this.bottom - maxHeight - opts.labels.padding - this._computeTitleHeight());\n }\n const x = _alignStartEnd(position, left, left + maxWidth);\n ctx.textAlign = rtlHelper.textAlign(_toLeftRightCenter(position));\n ctx.textBaseline = 'middle';\n ctx.strokeStyle = titleOpts.color;\n ctx.fillStyle = titleOpts.color;\n ctx.font = titleFont.string;\n renderText(ctx, titleOpts.text, x, y, titleFont);\n }\n _computeTitleHeight() {\n const titleOpts = this.options.title;\n const titleFont = toFont(titleOpts.font);\n const titlePadding = toPadding(titleOpts.padding);\n return titleOpts.display ? titleFont.lineHeight + titlePadding.height : 0;\n }\n _getLegendItemAt(x, y) {\n let i, hitBox, lh;\n if (_isBetween(x, this.left, this.right) && _isBetween(y, this.top, this.bottom)) {\n lh = this.legendHitBoxes;\n for(i = 0; i < lh.length; ++i){\n hitBox = lh[i];\n if (_isBetween(x, hitBox.left, hitBox.left + hitBox.width) && _isBetween(y, hitBox.top, hitBox.top + hitBox.height)) {\n return this.legendItems[i];\n }\n }\n }\n return null;\n }\n handleEvent(e) {\n const opts = this.options;\n if (!isListened(e.type, opts)) {\n return;\n }\n const hoveredItem = this._getLegendItemAt(e.x, e.y);\n if (e.type === 'mousemove' || e.type === 'mouseout') {\n const previous = this._hoveredItem;\n const sameItem = itemsEqual(previous, hoveredItem);\n if (previous && !sameItem) {\n callback(opts.onLeave, [\n e,\n previous,\n this\n ], this);\n }\n this._hoveredItem = hoveredItem;\n if (hoveredItem && !sameItem) {\n callback(opts.onHover, [\n e,\n hoveredItem,\n this\n ], this);\n }\n } else if (hoveredItem) {\n callback(opts.onClick, [\n e,\n hoveredItem,\n this\n ], this);\n }\n }\n}\nfunction calculateItemSize(boxWidth, labelFont, ctx, legendItem, _itemHeight) {\n const itemWidth = calculateItemWidth(legendItem, boxWidth, labelFont, ctx);\n const itemHeight = calculateItemHeight(_itemHeight, legendItem, labelFont.lineHeight);\n return {\n itemWidth,\n itemHeight\n };\n}\nfunction calculateItemWidth(legendItem, boxWidth, labelFont, ctx) {\n let legendItemText = legendItem.text;\n if (legendItemText && typeof legendItemText !== 'string') {\n legendItemText = legendItemText.reduce((a, b)=>a.length > b.length ? a : b);\n }\n return boxWidth + labelFont.size / 2 + ctx.measureText(legendItemText).width;\n}\nfunction calculateItemHeight(_itemHeight, legendItem, fontLineHeight) {\n let itemHeight = _itemHeight;\n if (typeof legendItem.text !== 'string') {\n itemHeight = calculateLegendItemHeight(legendItem, fontLineHeight);\n }\n return itemHeight;\n}\nfunction calculateLegendItemHeight(legendItem, fontLineHeight) {\n const labelHeight = legendItem.text ? legendItem.text.length + 0.5 : 0;\n return fontLineHeight * labelHeight;\n}\nfunction isListened(type, opts) {\n if ((type === 'mousemove' || type === 'mouseout') && (opts.onHover || opts.onLeave)) {\n return true;\n }\n if (opts.onClick && (type === 'click' || type === 'mouseup')) {\n return true;\n }\n return false;\n}\nvar plugin_legend = {\n id: 'legend',\n _element: Legend,\n start (chart, _args, options) {\n const legend = chart.legend = new Legend({\n ctx: chart.ctx,\n options,\n chart\n });\n layouts.configure(chart, legend, options);\n layouts.addBox(chart, legend);\n },\n stop (chart) {\n layouts.removeBox(chart, chart.legend);\n delete chart.legend;\n },\n beforeUpdate (chart, _args, options) {\n const legend = chart.legend;\n layouts.configure(chart, legend, options);\n legend.options = options;\n },\n afterUpdate (chart) {\n const legend = chart.legend;\n legend.buildLabels();\n legend.adjustHitBoxes();\n },\n afterEvent (chart, args) {\n if (!args.replay) {\n chart.legend.handleEvent(args.event);\n }\n },\n defaults: {\n display: true,\n position: 'top',\n align: 'center',\n fullSize: true,\n reverse: false,\n weight: 1000,\n onClick (e, legendItem, legend) {\n const index = legendItem.datasetIndex;\n const ci = legend.chart;\n if (ci.isDatasetVisible(index)) {\n ci.hide(index);\n legendItem.hidden = true;\n } else {\n ci.show(index);\n legendItem.hidden = false;\n }\n },\n onHover: null,\n onLeave: null,\n labels: {\n color: (ctx)=>ctx.chart.options.color,\n boxWidth: 40,\n padding: 10,\n generateLabels (chart) {\n const datasets = chart.data.datasets;\n const { labels: { usePointStyle , pointStyle , textAlign , color , useBorderRadius , borderRadius } } = chart.legend.options;\n return chart._getSortedDatasetMetas().map((meta)=>{\n const style = meta.controller.getStyle(usePointStyle ? 0 : undefined);\n const borderWidth = toPadding(style.borderWidth);\n return {\n text: datasets[meta.index].label,\n fillStyle: style.backgroundColor,\n fontColor: color,\n hidden: !meta.visible,\n lineCap: style.borderCapStyle,\n lineDash: style.borderDash,\n lineDashOffset: style.borderDashOffset,\n lineJoin: style.borderJoinStyle,\n lineWidth: (borderWidth.width + borderWidth.height) / 4,\n strokeStyle: style.borderColor,\n pointStyle: pointStyle || style.pointStyle,\n rotation: style.rotation,\n textAlign: textAlign || style.textAlign,\n borderRadius: useBorderRadius && (borderRadius || style.borderRadius),\n datasetIndex: meta.index\n };\n }, this);\n }\n },\n title: {\n color: (ctx)=>ctx.chart.options.color,\n display: false,\n position: 'center',\n text: ''\n }\n },\n descriptors: {\n _scriptable: (name)=>!name.startsWith('on'),\n labels: {\n _scriptable: (name)=>![\n 'generateLabels',\n 'filter',\n 'sort'\n ].includes(name)\n }\n }\n};\n\nclass Title extends Element {\n constructor(config){\n super();\n this.chart = config.chart;\n this.options = config.options;\n this.ctx = config.ctx;\n this._padding = undefined;\n this.top = undefined;\n this.bottom = undefined;\n this.left = undefined;\n this.right = undefined;\n this.width = undefined;\n this.height = undefined;\n this.position = undefined;\n this.weight = undefined;\n this.fullSize = undefined;\n }\n update(maxWidth, maxHeight) {\n const opts = this.options;\n this.left = 0;\n this.top = 0;\n if (!opts.display) {\n this.width = this.height = this.right = this.bottom = 0;\n return;\n }\n this.width = this.right = maxWidth;\n this.height = this.bottom = maxHeight;\n const lineCount = isArray(opts.text) ? opts.text.length : 1;\n this._padding = toPadding(opts.padding);\n const textSize = lineCount * toFont(opts.font).lineHeight + this._padding.height;\n if (this.isHorizontal()) {\n this.height = textSize;\n } else {\n this.width = textSize;\n }\n }\n isHorizontal() {\n const pos = this.options.position;\n return pos === 'top' || pos === 'bottom';\n }\n _drawArgs(offset) {\n const { top , left , bottom , right , options } = this;\n const align = options.align;\n let rotation = 0;\n let maxWidth, titleX, titleY;\n if (this.isHorizontal()) {\n titleX = _alignStartEnd(align, left, right);\n titleY = top + offset;\n maxWidth = right - left;\n } else {\n if (options.position === 'left') {\n titleX = left + offset;\n titleY = _alignStartEnd(align, bottom, top);\n rotation = PI * -0.5;\n } else {\n titleX = right - offset;\n titleY = _alignStartEnd(align, top, bottom);\n rotation = PI * 0.5;\n }\n maxWidth = bottom - top;\n }\n return {\n titleX,\n titleY,\n maxWidth,\n rotation\n };\n }\n draw() {\n const ctx = this.ctx;\n const opts = this.options;\n if (!opts.display) {\n return;\n }\n const fontOpts = toFont(opts.font);\n const lineHeight = fontOpts.lineHeight;\n const offset = lineHeight / 2 + this._padding.top;\n const { titleX , titleY , maxWidth , rotation } = this._drawArgs(offset);\n renderText(ctx, opts.text, 0, 0, fontOpts, {\n color: opts.color,\n maxWidth,\n rotation,\n textAlign: _toLeftRightCenter(opts.align),\n textBaseline: 'middle',\n translation: [\n titleX,\n titleY\n ]\n });\n }\n}\nfunction createTitle(chart, titleOpts) {\n const title = new Title({\n ctx: chart.ctx,\n options: titleOpts,\n chart\n });\n layouts.configure(chart, title, titleOpts);\n layouts.addBox(chart, title);\n chart.titleBlock = title;\n}\nvar plugin_title = {\n id: 'title',\n _element: Title,\n start (chart, _args, options) {\n createTitle(chart, options);\n },\n stop (chart) {\n const titleBlock = chart.titleBlock;\n layouts.removeBox(chart, titleBlock);\n delete chart.titleBlock;\n },\n beforeUpdate (chart, _args, options) {\n const title = chart.titleBlock;\n layouts.configure(chart, title, options);\n title.options = options;\n },\n defaults: {\n align: 'center',\n display: false,\n font: {\n weight: 'bold'\n },\n fullSize: true,\n padding: 10,\n position: 'top',\n text: '',\n weight: 2000\n },\n defaultRoutes: {\n color: 'color'\n },\n descriptors: {\n _scriptable: true,\n _indexable: false\n }\n};\n\nconst map = new WeakMap();\nvar plugin_subtitle = {\n id: 'subtitle',\n start (chart, _args, options) {\n const title = new Title({\n ctx: chart.ctx,\n options,\n chart\n });\n layouts.configure(chart, title, options);\n layouts.addBox(chart, title);\n map.set(chart, title);\n },\n stop (chart) {\n layouts.removeBox(chart, map.get(chart));\n map.delete(chart);\n },\n beforeUpdate (chart, _args, options) {\n const title = map.get(chart);\n layouts.configure(chart, title, options);\n title.options = options;\n },\n defaults: {\n align: 'center',\n display: false,\n font: {\n weight: 'normal'\n },\n fullSize: true,\n padding: 0,\n position: 'top',\n text: '',\n weight: 1500\n },\n defaultRoutes: {\n color: 'color'\n },\n descriptors: {\n _scriptable: true,\n _indexable: false\n }\n};\n\nconst positioners = {\n average (items) {\n if (!items.length) {\n return false;\n }\n let i, len;\n let x = 0;\n let y = 0;\n let count = 0;\n for(i = 0, len = items.length; i < len; ++i){\n const el = items[i].element;\n if (el && el.hasValue()) {\n const pos = el.tooltipPosition();\n x += pos.x;\n y += pos.y;\n ++count;\n }\n }\n return {\n x: x / count,\n y: y / count\n };\n },\n nearest (items, eventPosition) {\n if (!items.length) {\n return false;\n }\n let x = eventPosition.x;\n let y = eventPosition.y;\n let minDistance = Number.POSITIVE_INFINITY;\n let i, len, nearestElement;\n for(i = 0, len = items.length; i < len; ++i){\n const el = items[i].element;\n if (el && el.hasValue()) {\n const center = el.getCenterPoint();\n const d = distanceBetweenPoints(eventPosition, center);\n if (d < minDistance) {\n minDistance = d;\n nearestElement = el;\n }\n }\n }\n if (nearestElement) {\n const tp = nearestElement.tooltipPosition();\n x = tp.x;\n y = tp.y;\n }\n return {\n x,\n y\n };\n }\n};\nfunction pushOrConcat(base, toPush) {\n if (toPush) {\n if (isArray(toPush)) {\n Array.prototype.push.apply(base, toPush);\n } else {\n base.push(toPush);\n }\n }\n return base;\n}\n function splitNewlines(str) {\n if ((typeof str === 'string' || str instanceof String) && str.indexOf('\\n') > -1) {\n return str.split('\\n');\n }\n return str;\n}\n function createTooltipItem(chart, item) {\n const { element , datasetIndex , index } = item;\n const controller = chart.getDatasetMeta(datasetIndex).controller;\n const { label , value } = controller.getLabelAndValue(index);\n return {\n chart,\n label,\n parsed: controller.getParsed(index),\n raw: chart.data.datasets[datasetIndex].data[index],\n formattedValue: value,\n dataset: controller.getDataset(),\n dataIndex: index,\n datasetIndex,\n element\n };\n}\n function getTooltipSize(tooltip, options) {\n const ctx = tooltip.chart.ctx;\n const { body , footer , title } = tooltip;\n const { boxWidth , boxHeight } = options;\n const bodyFont = toFont(options.bodyFont);\n const titleFont = toFont(options.titleFont);\n const footerFont = toFont(options.footerFont);\n const titleLineCount = title.length;\n const footerLineCount = footer.length;\n const bodyLineItemCount = body.length;\n const padding = toPadding(options.padding);\n let height = padding.height;\n let width = 0;\n let combinedBodyLength = body.reduce((count, bodyItem)=>count + bodyItem.before.length + bodyItem.lines.length + bodyItem.after.length, 0);\n combinedBodyLength += tooltip.beforeBody.length + tooltip.afterBody.length;\n if (titleLineCount) {\n height += titleLineCount * titleFont.lineHeight + (titleLineCount - 1) * options.titleSpacing + options.titleMarginBottom;\n }\n if (combinedBodyLength) {\n const bodyLineHeight = options.displayColors ? Math.max(boxHeight, bodyFont.lineHeight) : bodyFont.lineHeight;\n height += bodyLineItemCount * bodyLineHeight + (combinedBodyLength - bodyLineItemCount) * bodyFont.lineHeight + (combinedBodyLength - 1) * options.bodySpacing;\n }\n if (footerLineCount) {\n height += options.footerMarginTop + footerLineCount * footerFont.lineHeight + (footerLineCount - 1) * options.footerSpacing;\n }\n let widthPadding = 0;\n const maxLineWidth = function(line) {\n width = Math.max(width, ctx.measureText(line).width + widthPadding);\n };\n ctx.save();\n ctx.font = titleFont.string;\n each(tooltip.title, maxLineWidth);\n ctx.font = bodyFont.string;\n each(tooltip.beforeBody.concat(tooltip.afterBody), maxLineWidth);\n widthPadding = options.displayColors ? boxWidth + 2 + options.boxPadding : 0;\n each(body, (bodyItem)=>{\n each(bodyItem.before, maxLineWidth);\n each(bodyItem.lines, maxLineWidth);\n each(bodyItem.after, maxLineWidth);\n });\n widthPadding = 0;\n ctx.font = footerFont.string;\n each(tooltip.footer, maxLineWidth);\n ctx.restore();\n width += padding.width;\n return {\n width,\n height\n };\n}\nfunction determineYAlign(chart, size) {\n const { y , height } = size;\n if (y < height / 2) {\n return 'top';\n } else if (y > chart.height - height / 2) {\n return 'bottom';\n }\n return 'center';\n}\nfunction doesNotFitWithAlign(xAlign, chart, options, size) {\n const { x , width } = size;\n const caret = options.caretSize + options.caretPadding;\n if (xAlign === 'left' && x + width + caret > chart.width) {\n return true;\n }\n if (xAlign === 'right' && x - width - caret < 0) {\n return true;\n }\n}\nfunction determineXAlign(chart, options, size, yAlign) {\n const { x , width } = size;\n const { width: chartWidth , chartArea: { left , right } } = chart;\n let xAlign = 'center';\n if (yAlign === 'center') {\n xAlign = x <= (left + right) / 2 ? 'left' : 'right';\n } else if (x <= width / 2) {\n xAlign = 'left';\n } else if (x >= chartWidth - width / 2) {\n xAlign = 'right';\n }\n if (doesNotFitWithAlign(xAlign, chart, options, size)) {\n xAlign = 'center';\n }\n return xAlign;\n}\n function determineAlignment(chart, options, size) {\n const yAlign = size.yAlign || options.yAlign || determineYAlign(chart, size);\n return {\n xAlign: size.xAlign || options.xAlign || determineXAlign(chart, options, size, yAlign),\n yAlign\n };\n}\nfunction alignX(size, xAlign) {\n let { x , width } = size;\n if (xAlign === 'right') {\n x -= width;\n } else if (xAlign === 'center') {\n x -= width / 2;\n }\n return x;\n}\nfunction alignY(size, yAlign, paddingAndSize) {\n let { y , height } = size;\n if (yAlign === 'top') {\n y += paddingAndSize;\n } else if (yAlign === 'bottom') {\n y -= height + paddingAndSize;\n } else {\n y -= height / 2;\n }\n return y;\n}\n function getBackgroundPoint(options, size, alignment, chart) {\n const { caretSize , caretPadding , cornerRadius } = options;\n const { xAlign , yAlign } = alignment;\n const paddingAndSize = caretSize + caretPadding;\n const { topLeft , topRight , bottomLeft , bottomRight } = toTRBLCorners(cornerRadius);\n let x = alignX(size, xAlign);\n const y = alignY(size, yAlign, paddingAndSize);\n if (yAlign === 'center') {\n if (xAlign === 'left') {\n x += paddingAndSize;\n } else if (xAlign === 'right') {\n x -= paddingAndSize;\n }\n } else if (xAlign === 'left') {\n x -= Math.max(topLeft, bottomLeft) + caretSize;\n } else if (xAlign === 'right') {\n x += Math.max(topRight, bottomRight) + caretSize;\n }\n return {\n x: _limitValue(x, 0, chart.width - size.width),\n y: _limitValue(y, 0, chart.height - size.height)\n };\n}\nfunction getAlignedX(tooltip, align, options) {\n const padding = toPadding(options.padding);\n return align === 'center' ? tooltip.x + tooltip.width / 2 : align === 'right' ? tooltip.x + tooltip.width - padding.right : tooltip.x + padding.left;\n}\n function getBeforeAfterBodyLines(callback) {\n return pushOrConcat([], splitNewlines(callback));\n}\nfunction createTooltipContext(parent, tooltip, tooltipItems) {\n return createContext(parent, {\n tooltip,\n tooltipItems,\n type: 'tooltip'\n });\n}\nfunction overrideCallbacks(callbacks, context) {\n const override = context && context.dataset && context.dataset.tooltip && context.dataset.tooltip.callbacks;\n return override ? callbacks.override(override) : callbacks;\n}\nconst defaultCallbacks = {\n beforeTitle: noop,\n title (tooltipItems) {\n if (tooltipItems.length > 0) {\n const item = tooltipItems[0];\n const labels = item.chart.data.labels;\n const labelCount = labels ? labels.length : 0;\n if (this && this.options && this.options.mode === 'dataset') {\n return item.dataset.label || '';\n } else if (item.label) {\n return item.label;\n } else if (labelCount > 0 && item.dataIndex < labelCount) {\n return labels[item.dataIndex];\n }\n }\n return '';\n },\n afterTitle: noop,\n beforeBody: noop,\n beforeLabel: noop,\n label (tooltipItem) {\n if (this && this.options && this.options.mode === 'dataset') {\n return tooltipItem.label + ': ' + tooltipItem.formattedValue || tooltipItem.formattedValue;\n }\n let label = tooltipItem.dataset.label || '';\n if (label) {\n label += ': ';\n }\n const value = tooltipItem.formattedValue;\n if (!isNullOrUndef(value)) {\n label += value;\n }\n return label;\n },\n labelColor (tooltipItem) {\n const meta = tooltipItem.chart.getDatasetMeta(tooltipItem.datasetIndex);\n const options = meta.controller.getStyle(tooltipItem.dataIndex);\n return {\n borderColor: options.borderColor,\n backgroundColor: options.backgroundColor,\n borderWidth: options.borderWidth,\n borderDash: options.borderDash,\n borderDashOffset: options.borderDashOffset,\n borderRadius: 0\n };\n },\n labelTextColor () {\n return this.options.bodyColor;\n },\n labelPointStyle (tooltipItem) {\n const meta = tooltipItem.chart.getDatasetMeta(tooltipItem.datasetIndex);\n const options = meta.controller.getStyle(tooltipItem.dataIndex);\n return {\n pointStyle: options.pointStyle,\n rotation: options.rotation\n };\n },\n afterLabel: noop,\n afterBody: noop,\n beforeFooter: noop,\n footer: noop,\n afterFooter: noop\n};\n function invokeCallbackWithFallback(callbacks, name, ctx, arg) {\n const result = callbacks[name].call(ctx, arg);\n if (typeof result === 'undefined') {\n return defaultCallbacks[name].call(ctx, arg);\n }\n return result;\n}\nclass Tooltip extends Element {\n static positioners = positioners;\n constructor(config){\n super();\n this.opacity = 0;\n this._active = [];\n this._eventPosition = undefined;\n this._size = undefined;\n this._cachedAnimations = undefined;\n this._tooltipItems = [];\n this.$animations = undefined;\n this.$context = undefined;\n this.chart = config.chart;\n this.options = config.options;\n this.dataPoints = undefined;\n this.title = undefined;\n this.beforeBody = undefined;\n this.body = undefined;\n this.afterBody = undefined;\n this.footer = undefined;\n this.xAlign = undefined;\n this.yAlign = undefined;\n this.x = undefined;\n this.y = undefined;\n this.height = undefined;\n this.width = undefined;\n this.caretX = undefined;\n this.caretY = undefined;\n this.labelColors = undefined;\n this.labelPointStyles = undefined;\n this.labelTextColors = undefined;\n }\n initialize(options) {\n this.options = options;\n this._cachedAnimations = undefined;\n this.$context = undefined;\n }\n _resolveAnimations() {\n const cached = this._cachedAnimations;\n if (cached) {\n return cached;\n }\n const chart = this.chart;\n const options = this.options.setContext(this.getContext());\n const opts = options.enabled && chart.options.animation && options.animations;\n const animations = new Animations(this.chart, opts);\n if (opts._cacheable) {\n this._cachedAnimations = Object.freeze(animations);\n }\n return animations;\n }\n getContext() {\n return this.$context || (this.$context = createTooltipContext(this.chart.getContext(), this, this._tooltipItems));\n }\n getTitle(context, options) {\n const { callbacks } = options;\n const beforeTitle = invokeCallbackWithFallback(callbacks, 'beforeTitle', this, context);\n const title = invokeCallbackWithFallback(callbacks, 'title', this, context);\n const afterTitle = invokeCallbackWithFallback(callbacks, 'afterTitle', this, context);\n let lines = [];\n lines = pushOrConcat(lines, splitNewlines(beforeTitle));\n lines = pushOrConcat(lines, splitNewlines(title));\n lines = pushOrConcat(lines, splitNewlines(afterTitle));\n return lines;\n }\n getBeforeBody(tooltipItems, options) {\n return getBeforeAfterBodyLines(invokeCallbackWithFallback(options.callbacks, 'beforeBody', this, tooltipItems));\n }\n getBody(tooltipItems, options) {\n const { callbacks } = options;\n const bodyItems = [];\n each(tooltipItems, (context)=>{\n const bodyItem = {\n before: [],\n lines: [],\n after: []\n };\n const scoped = overrideCallbacks(callbacks, context);\n pushOrConcat(bodyItem.before, splitNewlines(invokeCallbackWithFallback(scoped, 'beforeLabel', this, context)));\n pushOrConcat(bodyItem.lines, invokeCallbackWithFallback(scoped, 'label', this, context));\n pushOrConcat(bodyItem.after, splitNewlines(invokeCallbackWithFallback(scoped, 'afterLabel', this, context)));\n bodyItems.push(bodyItem);\n });\n return bodyItems;\n }\n getAfterBody(tooltipItems, options) {\n return getBeforeAfterBodyLines(invokeCallbackWithFallback(options.callbacks, 'afterBody', this, tooltipItems));\n }\n getFooter(tooltipItems, options) {\n const { callbacks } = options;\n const beforeFooter = invokeCallbackWithFallback(callbacks, 'beforeFooter', this, tooltipItems);\n const footer = invokeCallbackWithFallback(callbacks, 'footer', this, tooltipItems);\n const afterFooter = invokeCallbackWithFallback(callbacks, 'afterFooter', this, tooltipItems);\n let lines = [];\n lines = pushOrConcat(lines, splitNewlines(beforeFooter));\n lines = pushOrConcat(lines, splitNewlines(footer));\n lines = pushOrConcat(lines, splitNewlines(afterFooter));\n return lines;\n }\n _createItems(options) {\n const active = this._active;\n const data = this.chart.data;\n const labelColors = [];\n const labelPointStyles = [];\n const labelTextColors = [];\n let tooltipItems = [];\n let i, len;\n for(i = 0, len = active.length; i < len; ++i){\n tooltipItems.push(createTooltipItem(this.chart, active[i]));\n }\n if (options.filter) {\n tooltipItems = tooltipItems.filter((element, index, array)=>options.filter(element, index, array, data));\n }\n if (options.itemSort) {\n tooltipItems = tooltipItems.sort((a, b)=>options.itemSort(a, b, data));\n }\n each(tooltipItems, (context)=>{\n const scoped = overrideCallbacks(options.callbacks, context);\n labelColors.push(invokeCallbackWithFallback(scoped, 'labelColor', this, context));\n labelPointStyles.push(invokeCallbackWithFallback(scoped, 'labelPointStyle', this, context));\n labelTextColors.push(invokeCallbackWithFallback(scoped, 'labelTextColor', this, context));\n });\n this.labelColors = labelColors;\n this.labelPointStyles = labelPointStyles;\n this.labelTextColors = labelTextColors;\n this.dataPoints = tooltipItems;\n return tooltipItems;\n }\n update(changed, replay) {\n const options = this.options.setContext(this.getContext());\n const active = this._active;\n let properties;\n let tooltipItems = [];\n if (!active.length) {\n if (this.opacity !== 0) {\n properties = {\n opacity: 0\n };\n }\n } else {\n const position = positioners[options.position].call(this, active, this._eventPosition);\n tooltipItems = this._createItems(options);\n this.title = this.getTitle(tooltipItems, options);\n this.beforeBody = this.getBeforeBody(tooltipItems, options);\n this.body = this.getBody(tooltipItems, options);\n this.afterBody = this.getAfterBody(tooltipItems, options);\n this.footer = this.getFooter(tooltipItems, options);\n const size = this._size = getTooltipSize(this, options);\n const positionAndSize = Object.assign({}, position, size);\n const alignment = determineAlignment(this.chart, options, positionAndSize);\n const backgroundPoint = getBackgroundPoint(options, positionAndSize, alignment, this.chart);\n this.xAlign = alignment.xAlign;\n this.yAlign = alignment.yAlign;\n properties = {\n opacity: 1,\n x: backgroundPoint.x,\n y: backgroundPoint.y,\n width: size.width,\n height: size.height,\n caretX: position.x,\n caretY: position.y\n };\n }\n this._tooltipItems = tooltipItems;\n this.$context = undefined;\n if (properties) {\n this._resolveAnimations().update(this, properties);\n }\n if (changed && options.external) {\n options.external.call(this, {\n chart: this.chart,\n tooltip: this,\n replay\n });\n }\n }\n drawCaret(tooltipPoint, ctx, size, options) {\n const caretPosition = this.getCaretPosition(tooltipPoint, size, options);\n ctx.lineTo(caretPosition.x1, caretPosition.y1);\n ctx.lineTo(caretPosition.x2, caretPosition.y2);\n ctx.lineTo(caretPosition.x3, caretPosition.y3);\n }\n getCaretPosition(tooltipPoint, size, options) {\n const { xAlign , yAlign } = this;\n const { caretSize , cornerRadius } = options;\n const { topLeft , topRight , bottomLeft , bottomRight } = toTRBLCorners(cornerRadius);\n const { x: ptX , y: ptY } = tooltipPoint;\n const { width , height } = size;\n let x1, x2, x3, y1, y2, y3;\n if (yAlign === 'center') {\n y2 = ptY + height / 2;\n if (xAlign === 'left') {\n x1 = ptX;\n x2 = x1 - caretSize;\n y1 = y2 + caretSize;\n y3 = y2 - caretSize;\n } else {\n x1 = ptX + width;\n x2 = x1 + caretSize;\n y1 = y2 - caretSize;\n y3 = y2 + caretSize;\n }\n x3 = x1;\n } else {\n if (xAlign === 'left') {\n x2 = ptX + Math.max(topLeft, bottomLeft) + caretSize;\n } else if (xAlign === 'right') {\n x2 = ptX + width - Math.max(topRight, bottomRight) - caretSize;\n } else {\n x2 = this.caretX;\n }\n if (yAlign === 'top') {\n y1 = ptY;\n y2 = y1 - caretSize;\n x1 = x2 - caretSize;\n x3 = x2 + caretSize;\n } else {\n y1 = ptY + height;\n y2 = y1 + caretSize;\n x1 = x2 + caretSize;\n x3 = x2 - caretSize;\n }\n y3 = y1;\n }\n return {\n x1,\n x2,\n x3,\n y1,\n y2,\n y3\n };\n }\n drawTitle(pt, ctx, options) {\n const title = this.title;\n const length = title.length;\n let titleFont, titleSpacing, i;\n if (length) {\n const rtlHelper = getRtlAdapter(options.rtl, this.x, this.width);\n pt.x = getAlignedX(this, options.titleAlign, options);\n ctx.textAlign = rtlHelper.textAlign(options.titleAlign);\n ctx.textBaseline = 'middle';\n titleFont = toFont(options.titleFont);\n titleSpacing = options.titleSpacing;\n ctx.fillStyle = options.titleColor;\n ctx.font = titleFont.string;\n for(i = 0; i < length; ++i){\n ctx.fillText(title[i], rtlHelper.x(pt.x), pt.y + titleFont.lineHeight / 2);\n pt.y += titleFont.lineHeight + titleSpacing;\n if (i + 1 === length) {\n pt.y += options.titleMarginBottom - titleSpacing;\n }\n }\n }\n }\n _drawColorBox(ctx, pt, i, rtlHelper, options) {\n const labelColors = this.labelColors[i];\n const labelPointStyle = this.labelPointStyles[i];\n const { boxHeight , boxWidth , boxPadding } = options;\n const bodyFont = toFont(options.bodyFont);\n const colorX = getAlignedX(this, 'left', options);\n const rtlColorX = rtlHelper.x(colorX);\n const yOffSet = boxHeight < bodyFont.lineHeight ? (bodyFont.lineHeight - boxHeight) / 2 : 0;\n const colorY = pt.y + yOffSet;\n if (options.usePointStyle) {\n const drawOptions = {\n radius: Math.min(boxWidth, boxHeight) / 2,\n pointStyle: labelPointStyle.pointStyle,\n rotation: labelPointStyle.rotation,\n borderWidth: 1\n };\n const centerX = rtlHelper.leftForLtr(rtlColorX, boxWidth) + boxWidth / 2;\n const centerY = colorY + boxHeight / 2;\n ctx.strokeStyle = options.multiKeyBackground;\n ctx.fillStyle = options.multiKeyBackground;\n drawPoint(ctx, drawOptions, centerX, centerY);\n ctx.strokeStyle = labelColors.borderColor;\n ctx.fillStyle = labelColors.backgroundColor;\n drawPoint(ctx, drawOptions, centerX, centerY);\n } else {\n ctx.lineWidth = isObject(labelColors.borderWidth) ? Math.max(...Object.values(labelColors.borderWidth)) : labelColors.borderWidth || 1;\n ctx.strokeStyle = labelColors.borderColor;\n ctx.setLineDash(labelColors.borderDash || []);\n ctx.lineDashOffset = labelColors.borderDashOffset || 0;\n const outerX = rtlHelper.leftForLtr(rtlColorX, boxWidth - boxPadding);\n const innerX = rtlHelper.leftForLtr(rtlHelper.xPlus(rtlColorX, 1), boxWidth - boxPadding - 2);\n const borderRadius = toTRBLCorners(labelColors.borderRadius);\n if (Object.values(borderRadius).some((v)=>v !== 0)) {\n ctx.beginPath();\n ctx.fillStyle = options.multiKeyBackground;\n addRoundedRectPath(ctx, {\n x: outerX,\n y: colorY,\n w: boxWidth,\n h: boxHeight,\n radius: borderRadius\n });\n ctx.fill();\n ctx.stroke();\n ctx.fillStyle = labelColors.backgroundColor;\n ctx.beginPath();\n addRoundedRectPath(ctx, {\n x: innerX,\n y: colorY + 1,\n w: boxWidth - 2,\n h: boxHeight - 2,\n radius: borderRadius\n });\n ctx.fill();\n } else {\n ctx.fillStyle = options.multiKeyBackground;\n ctx.fillRect(outerX, colorY, boxWidth, boxHeight);\n ctx.strokeRect(outerX, colorY, boxWidth, boxHeight);\n ctx.fillStyle = labelColors.backgroundColor;\n ctx.fillRect(innerX, colorY + 1, boxWidth - 2, boxHeight - 2);\n }\n }\n ctx.fillStyle = this.labelTextColors[i];\n }\n drawBody(pt, ctx, options) {\n const { body } = this;\n const { bodySpacing , bodyAlign , displayColors , boxHeight , boxWidth , boxPadding } = options;\n const bodyFont = toFont(options.bodyFont);\n let bodyLineHeight = bodyFont.lineHeight;\n let xLinePadding = 0;\n const rtlHelper = getRtlAdapter(options.rtl, this.x, this.width);\n const fillLineOfText = function(line) {\n ctx.fillText(line, rtlHelper.x(pt.x + xLinePadding), pt.y + bodyLineHeight / 2);\n pt.y += bodyLineHeight + bodySpacing;\n };\n const bodyAlignForCalculation = rtlHelper.textAlign(bodyAlign);\n let bodyItem, textColor, lines, i, j, ilen, jlen;\n ctx.textAlign = bodyAlign;\n ctx.textBaseline = 'middle';\n ctx.font = bodyFont.string;\n pt.x = getAlignedX(this, bodyAlignForCalculation, options);\n ctx.fillStyle = options.bodyColor;\n each(this.beforeBody, fillLineOfText);\n xLinePadding = displayColors && bodyAlignForCalculation !== 'right' ? bodyAlign === 'center' ? boxWidth / 2 + boxPadding : boxWidth + 2 + boxPadding : 0;\n for(i = 0, ilen = body.length; i < ilen; ++i){\n bodyItem = body[i];\n textColor = this.labelTextColors[i];\n ctx.fillStyle = textColor;\n each(bodyItem.before, fillLineOfText);\n lines = bodyItem.lines;\n if (displayColors && lines.length) {\n this._drawColorBox(ctx, pt, i, rtlHelper, options);\n bodyLineHeight = Math.max(bodyFont.lineHeight, boxHeight);\n }\n for(j = 0, jlen = lines.length; j < jlen; ++j){\n fillLineOfText(lines[j]);\n bodyLineHeight = bodyFont.lineHeight;\n }\n each(bodyItem.after, fillLineOfText);\n }\n xLinePadding = 0;\n bodyLineHeight = bodyFont.lineHeight;\n each(this.afterBody, fillLineOfText);\n pt.y -= bodySpacing;\n }\n drawFooter(pt, ctx, options) {\n const footer = this.footer;\n const length = footer.length;\n let footerFont, i;\n if (length) {\n const rtlHelper = getRtlAdapter(options.rtl, this.x, this.width);\n pt.x = getAlignedX(this, options.footerAlign, options);\n pt.y += options.footerMarginTop;\n ctx.textAlign = rtlHelper.textAlign(options.footerAlign);\n ctx.textBaseline = 'middle';\n footerFont = toFont(options.footerFont);\n ctx.fillStyle = options.footerColor;\n ctx.font = footerFont.string;\n for(i = 0; i < length; ++i){\n ctx.fillText(footer[i], rtlHelper.x(pt.x), pt.y + footerFont.lineHeight / 2);\n pt.y += footerFont.lineHeight + options.footerSpacing;\n }\n }\n }\n drawBackground(pt, ctx, tooltipSize, options) {\n const { xAlign , yAlign } = this;\n const { x , y } = pt;\n const { width , height } = tooltipSize;\n const { topLeft , topRight , bottomLeft , bottomRight } = toTRBLCorners(options.cornerRadius);\n ctx.fillStyle = options.backgroundColor;\n ctx.strokeStyle = options.borderColor;\n ctx.lineWidth = options.borderWidth;\n ctx.beginPath();\n ctx.moveTo(x + topLeft, y);\n if (yAlign === 'top') {\n this.drawCaret(pt, ctx, tooltipSize, options);\n }\n ctx.lineTo(x + width - topRight, y);\n ctx.quadraticCurveTo(x + width, y, x + width, y + topRight);\n if (yAlign === 'center' && xAlign === 'right') {\n this.drawCaret(pt, ctx, tooltipSize, options);\n }\n ctx.lineTo(x + width, y + height - bottomRight);\n ctx.quadraticCurveTo(x + width, y + height, x + width - bottomRight, y + height);\n if (yAlign === 'bottom') {\n this.drawCaret(pt, ctx, tooltipSize, options);\n }\n ctx.lineTo(x + bottomLeft, y + height);\n ctx.quadraticCurveTo(x, y + height, x, y + height - bottomLeft);\n if (yAlign === 'center' && xAlign === 'left') {\n this.drawCaret(pt, ctx, tooltipSize, options);\n }\n ctx.lineTo(x, y + topLeft);\n ctx.quadraticCurveTo(x, y, x + topLeft, y);\n ctx.closePath();\n ctx.fill();\n if (options.borderWidth > 0) {\n ctx.stroke();\n }\n }\n _updateAnimationTarget(options) {\n const chart = this.chart;\n const anims = this.$animations;\n const animX = anims && anims.x;\n const animY = anims && anims.y;\n if (animX || animY) {\n const position = positioners[options.position].call(this, this._active, this._eventPosition);\n if (!position) {\n return;\n }\n const size = this._size = getTooltipSize(this, options);\n const positionAndSize = Object.assign({}, position, this._size);\n const alignment = determineAlignment(chart, options, positionAndSize);\n const point = getBackgroundPoint(options, positionAndSize, alignment, chart);\n if (animX._to !== point.x || animY._to !== point.y) {\n this.xAlign = alignment.xAlign;\n this.yAlign = alignment.yAlign;\n this.width = size.width;\n this.height = size.height;\n this.caretX = position.x;\n this.caretY = position.y;\n this._resolveAnimations().update(this, point);\n }\n }\n }\n _willRender() {\n return !!this.opacity;\n }\n draw(ctx) {\n const options = this.options.setContext(this.getContext());\n let opacity = this.opacity;\n if (!opacity) {\n return;\n }\n this._updateAnimationTarget(options);\n const tooltipSize = {\n width: this.width,\n height: this.height\n };\n const pt = {\n x: this.x,\n y: this.y\n };\n opacity = Math.abs(opacity) < 1e-3 ? 0 : opacity;\n const padding = toPadding(options.padding);\n const hasTooltipContent = this.title.length || this.beforeBody.length || this.body.length || this.afterBody.length || this.footer.length;\n if (options.enabled && hasTooltipContent) {\n ctx.save();\n ctx.globalAlpha = opacity;\n this.drawBackground(pt, ctx, tooltipSize, options);\n overrideTextDirection(ctx, options.textDirection);\n pt.y += padding.top;\n this.drawTitle(pt, ctx, options);\n this.drawBody(pt, ctx, options);\n this.drawFooter(pt, ctx, options);\n restoreTextDirection(ctx, options.textDirection);\n ctx.restore();\n }\n }\n getActiveElements() {\n return this._active || [];\n }\n setActiveElements(activeElements, eventPosition) {\n const lastActive = this._active;\n const active = activeElements.map(({ datasetIndex , index })=>{\n const meta = this.chart.getDatasetMeta(datasetIndex);\n if (!meta) {\n throw new Error('Cannot find a dataset at index ' + datasetIndex);\n }\n return {\n datasetIndex,\n element: meta.data[index],\n index\n };\n });\n const changed = !_elementsEqual(lastActive, active);\n const positionChanged = this._positionChanged(active, eventPosition);\n if (changed || positionChanged) {\n this._active = active;\n this._eventPosition = eventPosition;\n this._ignoreReplayEvents = true;\n this.update(true);\n }\n }\n handleEvent(e, replay, inChartArea = true) {\n if (replay && this._ignoreReplayEvents) {\n return false;\n }\n this._ignoreReplayEvents = false;\n const options = this.options;\n const lastActive = this._active || [];\n const active = this._getActiveElements(e, lastActive, replay, inChartArea);\n const positionChanged = this._positionChanged(active, e);\n const changed = replay || !_elementsEqual(active, lastActive) || positionChanged;\n if (changed) {\n this._active = active;\n if (options.enabled || options.external) {\n this._eventPosition = {\n x: e.x,\n y: e.y\n };\n this.update(true, replay);\n }\n }\n return changed;\n }\n _getActiveElements(e, lastActive, replay, inChartArea) {\n const options = this.options;\n if (e.type === 'mouseout') {\n return [];\n }\n if (!inChartArea) {\n return lastActive;\n }\n const active = this.chart.getElementsAtEventForMode(e, options.mode, options, replay);\n if (options.reverse) {\n active.reverse();\n }\n return active;\n }\n _positionChanged(active, e) {\n const { caretX , caretY , options } = this;\n const position = positioners[options.position].call(this, active, e);\n return position !== false && (caretX !== position.x || caretY !== position.y);\n }\n}\nvar plugin_tooltip = {\n id: 'tooltip',\n _element: Tooltip,\n positioners,\n afterInit (chart, _args, options) {\n if (options) {\n chart.tooltip = new Tooltip({\n chart,\n options\n });\n }\n },\n beforeUpdate (chart, _args, options) {\n if (chart.tooltip) {\n chart.tooltip.initialize(options);\n }\n },\n reset (chart, _args, options) {\n if (chart.tooltip) {\n chart.tooltip.initialize(options);\n }\n },\n afterDraw (chart) {\n const tooltip = chart.tooltip;\n if (tooltip && tooltip._willRender()) {\n const args = {\n tooltip\n };\n if (chart.notifyPlugins('beforeTooltipDraw', {\n ...args,\n cancelable: true\n }) === false) {\n return;\n }\n tooltip.draw(chart.ctx);\n chart.notifyPlugins('afterTooltipDraw', args);\n }\n },\n afterEvent (chart, args) {\n if (chart.tooltip) {\n const useFinalPosition = args.replay;\n if (chart.tooltip.handleEvent(args.event, useFinalPosition, args.inChartArea)) {\n args.changed = true;\n }\n }\n },\n defaults: {\n enabled: true,\n external: null,\n position: 'average',\n backgroundColor: 'rgba(0,0,0,0.8)',\n titleColor: '#fff',\n titleFont: {\n weight: 'bold'\n },\n titleSpacing: 2,\n titleMarginBottom: 6,\n titleAlign: 'left',\n bodyColor: '#fff',\n bodySpacing: 2,\n bodyFont: {},\n bodyAlign: 'left',\n footerColor: '#fff',\n footerSpacing: 2,\n footerMarginTop: 6,\n footerFont: {\n weight: 'bold'\n },\n footerAlign: 'left',\n padding: 6,\n caretPadding: 2,\n caretSize: 5,\n cornerRadius: 6,\n boxHeight: (ctx, opts)=>opts.bodyFont.size,\n boxWidth: (ctx, opts)=>opts.bodyFont.size,\n multiKeyBackground: '#fff',\n displayColors: true,\n boxPadding: 0,\n borderColor: 'rgba(0,0,0,0)',\n borderWidth: 0,\n animation: {\n duration: 400,\n easing: 'easeOutQuart'\n },\n animations: {\n numbers: {\n type: 'number',\n properties: [\n 'x',\n 'y',\n 'width',\n 'height',\n 'caretX',\n 'caretY'\n ]\n },\n opacity: {\n easing: 'linear',\n duration: 200\n }\n },\n callbacks: defaultCallbacks\n },\n defaultRoutes: {\n bodyFont: 'font',\n footerFont: 'font',\n titleFont: 'font'\n },\n descriptors: {\n _scriptable: (name)=>name !== 'filter' && name !== 'itemSort' && name !== 'external',\n _indexable: false,\n callbacks: {\n _scriptable: false,\n _indexable: false\n },\n animation: {\n _fallback: false\n },\n animations: {\n _fallback: 'animation'\n }\n },\n additionalOptionScopes: [\n 'interaction'\n ]\n};\n\nvar plugins = /*#__PURE__*/Object.freeze({\n__proto__: null,\nColors: plugin_colors,\nDecimation: plugin_decimation,\nFiller: index,\nLegend: plugin_legend,\nSubTitle: plugin_subtitle,\nTitle: plugin_title,\nTooltip: plugin_tooltip\n});\n\nconst addIfString = (labels, raw, index, addedLabels)=>{\n if (typeof raw === 'string') {\n index = labels.push(raw) - 1;\n addedLabels.unshift({\n index,\n label: raw\n });\n } else if (isNaN(raw)) {\n index = null;\n }\n return index;\n};\nfunction findOrAddLabel(labels, raw, index, addedLabels) {\n const first = labels.indexOf(raw);\n if (first === -1) {\n return addIfString(labels, raw, index, addedLabels);\n }\n const last = labels.lastIndexOf(raw);\n return first !== last ? index : first;\n}\nconst validIndex = (index, max)=>index === null ? null : _limitValue(Math.round(index), 0, max);\nfunction _getLabelForValue(value) {\n const labels = this.getLabels();\n if (value >= 0 && value < labels.length) {\n return labels[value];\n }\n return value;\n}\nclass CategoryScale extends Scale {\n static id = 'category';\n static defaults = {\n ticks: {\n callback: _getLabelForValue\n }\n };\n constructor(cfg){\n super(cfg);\n this._startValue = undefined;\n this._valueRange = 0;\n this._addedLabels = [];\n }\n init(scaleOptions) {\n const added = this._addedLabels;\n if (added.length) {\n const labels = this.getLabels();\n for (const { index , label } of added){\n if (labels[index] === label) {\n labels.splice(index, 1);\n }\n }\n this._addedLabels = [];\n }\n super.init(scaleOptions);\n }\n parse(raw, index) {\n if (isNullOrUndef(raw)) {\n return null;\n }\n const labels = this.getLabels();\n index = isFinite(index) && labels[index] === raw ? index : findOrAddLabel(labels, raw, valueOrDefault(index, raw), this._addedLabels);\n return validIndex(index, labels.length - 1);\n }\n determineDataLimits() {\n const { minDefined , maxDefined } = this.getUserBounds();\n let { min , max } = this.getMinMax(true);\n if (this.options.bounds === 'ticks') {\n if (!minDefined) {\n min = 0;\n }\n if (!maxDefined) {\n max = this.getLabels().length - 1;\n }\n }\n this.min = min;\n this.max = max;\n }\n buildTicks() {\n const min = this.min;\n const max = this.max;\n const offset = this.options.offset;\n const ticks = [];\n let labels = this.getLabels();\n labels = min === 0 && max === labels.length - 1 ? labels : labels.slice(min, max + 1);\n this._valueRange = Math.max(labels.length - (offset ? 0 : 1), 1);\n this._startValue = this.min - (offset ? 0.5 : 0);\n for(let value = min; value <= max; value++){\n ticks.push({\n value\n });\n }\n return ticks;\n }\n getLabelForValue(value) {\n return _getLabelForValue.call(this, value);\n }\n configure() {\n super.configure();\n if (!this.isHorizontal()) {\n this._reversePixels = !this._reversePixels;\n }\n }\n getPixelForValue(value) {\n if (typeof value !== 'number') {\n value = this.parse(value);\n }\n return value === null ? NaN : this.getPixelForDecimal((value - this._startValue) / this._valueRange);\n }\n getPixelForTick(index) {\n const ticks = this.ticks;\n if (index < 0 || index > ticks.length - 1) {\n return null;\n }\n return this.getPixelForValue(ticks[index].value);\n }\n getValueForPixel(pixel) {\n return Math.round(this._startValue + this.getDecimalForPixel(pixel) * this._valueRange);\n }\n getBasePixel() {\n return this.bottom;\n }\n}\n\nfunction generateTicks$1(generationOptions, dataRange) {\n const ticks = [];\n const MIN_SPACING = 1e-14;\n const { bounds , step , min , max , precision , count , maxTicks , maxDigits , includeBounds } = generationOptions;\n const unit = step || 1;\n const maxSpaces = maxTicks - 1;\n const { min: rmin , max: rmax } = dataRange;\n const minDefined = !isNullOrUndef(min);\n const maxDefined = !isNullOrUndef(max);\n const countDefined = !isNullOrUndef(count);\n const minSpacing = (rmax - rmin) / (maxDigits + 1);\n let spacing = niceNum((rmax - rmin) / maxSpaces / unit) * unit;\n let factor, niceMin, niceMax, numSpaces;\n if (spacing < MIN_SPACING && !minDefined && !maxDefined) {\n return [\n {\n value: rmin\n },\n {\n value: rmax\n }\n ];\n }\n numSpaces = Math.ceil(rmax / spacing) - Math.floor(rmin / spacing);\n if (numSpaces > maxSpaces) {\n spacing = niceNum(numSpaces * spacing / maxSpaces / unit) * unit;\n }\n if (!isNullOrUndef(precision)) {\n factor = Math.pow(10, precision);\n spacing = Math.ceil(spacing * factor) / factor;\n }\n if (bounds === 'ticks') {\n niceMin = Math.floor(rmin / spacing) * spacing;\n niceMax = Math.ceil(rmax / spacing) * spacing;\n } else {\n niceMin = rmin;\n niceMax = rmax;\n }\n if (minDefined && maxDefined && step && almostWhole((max - min) / step, spacing / 1000)) {\n numSpaces = Math.round(Math.min((max - min) / spacing, maxTicks));\n spacing = (max - min) / numSpaces;\n niceMin = min;\n niceMax = max;\n } else if (countDefined) {\n niceMin = minDefined ? min : niceMin;\n niceMax = maxDefined ? max : niceMax;\n numSpaces = count - 1;\n spacing = (niceMax - niceMin) / numSpaces;\n } else {\n numSpaces = (niceMax - niceMin) / spacing;\n if (almostEquals(numSpaces, Math.round(numSpaces), spacing / 1000)) {\n numSpaces = Math.round(numSpaces);\n } else {\n numSpaces = Math.ceil(numSpaces);\n }\n }\n const decimalPlaces = Math.max(_decimalPlaces(spacing), _decimalPlaces(niceMin));\n factor = Math.pow(10, isNullOrUndef(precision) ? decimalPlaces : precision);\n niceMin = Math.round(niceMin * factor) / factor;\n niceMax = Math.round(niceMax * factor) / factor;\n let j = 0;\n if (minDefined) {\n if (includeBounds && niceMin !== min) {\n ticks.push({\n value: min\n });\n if (niceMin < min) {\n j++;\n }\n if (almostEquals(Math.round((niceMin + j * spacing) * factor) / factor, min, relativeLabelSize(min, minSpacing, generationOptions))) {\n j++;\n }\n } else if (niceMin < min) {\n j++;\n }\n }\n for(; j < numSpaces; ++j){\n ticks.push({\n value: Math.round((niceMin + j * spacing) * factor) / factor\n });\n }\n if (maxDefined && includeBounds && niceMax !== max) {\n if (ticks.length && almostEquals(ticks[ticks.length - 1].value, max, relativeLabelSize(max, minSpacing, generationOptions))) {\n ticks[ticks.length - 1].value = max;\n } else {\n ticks.push({\n value: max\n });\n }\n } else if (!maxDefined || niceMax === max) {\n ticks.push({\n value: niceMax\n });\n }\n return ticks;\n}\nfunction relativeLabelSize(value, minSpacing, { horizontal , minRotation }) {\n const rad = toRadians(minRotation);\n const ratio = (horizontal ? Math.sin(rad) : Math.cos(rad)) || 0.001;\n const length = 0.75 * minSpacing * ('' + value).length;\n return Math.min(minSpacing / ratio, length);\n}\nclass LinearScaleBase extends Scale {\n constructor(cfg){\n super(cfg);\n this.start = undefined;\n this.end = undefined;\n this._startValue = undefined;\n this._endValue = undefined;\n this._valueRange = 0;\n }\n parse(raw, index) {\n if (isNullOrUndef(raw)) {\n return null;\n }\n if ((typeof raw === 'number' || raw instanceof Number) && !isFinite(+raw)) {\n return null;\n }\n return +raw;\n }\n handleTickRangeOptions() {\n const { beginAtZero } = this.options;\n const { minDefined , maxDefined } = this.getUserBounds();\n let { min , max } = this;\n const setMin = (v)=>min = minDefined ? min : v;\n const setMax = (v)=>max = maxDefined ? max : v;\n if (beginAtZero) {\n const minSign = sign(min);\n const maxSign = sign(max);\n if (minSign < 0 && maxSign < 0) {\n setMax(0);\n } else if (minSign > 0 && maxSign > 0) {\n setMin(0);\n }\n }\n if (min === max) {\n let offset = max === 0 ? 1 : Math.abs(max * 0.05);\n setMax(max + offset);\n if (!beginAtZero) {\n setMin(min - offset);\n }\n }\n this.min = min;\n this.max = max;\n }\n getTickLimit() {\n const tickOpts = this.options.ticks;\n let { maxTicksLimit , stepSize } = tickOpts;\n let maxTicks;\n if (stepSize) {\n maxTicks = Math.ceil(this.max / stepSize) - Math.floor(this.min / stepSize) + 1;\n if (maxTicks > 1000) {\n console.warn(`scales.${this.id}.ticks.stepSize: ${stepSize} would result generating up to ${maxTicks} ticks. Limiting to 1000.`);\n maxTicks = 1000;\n }\n } else {\n maxTicks = this.computeTickLimit();\n maxTicksLimit = maxTicksLimit || 11;\n }\n if (maxTicksLimit) {\n maxTicks = Math.min(maxTicksLimit, maxTicks);\n }\n return maxTicks;\n }\n computeTickLimit() {\n return Number.POSITIVE_INFINITY;\n }\n buildTicks() {\n const opts = this.options;\n const tickOpts = opts.ticks;\n let maxTicks = this.getTickLimit();\n maxTicks = Math.max(2, maxTicks);\n const numericGeneratorOptions = {\n maxTicks,\n bounds: opts.bounds,\n min: opts.min,\n max: opts.max,\n precision: tickOpts.precision,\n step: tickOpts.stepSize,\n count: tickOpts.count,\n maxDigits: this._maxDigits(),\n horizontal: this.isHorizontal(),\n minRotation: tickOpts.minRotation || 0,\n includeBounds: tickOpts.includeBounds !== false\n };\n const dataRange = this._range || this;\n const ticks = generateTicks$1(numericGeneratorOptions, dataRange);\n if (opts.bounds === 'ticks') {\n _setMinAndMaxByKey(ticks, this, 'value');\n }\n if (opts.reverse) {\n ticks.reverse();\n this.start = this.max;\n this.end = this.min;\n } else {\n this.start = this.min;\n this.end = this.max;\n }\n return ticks;\n }\n configure() {\n const ticks = this.ticks;\n let start = this.min;\n let end = this.max;\n super.configure();\n if (this.options.offset && ticks.length) {\n const offset = (end - start) / Math.max(ticks.length - 1, 1) / 2;\n start -= offset;\n end += offset;\n }\n this._startValue = start;\n this._endValue = end;\n this._valueRange = end - start;\n }\n getLabelForValue(value) {\n return formatNumber(value, this.chart.options.locale, this.options.ticks.format);\n }\n}\n\nclass LinearScale extends LinearScaleBase {\n static id = 'linear';\n static defaults = {\n ticks: {\n callback: Ticks.formatters.numeric\n }\n };\n determineDataLimits() {\n const { min , max } = this.getMinMax(true);\n this.min = isNumberFinite(min) ? min : 0;\n this.max = isNumberFinite(max) ? max : 1;\n this.handleTickRangeOptions();\n }\n computeTickLimit() {\n const horizontal = this.isHorizontal();\n const length = horizontal ? this.width : this.height;\n const minRotation = toRadians(this.options.ticks.minRotation);\n const ratio = (horizontal ? Math.sin(minRotation) : Math.cos(minRotation)) || 0.001;\n const tickFont = this._resolveTickFontOptions(0);\n return Math.ceil(length / Math.min(40, tickFont.lineHeight / ratio));\n }\n getPixelForValue(value) {\n return value === null ? NaN : this.getPixelForDecimal((value - this._startValue) / this._valueRange);\n }\n getValueForPixel(pixel) {\n return this._startValue + this.getDecimalForPixel(pixel) * this._valueRange;\n }\n}\n\nconst log10Floor = (v)=>Math.floor(log10(v));\nconst changeExponent = (v, m)=>Math.pow(10, log10Floor(v) + m);\nfunction isMajor(tickVal) {\n const remain = tickVal / Math.pow(10, log10Floor(tickVal));\n return remain === 1;\n}\nfunction steps(min, max, rangeExp) {\n const rangeStep = Math.pow(10, rangeExp);\n const start = Math.floor(min / rangeStep);\n const end = Math.ceil(max / rangeStep);\n return end - start;\n}\nfunction startExp(min, max) {\n const range = max - min;\n let rangeExp = log10Floor(range);\n while(steps(min, max, rangeExp) > 10){\n rangeExp++;\n }\n while(steps(min, max, rangeExp) < 10){\n rangeExp--;\n }\n return Math.min(rangeExp, log10Floor(min));\n}\n function generateTicks(generationOptions, { min , max }) {\n min = finiteOrDefault(generationOptions.min, min);\n const ticks = [];\n const minExp = log10Floor(min);\n let exp = startExp(min, max);\n let precision = exp < 0 ? Math.pow(10, Math.abs(exp)) : 1;\n const stepSize = Math.pow(10, exp);\n const base = minExp > exp ? Math.pow(10, minExp) : 0;\n const start = Math.round((min - base) * precision) / precision;\n const offset = Math.floor((min - base) / stepSize / 10) * stepSize * 10;\n let significand = Math.floor((start - offset) / Math.pow(10, exp));\n let value = finiteOrDefault(generationOptions.min, Math.round((base + offset + significand * Math.pow(10, exp)) * precision) / precision);\n while(value < max){\n ticks.push({\n value,\n major: isMajor(value),\n significand\n });\n if (significand >= 10) {\n significand = significand < 15 ? 15 : 20;\n } else {\n significand++;\n }\n if (significand >= 20) {\n exp++;\n significand = 2;\n precision = exp >= 0 ? 1 : precision;\n }\n value = Math.round((base + offset + significand * Math.pow(10, exp)) * precision) / precision;\n }\n const lastTick = finiteOrDefault(generationOptions.max, value);\n ticks.push({\n value: lastTick,\n major: isMajor(lastTick),\n significand\n });\n return ticks;\n}\nclass LogarithmicScale extends Scale {\n static id = 'logarithmic';\n static defaults = {\n ticks: {\n callback: Ticks.formatters.logarithmic,\n major: {\n enabled: true\n }\n }\n };\n constructor(cfg){\n super(cfg);\n this.start = undefined;\n this.end = undefined;\n this._startValue = undefined;\n this._valueRange = 0;\n }\n parse(raw, index) {\n const value = LinearScaleBase.prototype.parse.apply(this, [\n raw,\n index\n ]);\n if (value === 0) {\n this._zero = true;\n return undefined;\n }\n return isNumberFinite(value) && value > 0 ? value : null;\n }\n determineDataLimits() {\n const { min , max } = this.getMinMax(true);\n this.min = isNumberFinite(min) ? Math.max(0, min) : null;\n this.max = isNumberFinite(max) ? Math.max(0, max) : null;\n if (this.options.beginAtZero) {\n this._zero = true;\n }\n if (this._zero && this.min !== this._suggestedMin && !isNumberFinite(this._userMin)) {\n this.min = min === changeExponent(this.min, 0) ? changeExponent(this.min, -1) : changeExponent(this.min, 0);\n }\n this.handleTickRangeOptions();\n }\n handleTickRangeOptions() {\n const { minDefined , maxDefined } = this.getUserBounds();\n let min = this.min;\n let max = this.max;\n const setMin = (v)=>min = minDefined ? min : v;\n const setMax = (v)=>max = maxDefined ? max : v;\n if (min === max) {\n if (min <= 0) {\n setMin(1);\n setMax(10);\n } else {\n setMin(changeExponent(min, -1));\n setMax(changeExponent(max, +1));\n }\n }\n if (min <= 0) {\n setMin(changeExponent(max, -1));\n }\n if (max <= 0) {\n setMax(changeExponent(min, +1));\n }\n this.min = min;\n this.max = max;\n }\n buildTicks() {\n const opts = this.options;\n const generationOptions = {\n min: this._userMin,\n max: this._userMax\n };\n const ticks = generateTicks(generationOptions, this);\n if (opts.bounds === 'ticks') {\n _setMinAndMaxByKey(ticks, this, 'value');\n }\n if (opts.reverse) {\n ticks.reverse();\n this.start = this.max;\n this.end = this.min;\n } else {\n this.start = this.min;\n this.end = this.max;\n }\n return ticks;\n }\n getLabelForValue(value) {\n return value === undefined ? '0' : formatNumber(value, this.chart.options.locale, this.options.ticks.format);\n }\n configure() {\n const start = this.min;\n super.configure();\n this._startValue = log10(start);\n this._valueRange = log10(this.max) - log10(start);\n }\n getPixelForValue(value) {\n if (value === undefined || value === 0) {\n value = this.min;\n }\n if (value === null || isNaN(value)) {\n return NaN;\n }\n return this.getPixelForDecimal(value === this.min ? 0 : (log10(value) - this._startValue) / this._valueRange);\n }\n getValueForPixel(pixel) {\n const decimal = this.getDecimalForPixel(pixel);\n return Math.pow(10, this._startValue + decimal * this._valueRange);\n }\n}\n\nfunction getTickBackdropHeight(opts) {\n const tickOpts = opts.ticks;\n if (tickOpts.display && opts.display) {\n const padding = toPadding(tickOpts.backdropPadding);\n return valueOrDefault(tickOpts.font && tickOpts.font.size, defaults.font.size) + padding.height;\n }\n return 0;\n}\nfunction measureLabelSize(ctx, font, label) {\n label = isArray(label) ? label : [\n label\n ];\n return {\n w: _longestText(ctx, font.string, label),\n h: label.length * font.lineHeight\n };\n}\nfunction determineLimits(angle, pos, size, min, max) {\n if (angle === min || angle === max) {\n return {\n start: pos - size / 2,\n end: pos + size / 2\n };\n } else if (angle < min || angle > max) {\n return {\n start: pos - size,\n end: pos\n };\n }\n return {\n start: pos,\n end: pos + size\n };\n}\n function fitWithPointLabels(scale) {\n const orig = {\n l: scale.left + scale._padding.left,\n r: scale.right - scale._padding.right,\n t: scale.top + scale._padding.top,\n b: scale.bottom - scale._padding.bottom\n };\n const limits = Object.assign({}, orig);\n const labelSizes = [];\n const padding = [];\n const valueCount = scale._pointLabels.length;\n const pointLabelOpts = scale.options.pointLabels;\n const additionalAngle = pointLabelOpts.centerPointLabels ? PI / valueCount : 0;\n for(let i = 0; i < valueCount; i++){\n const opts = pointLabelOpts.setContext(scale.getPointLabelContext(i));\n padding[i] = opts.padding;\n const pointPosition = scale.getPointPosition(i, scale.drawingArea + padding[i], additionalAngle);\n const plFont = toFont(opts.font);\n const textSize = measureLabelSize(scale.ctx, plFont, scale._pointLabels[i]);\n labelSizes[i] = textSize;\n const angleRadians = _normalizeAngle(scale.getIndexAngle(i) + additionalAngle);\n const angle = Math.round(toDegrees(angleRadians));\n const hLimits = determineLimits(angle, pointPosition.x, textSize.w, 0, 180);\n const vLimits = determineLimits(angle, pointPosition.y, textSize.h, 90, 270);\n updateLimits(limits, orig, angleRadians, hLimits, vLimits);\n }\n scale.setCenterPoint(orig.l - limits.l, limits.r - orig.r, orig.t - limits.t, limits.b - orig.b);\n scale._pointLabelItems = buildPointLabelItems(scale, labelSizes, padding);\n}\nfunction updateLimits(limits, orig, angle, hLimits, vLimits) {\n const sin = Math.abs(Math.sin(angle));\n const cos = Math.abs(Math.cos(angle));\n let x = 0;\n let y = 0;\n if (hLimits.start < orig.l) {\n x = (orig.l - hLimits.start) / sin;\n limits.l = Math.min(limits.l, orig.l - x);\n } else if (hLimits.end > orig.r) {\n x = (hLimits.end - orig.r) / sin;\n limits.r = Math.max(limits.r, orig.r + x);\n }\n if (vLimits.start < orig.t) {\n y = (orig.t - vLimits.start) / cos;\n limits.t = Math.min(limits.t, orig.t - y);\n } else if (vLimits.end > orig.b) {\n y = (vLimits.end - orig.b) / cos;\n limits.b = Math.max(limits.b, orig.b + y);\n }\n}\nfunction buildPointLabelItems(scale, labelSizes, padding) {\n const items = [];\n const valueCount = scale._pointLabels.length;\n const opts = scale.options;\n const extra = getTickBackdropHeight(opts) / 2;\n const outerDistance = scale.drawingArea;\n const additionalAngle = opts.pointLabels.centerPointLabels ? PI / valueCount : 0;\n for(let i = 0; i < valueCount; i++){\n const pointLabelPosition = scale.getPointPosition(i, outerDistance + extra + padding[i], additionalAngle);\n const angle = Math.round(toDegrees(_normalizeAngle(pointLabelPosition.angle + HALF_PI)));\n const size = labelSizes[i];\n const y = yForAngle(pointLabelPosition.y, size.h, angle);\n const textAlign = getTextAlignForAngle(angle);\n const left = leftForTextAlign(pointLabelPosition.x, size.w, textAlign);\n items.push({\n x: pointLabelPosition.x,\n y,\n textAlign,\n left,\n top: y,\n right: left + size.w,\n bottom: y + size.h\n });\n }\n return items;\n}\nfunction getTextAlignForAngle(angle) {\n if (angle === 0 || angle === 180) {\n return 'center';\n } else if (angle < 180) {\n return 'left';\n }\n return 'right';\n}\nfunction leftForTextAlign(x, w, align) {\n if (align === 'right') {\n x -= w;\n } else if (align === 'center') {\n x -= w / 2;\n }\n return x;\n}\nfunction yForAngle(y, h, angle) {\n if (angle === 90 || angle === 270) {\n y -= h / 2;\n } else if (angle > 270 || angle < 90) {\n y -= h;\n }\n return y;\n}\nfunction drawPointLabels(scale, labelCount) {\n const { ctx , options: { pointLabels } } = scale;\n for(let i = labelCount - 1; i >= 0; i--){\n const optsAtIndex = pointLabels.setContext(scale.getPointLabelContext(i));\n const plFont = toFont(optsAtIndex.font);\n const { x , y , textAlign , left , top , right , bottom } = scale._pointLabelItems[i];\n const { backdropColor } = optsAtIndex;\n if (!isNullOrUndef(backdropColor)) {\n const borderRadius = toTRBLCorners(optsAtIndex.borderRadius);\n const padding = toPadding(optsAtIndex.backdropPadding);\n ctx.fillStyle = backdropColor;\n const backdropLeft = left - padding.left;\n const backdropTop = top - padding.top;\n const backdropWidth = right - left + padding.width;\n const backdropHeight = bottom - top + padding.height;\n if (Object.values(borderRadius).some((v)=>v !== 0)) {\n ctx.beginPath();\n addRoundedRectPath(ctx, {\n x: backdropLeft,\n y: backdropTop,\n w: backdropWidth,\n h: backdropHeight,\n radius: borderRadius\n });\n ctx.fill();\n } else {\n ctx.fillRect(backdropLeft, backdropTop, backdropWidth, backdropHeight);\n }\n }\n renderText(ctx, scale._pointLabels[i], x, y + plFont.lineHeight / 2, plFont, {\n color: optsAtIndex.color,\n textAlign: textAlign,\n textBaseline: 'middle'\n });\n }\n}\nfunction pathRadiusLine(scale, radius, circular, labelCount) {\n const { ctx } = scale;\n if (circular) {\n ctx.arc(scale.xCenter, scale.yCenter, radius, 0, TAU);\n } else {\n let pointPosition = scale.getPointPosition(0, radius);\n ctx.moveTo(pointPosition.x, pointPosition.y);\n for(let i = 1; i < labelCount; i++){\n pointPosition = scale.getPointPosition(i, radius);\n ctx.lineTo(pointPosition.x, pointPosition.y);\n }\n }\n}\nfunction drawRadiusLine(scale, gridLineOpts, radius, labelCount, borderOpts) {\n const ctx = scale.ctx;\n const circular = gridLineOpts.circular;\n const { color , lineWidth } = gridLineOpts;\n if (!circular && !labelCount || !color || !lineWidth || radius < 0) {\n return;\n }\n ctx.save();\n ctx.strokeStyle = color;\n ctx.lineWidth = lineWidth;\n ctx.setLineDash(borderOpts.dash);\n ctx.lineDashOffset = borderOpts.dashOffset;\n ctx.beginPath();\n pathRadiusLine(scale, radius, circular, labelCount);\n ctx.closePath();\n ctx.stroke();\n ctx.restore();\n}\nfunction createPointLabelContext(parent, index, label) {\n return createContext(parent, {\n label,\n index,\n type: 'pointLabel'\n });\n}\nclass RadialLinearScale extends LinearScaleBase {\n static id = 'radialLinear';\n static defaults = {\n display: true,\n animate: true,\n position: 'chartArea',\n angleLines: {\n display: true,\n lineWidth: 1,\n borderDash: [],\n borderDashOffset: 0.0\n },\n grid: {\n circular: false\n },\n startAngle: 0,\n ticks: {\n showLabelBackdrop: true,\n callback: Ticks.formatters.numeric\n },\n pointLabels: {\n backdropColor: undefined,\n backdropPadding: 2,\n display: true,\n font: {\n size: 10\n },\n callback (label) {\n return label;\n },\n padding: 5,\n centerPointLabels: false\n }\n };\n static defaultRoutes = {\n 'angleLines.color': 'borderColor',\n 'pointLabels.color': 'color',\n 'ticks.color': 'color'\n };\n static descriptors = {\n angleLines: {\n _fallback: 'grid'\n }\n };\n constructor(cfg){\n super(cfg);\n this.xCenter = undefined;\n this.yCenter = undefined;\n this.drawingArea = undefined;\n this._pointLabels = [];\n this._pointLabelItems = [];\n }\n setDimensions() {\n const padding = this._padding = toPadding(getTickBackdropHeight(this.options) / 2);\n const w = this.width = this.maxWidth - padding.width;\n const h = this.height = this.maxHeight - padding.height;\n this.xCenter = Math.floor(this.left + w / 2 + padding.left);\n this.yCenter = Math.floor(this.top + h / 2 + padding.top);\n this.drawingArea = Math.floor(Math.min(w, h) / 2);\n }\n determineDataLimits() {\n const { min , max } = this.getMinMax(false);\n this.min = isNumberFinite(min) && !isNaN(min) ? min : 0;\n this.max = isNumberFinite(max) && !isNaN(max) ? max : 0;\n this.handleTickRangeOptions();\n }\n computeTickLimit() {\n return Math.ceil(this.drawingArea / getTickBackdropHeight(this.options));\n }\n generateTickLabels(ticks) {\n LinearScaleBase.prototype.generateTickLabels.call(this, ticks);\n this._pointLabels = this.getLabels().map((value, index)=>{\n const label = callback(this.options.pointLabels.callback, [\n value,\n index\n ], this);\n return label || label === 0 ? label : '';\n }).filter((v, i)=>this.chart.getDataVisibility(i));\n }\n fit() {\n const opts = this.options;\n if (opts.display && opts.pointLabels.display) {\n fitWithPointLabels(this);\n } else {\n this.setCenterPoint(0, 0, 0, 0);\n }\n }\n setCenterPoint(leftMovement, rightMovement, topMovement, bottomMovement) {\n this.xCenter += Math.floor((leftMovement - rightMovement) / 2);\n this.yCenter += Math.floor((topMovement - bottomMovement) / 2);\n this.drawingArea -= Math.min(this.drawingArea / 2, Math.max(leftMovement, rightMovement, topMovement, bottomMovement));\n }\n getIndexAngle(index) {\n const angleMultiplier = TAU / (this._pointLabels.length || 1);\n const startAngle = this.options.startAngle || 0;\n return _normalizeAngle(index * angleMultiplier + toRadians(startAngle));\n }\n getDistanceFromCenterForValue(value) {\n if (isNullOrUndef(value)) {\n return NaN;\n }\n const scalingFactor = this.drawingArea / (this.max - this.min);\n if (this.options.reverse) {\n return (this.max - value) * scalingFactor;\n }\n return (value - this.min) * scalingFactor;\n }\n getValueForDistanceFromCenter(distance) {\n if (isNullOrUndef(distance)) {\n return NaN;\n }\n const scaledDistance = distance / (this.drawingArea / (this.max - this.min));\n return this.options.reverse ? this.max - scaledDistance : this.min + scaledDistance;\n }\n getPointLabelContext(index) {\n const pointLabels = this._pointLabels || [];\n if (index >= 0 && index < pointLabels.length) {\n const pointLabel = pointLabels[index];\n return createPointLabelContext(this.getContext(), index, pointLabel);\n }\n }\n getPointPosition(index, distanceFromCenter, additionalAngle = 0) {\n const angle = this.getIndexAngle(index) - HALF_PI + additionalAngle;\n return {\n x: Math.cos(angle) * distanceFromCenter + this.xCenter,\n y: Math.sin(angle) * distanceFromCenter + this.yCenter,\n angle\n };\n }\n getPointPositionForValue(index, value) {\n return this.getPointPosition(index, this.getDistanceFromCenterForValue(value));\n }\n getBasePosition(index) {\n return this.getPointPositionForValue(index || 0, this.getBaseValue());\n }\n getPointLabelPosition(index) {\n const { left , top , right , bottom } = this._pointLabelItems[index];\n return {\n left,\n top,\n right,\n bottom\n };\n }\n drawBackground() {\n const { backgroundColor , grid: { circular } } = this.options;\n if (backgroundColor) {\n const ctx = this.ctx;\n ctx.save();\n ctx.beginPath();\n pathRadiusLine(this, this.getDistanceFromCenterForValue(this._endValue), circular, this._pointLabels.length);\n ctx.closePath();\n ctx.fillStyle = backgroundColor;\n ctx.fill();\n ctx.restore();\n }\n }\n drawGrid() {\n const ctx = this.ctx;\n const opts = this.options;\n const { angleLines , grid , border } = opts;\n const labelCount = this._pointLabels.length;\n let i, offset, position;\n if (opts.pointLabels.display) {\n drawPointLabels(this, labelCount);\n }\n if (grid.display) {\n this.ticks.forEach((tick, index)=>{\n if (index !== 0) {\n offset = this.getDistanceFromCenterForValue(tick.value);\n const context = this.getContext(index);\n const optsAtIndex = grid.setContext(context);\n const optsAtIndexBorder = border.setContext(context);\n drawRadiusLine(this, optsAtIndex, offset, labelCount, optsAtIndexBorder);\n }\n });\n }\n if (angleLines.display) {\n ctx.save();\n for(i = labelCount - 1; i >= 0; i--){\n const optsAtIndex = angleLines.setContext(this.getPointLabelContext(i));\n const { color , lineWidth } = optsAtIndex;\n if (!lineWidth || !color) {\n continue;\n }\n ctx.lineWidth = lineWidth;\n ctx.strokeStyle = color;\n ctx.setLineDash(optsAtIndex.borderDash);\n ctx.lineDashOffset = optsAtIndex.borderDashOffset;\n offset = this.getDistanceFromCenterForValue(opts.ticks.reverse ? this.min : this.max);\n position = this.getPointPosition(i, offset);\n ctx.beginPath();\n ctx.moveTo(this.xCenter, this.yCenter);\n ctx.lineTo(position.x, position.y);\n ctx.stroke();\n }\n ctx.restore();\n }\n }\n drawBorder() {}\n drawLabels() {\n const ctx = this.ctx;\n const opts = this.options;\n const tickOpts = opts.ticks;\n if (!tickOpts.display) {\n return;\n }\n const startAngle = this.getIndexAngle(0);\n let offset, width;\n ctx.save();\n ctx.translate(this.xCenter, this.yCenter);\n ctx.rotate(startAngle);\n ctx.textAlign = 'center';\n ctx.textBaseline = 'middle';\n this.ticks.forEach((tick, index)=>{\n if (index === 0 && !opts.reverse) {\n return;\n }\n const optsAtIndex = tickOpts.setContext(this.getContext(index));\n const tickFont = toFont(optsAtIndex.font);\n offset = this.getDistanceFromCenterForValue(this.ticks[index].value);\n if (optsAtIndex.showLabelBackdrop) {\n ctx.font = tickFont.string;\n width = ctx.measureText(tick.label).width;\n ctx.fillStyle = optsAtIndex.backdropColor;\n const padding = toPadding(optsAtIndex.backdropPadding);\n ctx.fillRect(-width / 2 - padding.left, -offset - tickFont.size / 2 - padding.top, width + padding.width, tickFont.size + padding.height);\n }\n renderText(ctx, tick.label, 0, -offset, tickFont, {\n color: optsAtIndex.color\n });\n });\n ctx.restore();\n }\n drawTitle() {}\n}\n\nconst INTERVALS = {\n millisecond: {\n common: true,\n size: 1,\n steps: 1000\n },\n second: {\n common: true,\n size: 1000,\n steps: 60\n },\n minute: {\n common: true,\n size: 60000,\n steps: 60\n },\n hour: {\n common: true,\n size: 3600000,\n steps: 24\n },\n day: {\n common: true,\n size: 86400000,\n steps: 30\n },\n week: {\n common: false,\n size: 604800000,\n steps: 4\n },\n month: {\n common: true,\n size: 2.628e9,\n steps: 12\n },\n quarter: {\n common: false,\n size: 7.884e9,\n steps: 4\n },\n year: {\n common: true,\n size: 3.154e10\n }\n};\n const UNITS = /* #__PURE__ */ Object.keys(INTERVALS);\n function sorter(a, b) {\n return a - b;\n}\n function parse(scale, input) {\n if (isNullOrUndef(input)) {\n return null;\n }\n const adapter = scale._adapter;\n const { parser , round , isoWeekday } = scale._parseOpts;\n let value = input;\n if (typeof parser === 'function') {\n value = parser(value);\n }\n if (!isNumberFinite(value)) {\n value = typeof parser === 'string' ? adapter.parse(value, parser) : adapter.parse(value);\n }\n if (value === null) {\n return null;\n }\n if (round) {\n value = round === 'week' && (isNumber(isoWeekday) || isoWeekday === true) ? adapter.startOf(value, 'isoWeek', isoWeekday) : adapter.startOf(value, round);\n }\n return +value;\n}\n function determineUnitForAutoTicks(minUnit, min, max, capacity) {\n const ilen = UNITS.length;\n for(let i = UNITS.indexOf(minUnit); i < ilen - 1; ++i){\n const interval = INTERVALS[UNITS[i]];\n const factor = interval.steps ? interval.steps : Number.MAX_SAFE_INTEGER;\n if (interval.common && Math.ceil((max - min) / (factor * interval.size)) <= capacity) {\n return UNITS[i];\n }\n }\n return UNITS[ilen - 1];\n}\n function determineUnitForFormatting(scale, numTicks, minUnit, min, max) {\n for(let i = UNITS.length - 1; i >= UNITS.indexOf(minUnit); i--){\n const unit = UNITS[i];\n if (INTERVALS[unit].common && scale._adapter.diff(max, min, unit) >= numTicks - 1) {\n return unit;\n }\n }\n return UNITS[minUnit ? UNITS.indexOf(minUnit) : 0];\n}\n function determineMajorUnit(unit) {\n for(let i = UNITS.indexOf(unit) + 1, ilen = UNITS.length; i < ilen; ++i){\n if (INTERVALS[UNITS[i]].common) {\n return UNITS[i];\n }\n }\n}\n function addTick(ticks, time, timestamps) {\n if (!timestamps) {\n ticks[time] = true;\n } else if (timestamps.length) {\n const { lo , hi } = _lookup(timestamps, time);\n const timestamp = timestamps[lo] >= time ? timestamps[lo] : timestamps[hi];\n ticks[timestamp] = true;\n }\n}\n function setMajorTicks(scale, ticks, map, majorUnit) {\n const adapter = scale._adapter;\n const first = +adapter.startOf(ticks[0].value, majorUnit);\n const last = ticks[ticks.length - 1].value;\n let major, index;\n for(major = first; major <= last; major = +adapter.add(major, 1, majorUnit)){\n index = map[major];\n if (index >= 0) {\n ticks[index].major = true;\n }\n }\n return ticks;\n}\n function ticksFromTimestamps(scale, values, majorUnit) {\n const ticks = [];\n const map = {};\n const ilen = values.length;\n let i, value;\n for(i = 0; i < ilen; ++i){\n value = values[i];\n map[value] = i;\n ticks.push({\n value,\n major: false\n });\n }\n return ilen === 0 || !majorUnit ? ticks : setMajorTicks(scale, ticks, map, majorUnit);\n}\nclass TimeScale extends Scale {\n static id = 'time';\n static defaults = {\n bounds: 'data',\n adapters: {},\n time: {\n parser: false,\n unit: false,\n round: false,\n isoWeekday: false,\n minUnit: 'millisecond',\n displayFormats: {}\n },\n ticks: {\n source: 'auto',\n callback: false,\n major: {\n enabled: false\n }\n }\n };\n constructor(props){\n super(props);\n this._cache = {\n data: [],\n labels: [],\n all: []\n };\n this._unit = 'day';\n this._majorUnit = undefined;\n this._offsets = {};\n this._normalized = false;\n this._parseOpts = undefined;\n }\n init(scaleOpts, opts = {}) {\n const time = scaleOpts.time || (scaleOpts.time = {});\n const adapter = this._adapter = new adapters._date(scaleOpts.adapters.date);\n adapter.init(opts);\n mergeIf(time.displayFormats, adapter.formats());\n this._parseOpts = {\n parser: time.parser,\n round: time.round,\n isoWeekday: time.isoWeekday\n };\n super.init(scaleOpts);\n this._normalized = opts.normalized;\n }\n parse(raw, index) {\n if (raw === undefined) {\n return null;\n }\n return parse(this, raw);\n }\n beforeLayout() {\n super.beforeLayout();\n this._cache = {\n data: [],\n labels: [],\n all: []\n };\n }\n determineDataLimits() {\n const options = this.options;\n const adapter = this._adapter;\n const unit = options.time.unit || 'day';\n let { min , max , minDefined , maxDefined } = this.getUserBounds();\n function _applyBounds(bounds) {\n if (!minDefined && !isNaN(bounds.min)) {\n min = Math.min(min, bounds.min);\n }\n if (!maxDefined && !isNaN(bounds.max)) {\n max = Math.max(max, bounds.max);\n }\n }\n if (!minDefined || !maxDefined) {\n _applyBounds(this._getLabelBounds());\n if (options.bounds !== 'ticks' || options.ticks.source !== 'labels') {\n _applyBounds(this.getMinMax(false));\n }\n }\n min = isNumberFinite(min) && !isNaN(min) ? min : +adapter.startOf(Date.now(), unit);\n max = isNumberFinite(max) && !isNaN(max) ? max : +adapter.endOf(Date.now(), unit) + 1;\n this.min = Math.min(min, max - 1);\n this.max = Math.max(min + 1, max);\n }\n _getLabelBounds() {\n const arr = this.getLabelTimestamps();\n let min = Number.POSITIVE_INFINITY;\n let max = Number.NEGATIVE_INFINITY;\n if (arr.length) {\n min = arr[0];\n max = arr[arr.length - 1];\n }\n return {\n min,\n max\n };\n }\n buildTicks() {\n const options = this.options;\n const timeOpts = options.time;\n const tickOpts = options.ticks;\n const timestamps = tickOpts.source === 'labels' ? this.getLabelTimestamps() : this._generate();\n if (options.bounds === 'ticks' && timestamps.length) {\n this.min = this._userMin || timestamps[0];\n this.max = this._userMax || timestamps[timestamps.length - 1];\n }\n const min = this.min;\n const max = this.max;\n const ticks = _filterBetween(timestamps, min, max);\n this._unit = timeOpts.unit || (tickOpts.autoSkip ? determineUnitForAutoTicks(timeOpts.minUnit, this.min, this.max, this._getLabelCapacity(min)) : determineUnitForFormatting(this, ticks.length, timeOpts.minUnit, this.min, this.max));\n this._majorUnit = !tickOpts.major.enabled || this._unit === 'year' ? undefined : determineMajorUnit(this._unit);\n this.initOffsets(timestamps);\n if (options.reverse) {\n ticks.reverse();\n }\n return ticksFromTimestamps(this, ticks, this._majorUnit);\n }\n afterAutoSkip() {\n if (this.options.offsetAfterAutoskip) {\n this.initOffsets(this.ticks.map((tick)=>+tick.value));\n }\n }\n initOffsets(timestamps = []) {\n let start = 0;\n let end = 0;\n let first, last;\n if (this.options.offset && timestamps.length) {\n first = this.getDecimalForValue(timestamps[0]);\n if (timestamps.length === 1) {\n start = 1 - first;\n } else {\n start = (this.getDecimalForValue(timestamps[1]) - first) / 2;\n }\n last = this.getDecimalForValue(timestamps[timestamps.length - 1]);\n if (timestamps.length === 1) {\n end = last;\n } else {\n end = (last - this.getDecimalForValue(timestamps[timestamps.length - 2])) / 2;\n }\n }\n const limit = timestamps.length < 3 ? 0.5 : 0.25;\n start = _limitValue(start, 0, limit);\n end = _limitValue(end, 0, limit);\n this._offsets = {\n start,\n end,\n factor: 1 / (start + 1 + end)\n };\n }\n _generate() {\n const adapter = this._adapter;\n const min = this.min;\n const max = this.max;\n const options = this.options;\n const timeOpts = options.time;\n const minor = timeOpts.unit || determineUnitForAutoTicks(timeOpts.minUnit, min, max, this._getLabelCapacity(min));\n const stepSize = valueOrDefault(options.ticks.stepSize, 1);\n const weekday = minor === 'week' ? timeOpts.isoWeekday : false;\n const hasWeekday = isNumber(weekday) || weekday === true;\n const ticks = {};\n let first = min;\n let time, count;\n if (hasWeekday) {\n first = +adapter.startOf(first, 'isoWeek', weekday);\n }\n first = +adapter.startOf(first, hasWeekday ? 'day' : minor);\n if (adapter.diff(max, min, minor) > 100000 * stepSize) {\n throw new Error(min + ' and ' + max + ' are too far apart with stepSize of ' + stepSize + ' ' + minor);\n }\n const timestamps = options.ticks.source === 'data' && this.getDataTimestamps();\n for(time = first, count = 0; time < max; time = +adapter.add(time, stepSize, minor), count++){\n addTick(ticks, time, timestamps);\n }\n if (time === max || options.bounds === 'ticks' || count === 1) {\n addTick(ticks, time, timestamps);\n }\n return Object.keys(ticks).sort((a, b)=>a - b).map((x)=>+x);\n }\n getLabelForValue(value) {\n const adapter = this._adapter;\n const timeOpts = this.options.time;\n if (timeOpts.tooltipFormat) {\n return adapter.format(value, timeOpts.tooltipFormat);\n }\n return adapter.format(value, timeOpts.displayFormats.datetime);\n }\n _tickFormatFunction(time, index, ticks, format) {\n const options = this.options;\n const formatter = options.ticks.callback;\n if (formatter) {\n return callback(formatter, [\n time,\n index,\n ticks\n ], this);\n }\n const formats = options.time.displayFormats;\n const unit = this._unit;\n const majorUnit = this._majorUnit;\n const minorFormat = unit && formats[unit];\n const majorFormat = majorUnit && formats[majorUnit];\n const tick = ticks[index];\n const major = majorUnit && majorFormat && tick && tick.major;\n return this._adapter.format(time, format || (major ? majorFormat : minorFormat));\n }\n generateTickLabels(ticks) {\n let i, ilen, tick;\n for(i = 0, ilen = ticks.length; i < ilen; ++i){\n tick = ticks[i];\n tick.label = this._tickFormatFunction(tick.value, i, ticks);\n }\n }\n getDecimalForValue(value) {\n return value === null ? NaN : (value - this.min) / (this.max - this.min);\n }\n getPixelForValue(value) {\n const offsets = this._offsets;\n const pos = this.getDecimalForValue(value);\n return this.getPixelForDecimal((offsets.start + pos) * offsets.factor);\n }\n getValueForPixel(pixel) {\n const offsets = this._offsets;\n const pos = this.getDecimalForPixel(pixel) / offsets.factor - offsets.end;\n return this.min + pos * (this.max - this.min);\n }\n _getLabelSize(label) {\n const ticksOpts = this.options.ticks;\n const tickLabelWidth = this.ctx.measureText(label).width;\n const angle = toRadians(this.isHorizontal() ? ticksOpts.maxRotation : ticksOpts.minRotation);\n const cosRotation = Math.cos(angle);\n const sinRotation = Math.sin(angle);\n const tickFontSize = this._resolveTickFontOptions(0).size;\n return {\n w: tickLabelWidth * cosRotation + tickFontSize * sinRotation,\n h: tickLabelWidth * sinRotation + tickFontSize * cosRotation\n };\n }\n _getLabelCapacity(exampleTime) {\n const timeOpts = this.options.time;\n const displayFormats = timeOpts.displayFormats;\n const format = displayFormats[timeOpts.unit] || displayFormats.millisecond;\n const exampleLabel = this._tickFormatFunction(exampleTime, 0, ticksFromTimestamps(this, [\n exampleTime\n ], this._majorUnit), format);\n const size = this._getLabelSize(exampleLabel);\n const capacity = Math.floor(this.isHorizontal() ? this.width / size.w : this.height / size.h) - 1;\n return capacity > 0 ? capacity : 1;\n }\n getDataTimestamps() {\n let timestamps = this._cache.data || [];\n let i, ilen;\n if (timestamps.length) {\n return timestamps;\n }\n const metas = this.getMatchingVisibleMetas();\n if (this._normalized && metas.length) {\n return this._cache.data = metas[0].controller.getAllParsedValues(this);\n }\n for(i = 0, ilen = metas.length; i < ilen; ++i){\n timestamps = timestamps.concat(metas[i].controller.getAllParsedValues(this));\n }\n return this._cache.data = this.normalize(timestamps);\n }\n getLabelTimestamps() {\n const timestamps = this._cache.labels || [];\n let i, ilen;\n if (timestamps.length) {\n return timestamps;\n }\n const labels = this.getLabels();\n for(i = 0, ilen = labels.length; i < ilen; ++i){\n timestamps.push(parse(this, labels[i]));\n }\n return this._cache.labels = this._normalized ? timestamps : this.normalize(timestamps);\n }\n normalize(values) {\n return _arrayUnique(values.sort(sorter));\n }\n}\n\nfunction interpolate(table, val, reverse) {\n let lo = 0;\n let hi = table.length - 1;\n let prevSource, nextSource, prevTarget, nextTarget;\n if (reverse) {\n if (val >= table[lo].pos && val <= table[hi].pos) {\n ({ lo , hi } = _lookupByKey(table, 'pos', val));\n }\n ({ pos: prevSource , time: prevTarget } = table[lo]);\n ({ pos: nextSource , time: nextTarget } = table[hi]);\n } else {\n if (val >= table[lo].time && val <= table[hi].time) {\n ({ lo , hi } = _lookupByKey(table, 'time', val));\n }\n ({ time: prevSource , pos: prevTarget } = table[lo]);\n ({ time: nextSource , pos: nextTarget } = table[hi]);\n }\n const span = nextSource - prevSource;\n return span ? prevTarget + (nextTarget - prevTarget) * (val - prevSource) / span : prevTarget;\n}\nclass TimeSeriesScale extends TimeScale {\n static id = 'timeseries';\n static defaults = TimeScale.defaults;\n constructor(props){\n super(props);\n this._table = [];\n this._minPos = undefined;\n this._tableRange = undefined;\n }\n initOffsets() {\n const timestamps = this._getTimestampsForTable();\n const table = this._table = this.buildLookupTable(timestamps);\n this._minPos = interpolate(table, this.min);\n this._tableRange = interpolate(table, this.max) - this._minPos;\n super.initOffsets(timestamps);\n }\n buildLookupTable(timestamps) {\n const { min , max } = this;\n const items = [];\n const table = [];\n let i, ilen, prev, curr, next;\n for(i = 0, ilen = timestamps.length; i < ilen; ++i){\n curr = timestamps[i];\n if (curr >= min && curr <= max) {\n items.push(curr);\n }\n }\n if (items.length < 2) {\n return [\n {\n time: min,\n pos: 0\n },\n {\n time: max,\n pos: 1\n }\n ];\n }\n for(i = 0, ilen = items.length; i < ilen; ++i){\n next = items[i + 1];\n prev = items[i - 1];\n curr = items[i];\n if (Math.round((next + prev) / 2) !== curr) {\n table.push({\n time: curr,\n pos: i / (ilen - 1)\n });\n }\n }\n return table;\n }\n _getTimestampsForTable() {\n let timestamps = this._cache.all || [];\n if (timestamps.length) {\n return timestamps;\n }\n const data = this.getDataTimestamps();\n const label = this.getLabelTimestamps();\n if (data.length && label.length) {\n timestamps = this.normalize(data.concat(label));\n } else {\n timestamps = data.length ? data : label;\n }\n timestamps = this._cache.all = timestamps;\n return timestamps;\n }\n getDecimalForValue(value) {\n return (interpolate(this._table, value) - this._minPos) / this._tableRange;\n }\n getValueForPixel(pixel) {\n const offsets = this._offsets;\n const decimal = this.getDecimalForPixel(pixel) / offsets.factor - offsets.end;\n return interpolate(this._table, decimal * this._tableRange + this._minPos, true);\n }\n}\n\nvar scales = /*#__PURE__*/Object.freeze({\n__proto__: null,\nCategoryScale: CategoryScale,\nLinearScale: LinearScale,\nLogarithmicScale: LogarithmicScale,\nRadialLinearScale: RadialLinearScale,\nTimeScale: TimeScale,\nTimeSeriesScale: TimeSeriesScale\n});\n\nconst registerables = [\n controllers,\n elements,\n plugins,\n scales\n];\n\nexport { Animation, Animations, ArcElement, BarController, BarElement, BasePlatform, BasicPlatform, BubbleController, CategoryScale, Chart, plugin_colors as Colors, DatasetController, plugin_decimation as Decimation, DomPlatform, DoughnutController, Element, index as Filler, Interaction, plugin_legend as Legend, LineController, LineElement, LinearScale, LogarithmicScale, PieController, PointElement, PolarAreaController, RadarController, RadialLinearScale, Scale, ScatterController, plugin_subtitle as SubTitle, TimeScale, TimeSeriesScale, plugin_title as Title, plugin_tooltip as Tooltip, adapters as _adapters, _detectPlatform, animator, controllers, elements, layouts, plugins, registerables, registry, scales };\n","/*!\n * @kurkle/color v0.3.2\n * https://github.com/kurkle/color#readme\n * (c) 2023 Jukka Kurkela\n * Released under the MIT License\n */\nfunction round(v) {\n return v + 0.5 | 0;\n}\nconst lim = (v, l, h) => Math.max(Math.min(v, h), l);\nfunction p2b(v) {\n return lim(round(v * 2.55), 0, 255);\n}\nfunction b2p(v) {\n return lim(round(v / 2.55), 0, 100);\n}\nfunction n2b(v) {\n return lim(round(v * 255), 0, 255);\n}\nfunction b2n(v) {\n return lim(round(v / 2.55) / 100, 0, 1);\n}\nfunction n2p(v) {\n return lim(round(v * 100), 0, 100);\n}\n\nconst map$1 = {0: 0, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, A: 10, B: 11, C: 12, D: 13, E: 14, F: 15, a: 10, b: 11, c: 12, d: 13, e: 14, f: 15};\nconst hex = [...'0123456789ABCDEF'];\nconst h1 = b => hex[b & 0xF];\nconst h2 = b => hex[(b & 0xF0) >> 4] + hex[b & 0xF];\nconst eq = b => ((b & 0xF0) >> 4) === (b & 0xF);\nconst isShort = v => eq(v.r) && eq(v.g) && eq(v.b) && eq(v.a);\nfunction hexParse(str) {\n var len = str.length;\n var ret;\n if (str[0] === '#') {\n if (len === 4 || len === 5) {\n ret = {\n r: 255 & map$1[str[1]] * 17,\n g: 255 & map$1[str[2]] * 17,\n b: 255 & map$1[str[3]] * 17,\n a: len === 5 ? map$1[str[4]] * 17 : 255\n };\n } else if (len === 7 || len === 9) {\n ret = {\n r: map$1[str[1]] << 4 | map$1[str[2]],\n g: map$1[str[3]] << 4 | map$1[str[4]],\n b: map$1[str[5]] << 4 | map$1[str[6]],\n a: len === 9 ? (map$1[str[7]] << 4 | map$1[str[8]]) : 255\n };\n }\n }\n return ret;\n}\nconst alpha = (a, f) => a < 255 ? f(a) : '';\nfunction hexString(v) {\n var f = isShort(v) ? h1 : h2;\n return v\n ? '#' + f(v.r) + f(v.g) + f(v.b) + alpha(v.a, f)\n : undefined;\n}\n\nconst HUE_RE = /^(hsla?|hwb|hsv)\\(\\s*([-+.e\\d]+)(?:deg)?[\\s,]+([-+.e\\d]+)%[\\s,]+([-+.e\\d]+)%(?:[\\s,]+([-+.e\\d]+)(%)?)?\\s*\\)$/;\nfunction hsl2rgbn(h, s, l) {\n const a = s * Math.min(l, 1 - l);\n const f = (n, k = (n + h / 30) % 12) => l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);\n return [f(0), f(8), f(4)];\n}\nfunction hsv2rgbn(h, s, v) {\n const f = (n, k = (n + h / 60) % 6) => v - v * s * Math.max(Math.min(k, 4 - k, 1), 0);\n return [f(5), f(3), f(1)];\n}\nfunction hwb2rgbn(h, w, b) {\n const rgb = hsl2rgbn(h, 1, 0.5);\n let i;\n if (w + b > 1) {\n i = 1 / (w + b);\n w *= i;\n b *= i;\n }\n for (i = 0; i < 3; i++) {\n rgb[i] *= 1 - w - b;\n rgb[i] += w;\n }\n return rgb;\n}\nfunction hueValue(r, g, b, d, max) {\n if (r === max) {\n return ((g - b) / d) + (g < b ? 6 : 0);\n }\n if (g === max) {\n return (b - r) / d + 2;\n }\n return (r - g) / d + 4;\n}\nfunction rgb2hsl(v) {\n const range = 255;\n const r = v.r / range;\n const g = v.g / range;\n const b = v.b / range;\n const max = Math.max(r, g, b);\n const min = Math.min(r, g, b);\n const l = (max + min) / 2;\n let h, s, d;\n if (max !== min) {\n d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n h = hueValue(r, g, b, d, max);\n h = h * 60 + 0.5;\n }\n return [h | 0, s || 0, l];\n}\nfunction calln(f, a, b, c) {\n return (\n Array.isArray(a)\n ? f(a[0], a[1], a[2])\n : f(a, b, c)\n ).map(n2b);\n}\nfunction hsl2rgb(h, s, l) {\n return calln(hsl2rgbn, h, s, l);\n}\nfunction hwb2rgb(h, w, b) {\n return calln(hwb2rgbn, h, w, b);\n}\nfunction hsv2rgb(h, s, v) {\n return calln(hsv2rgbn, h, s, v);\n}\nfunction hue(h) {\n return (h % 360 + 360) % 360;\n}\nfunction hueParse(str) {\n const m = HUE_RE.exec(str);\n let a = 255;\n let v;\n if (!m) {\n return;\n }\n if (m[5] !== v) {\n a = m[6] ? p2b(+m[5]) : n2b(+m[5]);\n }\n const h = hue(+m[2]);\n const p1 = +m[3] / 100;\n const p2 = +m[4] / 100;\n if (m[1] === 'hwb') {\n v = hwb2rgb(h, p1, p2);\n } else if (m[1] === 'hsv') {\n v = hsv2rgb(h, p1, p2);\n } else {\n v = hsl2rgb(h, p1, p2);\n }\n return {\n r: v[0],\n g: v[1],\n b: v[2],\n a: a\n };\n}\nfunction rotate(v, deg) {\n var h = rgb2hsl(v);\n h[0] = hue(h[0] + deg);\n h = hsl2rgb(h);\n v.r = h[0];\n v.g = h[1];\n v.b = h[2];\n}\nfunction hslString(v) {\n if (!v) {\n return;\n }\n const a = rgb2hsl(v);\n const h = a[0];\n const s = n2p(a[1]);\n const l = n2p(a[2]);\n return v.a < 255\n ? `hsla(${h}, ${s}%, ${l}%, ${b2n(v.a)})`\n : `hsl(${h}, ${s}%, ${l}%)`;\n}\n\nconst map = {\n x: 'dark',\n Z: 'light',\n Y: 're',\n X: 'blu',\n W: 'gr',\n V: 'medium',\n U: 'slate',\n A: 'ee',\n T: 'ol',\n S: 'or',\n B: 'ra',\n C: 'lateg',\n D: 'ights',\n R: 'in',\n Q: 'turquois',\n E: 'hi',\n P: 'ro',\n O: 'al',\n N: 'le',\n M: 'de',\n L: 'yello',\n F: 'en',\n K: 'ch',\n G: 'arks',\n H: 'ea',\n I: 'ightg',\n J: 'wh'\n};\nconst names$1 = {\n OiceXe: 'f0f8ff',\n antiquewEte: 'faebd7',\n aqua: 'ffff',\n aquamarRe: '7fffd4',\n azuY: 'f0ffff',\n beige: 'f5f5dc',\n bisque: 'ffe4c4',\n black: '0',\n blanKedOmond: 'ffebcd',\n Xe: 'ff',\n XeviTet: '8a2be2',\n bPwn: 'a52a2a',\n burlywood: 'deb887',\n caMtXe: '5f9ea0',\n KartYuse: '7fff00',\n KocTate: 'd2691e',\n cSO: 'ff7f50',\n cSnflowerXe: '6495ed',\n cSnsilk: 'fff8dc',\n crimson: 'dc143c',\n cyan: 'ffff',\n xXe: '8b',\n xcyan: '8b8b',\n xgTMnPd: 'b8860b',\n xWay: 'a9a9a9',\n xgYF: '6400',\n xgYy: 'a9a9a9',\n xkhaki: 'bdb76b',\n xmagFta: '8b008b',\n xTivegYF: '556b2f',\n xSange: 'ff8c00',\n xScEd: '9932cc',\n xYd: '8b0000',\n xsOmon: 'e9967a',\n xsHgYF: '8fbc8f',\n xUXe: '483d8b',\n xUWay: '2f4f4f',\n xUgYy: '2f4f4f',\n xQe: 'ced1',\n xviTet: '9400d3',\n dAppRk: 'ff1493',\n dApskyXe: 'bfff',\n dimWay: '696969',\n dimgYy: '696969',\n dodgerXe: '1e90ff',\n fiYbrick: 'b22222',\n flSOwEte: 'fffaf0',\n foYstWAn: '228b22',\n fuKsia: 'ff00ff',\n gaRsbSo: 'dcdcdc',\n ghostwEte: 'f8f8ff',\n gTd: 'ffd700',\n gTMnPd: 'daa520',\n Way: '808080',\n gYF: '8000',\n gYFLw: 'adff2f',\n gYy: '808080',\n honeyMw: 'f0fff0',\n hotpRk: 'ff69b4',\n RdianYd: 'cd5c5c',\n Rdigo: '4b0082',\n ivSy: 'fffff0',\n khaki: 'f0e68c',\n lavFMr: 'e6e6fa',\n lavFMrXsh: 'fff0f5',\n lawngYF: '7cfc00',\n NmoncEffon: 'fffacd',\n ZXe: 'add8e6',\n ZcSO: 'f08080',\n Zcyan: 'e0ffff',\n ZgTMnPdLw: 'fafad2',\n ZWay: 'd3d3d3',\n ZgYF: '90ee90',\n ZgYy: 'd3d3d3',\n ZpRk: 'ffb6c1',\n ZsOmon: 'ffa07a',\n ZsHgYF: '20b2aa',\n ZskyXe: '87cefa',\n ZUWay: '778899',\n ZUgYy: '778899',\n ZstAlXe: 'b0c4de',\n ZLw: 'ffffe0',\n lime: 'ff00',\n limegYF: '32cd32',\n lRF: 'faf0e6',\n magFta: 'ff00ff',\n maPon: '800000',\n VaquamarRe: '66cdaa',\n VXe: 'cd',\n VScEd: 'ba55d3',\n VpurpN: '9370db',\n VsHgYF: '3cb371',\n VUXe: '7b68ee',\n VsprRggYF: 'fa9a',\n VQe: '48d1cc',\n VviTetYd: 'c71585',\n midnightXe: '191970',\n mRtcYam: 'f5fffa',\n mistyPse: 'ffe4e1',\n moccasR: 'ffe4b5',\n navajowEte: 'ffdead',\n navy: '80',\n Tdlace: 'fdf5e6',\n Tive: '808000',\n TivedBb: '6b8e23',\n Sange: 'ffa500',\n SangeYd: 'ff4500',\n ScEd: 'da70d6',\n pOegTMnPd: 'eee8aa',\n pOegYF: '98fb98',\n pOeQe: 'afeeee',\n pOeviTetYd: 'db7093',\n papayawEp: 'ffefd5',\n pHKpuff: 'ffdab9',\n peru: 'cd853f',\n pRk: 'ffc0cb',\n plum: 'dda0dd',\n powMrXe: 'b0e0e6',\n purpN: '800080',\n YbeccapurpN: '663399',\n Yd: 'ff0000',\n Psybrown: 'bc8f8f',\n PyOXe: '4169e1',\n saddNbPwn: '8b4513',\n sOmon: 'fa8072',\n sandybPwn: 'f4a460',\n sHgYF: '2e8b57',\n sHshell: 'fff5ee',\n siFna: 'a0522d',\n silver: 'c0c0c0',\n skyXe: '87ceeb',\n UXe: '6a5acd',\n UWay: '708090',\n UgYy: '708090',\n snow: 'fffafa',\n sprRggYF: 'ff7f',\n stAlXe: '4682b4',\n tan: 'd2b48c',\n teO: '8080',\n tEstN: 'd8bfd8',\n tomato: 'ff6347',\n Qe: '40e0d0',\n viTet: 'ee82ee',\n JHt: 'f5deb3',\n wEte: 'ffffff',\n wEtesmoke: 'f5f5f5',\n Lw: 'ffff00',\n LwgYF: '9acd32'\n};\nfunction unpack() {\n const unpacked = {};\n const keys = Object.keys(names$1);\n const tkeys = Object.keys(map);\n let i, j, k, ok, nk;\n for (i = 0; i < keys.length; i++) {\n ok = nk = keys[i];\n for (j = 0; j < tkeys.length; j++) {\n k = tkeys[j];\n nk = nk.replace(k, map[k]);\n }\n k = parseInt(names$1[ok], 16);\n unpacked[nk] = [k >> 16 & 0xFF, k >> 8 & 0xFF, k & 0xFF];\n }\n return unpacked;\n}\n\nlet names;\nfunction nameParse(str) {\n if (!names) {\n names = unpack();\n names.transparent = [0, 0, 0, 0];\n }\n const a = names[str.toLowerCase()];\n return a && {\n r: a[0],\n g: a[1],\n b: a[2],\n a: a.length === 4 ? a[3] : 255\n };\n}\n\nconst RGB_RE = /^rgba?\\(\\s*([-+.\\d]+)(%)?[\\s,]+([-+.e\\d]+)(%)?[\\s,]+([-+.e\\d]+)(%)?(?:[\\s,/]+([-+.e\\d]+)(%)?)?\\s*\\)$/;\nfunction rgbParse(str) {\n const m = RGB_RE.exec(str);\n let a = 255;\n let r, g, b;\n if (!m) {\n return;\n }\n if (m[7] !== r) {\n const v = +m[7];\n a = m[8] ? p2b(v) : lim(v * 255, 0, 255);\n }\n r = +m[1];\n g = +m[3];\n b = +m[5];\n r = 255 & (m[2] ? p2b(r) : lim(r, 0, 255));\n g = 255 & (m[4] ? p2b(g) : lim(g, 0, 255));\n b = 255 & (m[6] ? p2b(b) : lim(b, 0, 255));\n return {\n r: r,\n g: g,\n b: b,\n a: a\n };\n}\nfunction rgbString(v) {\n return v && (\n v.a < 255\n ? `rgba(${v.r}, ${v.g}, ${v.b}, ${b2n(v.a)})`\n : `rgb(${v.r}, ${v.g}, ${v.b})`\n );\n}\n\nconst to = v => v <= 0.0031308 ? v * 12.92 : Math.pow(v, 1.0 / 2.4) * 1.055 - 0.055;\nconst from = v => v <= 0.04045 ? v / 12.92 : Math.pow((v + 0.055) / 1.055, 2.4);\nfunction interpolate(rgb1, rgb2, t) {\n const r = from(b2n(rgb1.r));\n const g = from(b2n(rgb1.g));\n const b = from(b2n(rgb1.b));\n return {\n r: n2b(to(r + t * (from(b2n(rgb2.r)) - r))),\n g: n2b(to(g + t * (from(b2n(rgb2.g)) - g))),\n b: n2b(to(b + t * (from(b2n(rgb2.b)) - b))),\n a: rgb1.a + t * (rgb2.a - rgb1.a)\n };\n}\n\nfunction modHSL(v, i, ratio) {\n if (v) {\n let tmp = rgb2hsl(v);\n tmp[i] = Math.max(0, Math.min(tmp[i] + tmp[i] * ratio, i === 0 ? 360 : 1));\n tmp = hsl2rgb(tmp);\n v.r = tmp[0];\n v.g = tmp[1];\n v.b = tmp[2];\n }\n}\nfunction clone(v, proto) {\n return v ? Object.assign(proto || {}, v) : v;\n}\nfunction fromObject(input) {\n var v = {r: 0, g: 0, b: 0, a: 255};\n if (Array.isArray(input)) {\n if (input.length >= 3) {\n v = {r: input[0], g: input[1], b: input[2], a: 255};\n if (input.length > 3) {\n v.a = n2b(input[3]);\n }\n }\n } else {\n v = clone(input, {r: 0, g: 0, b: 0, a: 1});\n v.a = n2b(v.a);\n }\n return v;\n}\nfunction functionParse(str) {\n if (str.charAt(0) === 'r') {\n return rgbParse(str);\n }\n return hueParse(str);\n}\nclass Color {\n constructor(input) {\n if (input instanceof Color) {\n return input;\n }\n const type = typeof input;\n let v;\n if (type === 'object') {\n v = fromObject(input);\n } else if (type === 'string') {\n v = hexParse(input) || nameParse(input) || functionParse(input);\n }\n this._rgb = v;\n this._valid = !!v;\n }\n get valid() {\n return this._valid;\n }\n get rgb() {\n var v = clone(this._rgb);\n if (v) {\n v.a = b2n(v.a);\n }\n return v;\n }\n set rgb(obj) {\n this._rgb = fromObject(obj);\n }\n rgbString() {\n return this._valid ? rgbString(this._rgb) : undefined;\n }\n hexString() {\n return this._valid ? hexString(this._rgb) : undefined;\n }\n hslString() {\n return this._valid ? hslString(this._rgb) : undefined;\n }\n mix(color, weight) {\n if (color) {\n const c1 = this.rgb;\n const c2 = color.rgb;\n let w2;\n const p = weight === w2 ? 0.5 : weight;\n const w = 2 * p - 1;\n const a = c1.a - c2.a;\n const w1 = ((w * a === -1 ? w : (w + a) / (1 + w * a)) + 1) / 2.0;\n w2 = 1 - w1;\n c1.r = 0xFF & w1 * c1.r + w2 * c2.r + 0.5;\n c1.g = 0xFF & w1 * c1.g + w2 * c2.g + 0.5;\n c1.b = 0xFF & w1 * c1.b + w2 * c2.b + 0.5;\n c1.a = p * c1.a + (1 - p) * c2.a;\n this.rgb = c1;\n }\n return this;\n }\n interpolate(color, t) {\n if (color) {\n this._rgb = interpolate(this._rgb, color._rgb, t);\n }\n return this;\n }\n clone() {\n return new Color(this.rgb);\n }\n alpha(a) {\n this._rgb.a = n2b(a);\n return this;\n }\n clearer(ratio) {\n const rgb = this._rgb;\n rgb.a *= 1 - ratio;\n return this;\n }\n greyscale() {\n const rgb = this._rgb;\n const val = round(rgb.r * 0.3 + rgb.g * 0.59 + rgb.b * 0.11);\n rgb.r = rgb.g = rgb.b = val;\n return this;\n }\n opaquer(ratio) {\n const rgb = this._rgb;\n rgb.a *= 1 + ratio;\n return this;\n }\n negate() {\n const v = this._rgb;\n v.r = 255 - v.r;\n v.g = 255 - v.g;\n v.b = 255 - v.b;\n return this;\n }\n lighten(ratio) {\n modHSL(this._rgb, 2, ratio);\n return this;\n }\n darken(ratio) {\n modHSL(this._rgb, 2, -ratio);\n return this;\n }\n saturate(ratio) {\n modHSL(this._rgb, 1, ratio);\n return this;\n }\n desaturate(ratio) {\n modHSL(this._rgb, 1, -ratio);\n return this;\n }\n rotate(deg) {\n rotate(this._rgb, deg);\n return this;\n }\n}\n\nfunction index_esm(input) {\n return new Color(input);\n}\n\nexport { Color, b2n, b2p, index_esm as default, hexParse, hexString, hsl2rgb, hslString, hsv2rgb, hueParse, hwb2rgb, lim, n2b, n2p, nameParse, p2b, rgb2hsl, rgbParse, rgbString, rotate, round };\n","/*!\n * Chart.js v4.1.2\n * https://www.chartjs.org\n * (c) 2023 Chart.js Contributors\n * Released under the MIT License\n */\nimport { Color } from '@kurkle/color';\n\n/**\n * @namespace Chart.helpers\n */ /**\n * An empty function that can be used, for example, for optional callback.\n */ function noop() {\n/* noop */ }\n/**\n * Returns a unique id, sequentially generated from a global variable.\n */ const uid = (()=>{\n let id = 0;\n return ()=>id++;\n})();\n/**\n * Returns true if `value` is neither null nor undefined, else returns false.\n * @param value - The value to test.\n * @since 2.7.0\n */ function isNullOrUndef(value) {\n return value === null || typeof value === 'undefined';\n}\n/**\n * Returns true if `value` is an array (including typed arrays), else returns false.\n * @param value - The value to test.\n * @function\n */ function isArray(value) {\n if (Array.isArray && Array.isArray(value)) {\n return true;\n }\n const type = Object.prototype.toString.call(value);\n if (type.slice(0, 7) === '[object' && type.slice(-6) === 'Array]') {\n return true;\n }\n return false;\n}\n/**\n * Returns true if `value` is an object (excluding null), else returns false.\n * @param value - The value to test.\n * @since 2.7.0\n */ function isObject(value) {\n return value !== null && Object.prototype.toString.call(value) === '[object Object]';\n}\n/**\n * Returns true if `value` is a finite number, else returns false\n * @param value - The value to test.\n */ function isNumberFinite(value) {\n return (typeof value === 'number' || value instanceof Number) && isFinite(+value);\n}\n/**\n * Returns `value` if finite, else returns `defaultValue`.\n * @param value - The value to return if defined.\n * @param defaultValue - The value to return if `value` is not finite.\n */ function finiteOrDefault(value, defaultValue) {\n return isNumberFinite(value) ? value : defaultValue;\n}\n/**\n * Returns `value` if defined, else returns `defaultValue`.\n * @param value - The value to return if defined.\n * @param defaultValue - The value to return if `value` is undefined.\n */ function valueOrDefault(value, defaultValue) {\n return typeof value === 'undefined' ? defaultValue : value;\n}\nconst toPercentage = (value, dimension)=>typeof value === 'string' && value.endsWith('%') ? parseFloat(value) / 100 : +value / dimension;\nconst toDimension = (value, dimension)=>typeof value === 'string' && value.endsWith('%') ? parseFloat(value) / 100 * dimension : +value;\n/**\n * Calls `fn` with the given `args` in the scope defined by `thisArg` and returns the\n * value returned by `fn`. If `fn` is not a function, this method returns undefined.\n * @param fn - The function to call.\n * @param args - The arguments with which `fn` should be called.\n * @param [thisArg] - The value of `this` provided for the call to `fn`.\n */ function callback(fn, args, thisArg) {\n if (fn && typeof fn.call === 'function') {\n return fn.apply(thisArg, args);\n }\n}\nfunction each(loopable, fn, thisArg, reverse) {\n let i, len, keys;\n if (isArray(loopable)) {\n len = loopable.length;\n if (reverse) {\n for(i = len - 1; i >= 0; i--){\n fn.call(thisArg, loopable[i], i);\n }\n } else {\n for(i = 0; i < len; i++){\n fn.call(thisArg, loopable[i], i);\n }\n }\n } else if (isObject(loopable)) {\n keys = Object.keys(loopable);\n len = keys.length;\n for(i = 0; i < len; i++){\n fn.call(thisArg, loopable[keys[i]], keys[i]);\n }\n }\n}\n/**\n * Returns true if the `a0` and `a1` arrays have the same content, else returns false.\n * @param a0 - The array to compare\n * @param a1 - The array to compare\n * @private\n */ function _elementsEqual(a0, a1) {\n let i, ilen, v0, v1;\n if (!a0 || !a1 || a0.length !== a1.length) {\n return false;\n }\n for(i = 0, ilen = a0.length; i < ilen; ++i){\n v0 = a0[i];\n v1 = a1[i];\n if (v0.datasetIndex !== v1.datasetIndex || v0.index !== v1.index) {\n return false;\n }\n }\n return true;\n}\n/**\n * Returns a deep copy of `source` without keeping references on objects and arrays.\n * @param source - The value to clone.\n */ function clone(source) {\n if (isArray(source)) {\n return source.map(clone);\n }\n if (isObject(source)) {\n const target = Object.create(null);\n const keys = Object.keys(source);\n const klen = keys.length;\n let k = 0;\n for(; k < klen; ++k){\n target[keys[k]] = clone(source[keys[k]]);\n }\n return target;\n }\n return source;\n}\nfunction isValidKey(key) {\n return [\n '__proto__',\n 'prototype',\n 'constructor'\n ].indexOf(key) === -1;\n}\n/**\n * The default merger when Chart.helpers.merge is called without merger option.\n * Note(SB): also used by mergeConfig and mergeScaleConfig as fallback.\n * @private\n */ function _merger(key, target, source, options) {\n if (!isValidKey(key)) {\n return;\n }\n const tval = target[key];\n const sval = source[key];\n if (isObject(tval) && isObject(sval)) {\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n merge(tval, sval, options);\n } else {\n target[key] = clone(sval);\n }\n}\nfunction merge(target, source, options) {\n const sources = isArray(source) ? source : [\n source\n ];\n const ilen = sources.length;\n if (!isObject(target)) {\n return target;\n }\n options = options || {};\n const merger = options.merger || _merger;\n let current;\n for(let i = 0; i < ilen; ++i){\n current = sources[i];\n if (!isObject(current)) {\n continue;\n }\n const keys = Object.keys(current);\n for(let k = 0, klen = keys.length; k < klen; ++k){\n merger(keys[k], target, current, options);\n }\n }\n return target;\n}\nfunction mergeIf(target, source) {\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n return merge(target, source, {\n merger: _mergerIf\n });\n}\n/**\n * Merges source[key] in target[key] only if target[key] is undefined.\n * @private\n */ function _mergerIf(key, target, source) {\n if (!isValidKey(key)) {\n return;\n }\n const tval = target[key];\n const sval = source[key];\n if (isObject(tval) && isObject(sval)) {\n mergeIf(tval, sval);\n } else if (!Object.prototype.hasOwnProperty.call(target, key)) {\n target[key] = clone(sval);\n }\n}\n/**\n * @private\n */ function _deprecated(scope, value, previous, current) {\n if (value !== undefined) {\n console.warn(scope + ': \"' + previous + '\" is deprecated. Please use \"' + current + '\" instead');\n }\n}\n// resolveObjectKey resolver cache\nconst keyResolvers = {\n // Chart.helpers.core resolveObjectKey should resolve empty key to root object\n '': (v)=>v,\n // default resolvers\n x: (o)=>o.x,\n y: (o)=>o.y\n};\n/**\n * @private\n */ function _splitKey(key) {\n const parts = key.split('.');\n const keys = [];\n let tmp = '';\n for (const part of parts){\n tmp += part;\n if (tmp.endsWith('\\\\')) {\n tmp = tmp.slice(0, -1) + '.';\n } else {\n keys.push(tmp);\n tmp = '';\n }\n }\n return keys;\n}\nfunction _getKeyResolver(key) {\n const keys = _splitKey(key);\n return (obj)=>{\n for (const k of keys){\n if (k === '') {\n break;\n }\n obj = obj && obj[k];\n }\n return obj;\n };\n}\nfunction resolveObjectKey(obj, key) {\n const resolver = keyResolvers[key] || (keyResolvers[key] = _getKeyResolver(key));\n return resolver(obj);\n}\n/**\n * @private\n */ function _capitalize(str) {\n return str.charAt(0).toUpperCase() + str.slice(1);\n}\nconst defined = (value)=>typeof value !== 'undefined';\nconst isFunction = (value)=>typeof value === 'function';\n// Adapted from https://stackoverflow.com/questions/31128855/comparing-ecma6-sets-for-equality#31129384\nconst setsEqual = (a, b)=>{\n if (a.size !== b.size) {\n return false;\n }\n for (const item of a){\n if (!b.has(item)) {\n return false;\n }\n }\n return true;\n};\n/**\n * @param e - The event\n * @private\n */ function _isClickEvent(e) {\n return e.type === 'mouseup' || e.type === 'click' || e.type === 'contextmenu';\n}\n\n/**\n * @alias Chart.helpers.math\n * @namespace\n */ const PI = Math.PI;\nconst TAU = 2 * PI;\nconst PITAU = TAU + PI;\nconst INFINITY = Number.POSITIVE_INFINITY;\nconst RAD_PER_DEG = PI / 180;\nconst HALF_PI = PI / 2;\nconst QUARTER_PI = PI / 4;\nconst TWO_THIRDS_PI = PI * 2 / 3;\nconst log10 = Math.log10;\nconst sign = Math.sign;\nfunction almostEquals(x, y, epsilon) {\n return Math.abs(x - y) < epsilon;\n}\n/**\n * Implementation of the nice number algorithm used in determining where axis labels will go\n */ function niceNum(range) {\n const roundedRange = Math.round(range);\n range = almostEquals(range, roundedRange, range / 1000) ? roundedRange : range;\n const niceRange = Math.pow(10, Math.floor(log10(range)));\n const fraction = range / niceRange;\n const niceFraction = fraction <= 1 ? 1 : fraction <= 2 ? 2 : fraction <= 5 ? 5 : 10;\n return niceFraction * niceRange;\n}\n/**\n * Returns an array of factors sorted from 1 to sqrt(value)\n * @private\n */ function _factorize(value) {\n const result = [];\n const sqrt = Math.sqrt(value);\n let i;\n for(i = 1; i < sqrt; i++){\n if (value % i === 0) {\n result.push(i);\n result.push(value / i);\n }\n }\n if (sqrt === (sqrt | 0)) {\n result.push(sqrt);\n }\n result.sort((a, b)=>a - b).pop();\n return result;\n}\nfunction isNumber(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n}\nfunction almostWhole(x, epsilon) {\n const rounded = Math.round(x);\n return rounded - epsilon <= x && rounded + epsilon >= x;\n}\n/**\n * @private\n */ function _setMinAndMaxByKey(array, target, property) {\n let i, ilen, value;\n for(i = 0, ilen = array.length; i < ilen; i++){\n value = array[i][property];\n if (!isNaN(value)) {\n target.min = Math.min(target.min, value);\n target.max = Math.max(target.max, value);\n }\n }\n}\nfunction toRadians(degrees) {\n return degrees * (PI / 180);\n}\nfunction toDegrees(radians) {\n return radians * (180 / PI);\n}\n/**\n * Returns the number of decimal places\n * i.e. the number of digits after the decimal point, of the value of this Number.\n * @param x - A number.\n * @returns The number of decimal places.\n * @private\n */ function _decimalPlaces(x) {\n if (!isNumberFinite(x)) {\n return;\n }\n let e = 1;\n let p = 0;\n while(Math.round(x * e) / e !== x){\n e *= 10;\n p++;\n }\n return p;\n}\n// Gets the angle from vertical upright to the point about a centre.\nfunction getAngleFromPoint(centrePoint, anglePoint) {\n const distanceFromXCenter = anglePoint.x - centrePoint.x;\n const distanceFromYCenter = anglePoint.y - centrePoint.y;\n const radialDistanceFromCenter = Math.sqrt(distanceFromXCenter * distanceFromXCenter + distanceFromYCenter * distanceFromYCenter);\n let angle = Math.atan2(distanceFromYCenter, distanceFromXCenter);\n if (angle < -0.5 * PI) {\n angle += TAU; // make sure the returned angle is in the range of (-PI/2, 3PI/2]\n }\n return {\n angle,\n distance: radialDistanceFromCenter\n };\n}\nfunction distanceBetweenPoints(pt1, pt2) {\n return Math.sqrt(Math.pow(pt2.x - pt1.x, 2) + Math.pow(pt2.y - pt1.y, 2));\n}\n/**\n * Shortest distance between angles, in either direction.\n * @private\n */ function _angleDiff(a, b) {\n return (a - b + PITAU) % TAU - PI;\n}\n/**\n * Normalize angle to be between 0 and 2*PI\n * @private\n */ function _normalizeAngle(a) {\n return (a % TAU + TAU) % TAU;\n}\n/**\n * @private\n */ function _angleBetween(angle, start, end, sameAngleIsFullCircle) {\n const a = _normalizeAngle(angle);\n const s = _normalizeAngle(start);\n const e = _normalizeAngle(end);\n const angleToStart = _normalizeAngle(s - a);\n const angleToEnd = _normalizeAngle(e - a);\n const startToAngle = _normalizeAngle(a - s);\n const endToAngle = _normalizeAngle(a - e);\n return a === s || a === e || sameAngleIsFullCircle && s === e || angleToStart > angleToEnd && startToAngle < endToAngle;\n}\n/**\n * Limit `value` between `min` and `max`\n * @param value\n * @param min\n * @param max\n * @private\n */ function _limitValue(value, min, max) {\n return Math.max(min, Math.min(max, value));\n}\n/**\n * @param {number} value\n * @private\n */ function _int16Range(value) {\n return _limitValue(value, -32768, 32767);\n}\n/**\n * @param value\n * @param start\n * @param end\n * @param [epsilon]\n * @private\n */ function _isBetween(value, start, end, epsilon = 1e-6) {\n return value >= Math.min(start, end) - epsilon && value <= Math.max(start, end) + epsilon;\n}\n\nfunction _lookup(table, value, cmp) {\n cmp = cmp || ((index)=>table[index] < value);\n let hi = table.length - 1;\n let lo = 0;\n let mid;\n while(hi - lo > 1){\n mid = lo + hi >> 1;\n if (cmp(mid)) {\n lo = mid;\n } else {\n hi = mid;\n }\n }\n return {\n lo,\n hi\n };\n}\n/**\n * Binary search\n * @param table - the table search. must be sorted!\n * @param key - property name for the value in each entry\n * @param value - value to find\n * @param last - lookup last index\n * @private\n */ const _lookupByKey = (table, key, value, last)=>_lookup(table, value, last ? (index)=>{\n const ti = table[index][key];\n return ti < value || ti === value && table[index + 1][key] === value;\n } : (index)=>table[index][key] < value);\n/**\n * Reverse binary search\n * @param table - the table search. must be sorted!\n * @param key - property name for the value in each entry\n * @param value - value to find\n * @private\n */ const _rlookupByKey = (table, key, value)=>_lookup(table, value, (index)=>table[index][key] >= value);\n/**\n * Return subset of `values` between `min` and `max` inclusive.\n * Values are assumed to be in sorted order.\n * @param values - sorted array of values\n * @param min - min value\n * @param max - max value\n */ function _filterBetween(values, min, max) {\n let start = 0;\n let end = values.length;\n while(start < end && values[start] < min){\n start++;\n }\n while(end > start && values[end - 1] > max){\n end--;\n }\n return start > 0 || end < values.length ? values.slice(start, end) : values;\n}\nconst arrayEvents = [\n 'push',\n 'pop',\n 'shift',\n 'splice',\n 'unshift'\n];\nfunction listenArrayEvents(array, listener) {\n if (array._chartjs) {\n array._chartjs.listeners.push(listener);\n return;\n }\n Object.defineProperty(array, '_chartjs', {\n configurable: true,\n enumerable: false,\n value: {\n listeners: [\n listener\n ]\n }\n });\n arrayEvents.forEach((key)=>{\n const method = '_onData' + _capitalize(key);\n const base = array[key];\n Object.defineProperty(array, key, {\n configurable: true,\n enumerable: false,\n value (...args) {\n const res = base.apply(this, args);\n array._chartjs.listeners.forEach((object)=>{\n if (typeof object[method] === 'function') {\n object[method](...args);\n }\n });\n return res;\n }\n });\n });\n}\nfunction unlistenArrayEvents(array, listener) {\n const stub = array._chartjs;\n if (!stub) {\n return;\n }\n const listeners = stub.listeners;\n const index = listeners.indexOf(listener);\n if (index !== -1) {\n listeners.splice(index, 1);\n }\n if (listeners.length > 0) {\n return;\n }\n arrayEvents.forEach((key)=>{\n delete array[key];\n });\n delete array._chartjs;\n}\n/**\n * @param items\n */ function _arrayUnique(items) {\n const set = new Set();\n let i, ilen;\n for(i = 0, ilen = items.length; i < ilen; ++i){\n set.add(items[i]);\n }\n if (set.size === ilen) {\n return items;\n }\n return Array.from(set);\n}\n\nfunction fontString(pixelSize, fontStyle, fontFamily) {\n return fontStyle + ' ' + pixelSize + 'px ' + fontFamily;\n}\n/**\n* Request animation polyfill\n*/ const requestAnimFrame = function() {\n if (typeof window === 'undefined') {\n return function(callback) {\n return callback();\n };\n }\n return window.requestAnimationFrame;\n}();\n/**\n * Throttles calling `fn` once per animation frame\n * Latest arguments are used on the actual call\n */ function throttled(fn, thisArg) {\n let argsToUse = [];\n let ticking = false;\n return function(...args) {\n // Save the args for use later\n argsToUse = args;\n if (!ticking) {\n ticking = true;\n requestAnimFrame.call(window, ()=>{\n ticking = false;\n fn.apply(thisArg, argsToUse);\n });\n }\n };\n}\n/**\n * Debounces calling `fn` for `delay` ms\n */ function debounce(fn, delay) {\n let timeout;\n return function(...args) {\n if (delay) {\n clearTimeout(timeout);\n timeout = setTimeout(fn, delay, args);\n } else {\n fn.apply(this, args);\n }\n return delay;\n };\n}\n/**\n * Converts 'start' to 'left', 'end' to 'right' and others to 'center'\n * @private\n */ const _toLeftRightCenter = (align)=>align === 'start' ? 'left' : align === 'end' ? 'right' : 'center';\n/**\n * Returns `start`, `end` or `(start + end) / 2` depending on `align`. Defaults to `center`\n * @private\n */ const _alignStartEnd = (align, start, end)=>align === 'start' ? start : align === 'end' ? end : (start + end) / 2;\n/**\n * Returns `left`, `right` or `(left + right) / 2` depending on `align`. Defaults to `left`\n * @private\n */ const _textX = (align, left, right, rtl)=>{\n const check = rtl ? 'left' : 'right';\n return align === check ? right : align === 'center' ? (left + right) / 2 : left;\n};\n/**\n * Return start and count of visible points.\n * @private\n */ function _getStartAndCountOfVisiblePoints(meta, points, animationsDisabled) {\n const pointCount = points.length;\n let start = 0;\n let count = pointCount;\n if (meta._sorted) {\n const { iScale , _parsed } = meta;\n const axis = iScale.axis;\n const { min , max , minDefined , maxDefined } = iScale.getUserBounds();\n if (minDefined) {\n start = _limitValue(Math.min(// @ts-expect-error Need to type _parsed\n _lookupByKey(_parsed, iScale.axis, min).lo, // @ts-expect-error Need to fix types on _lookupByKey\n animationsDisabled ? pointCount : _lookupByKey(points, axis, iScale.getPixelForValue(min)).lo), 0, pointCount - 1);\n }\n if (maxDefined) {\n count = _limitValue(Math.max(// @ts-expect-error Need to type _parsed\n _lookupByKey(_parsed, iScale.axis, max, true).hi + 1, // @ts-expect-error Need to fix types on _lookupByKey\n animationsDisabled ? 0 : _lookupByKey(points, axis, iScale.getPixelForValue(max), true).hi + 1), start, pointCount) - start;\n } else {\n count = pointCount - start;\n }\n }\n return {\n start,\n count\n };\n}\n/**\n * Checks if the scale ranges have changed.\n * @param {object} meta - dataset meta.\n * @returns {boolean}\n * @private\n */ function _scaleRangesChanged(meta) {\n const { xScale , yScale , _scaleRanges } = meta;\n const newRanges = {\n xmin: xScale.min,\n xmax: xScale.max,\n ymin: yScale.min,\n ymax: yScale.max\n };\n if (!_scaleRanges) {\n meta._scaleRanges = newRanges;\n return true;\n }\n const changed = _scaleRanges.xmin !== xScale.min || _scaleRanges.xmax !== xScale.max || _scaleRanges.ymin !== yScale.min || _scaleRanges.ymax !== yScale.max;\n Object.assign(_scaleRanges, newRanges);\n return changed;\n}\n\nconst atEdge = (t)=>t === 0 || t === 1;\nconst elasticIn = (t, s, p)=>-(Math.pow(2, 10 * (t -= 1)) * Math.sin((t - s) * TAU / p));\nconst elasticOut = (t, s, p)=>Math.pow(2, -10 * t) * Math.sin((t - s) * TAU / p) + 1;\n/**\n * Easing functions adapted from Robert Penner's easing equations.\n * @namespace Chart.helpers.easing.effects\n * @see http://www.robertpenner.com/easing/\n */ const effects = {\n linear: (t)=>t,\n easeInQuad: (t)=>t * t,\n easeOutQuad: (t)=>-t * (t - 2),\n easeInOutQuad: (t)=>(t /= 0.5) < 1 ? 0.5 * t * t : -0.5 * (--t * (t - 2) - 1),\n easeInCubic: (t)=>t * t * t,\n easeOutCubic: (t)=>(t -= 1) * t * t + 1,\n easeInOutCubic: (t)=>(t /= 0.5) < 1 ? 0.5 * t * t * t : 0.5 * ((t -= 2) * t * t + 2),\n easeInQuart: (t)=>t * t * t * t,\n easeOutQuart: (t)=>-((t -= 1) * t * t * t - 1),\n easeInOutQuart: (t)=>(t /= 0.5) < 1 ? 0.5 * t * t * t * t : -0.5 * ((t -= 2) * t * t * t - 2),\n easeInQuint: (t)=>t * t * t * t * t,\n easeOutQuint: (t)=>(t -= 1) * t * t * t * t + 1,\n easeInOutQuint: (t)=>(t /= 0.5) < 1 ? 0.5 * t * t * t * t * t : 0.5 * ((t -= 2) * t * t * t * t + 2),\n easeInSine: (t)=>-Math.cos(t * HALF_PI) + 1,\n easeOutSine: (t)=>Math.sin(t * HALF_PI),\n easeInOutSine: (t)=>-0.5 * (Math.cos(PI * t) - 1),\n easeInExpo: (t)=>t === 0 ? 0 : Math.pow(2, 10 * (t - 1)),\n easeOutExpo: (t)=>t === 1 ? 1 : -Math.pow(2, -10 * t) + 1,\n easeInOutExpo: (t)=>atEdge(t) ? t : t < 0.5 ? 0.5 * Math.pow(2, 10 * (t * 2 - 1)) : 0.5 * (-Math.pow(2, -10 * (t * 2 - 1)) + 2),\n easeInCirc: (t)=>t >= 1 ? t : -(Math.sqrt(1 - t * t) - 1),\n easeOutCirc: (t)=>Math.sqrt(1 - (t -= 1) * t),\n easeInOutCirc: (t)=>(t /= 0.5) < 1 ? -0.5 * (Math.sqrt(1 - t * t) - 1) : 0.5 * (Math.sqrt(1 - (t -= 2) * t) + 1),\n easeInElastic: (t)=>atEdge(t) ? t : elasticIn(t, 0.075, 0.3),\n easeOutElastic: (t)=>atEdge(t) ? t : elasticOut(t, 0.075, 0.3),\n easeInOutElastic (t) {\n const s = 0.1125;\n const p = 0.45;\n return atEdge(t) ? t : t < 0.5 ? 0.5 * elasticIn(t * 2, s, p) : 0.5 + 0.5 * elasticOut(t * 2 - 1, s, p);\n },\n easeInBack (t) {\n const s = 1.70158;\n return t * t * ((s + 1) * t - s);\n },\n easeOutBack (t) {\n const s = 1.70158;\n return (t -= 1) * t * ((s + 1) * t + s) + 1;\n },\n easeInOutBack (t) {\n let s = 1.70158;\n if ((t /= 0.5) < 1) {\n return 0.5 * (t * t * (((s *= 1.525) + 1) * t - s));\n }\n return 0.5 * ((t -= 2) * t * (((s *= 1.525) + 1) * t + s) + 2);\n },\n easeInBounce: (t)=>1 - effects.easeOutBounce(1 - t),\n easeOutBounce (t) {\n const m = 7.5625;\n const d = 2.75;\n if (t < 1 / d) {\n return m * t * t;\n }\n if (t < 2 / d) {\n return m * (t -= 1.5 / d) * t + 0.75;\n }\n if (t < 2.5 / d) {\n return m * (t -= 2.25 / d) * t + 0.9375;\n }\n return m * (t -= 2.625 / d) * t + 0.984375;\n },\n easeInOutBounce: (t)=>t < 0.5 ? effects.easeInBounce(t * 2) * 0.5 : effects.easeOutBounce(t * 2 - 1) * 0.5 + 0.5\n};\n\nfunction isPatternOrGradient(value) {\n if (value && typeof value === 'object') {\n const type = value.toString();\n return type === '[object CanvasPattern]' || type === '[object CanvasGradient]';\n }\n return false;\n}\nfunction color(value) {\n return isPatternOrGradient(value) ? value : new Color(value);\n}\nfunction getHoverColor(value) {\n return isPatternOrGradient(value) ? value : new Color(value).saturate(0.5).darken(0.1).hexString();\n}\n\nconst numbers = [\n 'x',\n 'y',\n 'borderWidth',\n 'radius',\n 'tension'\n];\nconst colors = [\n 'color',\n 'borderColor',\n 'backgroundColor'\n];\nfunction applyAnimationsDefaults(defaults) {\n defaults.set('animation', {\n delay: undefined,\n duration: 1000,\n easing: 'easeOutQuart',\n fn: undefined,\n from: undefined,\n loop: undefined,\n to: undefined,\n type: undefined\n });\n defaults.describe('animation', {\n _fallback: false,\n _indexable: false,\n _scriptable: (name)=>name !== 'onProgress' && name !== 'onComplete' && name !== 'fn'\n });\n defaults.set('animations', {\n colors: {\n type: 'color',\n properties: colors\n },\n numbers: {\n type: 'number',\n properties: numbers\n }\n });\n defaults.describe('animations', {\n _fallback: 'animation'\n });\n defaults.set('transitions', {\n active: {\n animation: {\n duration: 400\n }\n },\n resize: {\n animation: {\n duration: 0\n }\n },\n show: {\n animations: {\n colors: {\n from: 'transparent'\n },\n visible: {\n type: 'boolean',\n duration: 0\n }\n }\n },\n hide: {\n animations: {\n colors: {\n to: 'transparent'\n },\n visible: {\n type: 'boolean',\n easing: 'linear',\n fn: (v)=>v | 0\n }\n }\n }\n });\n}\n\nfunction applyLayoutsDefaults(defaults) {\n defaults.set('layout', {\n autoPadding: true,\n padding: {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n }\n });\n}\n\nconst intlCache = new Map();\nfunction getNumberFormat(locale, options) {\n options = options || {};\n const cacheKey = locale + JSON.stringify(options);\n let formatter = intlCache.get(cacheKey);\n if (!formatter) {\n formatter = new Intl.NumberFormat(locale, options);\n intlCache.set(cacheKey, formatter);\n }\n return formatter;\n}\nfunction formatNumber(num, locale, options) {\n return getNumberFormat(locale, options).format(num);\n}\n\nconst formatters = {\n values (value) {\n return isArray(value) ? value : '' + value;\n },\n numeric (tickValue, index, ticks) {\n if (tickValue === 0) {\n return '0';\n }\n const locale = this.chart.options.locale;\n let notation;\n let delta = tickValue;\n if (ticks.length > 1) {\n const maxTick = Math.max(Math.abs(ticks[0].value), Math.abs(ticks[ticks.length - 1].value));\n if (maxTick < 1e-4 || maxTick > 1e+15) {\n notation = 'scientific';\n }\n delta = calculateDelta(tickValue, ticks);\n }\n const logDelta = log10(Math.abs(delta));\n const numDecimal = Math.max(Math.min(-1 * Math.floor(logDelta), 20), 0);\n const options = {\n notation,\n minimumFractionDigits: numDecimal,\n maximumFractionDigits: numDecimal\n };\n Object.assign(options, this.options.ticks.format);\n return formatNumber(tickValue, locale, options);\n },\n logarithmic (tickValue, index, ticks) {\n if (tickValue === 0) {\n return '0';\n }\n const remain = ticks[index].significand || tickValue / Math.pow(10, Math.floor(log10(tickValue)));\n if ([\n 1,\n 2,\n 3,\n 5,\n 10,\n 15\n ].includes(remain) || index > 0.8 * ticks.length) {\n return formatters.numeric.call(this, tickValue, index, ticks);\n }\n return '';\n }\n};\nfunction calculateDelta(tickValue, ticks) {\n let delta = ticks.length > 3 ? ticks[2].value - ticks[1].value : ticks[1].value - ticks[0].value;\n if (Math.abs(delta) >= 1 && tickValue !== Math.floor(tickValue)) {\n delta = tickValue - Math.floor(tickValue);\n }\n return delta;\n}\n var Ticks = {\n formatters\n};\n\nfunction applyScaleDefaults(defaults) {\n defaults.set('scale', {\n display: true,\n offset: false,\n reverse: false,\n beginAtZero: false,\n bounds: 'ticks',\n grace: 0,\n grid: {\n display: true,\n lineWidth: 1,\n drawOnChartArea: true,\n drawTicks: true,\n tickLength: 8,\n tickWidth: (_ctx, options)=>options.lineWidth,\n tickColor: (_ctx, options)=>options.color,\n offset: false\n },\n border: {\n display: true,\n dash: [],\n dashOffset: 0.0,\n width: 1\n },\n title: {\n display: false,\n text: '',\n padding: {\n top: 4,\n bottom: 4\n }\n },\n ticks: {\n minRotation: 0,\n maxRotation: 50,\n mirror: false,\n textStrokeWidth: 0,\n textStrokeColor: '',\n padding: 3,\n display: true,\n autoSkip: true,\n autoSkipPadding: 3,\n labelOffset: 0,\n callback: Ticks.formatters.values,\n minor: {},\n major: {},\n align: 'center',\n crossAlign: 'near',\n showLabelBackdrop: false,\n backdropColor: 'rgba(255, 255, 255, 0.75)',\n backdropPadding: 2\n }\n });\n defaults.route('scale.ticks', 'color', '', 'color');\n defaults.route('scale.grid', 'color', '', 'borderColor');\n defaults.route('scale.border', 'color', '', 'borderColor');\n defaults.route('scale.title', 'color', '', 'color');\n defaults.describe('scale', {\n _fallback: false,\n _scriptable: (name)=>!name.startsWith('before') && !name.startsWith('after') && name !== 'callback' && name !== 'parser',\n _indexable: (name)=>name !== 'borderDash' && name !== 'tickBorderDash' && name !== 'dash'\n });\n defaults.describe('scales', {\n _fallback: 'scale'\n });\n defaults.describe('scale.ticks', {\n _scriptable: (name)=>name !== 'backdropPadding' && name !== 'callback',\n _indexable: (name)=>name !== 'backdropPadding'\n });\n}\n\nconst overrides = Object.create(null);\nconst descriptors = Object.create(null);\n function getScope$1(node, key) {\n if (!key) {\n return node;\n }\n const keys = key.split('.');\n for(let i = 0, n = keys.length; i < n; ++i){\n const k = keys[i];\n node = node[k] || (node[k] = Object.create(null));\n }\n return node;\n}\nfunction set(root, scope, values) {\n if (typeof scope === 'string') {\n return merge(getScope$1(root, scope), values);\n }\n return merge(getScope$1(root, ''), scope);\n}\n class Defaults {\n constructor(_descriptors, _appliers){\n this.animation = undefined;\n this.backgroundColor = 'rgba(0,0,0,0.1)';\n this.borderColor = 'rgba(0,0,0,0.1)';\n this.color = '#666';\n this.datasets = {};\n this.devicePixelRatio = (context)=>context.chart.platform.getDevicePixelRatio();\n this.elements = {};\n this.events = [\n 'mousemove',\n 'mouseout',\n 'click',\n 'touchstart',\n 'touchmove'\n ];\n this.font = {\n family: \"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif\",\n size: 12,\n style: 'normal',\n lineHeight: 1.2,\n weight: null\n };\n this.hover = {};\n this.hoverBackgroundColor = (ctx, options)=>getHoverColor(options.backgroundColor);\n this.hoverBorderColor = (ctx, options)=>getHoverColor(options.borderColor);\n this.hoverColor = (ctx, options)=>getHoverColor(options.color);\n this.indexAxis = 'x';\n this.interaction = {\n mode: 'nearest',\n intersect: true,\n includeInvisible: false\n };\n this.maintainAspectRatio = true;\n this.onHover = null;\n this.onClick = null;\n this.parsing = true;\n this.plugins = {};\n this.responsive = true;\n this.scale = undefined;\n this.scales = {};\n this.showLine = true;\n this.drawActiveElementsOnTop = true;\n this.describe(_descriptors);\n this.apply(_appliers);\n }\n set(scope, values) {\n return set(this, scope, values);\n }\n get(scope) {\n return getScope$1(this, scope);\n }\n describe(scope, values) {\n return set(descriptors, scope, values);\n }\n override(scope, values) {\n return set(overrides, scope, values);\n }\n route(scope, name, targetScope, targetName) {\n const scopeObject = getScope$1(this, scope);\n const targetScopeObject = getScope$1(this, targetScope);\n const privateName = '_' + name;\n Object.defineProperties(scopeObject, {\n [privateName]: {\n value: scopeObject[name],\n writable: true\n },\n [name]: {\n enumerable: true,\n get () {\n const local = this[privateName];\n const target = targetScopeObject[targetName];\n if (isObject(local)) {\n return Object.assign({}, target, local);\n }\n return valueOrDefault(local, target);\n },\n set (value) {\n this[privateName] = value;\n }\n }\n });\n }\n apply(appliers) {\n appliers.forEach((apply)=>apply(this));\n }\n}\nvar defaults = /* #__PURE__ */ new Defaults({\n _scriptable: (name)=>!name.startsWith('on'),\n _indexable: (name)=>name !== 'events',\n hover: {\n _fallback: 'interaction'\n },\n interaction: {\n _scriptable: false,\n _indexable: false\n }\n}, [\n applyAnimationsDefaults,\n applyLayoutsDefaults,\n applyScaleDefaults\n]);\n\nfunction toFontString(font) {\n if (!font || isNullOrUndef(font.size) || isNullOrUndef(font.family)) {\n return null;\n }\n return (font.style ? font.style + ' ' : '') + (font.weight ? font.weight + ' ' : '') + font.size + 'px ' + font.family;\n}\n function _measureText(ctx, data, gc, longest, string) {\n let textWidth = data[string];\n if (!textWidth) {\n textWidth = data[string] = ctx.measureText(string).width;\n gc.push(string);\n }\n if (textWidth > longest) {\n longest = textWidth;\n }\n return longest;\n}\n function _longestText(ctx, font, arrayOfThings, cache) {\n cache = cache || {};\n let data = cache.data = cache.data || {};\n let gc = cache.garbageCollect = cache.garbageCollect || [];\n if (cache.font !== font) {\n data = cache.data = {};\n gc = cache.garbageCollect = [];\n cache.font = font;\n }\n ctx.save();\n ctx.font = font;\n let longest = 0;\n const ilen = arrayOfThings.length;\n let i, j, jlen, thing, nestedThing;\n for(i = 0; i < ilen; i++){\n thing = arrayOfThings[i];\n if (thing !== undefined && thing !== null && isArray(thing) !== true) {\n longest = _measureText(ctx, data, gc, longest, thing);\n } else if (isArray(thing)) {\n for(j = 0, jlen = thing.length; j < jlen; j++){\n nestedThing = thing[j];\n if (nestedThing !== undefined && nestedThing !== null && !isArray(nestedThing)) {\n longest = _measureText(ctx, data, gc, longest, nestedThing);\n }\n }\n }\n }\n ctx.restore();\n const gcLen = gc.length / 2;\n if (gcLen > arrayOfThings.length) {\n for(i = 0; i < gcLen; i++){\n delete data[gc[i]];\n }\n gc.splice(0, gcLen);\n }\n return longest;\n}\n function _alignPixel(chart, pixel, width) {\n const devicePixelRatio = chart.currentDevicePixelRatio;\n const halfWidth = width !== 0 ? Math.max(width / 2, 0.5) : 0;\n return Math.round((pixel - halfWidth) * devicePixelRatio) / devicePixelRatio + halfWidth;\n}\n function clearCanvas(canvas, ctx) {\n ctx = ctx || canvas.getContext('2d');\n ctx.save();\n ctx.resetTransform();\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n ctx.restore();\n}\nfunction drawPoint(ctx, options, x, y) {\n drawPointLegend(ctx, options, x, y, null);\n}\nfunction drawPointLegend(ctx, options, x, y, w) {\n let type, xOffset, yOffset, size, cornerRadius, width, xOffsetW, yOffsetW;\n const style = options.pointStyle;\n const rotation = options.rotation;\n const radius = options.radius;\n let rad = (rotation || 0) * RAD_PER_DEG;\n if (style && typeof style === 'object') {\n type = style.toString();\n if (type === '[object HTMLImageElement]' || type === '[object HTMLCanvasElement]') {\n ctx.save();\n ctx.translate(x, y);\n ctx.rotate(rad);\n ctx.drawImage(style, -style.width / 2, -style.height / 2, style.width, style.height);\n ctx.restore();\n return;\n }\n }\n if (isNaN(radius) || radius <= 0) {\n return;\n }\n ctx.beginPath();\n switch(style){\n default:\n if (w) {\n ctx.ellipse(x, y, w / 2, radius, 0, 0, TAU);\n } else {\n ctx.arc(x, y, radius, 0, TAU);\n }\n ctx.closePath();\n break;\n case 'triangle':\n width = w ? w / 2 : radius;\n ctx.moveTo(x + Math.sin(rad) * width, y - Math.cos(rad) * radius);\n rad += TWO_THIRDS_PI;\n ctx.lineTo(x + Math.sin(rad) * width, y - Math.cos(rad) * radius);\n rad += TWO_THIRDS_PI;\n ctx.lineTo(x + Math.sin(rad) * width, y - Math.cos(rad) * radius);\n ctx.closePath();\n break;\n case 'rectRounded':\n cornerRadius = radius * 0.516;\n size = radius - cornerRadius;\n xOffset = Math.cos(rad + QUARTER_PI) * size;\n xOffsetW = Math.cos(rad + QUARTER_PI) * (w ? w / 2 - cornerRadius : size);\n yOffset = Math.sin(rad + QUARTER_PI) * size;\n yOffsetW = Math.sin(rad + QUARTER_PI) * (w ? w / 2 - cornerRadius : size);\n ctx.arc(x - xOffsetW, y - yOffset, cornerRadius, rad - PI, rad - HALF_PI);\n ctx.arc(x + yOffsetW, y - xOffset, cornerRadius, rad - HALF_PI, rad);\n ctx.arc(x + xOffsetW, y + yOffset, cornerRadius, rad, rad + HALF_PI);\n ctx.arc(x - yOffsetW, y + xOffset, cornerRadius, rad + HALF_PI, rad + PI);\n ctx.closePath();\n break;\n case 'rect':\n if (!rotation) {\n size = Math.SQRT1_2 * radius;\n width = w ? w / 2 : size;\n ctx.rect(x - width, y - size, 2 * width, 2 * size);\n break;\n }\n rad += QUARTER_PI;\n case 'rectRot':\n xOffsetW = Math.cos(rad) * (w ? w / 2 : radius);\n xOffset = Math.cos(rad) * radius;\n yOffset = Math.sin(rad) * radius;\n yOffsetW = Math.sin(rad) * (w ? w / 2 : radius);\n ctx.moveTo(x - xOffsetW, y - yOffset);\n ctx.lineTo(x + yOffsetW, y - xOffset);\n ctx.lineTo(x + xOffsetW, y + yOffset);\n ctx.lineTo(x - yOffsetW, y + xOffset);\n ctx.closePath();\n break;\n case 'crossRot':\n rad += QUARTER_PI;\n case 'cross':\n xOffsetW = Math.cos(rad) * (w ? w / 2 : radius);\n xOffset = Math.cos(rad) * radius;\n yOffset = Math.sin(rad) * radius;\n yOffsetW = Math.sin(rad) * (w ? w / 2 : radius);\n ctx.moveTo(x - xOffsetW, y - yOffset);\n ctx.lineTo(x + xOffsetW, y + yOffset);\n ctx.moveTo(x + yOffsetW, y - xOffset);\n ctx.lineTo(x - yOffsetW, y + xOffset);\n break;\n case 'star':\n xOffsetW = Math.cos(rad) * (w ? w / 2 : radius);\n xOffset = Math.cos(rad) * radius;\n yOffset = Math.sin(rad) * radius;\n yOffsetW = Math.sin(rad) * (w ? w / 2 : radius);\n ctx.moveTo(x - xOffsetW, y - yOffset);\n ctx.lineTo(x + xOffsetW, y + yOffset);\n ctx.moveTo(x + yOffsetW, y - xOffset);\n ctx.lineTo(x - yOffsetW, y + xOffset);\n rad += QUARTER_PI;\n xOffsetW = Math.cos(rad) * (w ? w / 2 : radius);\n xOffset = Math.cos(rad) * radius;\n yOffset = Math.sin(rad) * radius;\n yOffsetW = Math.sin(rad) * (w ? w / 2 : radius);\n ctx.moveTo(x - xOffsetW, y - yOffset);\n ctx.lineTo(x + xOffsetW, y + yOffset);\n ctx.moveTo(x + yOffsetW, y - xOffset);\n ctx.lineTo(x - yOffsetW, y + xOffset);\n break;\n case 'line':\n xOffset = w ? w / 2 : Math.cos(rad) * radius;\n yOffset = Math.sin(rad) * radius;\n ctx.moveTo(x - xOffset, y - yOffset);\n ctx.lineTo(x + xOffset, y + yOffset);\n break;\n case 'dash':\n ctx.moveTo(x, y);\n ctx.lineTo(x + Math.cos(rad) * (w ? w / 2 : radius), y + Math.sin(rad) * radius);\n break;\n case false:\n ctx.closePath();\n break;\n }\n ctx.fill();\n if (options.borderWidth > 0) {\n ctx.stroke();\n }\n}\n function _isPointInArea(point, area, margin) {\n margin = margin || 0.5;\n return !area || point && point.x > area.left - margin && point.x < area.right + margin && point.y > area.top - margin && point.y < area.bottom + margin;\n}\nfunction clipArea(ctx, area) {\n ctx.save();\n ctx.beginPath();\n ctx.rect(area.left, area.top, area.right - area.left, area.bottom - area.top);\n ctx.clip();\n}\nfunction unclipArea(ctx) {\n ctx.restore();\n}\n function _steppedLineTo(ctx, previous, target, flip, mode) {\n if (!previous) {\n return ctx.lineTo(target.x, target.y);\n }\n if (mode === 'middle') {\n const midpoint = (previous.x + target.x) / 2.0;\n ctx.lineTo(midpoint, previous.y);\n ctx.lineTo(midpoint, target.y);\n } else if (mode === 'after' !== !!flip) {\n ctx.lineTo(previous.x, target.y);\n } else {\n ctx.lineTo(target.x, previous.y);\n }\n ctx.lineTo(target.x, target.y);\n}\n function _bezierCurveTo(ctx, previous, target, flip) {\n if (!previous) {\n return ctx.lineTo(target.x, target.y);\n }\n ctx.bezierCurveTo(flip ? previous.cp1x : previous.cp2x, flip ? previous.cp1y : previous.cp2y, flip ? target.cp2x : target.cp1x, flip ? target.cp2y : target.cp1y, target.x, target.y);\n}\n function renderText(ctx, text, x, y, font, opts = {}) {\n const lines = isArray(text) ? text : [\n text\n ];\n const stroke = opts.strokeWidth > 0 && opts.strokeColor !== '';\n let i, line;\n ctx.save();\n ctx.font = font.string;\n setRenderOpts(ctx, opts);\n for(i = 0; i < lines.length; ++i){\n line = lines[i];\n if (opts.backdrop) {\n drawBackdrop(ctx, opts.backdrop);\n }\n if (stroke) {\n if (opts.strokeColor) {\n ctx.strokeStyle = opts.strokeColor;\n }\n if (!isNullOrUndef(opts.strokeWidth)) {\n ctx.lineWidth = opts.strokeWidth;\n }\n ctx.strokeText(line, x, y, opts.maxWidth);\n }\n ctx.fillText(line, x, y, opts.maxWidth);\n decorateText(ctx, x, y, line, opts);\n y += font.lineHeight;\n }\n ctx.restore();\n}\nfunction setRenderOpts(ctx, opts) {\n if (opts.translation) {\n ctx.translate(opts.translation[0], opts.translation[1]);\n }\n if (!isNullOrUndef(opts.rotation)) {\n ctx.rotate(opts.rotation);\n }\n if (opts.color) {\n ctx.fillStyle = opts.color;\n }\n if (opts.textAlign) {\n ctx.textAlign = opts.textAlign;\n }\n if (opts.textBaseline) {\n ctx.textBaseline = opts.textBaseline;\n }\n}\nfunction decorateText(ctx, x, y, line, opts) {\n if (opts.strikethrough || opts.underline) {\n const metrics = ctx.measureText(line);\n const left = x - metrics.actualBoundingBoxLeft;\n const right = x + metrics.actualBoundingBoxRight;\n const top = y - metrics.actualBoundingBoxAscent;\n const bottom = y + metrics.actualBoundingBoxDescent;\n const yDecoration = opts.strikethrough ? (top + bottom) / 2 : bottom;\n ctx.strokeStyle = ctx.fillStyle;\n ctx.beginPath();\n ctx.lineWidth = opts.decorationWidth || 2;\n ctx.moveTo(left, yDecoration);\n ctx.lineTo(right, yDecoration);\n ctx.stroke();\n }\n}\nfunction drawBackdrop(ctx, opts) {\n const oldColor = ctx.fillStyle;\n ctx.fillStyle = opts.color;\n ctx.fillRect(opts.left, opts.top, opts.width, opts.height);\n ctx.fillStyle = oldColor;\n}\n function addRoundedRectPath(ctx, rect) {\n const { x , y , w , h , radius } = rect;\n ctx.arc(x + radius.topLeft, y + radius.topLeft, radius.topLeft, -HALF_PI, PI, true);\n ctx.lineTo(x, y + h - radius.bottomLeft);\n ctx.arc(x + radius.bottomLeft, y + h - radius.bottomLeft, radius.bottomLeft, PI, HALF_PI, true);\n ctx.lineTo(x + w - radius.bottomRight, y + h);\n ctx.arc(x + w - radius.bottomRight, y + h - radius.bottomRight, radius.bottomRight, HALF_PI, 0, true);\n ctx.lineTo(x + w, y + radius.topRight);\n ctx.arc(x + w - radius.topRight, y + radius.topRight, radius.topRight, 0, -HALF_PI, true);\n ctx.lineTo(x + radius.topLeft, y);\n}\n\nconst LINE_HEIGHT = /^(normal|(\\d+(?:\\.\\d+)?)(px|em|%)?)$/;\nconst FONT_STYLE = /^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;\n/**\n * @alias Chart.helpers.options\n * @namespace\n */ /**\n * Converts the given line height `value` in pixels for a specific font `size`.\n * @param value - The lineHeight to parse (eg. 1.6, '14px', '75%', '1.6em').\n * @param size - The font size (in pixels) used to resolve relative `value`.\n * @returns The effective line height in pixels (size * 1.2 if value is invalid).\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/line-height\n * @since 2.7.0\n */ function toLineHeight(value, size) {\n const matches = ('' + value).match(LINE_HEIGHT);\n if (!matches || matches[1] === 'normal') {\n return size * 1.2;\n }\n value = +matches[2];\n switch(matches[3]){\n case 'px':\n return value;\n case '%':\n value /= 100;\n break;\n }\n return size * value;\n}\nconst numberOrZero = (v)=>+v || 0;\nfunction _readValueToProps(value, props) {\n const ret = {};\n const objProps = isObject(props);\n const keys = objProps ? Object.keys(props) : props;\n const read = isObject(value) ? objProps ? (prop)=>valueOrDefault(value[prop], value[props[prop]]) : (prop)=>value[prop] : ()=>value;\n for (const prop of keys){\n ret[prop] = numberOrZero(read(prop));\n }\n return ret;\n}\n/**\n * Converts the given value into a TRBL object.\n * @param value - If a number, set the value to all TRBL component,\n * else, if an object, use defined properties and sets undefined ones to 0.\n * x / y are shorthands for same value for left/right and top/bottom.\n * @returns The padding values (top, right, bottom, left)\n * @since 3.0.0\n */ function toTRBL(value) {\n return _readValueToProps(value, {\n top: 'y',\n right: 'x',\n bottom: 'y',\n left: 'x'\n });\n}\n/**\n * Converts the given value into a TRBL corners object (similar with css border-radius).\n * @param value - If a number, set the value to all TRBL corner components,\n * else, if an object, use defined properties and sets undefined ones to 0.\n * @returns The TRBL corner values (topLeft, topRight, bottomLeft, bottomRight)\n * @since 3.0.0\n */ function toTRBLCorners(value) {\n return _readValueToProps(value, [\n 'topLeft',\n 'topRight',\n 'bottomLeft',\n 'bottomRight'\n ]);\n}\n/**\n * Converts the given value into a padding object with pre-computed width/height.\n * @param value - If a number, set the value to all TRBL component,\n * else, if an object, use defined properties and sets undefined ones to 0.\n * x / y are shorthands for same value for left/right and top/bottom.\n * @returns The padding values (top, right, bottom, left, width, height)\n * @since 2.7.0\n */ function toPadding(value) {\n const obj = toTRBL(value);\n obj.width = obj.left + obj.right;\n obj.height = obj.top + obj.bottom;\n return obj;\n}\n/**\n * Parses font options and returns the font object.\n * @param options - A object that contains font options to be parsed.\n * @param fallback - A object that contains fallback font options.\n * @return The font object.\n * @private\n */ function toFont(options, fallback) {\n options = options || {};\n fallback = fallback || defaults.font;\n let size = valueOrDefault(options.size, fallback.size);\n if (typeof size === 'string') {\n size = parseInt(size, 10);\n }\n let style = valueOrDefault(options.style, fallback.style);\n if (style && !('' + style).match(FONT_STYLE)) {\n console.warn('Invalid font style specified: \"' + style + '\"');\n style = undefined;\n }\n const font = {\n family: valueOrDefault(options.family, fallback.family),\n lineHeight: toLineHeight(valueOrDefault(options.lineHeight, fallback.lineHeight), size),\n size,\n style,\n weight: valueOrDefault(options.weight, fallback.weight),\n string: ''\n };\n font.string = toFontString(font);\n return font;\n}\n/**\n * Evaluates the given `inputs` sequentially and returns the first defined value.\n * @param inputs - An array of values, falling back to the last value.\n * @param context - If defined and the current value is a function, the value\n * is called with `context` as first argument and the result becomes the new input.\n * @param index - If defined and the current value is an array, the value\n * at `index` become the new input.\n * @param info - object to return information about resolution in\n * @param info.cacheable - Will be set to `false` if option is not cacheable.\n * @since 2.7.0\n */ function resolve(inputs, context, index, info) {\n let cacheable = true;\n let i, ilen, value;\n for(i = 0, ilen = inputs.length; i < ilen; ++i){\n value = inputs[i];\n if (value === undefined) {\n continue;\n }\n if (context !== undefined && typeof value === 'function') {\n value = value(context);\n cacheable = false;\n }\n if (index !== undefined && isArray(value)) {\n value = value[index % value.length];\n cacheable = false;\n }\n if (value !== undefined) {\n if (info && !cacheable) {\n info.cacheable = false;\n }\n return value;\n }\n }\n}\n/**\n * @param minmax\n * @param grace\n * @param beginAtZero\n * @private\n */ function _addGrace(minmax, grace, beginAtZero) {\n const { min , max } = minmax;\n const change = toDimension(grace, (max - min) / 2);\n const keepZero = (value, add)=>beginAtZero && value === 0 ? 0 : value + add;\n return {\n min: keepZero(min, -Math.abs(change)),\n max: keepZero(max, change)\n };\n}\nfunction createContext(parentContext, context) {\n return Object.assign(Object.create(parentContext), context);\n}\n\nfunction _createResolver(scopes, prefixes = [\n ''\n], rootScopes = scopes, fallback, getTarget = ()=>scopes[0]) {\n if (!defined(fallback)) {\n fallback = _resolve('_fallback', scopes);\n }\n const cache = {\n [Symbol.toStringTag]: 'Object',\n _cacheable: true,\n _scopes: scopes,\n _rootScopes: rootScopes,\n _fallback: fallback,\n _getTarget: getTarget,\n override: (scope)=>_createResolver([\n scope,\n ...scopes\n ], prefixes, rootScopes, fallback)\n };\n return new Proxy(cache, {\n deleteProperty (target, prop) {\n delete target[prop];\n delete target._keys;\n delete scopes[0][prop];\n return true;\n },\n get (target, prop) {\n return _cached(target, prop, ()=>_resolveWithPrefixes(prop, prefixes, scopes, target));\n },\n getOwnPropertyDescriptor (target, prop) {\n return Reflect.getOwnPropertyDescriptor(target._scopes[0], prop);\n },\n getPrototypeOf () {\n return Reflect.getPrototypeOf(scopes[0]);\n },\n has (target, prop) {\n return getKeysFromAllScopes(target).includes(prop);\n },\n ownKeys (target) {\n return getKeysFromAllScopes(target);\n },\n set (target, prop, value) {\n const storage = target._storage || (target._storage = getTarget());\n target[prop] = storage[prop] = value;\n delete target._keys;\n return true;\n }\n });\n}\n function _attachContext(proxy, context, subProxy, descriptorDefaults) {\n const cache = {\n _cacheable: false,\n _proxy: proxy,\n _context: context,\n _subProxy: subProxy,\n _stack: new Set(),\n _descriptors: _descriptors(proxy, descriptorDefaults),\n setContext: (ctx)=>_attachContext(proxy, ctx, subProxy, descriptorDefaults),\n override: (scope)=>_attachContext(proxy.override(scope), context, subProxy, descriptorDefaults)\n };\n return new Proxy(cache, {\n deleteProperty (target, prop) {\n delete target[prop];\n delete proxy[prop];\n return true;\n },\n get (target, prop, receiver) {\n return _cached(target, prop, ()=>_resolveWithContext(target, prop, receiver));\n },\n getOwnPropertyDescriptor (target, prop) {\n return target._descriptors.allKeys ? Reflect.has(proxy, prop) ? {\n enumerable: true,\n configurable: true\n } : undefined : Reflect.getOwnPropertyDescriptor(proxy, prop);\n },\n getPrototypeOf () {\n return Reflect.getPrototypeOf(proxy);\n },\n has (target, prop) {\n return Reflect.has(proxy, prop);\n },\n ownKeys () {\n return Reflect.ownKeys(proxy);\n },\n set (target, prop, value) {\n proxy[prop] = value;\n delete target[prop];\n return true;\n }\n });\n}\n function _descriptors(proxy, defaults = {\n scriptable: true,\n indexable: true\n}) {\n const { _scriptable =defaults.scriptable , _indexable =defaults.indexable , _allKeys =defaults.allKeys } = proxy;\n return {\n allKeys: _allKeys,\n scriptable: _scriptable,\n indexable: _indexable,\n isScriptable: isFunction(_scriptable) ? _scriptable : ()=>_scriptable,\n isIndexable: isFunction(_indexable) ? _indexable : ()=>_indexable\n };\n}\nconst readKey = (prefix, name)=>prefix ? prefix + _capitalize(name) : name;\nconst needsSubResolver = (prop, value)=>isObject(value) && prop !== 'adapters' && (Object.getPrototypeOf(value) === null || value.constructor === Object);\nfunction _cached(target, prop, resolve) {\n if (Object.prototype.hasOwnProperty.call(target, prop)) {\n return target[prop];\n }\n const value = resolve();\n target[prop] = value;\n return value;\n}\nfunction _resolveWithContext(target, prop, receiver) {\n const { _proxy , _context , _subProxy , _descriptors: descriptors } = target;\n let value = _proxy[prop];\n if (isFunction(value) && descriptors.isScriptable(prop)) {\n value = _resolveScriptable(prop, value, target, receiver);\n }\n if (isArray(value) && value.length) {\n value = _resolveArray(prop, value, target, descriptors.isIndexable);\n }\n if (needsSubResolver(prop, value)) {\n value = _attachContext(value, _context, _subProxy && _subProxy[prop], descriptors);\n }\n return value;\n}\nfunction _resolveScriptable(prop, value, target, receiver) {\n const { _proxy , _context , _subProxy , _stack } = target;\n if (_stack.has(prop)) {\n throw new Error('Recursion detected: ' + Array.from(_stack).join('->') + '->' + prop);\n }\n _stack.add(prop);\n value = value(_context, _subProxy || receiver);\n _stack.delete(prop);\n if (needsSubResolver(prop, value)) {\n value = createSubResolver(_proxy._scopes, _proxy, prop, value);\n }\n return value;\n}\nfunction _resolveArray(prop, value, target, isIndexable) {\n const { _proxy , _context , _subProxy , _descriptors: descriptors } = target;\n if (defined(_context.index) && isIndexable(prop)) {\n value = value[_context.index % value.length];\n } else if (isObject(value[0])) {\n const arr = value;\n const scopes = _proxy._scopes.filter((s)=>s !== arr);\n value = [];\n for (const item of arr){\n const resolver = createSubResolver(scopes, _proxy, prop, item);\n value.push(_attachContext(resolver, _context, _subProxy && _subProxy[prop], descriptors));\n }\n }\n return value;\n}\nfunction resolveFallback(fallback, prop, value) {\n return isFunction(fallback) ? fallback(prop, value) : fallback;\n}\nconst getScope = (key, parent)=>key === true ? parent : typeof key === 'string' ? resolveObjectKey(parent, key) : undefined;\nfunction addScopes(set, parentScopes, key, parentFallback, value) {\n for (const parent of parentScopes){\n const scope = getScope(key, parent);\n if (scope) {\n set.add(scope);\n const fallback = resolveFallback(scope._fallback, key, value);\n if (defined(fallback) && fallback !== key && fallback !== parentFallback) {\n return fallback;\n }\n } else if (scope === false && defined(parentFallback) && key !== parentFallback) {\n return null;\n }\n }\n return false;\n}\nfunction createSubResolver(parentScopes, resolver, prop, value) {\n const rootScopes = resolver._rootScopes;\n const fallback = resolveFallback(resolver._fallback, prop, value);\n const allScopes = [\n ...parentScopes,\n ...rootScopes\n ];\n const set = new Set();\n set.add(value);\n let key = addScopesFromKey(set, allScopes, prop, fallback || prop, value);\n if (key === null) {\n return false;\n }\n if (defined(fallback) && fallback !== prop) {\n key = addScopesFromKey(set, allScopes, fallback, key, value);\n if (key === null) {\n return false;\n }\n }\n return _createResolver(Array.from(set), [\n ''\n ], rootScopes, fallback, ()=>subGetTarget(resolver, prop, value));\n}\nfunction addScopesFromKey(set, allScopes, key, fallback, item) {\n while(key){\n key = addScopes(set, allScopes, key, fallback, item);\n }\n return key;\n}\nfunction subGetTarget(resolver, prop, value) {\n const parent = resolver._getTarget();\n if (!(prop in parent)) {\n parent[prop] = {};\n }\n const target = parent[prop];\n if (isArray(target) && isObject(value)) {\n return value;\n }\n return target || {};\n}\nfunction _resolveWithPrefixes(prop, prefixes, scopes, proxy) {\n let value;\n for (const prefix of prefixes){\n value = _resolve(readKey(prefix, prop), scopes);\n if (defined(value)) {\n return needsSubResolver(prop, value) ? createSubResolver(scopes, proxy, prop, value) : value;\n }\n }\n}\nfunction _resolve(key, scopes) {\n for (const scope of scopes){\n if (!scope) {\n continue;\n }\n const value = scope[key];\n if (defined(value)) {\n return value;\n }\n }\n}\nfunction getKeysFromAllScopes(target) {\n let keys = target._keys;\n if (!keys) {\n keys = target._keys = resolveKeysFromAllScopes(target._scopes);\n }\n return keys;\n}\nfunction resolveKeysFromAllScopes(scopes) {\n const set = new Set();\n for (const scope of scopes){\n for (const key of Object.keys(scope).filter((k)=>!k.startsWith('_'))){\n set.add(key);\n }\n }\n return Array.from(set);\n}\nfunction _parseObjectDataRadialScale(meta, data, start, count) {\n const { iScale } = meta;\n const { key ='r' } = this._parsing;\n const parsed = new Array(count);\n let i, ilen, index, item;\n for(i = 0, ilen = count; i < ilen; ++i){\n index = i + start;\n item = data[index];\n parsed[i] = {\n r: iScale.parse(resolveObjectKey(item, key), index)\n };\n }\n return parsed;\n}\n\nconst EPSILON = Number.EPSILON || 1e-14;\nconst getPoint = (points, i)=>i < points.length && !points[i].skip && points[i];\nconst getValueAxis = (indexAxis)=>indexAxis === 'x' ? 'y' : 'x';\nfunction splineCurve(firstPoint, middlePoint, afterPoint, t) {\n // Props to Rob Spencer at scaled innovation for his post on splining between points\n // http://scaledinnovation.com/analytics/splines/aboutSplines.html\n // This function must also respect \"skipped\" points\n const previous = firstPoint.skip ? middlePoint : firstPoint;\n const current = middlePoint;\n const next = afterPoint.skip ? middlePoint : afterPoint;\n const d01 = distanceBetweenPoints(current, previous);\n const d12 = distanceBetweenPoints(next, current);\n let s01 = d01 / (d01 + d12);\n let s12 = d12 / (d01 + d12);\n // If all points are the same, s01 & s02 will be inf\n s01 = isNaN(s01) ? 0 : s01;\n s12 = isNaN(s12) ? 0 : s12;\n const fa = t * s01; // scaling factor for triangle Ta\n const fb = t * s12;\n return {\n previous: {\n x: current.x - fa * (next.x - previous.x),\n y: current.y - fa * (next.y - previous.y)\n },\n next: {\n x: current.x + fb * (next.x - previous.x),\n y: current.y + fb * (next.y - previous.y)\n }\n };\n}\n/**\n * Adjust tangents to ensure monotonic properties\n */ function monotoneAdjust(points, deltaK, mK) {\n const pointsLen = points.length;\n let alphaK, betaK, tauK, squaredMagnitude, pointCurrent;\n let pointAfter = getPoint(points, 0);\n for(let i = 0; i < pointsLen - 1; ++i){\n pointCurrent = pointAfter;\n pointAfter = getPoint(points, i + 1);\n if (!pointCurrent || !pointAfter) {\n continue;\n }\n if (almostEquals(deltaK[i], 0, EPSILON)) {\n mK[i] = mK[i + 1] = 0;\n continue;\n }\n alphaK = mK[i] / deltaK[i];\n betaK = mK[i + 1] / deltaK[i];\n squaredMagnitude = Math.pow(alphaK, 2) + Math.pow(betaK, 2);\n if (squaredMagnitude <= 9) {\n continue;\n }\n tauK = 3 / Math.sqrt(squaredMagnitude);\n mK[i] = alphaK * tauK * deltaK[i];\n mK[i + 1] = betaK * tauK * deltaK[i];\n }\n}\nfunction monotoneCompute(points, mK, indexAxis = 'x') {\n const valueAxis = getValueAxis(indexAxis);\n const pointsLen = points.length;\n let delta, pointBefore, pointCurrent;\n let pointAfter = getPoint(points, 0);\n for(let i = 0; i < pointsLen; ++i){\n pointBefore = pointCurrent;\n pointCurrent = pointAfter;\n pointAfter = getPoint(points, i + 1);\n if (!pointCurrent) {\n continue;\n }\n const iPixel = pointCurrent[indexAxis];\n const vPixel = pointCurrent[valueAxis];\n if (pointBefore) {\n delta = (iPixel - pointBefore[indexAxis]) / 3;\n pointCurrent[`cp1${indexAxis}`] = iPixel - delta;\n pointCurrent[`cp1${valueAxis}`] = vPixel - delta * mK[i];\n }\n if (pointAfter) {\n delta = (pointAfter[indexAxis] - iPixel) / 3;\n pointCurrent[`cp2${indexAxis}`] = iPixel + delta;\n pointCurrent[`cp2${valueAxis}`] = vPixel + delta * mK[i];\n }\n }\n}\n/**\n * This function calculates Bézier control points in a similar way than |splineCurve|,\n * but preserves monotonicity of the provided data and ensures no local extremums are added\n * between the dataset discrete points due to the interpolation.\n * See : https://en.wikipedia.org/wiki/Monotone_cubic_interpolation\n */ function splineCurveMonotone(points, indexAxis = 'x') {\n const valueAxis = getValueAxis(indexAxis);\n const pointsLen = points.length;\n const deltaK = Array(pointsLen).fill(0);\n const mK = Array(pointsLen);\n // Calculate slopes (deltaK) and initialize tangents (mK)\n let i, pointBefore, pointCurrent;\n let pointAfter = getPoint(points, 0);\n for(i = 0; i < pointsLen; ++i){\n pointBefore = pointCurrent;\n pointCurrent = pointAfter;\n pointAfter = getPoint(points, i + 1);\n if (!pointCurrent) {\n continue;\n }\n if (pointAfter) {\n const slopeDelta = pointAfter[indexAxis] - pointCurrent[indexAxis];\n // In the case of two points that appear at the same x pixel, slopeDeltaX is 0\n deltaK[i] = slopeDelta !== 0 ? (pointAfter[valueAxis] - pointCurrent[valueAxis]) / slopeDelta : 0;\n }\n mK[i] = !pointBefore ? deltaK[i] : !pointAfter ? deltaK[i - 1] : sign(deltaK[i - 1]) !== sign(deltaK[i]) ? 0 : (deltaK[i - 1] + deltaK[i]) / 2;\n }\n monotoneAdjust(points, deltaK, mK);\n monotoneCompute(points, mK, indexAxis);\n}\nfunction capControlPoint(pt, min, max) {\n return Math.max(Math.min(pt, max), min);\n}\nfunction capBezierPoints(points, area) {\n let i, ilen, point, inArea, inAreaPrev;\n let inAreaNext = _isPointInArea(points[0], area);\n for(i = 0, ilen = points.length; i < ilen; ++i){\n inAreaPrev = inArea;\n inArea = inAreaNext;\n inAreaNext = i < ilen - 1 && _isPointInArea(points[i + 1], area);\n if (!inArea) {\n continue;\n }\n point = points[i];\n if (inAreaPrev) {\n point.cp1x = capControlPoint(point.cp1x, area.left, area.right);\n point.cp1y = capControlPoint(point.cp1y, area.top, area.bottom);\n }\n if (inAreaNext) {\n point.cp2x = capControlPoint(point.cp2x, area.left, area.right);\n point.cp2y = capControlPoint(point.cp2y, area.top, area.bottom);\n }\n }\n}\n/**\n * @private\n */ function _updateBezierControlPoints(points, options, area, loop, indexAxis) {\n let i, ilen, point, controlPoints;\n // Only consider points that are drawn in case the spanGaps option is used\n if (options.spanGaps) {\n points = points.filter((pt)=>!pt.skip);\n }\n if (options.cubicInterpolationMode === 'monotone') {\n splineCurveMonotone(points, indexAxis);\n } else {\n let prev = loop ? points[points.length - 1] : points[0];\n for(i = 0, ilen = points.length; i < ilen; ++i){\n point = points[i];\n controlPoints = splineCurve(prev, point, points[Math.min(i + 1, ilen - (loop ? 0 : 1)) % ilen], options.tension);\n point.cp1x = controlPoints.previous.x;\n point.cp1y = controlPoints.previous.y;\n point.cp2x = controlPoints.next.x;\n point.cp2y = controlPoints.next.y;\n prev = point;\n }\n }\n if (options.capBezierPoints) {\n capBezierPoints(points, area);\n }\n}\n\n/**\n * Note: typedefs are auto-exported, so use a made-up `dom` namespace where\n * necessary to avoid duplicates with `export * from './helpers`; see\n * https://github.com/microsoft/TypeScript/issues/46011\n * @typedef { import('../core/core.controller.js').default } dom.Chart\n * @typedef { import('../../types').ChartEvent } ChartEvent\n */ /**\n * @private\n */ function _isDomSupported() {\n return typeof window !== 'undefined' && typeof document !== 'undefined';\n}\n/**\n * @private\n */ function _getParentNode(domNode) {\n let parent = domNode.parentNode;\n if (parent && parent.toString() === '[object ShadowRoot]') {\n parent = parent.host;\n }\n return parent;\n}\n/**\n * convert max-width/max-height values that may be percentages into a number\n * @private\n */ function parseMaxStyle(styleValue, node, parentProperty) {\n let valueInPixels;\n if (typeof styleValue === 'string') {\n valueInPixels = parseInt(styleValue, 10);\n if (styleValue.indexOf('%') !== -1) {\n // percentage * size in dimension\n valueInPixels = valueInPixels / 100 * node.parentNode[parentProperty];\n }\n } else {\n valueInPixels = styleValue;\n }\n return valueInPixels;\n}\nconst getComputedStyle = (element)=>element.ownerDocument.defaultView.getComputedStyle(element, null);\nfunction getStyle(el, property) {\n return getComputedStyle(el).getPropertyValue(property);\n}\nconst positions = [\n 'top',\n 'right',\n 'bottom',\n 'left'\n];\nfunction getPositionedStyle(styles, style, suffix) {\n const result = {};\n suffix = suffix ? '-' + suffix : '';\n for(let i = 0; i < 4; i++){\n const pos = positions[i];\n result[pos] = parseFloat(styles[style + '-' + pos + suffix]) || 0;\n }\n result.width = result.left + result.right;\n result.height = result.top + result.bottom;\n return result;\n}\nconst useOffsetPos = (x, y, target)=>(x > 0 || y > 0) && (!target || !target.shadowRoot);\n/**\n * @param e\n * @param canvas\n * @returns Canvas position\n */ function getCanvasPosition(e, canvas) {\n const touches = e.touches;\n const source = touches && touches.length ? touches[0] : e;\n const { offsetX , offsetY } = source;\n let box = false;\n let x, y;\n if (useOffsetPos(offsetX, offsetY, e.target)) {\n x = offsetX;\n y = offsetY;\n } else {\n const rect = canvas.getBoundingClientRect();\n x = source.clientX - rect.left;\n y = source.clientY - rect.top;\n box = true;\n }\n return {\n x,\n y,\n box\n };\n}\n/**\n * Gets an event's x, y coordinates, relative to the chart area\n * @param event\n * @param chart\n * @returns x and y coordinates of the event\n */ function getRelativePosition(event, chart) {\n if ('native' in event) {\n return event;\n }\n const { canvas , currentDevicePixelRatio } = chart;\n const style = getComputedStyle(canvas);\n const borderBox = style.boxSizing === 'border-box';\n const paddings = getPositionedStyle(style, 'padding');\n const borders = getPositionedStyle(style, 'border', 'width');\n const { x , y , box } = getCanvasPosition(event, canvas);\n const xOffset = paddings.left + (box && borders.left);\n const yOffset = paddings.top + (box && borders.top);\n let { width , height } = chart;\n if (borderBox) {\n width -= paddings.width + borders.width;\n height -= paddings.height + borders.height;\n }\n return {\n x: Math.round((x - xOffset) / width * canvas.width / currentDevicePixelRatio),\n y: Math.round((y - yOffset) / height * canvas.height / currentDevicePixelRatio)\n };\n}\nfunction getContainerSize(canvas, width, height) {\n let maxWidth, maxHeight;\n if (width === undefined || height === undefined) {\n const container = _getParentNode(canvas);\n if (!container) {\n width = canvas.clientWidth;\n height = canvas.clientHeight;\n } else {\n const rect = container.getBoundingClientRect(); // this is the border box of the container\n const containerStyle = getComputedStyle(container);\n const containerBorder = getPositionedStyle(containerStyle, 'border', 'width');\n const containerPadding = getPositionedStyle(containerStyle, 'padding');\n width = rect.width - containerPadding.width - containerBorder.width;\n height = rect.height - containerPadding.height - containerBorder.height;\n maxWidth = parseMaxStyle(containerStyle.maxWidth, container, 'clientWidth');\n maxHeight = parseMaxStyle(containerStyle.maxHeight, container, 'clientHeight');\n }\n }\n return {\n width,\n height,\n maxWidth: maxWidth || INFINITY,\n maxHeight: maxHeight || INFINITY\n };\n}\nconst round1 = (v)=>Math.round(v * 10) / 10;\n// eslint-disable-next-line complexity\nfunction getMaximumSize(canvas, bbWidth, bbHeight, aspectRatio) {\n const style = getComputedStyle(canvas);\n const margins = getPositionedStyle(style, 'margin');\n const maxWidth = parseMaxStyle(style.maxWidth, canvas, 'clientWidth') || INFINITY;\n const maxHeight = parseMaxStyle(style.maxHeight, canvas, 'clientHeight') || INFINITY;\n const containerSize = getContainerSize(canvas, bbWidth, bbHeight);\n let { width , height } = containerSize;\n if (style.boxSizing === 'content-box') {\n const borders = getPositionedStyle(style, 'border', 'width');\n const paddings = getPositionedStyle(style, 'padding');\n width -= paddings.width + borders.width;\n height -= paddings.height + borders.height;\n }\n width = Math.max(0, width - margins.width);\n height = Math.max(0, aspectRatio ? width / aspectRatio : height - margins.height);\n width = round1(Math.min(width, maxWidth, containerSize.maxWidth));\n height = round1(Math.min(height, maxHeight, containerSize.maxHeight));\n if (width && !height) {\n // https://github.com/chartjs/Chart.js/issues/4659\n // If the canvas has width, but no height, default to aspectRatio of 2 (canvas default)\n height = round1(width / 2);\n }\n const maintainHeight = bbWidth !== undefined || bbHeight !== undefined;\n if (maintainHeight && aspectRatio && containerSize.height && height > containerSize.height) {\n height = containerSize.height;\n width = round1(Math.floor(height * aspectRatio));\n }\n return {\n width,\n height\n };\n}\n/**\n * @param chart\n * @param forceRatio\n * @param forceStyle\n * @returns True if the canvas context size or transformation has changed.\n */ function retinaScale(chart, forceRatio, forceStyle) {\n const pixelRatio = forceRatio || 1;\n const deviceHeight = Math.floor(chart.height * pixelRatio);\n const deviceWidth = Math.floor(chart.width * pixelRatio);\n chart.height = Math.floor(chart.height);\n chart.width = Math.floor(chart.width);\n const canvas = chart.canvas;\n // If no style has been set on the canvas, the render size is used as display size,\n // making the chart visually bigger, so let's enforce it to the \"correct\" values.\n // See https://github.com/chartjs/Chart.js/issues/3575\n if (canvas.style && (forceStyle || !canvas.style.height && !canvas.style.width)) {\n canvas.style.height = `${chart.height}px`;\n canvas.style.width = `${chart.width}px`;\n }\n if (chart.currentDevicePixelRatio !== pixelRatio || canvas.height !== deviceHeight || canvas.width !== deviceWidth) {\n chart.currentDevicePixelRatio = pixelRatio;\n canvas.height = deviceHeight;\n canvas.width = deviceWidth;\n chart.ctx.setTransform(pixelRatio, 0, 0, pixelRatio, 0, 0);\n return true;\n }\n return false;\n}\n/**\n * Detects support for options object argument in addEventListener.\n * https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Safely_detecting_option_support\n * @private\n */ const supportsEventListenerOptions = function() {\n let passiveSupported = false;\n try {\n const options = {\n get passive () {\n passiveSupported = true;\n return false;\n }\n };\n window.addEventListener('test', null, options);\n window.removeEventListener('test', null, options);\n } catch (e) {\n // continue regardless of error\n }\n return passiveSupported;\n}();\n/**\n * The \"used\" size is the final value of a dimension property after all calculations have\n * been performed. This method uses the computed style of `element` but returns undefined\n * if the computed style is not expressed in pixels. That can happen in some cases where\n * `element` has a size relative to its parent and this last one is not yet displayed,\n * for example because of `display: none` on a parent node.\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/used_value\n * @returns Size in pixels or undefined if unknown.\n */ function readUsedSize(element, property) {\n const value = getStyle(element, property);\n const matches = value && value.match(/^(\\d+)(\\.\\d+)?px$/);\n return matches ? +matches[1] : undefined;\n}\n\n/**\n * @private\n */ function _pointInLine(p1, p2, t, mode) {\n return {\n x: p1.x + t * (p2.x - p1.x),\n y: p1.y + t * (p2.y - p1.y)\n };\n}\n/**\n * @private\n */ function _steppedInterpolation(p1, p2, t, mode) {\n return {\n x: p1.x + t * (p2.x - p1.x),\n y: mode === 'middle' ? t < 0.5 ? p1.y : p2.y : mode === 'after' ? t < 1 ? p1.y : p2.y : t > 0 ? p2.y : p1.y\n };\n}\n/**\n * @private\n */ function _bezierInterpolation(p1, p2, t, mode) {\n const cp1 = {\n x: p1.cp2x,\n y: p1.cp2y\n };\n const cp2 = {\n x: p2.cp1x,\n y: p2.cp1y\n };\n const a = _pointInLine(p1, cp1, t);\n const b = _pointInLine(cp1, cp2, t);\n const c = _pointInLine(cp2, p2, t);\n const d = _pointInLine(a, b, t);\n const e = _pointInLine(b, c, t);\n return _pointInLine(d, e, t);\n}\n\nconst getRightToLeftAdapter = function(rectX, width) {\n return {\n x (x) {\n return rectX + rectX + width - x;\n },\n setWidth (w) {\n width = w;\n },\n textAlign (align) {\n if (align === 'center') {\n return align;\n }\n return align === 'right' ? 'left' : 'right';\n },\n xPlus (x, value) {\n return x - value;\n },\n leftForLtr (x, itemWidth) {\n return x - itemWidth;\n }\n };\n};\nconst getLeftToRightAdapter = function() {\n return {\n x (x) {\n return x;\n },\n setWidth (w) {},\n textAlign (align) {\n return align;\n },\n xPlus (x, value) {\n return x + value;\n },\n leftForLtr (x, _itemWidth) {\n return x;\n }\n };\n};\nfunction getRtlAdapter(rtl, rectX, width) {\n return rtl ? getRightToLeftAdapter(rectX, width) : getLeftToRightAdapter();\n}\nfunction overrideTextDirection(ctx, direction) {\n let style, original;\n if (direction === 'ltr' || direction === 'rtl') {\n style = ctx.canvas.style;\n original = [\n style.getPropertyValue('direction'),\n style.getPropertyPriority('direction')\n ];\n style.setProperty('direction', direction, 'important');\n ctx.prevTextDirection = original;\n }\n}\nfunction restoreTextDirection(ctx, original) {\n if (original !== undefined) {\n delete ctx.prevTextDirection;\n ctx.canvas.style.setProperty('direction', original[0], original[1]);\n }\n}\n\nfunction propertyFn(property) {\n if (property === 'angle') {\n return {\n between: _angleBetween,\n compare: _angleDiff,\n normalize: _normalizeAngle\n };\n }\n return {\n between: _isBetween,\n compare: (a, b)=>a - b,\n normalize: (x)=>x\n };\n}\nfunction normalizeSegment({ start , end , count , loop , style }) {\n return {\n start: start % count,\n end: end % count,\n loop: loop && (end - start + 1) % count === 0,\n style\n };\n}\nfunction getSegment(segment, points, bounds) {\n const { property , start: startBound , end: endBound } = bounds;\n const { between , normalize } = propertyFn(property);\n const count = points.length;\n let { start , end , loop } = segment;\n let i, ilen;\n if (loop) {\n start += count;\n end += count;\n for(i = 0, ilen = count; i < ilen; ++i){\n if (!between(normalize(points[start % count][property]), startBound, endBound)) {\n break;\n }\n start--;\n end--;\n }\n start %= count;\n end %= count;\n }\n if (end < start) {\n end += count;\n }\n return {\n start,\n end,\n loop,\n style: segment.style\n };\n}\n function _boundSegment(segment, points, bounds) {\n if (!bounds) {\n return [\n segment\n ];\n }\n const { property , start: startBound , end: endBound } = bounds;\n const count = points.length;\n const { compare , between , normalize } = propertyFn(property);\n const { start , end , loop , style } = getSegment(segment, points, bounds);\n const result = [];\n let inside = false;\n let subStart = null;\n let value, point, prevValue;\n const startIsBefore = ()=>between(startBound, prevValue, value) && compare(startBound, prevValue) !== 0;\n const endIsBefore = ()=>compare(endBound, value) === 0 || between(endBound, prevValue, value);\n const shouldStart = ()=>inside || startIsBefore();\n const shouldStop = ()=>!inside || endIsBefore();\n for(let i = start, prev = start; i <= end; ++i){\n point = points[i % count];\n if (point.skip) {\n continue;\n }\n value = normalize(point[property]);\n if (value === prevValue) {\n continue;\n }\n inside = between(value, startBound, endBound);\n if (subStart === null && shouldStart()) {\n subStart = compare(value, startBound) === 0 ? i : prev;\n }\n if (subStart !== null && shouldStop()) {\n result.push(normalizeSegment({\n start: subStart,\n end: i,\n loop,\n count,\n style\n }));\n subStart = null;\n }\n prev = i;\n prevValue = value;\n }\n if (subStart !== null) {\n result.push(normalizeSegment({\n start: subStart,\n end,\n loop,\n count,\n style\n }));\n }\n return result;\n}\n function _boundSegments(line, bounds) {\n const result = [];\n const segments = line.segments;\n for(let i = 0; i < segments.length; i++){\n const sub = _boundSegment(segments[i], line.points, bounds);\n if (sub.length) {\n result.push(...sub);\n }\n }\n return result;\n}\n function findStartAndEnd(points, count, loop, spanGaps) {\n let start = 0;\n let end = count - 1;\n if (loop && !spanGaps) {\n while(start < count && !points[start].skip){\n start++;\n }\n }\n while(start < count && points[start].skip){\n start++;\n }\n start %= count;\n if (loop) {\n end += start;\n }\n while(end > start && points[end % count].skip){\n end--;\n }\n end %= count;\n return {\n start,\n end\n };\n}\n function solidSegments(points, start, max, loop) {\n const count = points.length;\n const result = [];\n let last = start;\n let prev = points[start];\n let end;\n for(end = start + 1; end <= max; ++end){\n const cur = points[end % count];\n if (cur.skip || cur.stop) {\n if (!prev.skip) {\n loop = false;\n result.push({\n start: start % count,\n end: (end - 1) % count,\n loop\n });\n start = last = cur.stop ? end : null;\n }\n } else {\n last = end;\n if (prev.skip) {\n start = end;\n }\n }\n prev = cur;\n }\n if (last !== null) {\n result.push({\n start: start % count,\n end: last % count,\n loop\n });\n }\n return result;\n}\n function _computeSegments(line, segmentOptions) {\n const points = line.points;\n const spanGaps = line.options.spanGaps;\n const count = points.length;\n if (!count) {\n return [];\n }\n const loop = !!line._loop;\n const { start , end } = findStartAndEnd(points, count, loop, spanGaps);\n if (spanGaps === true) {\n return splitByStyles(line, [\n {\n start,\n end,\n loop\n }\n ], points, segmentOptions);\n }\n const max = end < start ? end + count : end;\n const completeLoop = !!line._fullLoop && start === 0 && end === count - 1;\n return splitByStyles(line, solidSegments(points, start, max, completeLoop), points, segmentOptions);\n}\n function splitByStyles(line, segments, points, segmentOptions) {\n if (!segmentOptions || !segmentOptions.setContext || !points) {\n return segments;\n }\n return doSplitByStyles(line, segments, points, segmentOptions);\n}\n function doSplitByStyles(line, segments, points, segmentOptions) {\n const chartContext = line._chart.getContext();\n const baseStyle = readStyle(line.options);\n const { _datasetIndex: datasetIndex , options: { spanGaps } } = line;\n const count = points.length;\n const result = [];\n let prevStyle = baseStyle;\n let start = segments[0].start;\n let i = start;\n function addStyle(s, e, l, st) {\n const dir = spanGaps ? -1 : 1;\n if (s === e) {\n return;\n }\n s += count;\n while(points[s % count].skip){\n s -= dir;\n }\n while(points[e % count].skip){\n e += dir;\n }\n if (s % count !== e % count) {\n result.push({\n start: s % count,\n end: e % count,\n loop: l,\n style: st\n });\n prevStyle = st;\n start = e % count;\n }\n }\n for (const segment of segments){\n start = spanGaps ? start : segment.start;\n let prev = points[start % count];\n let style;\n for(i = start + 1; i <= segment.end; i++){\n const pt = points[i % count];\n style = readStyle(segmentOptions.setContext(createContext(chartContext, {\n type: 'segment',\n p0: prev,\n p1: pt,\n p0DataIndex: (i - 1) % count,\n p1DataIndex: i % count,\n datasetIndex\n })));\n if (styleChanged(style, prevStyle)) {\n addStyle(start, i - 1, segment.loop, prevStyle);\n }\n prev = pt;\n prevStyle = style;\n }\n if (start < i - 1) {\n addStyle(start, i - 1, segment.loop, prevStyle);\n }\n }\n return result;\n}\nfunction readStyle(options) {\n return {\n backgroundColor: options.backgroundColor,\n borderCapStyle: options.borderCapStyle,\n borderDash: options.borderDash,\n borderDashOffset: options.borderDashOffset,\n borderJoinStyle: options.borderJoinStyle,\n borderWidth: options.borderWidth,\n borderColor: options.borderColor\n };\n}\nfunction styleChanged(style, prevStyle) {\n return prevStyle && JSON.stringify(style) !== JSON.stringify(prevStyle);\n}\n\nexport { unclipArea as $, _rlookupByKey as A, _lookupByKey as B, _isPointInArea as C, getAngleFromPoint as D, toPadding as E, each as F, getMaximumSize as G, HALF_PI as H, _getParentNode as I, readUsedSize as J, supportsEventListenerOptions as K, throttled as L, _isDomSupported as M, _factorize as N, finiteOrDefault as O, PI as P, callback as Q, _addGrace as R, _limitValue as S, TAU as T, toDegrees as U, _measureText as V, _int16Range as W, _alignPixel as X, clipArea as Y, renderText as Z, _arrayUnique as _, resolve as a, fontString as a$, toFont as a0, _toLeftRightCenter as a1, _alignStartEnd as a2, overrides as a3, merge as a4, _capitalize as a5, descriptors as a6, isFunction as a7, _attachContext as a8, _createResolver as a9, overrideTextDirection as aA, _textX as aB, restoreTextDirection as aC, drawPointLegend as aD, distanceBetweenPoints as aE, noop as aF, _setMinAndMaxByKey as aG, niceNum as aH, almostWhole as aI, almostEquals as aJ, _decimalPlaces as aK, Ticks as aL, log10 as aM, _longestText as aN, _filterBetween as aO, _lookup as aP, isPatternOrGradient as aQ, getHoverColor as aR, clone as aS, _merger as aT, _mergerIf as aU, _deprecated as aV, _splitKey as aW, toFontString as aX, splineCurve as aY, splineCurveMonotone as aZ, getStyle as a_, _descriptors as aa, mergeIf as ab, uid as ac, debounce as ad, retinaScale as ae, clearCanvas as af, setsEqual as ag, _elementsEqual as ah, _isClickEvent as ai, _isBetween as aj, _readValueToProps as ak, _updateBezierControlPoints as al, _computeSegments as am, _boundSegments as an, _steppedInterpolation as ao, _bezierInterpolation as ap, _pointInLine as aq, _steppedLineTo as ar, _bezierCurveTo as as, drawPoint as at, addRoundedRectPath as au, toTRBL as av, toTRBLCorners as aw, _boundSegment as ax, _normalizeAngle as ay, getRtlAdapter as az, isArray as b, toLineHeight as b0, PITAU as b1, INFINITY as b2, RAD_PER_DEG as b3, QUARTER_PI as b4, TWO_THIRDS_PI as b5, _angleDiff as b6, color as c, defaults as d, effects as e, resolveObjectKey as f, isNumberFinite as g, defined as h, isObject as i, createContext as j, isNullOrUndef as k, listenArrayEvents as l, toPercentage as m, toDimension as n, formatNumber as o, _angleBetween as p, _getStartAndCountOfVisiblePoints as q, requestAnimFrame as r, sign as s, toRadians as t, unlistenArrayEvents as u, valueOrDefault as v, _scaleRangesChanged as w, isNumber as x, _parseObjectDataRadialScale as y, getRelativePosition as z };\n","function none() {}\n\nexport default function(selector) {\n return selector == null ? none : function() {\n return this.querySelector(selector);\n };\n}\n","// Given something array like (or null), returns something that is strictly an\n// array. This is used to ensure that array-like objects passed to d3.selectAll\n// or selection.selectAll are converted into proper arrays when creating a\n// selection; we don’t ever want to create a selection backed by a live\n// HTMLCollection or NodeList. However, note that selection.selectAll will use a\n// static NodeList as a group, since it safely derived from querySelectorAll.\nexport default function array(x) {\n return x == null ? [] : Array.isArray(x) ? x : Array.from(x);\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","export default function(selector) {\n return function() {\n return this.matches(selector);\n };\n}\n\nexport function childMatcher(selector) {\n return function(node) {\n return node.matches(selector);\n };\n}\n\n","import {childMatcher} from \"../matcher.js\";\n\nvar find = Array.prototype.find;\n\nfunction childFind(match) {\n return function() {\n return find.call(this.children, match);\n };\n}\n\nfunction childFirst() {\n return this.firstElementChild;\n}\n\nexport default function(match) {\n return this.select(match == null ? childFirst\n : childFind(typeof match === \"function\" ? match : childMatcher(match)));\n}\n","import {childMatcher} from \"../matcher.js\";\n\nvar filter = Array.prototype.filter;\n\nfunction children() {\n return Array.from(this.children);\n}\n\nfunction childrenFilter(match) {\n return function() {\n return filter.call(this.children, match);\n };\n}\n\nexport default function(match) {\n return this.selectAll(match == null ? children\n : childrenFilter(typeof match === \"function\" ? match : childMatcher(match)));\n}\n","export default function(update) {\n return new Array(update.length);\n}\n","import sparse from \"./sparse.js\";\nimport {Selection} from \"./index.js\";\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","export default function(x) {\n return function() {\n return x;\n };\n}\n","import {Selection} from \"./index.js\";\nimport {EnterNode} from \"./enter.js\";\nimport constant from \"../constant.js\";\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 = new Map,\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 = key.call(node, node.__data__, i, group) + \"\";\n if (nodeByKeyValue.has(keyValue)) {\n exit[i] = node;\n } else {\n nodeByKeyValue.set(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 = key.call(parent, data[i], i, data) + \"\";\n if (node = nodeByKeyValue.get(keyValue)) {\n update[i] = node;\n node.__data__ = data[i];\n nodeByKeyValue.delete(keyValue);\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.get(keyValues[i]) === node)) {\n exit[i] = node;\n }\n }\n}\n\nfunction datum(node) {\n return node.__data__;\n}\n\nexport default function(value, key) {\n if (!arguments.length) return Array.from(this, datum);\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 = arraylike(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\n// Given some data, this returns an array-like view of it: an object that\n// exposes a length property and allows numeric indexing. Note that unlike\n// selectAll, this isn’t worried about “live” collections because the resulting\n// array will only be used briefly while data is being bound. (It is possible to\n// cause the data to change while iterating by using a key function, but please\n// don’t; we’d rather avoid a gratuitous copy.)\nfunction arraylike(data) {\n return typeof data === \"object\" && \"length\" in data\n ? data // Array, TypedArray, NodeList, array-like\n : Array.from(data); // Map, Set, iterable, string, or anything else\n}\n","import {Selection} from \"./index.js\";\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","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","import namespaces from \"./namespaces.js\";\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; // eslint-disable-line no-prototype-builtins\n}\n","import namespace from \"../namespace.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, 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","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","import defaultView from \"../window.js\";\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 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 namespace from \"./namespace.js\";\nimport {xhtml} from \"./namespaces.js\";\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.js\";\nimport selector from \"../selector.js\";\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","function contextListener(listener) {\n return function(event) {\n listener.call(this, event, this.__data__);\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.options);\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, options) {\n return function() {\n var on = this.__on, o, listener = contextListener(value);\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.options);\n this.addEventListener(o.type, o.listener = listener, o.options = options);\n o.value = value;\n return;\n }\n }\n this.addEventListener(typename.type, listener, options);\n o = {type: typename.type, name: typename.name, value: value, listener: listener, options: options};\n if (!on) this.__on = [o];\n else on.push(o);\n };\n}\n\nexport default function(typename, value, options) {\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 for (i = 0; i < n; ++i) this.each(on(typenames[i], value, options));\n return this;\n}\n","import defaultView from \"../window.js\";\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.js\";\nimport selection_selectAll from \"./selectAll.js\";\nimport selection_selectChild from \"./selectChild.js\";\nimport selection_selectChildren from \"./selectChildren.js\";\nimport selection_filter from \"./filter.js\";\nimport selection_data from \"./data.js\";\nimport selection_enter from \"./enter.js\";\nimport selection_exit from \"./exit.js\";\nimport selection_join from \"./join.js\";\nimport selection_merge from \"./merge.js\";\nimport selection_order from \"./order.js\";\nimport selection_sort from \"./sort.js\";\nimport selection_call from \"./call.js\";\nimport selection_nodes from \"./nodes.js\";\nimport selection_node from \"./node.js\";\nimport selection_size from \"./size.js\";\nimport selection_empty from \"./empty.js\";\nimport selection_each from \"./each.js\";\nimport selection_attr from \"./attr.js\";\nimport selection_style from \"./style.js\";\nimport selection_property from \"./property.js\";\nimport selection_classed from \"./classed.js\";\nimport selection_text from \"./text.js\";\nimport selection_html from \"./html.js\";\nimport selection_raise from \"./raise.js\";\nimport selection_lower from \"./lower.js\";\nimport selection_append from \"./append.js\";\nimport selection_insert from \"./insert.js\";\nimport selection_remove from \"./remove.js\";\nimport selection_clone from \"./clone.js\";\nimport selection_datum from \"./datum.js\";\nimport selection_on from \"./on.js\";\nimport selection_dispatch from \"./dispatch.js\";\nimport selection_iterator from \"./iterator.js\";\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\nfunction selection_selection() {\n return this;\n}\n\nSelection.prototype = selection.prototype = {\n constructor: Selection,\n select: selection_select,\n selectAll: selection_selectAll,\n selectChild: selection_selectChild,\n selectChildren: selection_selectChildren,\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 selection: selection_selection,\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 [Symbol.iterator]: selection_iterator\n};\n\nexport default selection;\n","import {Selection} from \"./index.js\";\nimport selector from \"../selector.js\";\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.js\";\nimport array from \"../array.js\";\nimport selectorAll from \"../selectorAll.js\";\n\nfunction arrayAll(select) {\n return function() {\n return array(select.apply(this, arguments));\n };\n}\n\nexport default function(select) {\n if (typeof select === \"function\") select = arrayAll(select);\n else 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.js\";\nimport matcher from \"../matcher.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 Selection(subgroups, this._parents);\n}\n","import sparse from \"./sparse.js\";\nimport {Selection} from \"./index.js\";\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 if (typeof onenter === \"function\") {\n enter = onenter(enter);\n if (enter) enter = enter.selection();\n } else {\n enter = enter.append(onenter + \"\");\n }\n if (onupdate != null) {\n update = onupdate(update);\n if (update) update = update.selection();\n }\n if (onexit == null) exit.remove(); else onexit(exit);\n return enter && update ? enter.merge(update).order() : update;\n}\n","import {Selection} from \"./index.js\";\n\nexport default function(context) {\n var selection = context.selection ? context.selection() : context;\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 return Array.from(this);\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 let size = 0;\n for (const node of this) ++size; // eslint-disable-line no-unused-vars\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.js\";\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","export default function*() {\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]) yield node;\n }\n }\n}\n","var noop = {value: () => {}};\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","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(undefined, 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(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","export default function(a, b) {\n return a = +a, b = +b, function(t) {\n return a * (1 - t) + b * t;\n };\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 decompose, {identity} from \"./decompose.js\";\n\nvar svgNode;\n\n/* eslint-disable no-undef */\nexport function parseCss(value) {\n const m = new (typeof DOMMatrix === \"function\" ? DOMMatrix : WebKitCSSMatrix)(value + \"\");\n return m.isIdentity ? identity : decompose(m.a, m.b, m.c, m.d, m.e, m.f);\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","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 {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","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","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(channels) {\n return Object.assign(new this.constructor, this, channels);\n },\n displayable() {\n return this.rgb().displayable();\n },\n hex: color_formatHex, // Deprecated! Use color.formatHex.\n formatHex: color_formatHex,\n formatHex8: color_formatHex8,\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_formatHex8() {\n return this.rgb().formatHex8();\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(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(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() {\n return this;\n },\n clamp() {\n return new Rgb(clampi(this.r), clampi(this.g), clampi(this.b), clampa(this.opacity));\n },\n displayable() {\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 formatHex8: rgb_formatHex8,\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_formatHex8() {\n return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}${hex((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;\n}\n\nfunction rgb_formatRgb() {\n const a = clampa(this.opacity);\n return `${a === 1 ? \"rgb(\" : \"rgba(\"}${clampi(this.r)}, ${clampi(this.g)}, ${clampi(this.b)}${a === 1 ? \")\" : `, ${a})`}`;\n}\n\nfunction clampa(opacity) {\n return isNaN(opacity) ? 1 : Math.max(0, Math.min(1, opacity));\n}\n\nfunction clampi(value) {\n return Math.max(0, Math.min(255, Math.round(value) || 0));\n}\n\nfunction hex(value) {\n value = clampi(value);\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(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(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() {\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 clamp() {\n return new Hsl(clamph(this.h), clampt(this.s), clampt(this.l), clampa(this.opacity));\n },\n displayable() {\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() {\n const a = clampa(this.opacity);\n return `${a === 1 ? \"hsl(\" : \"hsla(\"}${clamph(this.h)}, ${clampt(this.s) * 100}%, ${clampt(this.l) * 100}%${a === 1 ? \")\" : `, ${a})`}`;\n }\n}));\n\nfunction clamph(value) {\n value = (value || 0) % 360;\n return value < 0 ? value + 360 : value;\n}\n\nfunction clampt(value) {\n return Math.max(0, Math.min(1, value || 0));\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 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","export default x => () => x;\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","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","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 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 {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 {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 {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","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","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","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","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_easeVarying from \"./easeVarying.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 selectChild: selection_prototype.selectChild,\n selectChildren: selection_prototype.selectChildren,\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 easeVarying: transition_easeVarying,\n end: transition_end,\n [Symbol.iterator]: selection_prototype[Symbol.iterator]\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 {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 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 {set} from \"./schedule.js\";\n\nfunction easeVarying(id, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (typeof v !== \"function\") throw new Error;\n set(this, id).ease = v;\n };\n}\n\nexport default function(value) {\n if (typeof value !== \"function\") throw new Error;\n return this.each(easeVarying(this._id, value));\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 // The selection was empty, resolve end immediately\n if (size === 0) resolve();\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 throw new Error(`transition ${id} not found`);\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","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","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 {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 {dispatch} from \"d3-dispatch\";\nimport {dragDisable, dragEnable} from \"d3-drag\";\nimport {interpolate} from \"d3-interpolate\";\nimport {pointer, 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\nconst {abs, max, min} = Math;\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\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(event) {\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, event) {\n if (group.tween) {\n group\n .on(\"start.brush\", function(event) { emitter(this, arguments).beforestart().start(event); })\n .on(\"interrupt.brush end.brush\", function(event) { emitter(this, arguments).end(event); })\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(event).brush(event).end(event);\n });\n }\n };\n\n brush.clear = function(group, event) {\n brush.move(group, null, event);\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(event, mode) {\n if (this.starting) this.starting = false, this.emit(\"start\", event, mode);\n else this.emit(\"brush\", event);\n return this;\n },\n brush: function(event, mode) {\n this.emit(\"brush\", event, mode);\n return this;\n },\n end: function(event, mode) {\n if (--this.active === 0) delete this.state.emitter, this.emit(\"end\", event, mode);\n return this;\n },\n emit: function(type, event, mode) {\n var d = select(this.that).datum();\n listeners.call(\n type,\n this.that,\n new BrushEvent(type, {\n sourceEvent: event,\n target: brush,\n selection: dim.output(this.state.selection),\n mode,\n dispatch: listeners\n }),\n d\n );\n }\n };\n\n function started(event) {\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 points = Array.from(event.touches || [event], t => {\n const i = t.identifier;\n t = pointer(t, that);\n t.point0 = t.slice();\n t.identifier = i;\n return t;\n });\n\n interrupt(that);\n var emit = emitter(that, arguments, true).beforestart();\n\n if (type === \"overlay\") {\n if (selection) moving = true;\n const pts = [points[0], points[1] || points[0]];\n state.selection = selection = [[\n w0 = dim === Y ? W : min(pts[0][0], pts[1][0]),\n n0 = dim === X ? N : min(pts[0][1], pts[1][1])\n ], [\n e0 = dim === Y ? E : max(pts[0][0], pts[1][0]),\n s0 = dim === X ? S : max(pts[0][1], pts[1][1])\n ]];\n if (points.length > 1) move(event);\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 redraw.call(that);\n emit.start(event, mode.name);\n\n function moved(event) {\n for (const p of event.changedTouches || [event]) {\n for (const d of points)\n if (d.identifier === p.identifier) d.cur = pointer(p, that);\n }\n if (shifting && !lockX && !lockY && points.length === 1) {\n const point = points[0];\n if (abs(point.cur[0] - point[0]) > abs(point.cur[1] - point[1]))\n lockY = true;\n else\n lockX = true;\n }\n for (const point of points)\n if (point.cur) point[0] = point.cur[0], point[1] = point.cur[1];\n moving = true;\n noevent(event);\n move(event);\n }\n\n function move(event) {\n const point = points[0], point0 = point.point0;\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 = max(W - w0, min(E - e0, dx)), w1 = w0 + dx, e1 = e0 + dx;\n if (signY) dy = max(N - n0, min(S - s0, dy)), n1 = n0 + dy, s1 = s0 + dy;\n break;\n }\n case MODE_HANDLE: {\n if (points[1]) {\n if (signX) w1 = max(W, min(E, points[0][0])), e1 = max(W, min(E, points[1][0])), signX = 1;\n if (signY) n1 = max(N, min(S, points[0][1])), s1 = max(N, min(S, points[1][1])), signY = 1;\n } else {\n if (signX < 0) dx = max(W - w0, min(E - w0, dx)), w1 = w0 + dx, e1 = e0;\n else if (signX > 0) dx = max(W - e0, min(E - e0, dx)), w1 = w0, e1 = e0 + dx;\n if (signY < 0) dy = max(N - n0, min(S - n0, dy)), n1 = n0 + dy, s1 = s0;\n else if (signY > 0) dy = max(N - s0, min(S - s0, dy)), n1 = n0, s1 = s0 + dy;\n }\n break;\n }\n case MODE_CENTER: {\n if (signX) w1 = max(W, min(E, w0 - dx * signX)), e1 = max(W, min(E, e0 + dx * signX));\n if (signY) n1 = max(N, min(S, n0 - dy * signY)), s1 = max(N, 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(event, mode.name);\n }\n }\n\n function ended(event) {\n nopropagation(event);\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(event, mode.name);\n }\n\n function keydowned(event) {\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(event);\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(event);\n }\n break;\n }\n default: return;\n }\n noevent(event);\n }\n\n function keyupped(event) {\n switch (event.keyCode) {\n case 16: { // SHIFT\n if (shifting) {\n lockX = lockY = shifting = false;\n move(event);\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(event);\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(event);\n }\n break;\n }\n default: return;\n }\n noevent(event);\n }\n }\n\n function touchmoved(event) {\n emitter(this, arguments).moved(event);\n }\n\n function touchended(event) {\n emitter(this, arguments).ended(event);\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 {Selection, root} from \"./selection/index.js\";\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(x) {\n return function constant() {\n return x;\n };\n}\n","export const abs = Math.abs;\nexport const atan2 = Math.atan2;\nexport const cos = Math.cos;\nexport const max = Math.max;\nexport const min = Math.min;\nexport const sin = Math.sin;\nexport const sqrt = Math.sqrt;\n\nexport const epsilon = 1e-12;\nexport const pi = Math.PI;\nexport const halfPi = pi / 2;\nexport const 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","const pi = Math.PI,\n tau = 2 * pi,\n epsilon = 1e-6,\n tauEpsilon = tau - epsilon;\n\nfunction append(strings) {\n this._ += strings[0];\n for (let i = 1, n = strings.length; i < n; ++i) {\n this._ += arguments[i] + strings[i];\n }\n}\n\nfunction appendRound(digits) {\n let d = Math.floor(digits);\n if (!(d >= 0)) throw new Error(`invalid digits: ${digits}`);\n if (d > 15) return append;\n const k = 10 ** d;\n return function(strings) {\n this._ += strings[0];\n for (let i = 1, n = strings.length; i < n; ++i) {\n this._ += Math.round(arguments[i] * k) / k + strings[i];\n }\n };\n}\n\nexport class Path {\n constructor(digits) {\n this._x0 = this._y0 = // start of current subpath\n this._x1 = this._y1 = null; // end of current subpath\n this._ = \"\";\n this._append = digits == null ? append : appendRound(digits);\n }\n moveTo(x, y) {\n this._append`M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}`;\n }\n closePath() {\n if (this._x1 !== null) {\n this._x1 = this._x0, this._y1 = this._y0;\n this._append`Z`;\n }\n }\n lineTo(x, y) {\n this._append`L${this._x1 = +x},${this._y1 = +y}`;\n }\n quadraticCurveTo(x1, y1, x, y) {\n this._append`Q${+x1},${+y1},${this._x1 = +x},${this._y1 = +y}`;\n }\n bezierCurveTo(x1, y1, x2, y2, x, y) {\n this._append`C${+x1},${+y1},${+x2},${+y2},${this._x1 = +x},${this._y1 = +y}`;\n }\n arcTo(x1, y1, x2, y2, r) {\n x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;\n\n // Is the radius negative? Error.\n if (r < 0) throw new Error(`negative radius: ${r}`);\n\n let 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 this path empty? Move to (x1,y1).\n if (this._x1 === null) {\n this._append`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._append`L${this._x1 = x1},${this._y1 = y1}`;\n }\n\n // Otherwise, draw an arc!\n else {\n let 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._append`L${x1 + t01 * x01},${y1 + t01 * y01}`;\n }\n\n this._append`A${r},${r},0,0,${+(y01 * x20 > x01 * y20)},${this._x1 = x1 + t21 * x21},${this._y1 = y1 + t21 * y21}`;\n }\n }\n arc(x, y, r, a0, a1, ccw) {\n x = +x, y = +y, r = +r, ccw = !!ccw;\n\n // Is the radius negative? Error.\n if (r < 0) throw new Error(`negative radius: ${r}`);\n\n let 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 this path empty? Move to (x0,y0).\n if (this._x1 === null) {\n this._append`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._append`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._append`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._append`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(x, y, w, h) {\n this._append`M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}h${w = +w}v${+h}h${-w}Z`;\n }\n toString() {\n return this._;\n }\n}\n\nexport function path() {\n return new Path;\n}\n\n// Allow instanceof d3.path\npath.prototype = Path.prototype;\n\nexport function pathRound(digits = 3) {\n return new Path(+digits);\n}\n","import constant from \"./constant.js\";\nimport {abs, acos, asin, atan2, cos, epsilon, halfPi, max, min, pi, sin, sqrt, tau} from \"./math.js\";\nimport {withPath} from \"./path.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 path = withPath(arc);\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. If this\n // intersection fails, it’s probably because the arc is too small, so\n // disable the corner radius entirely.\n if (da < pi) {\n if (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 } else {\n rc0 = rc1 = 0;\n }\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","import {Path} from \"d3-path\";\n\nexport function withPath(shape) {\n let digits = 3;\n\n shape.digits = function(_) {\n if (!arguments.length) return digits;\n if (_ == null) {\n digits = null;\n } else {\n const d = Math.floor(_);\n if (!(d >= 0)) throw new RangeError(`invalid digits: ${_}`);\n digits = d;\n }\n return shape;\n };\n\n return () => new Path(digits);\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 {dispatch} from \"d3-dispatch\";\nimport {dragDisable, dragEnable} from \"d3-drag\";\nimport {interpolateZoom} from \"d3-interpolate\";\nimport {select, pointer} 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.\n// except for pinch-to-zoom, which is sent as a wheel+ctrlKey event\nfunction defaultFilter(event) {\n return (!event.ctrlKey || event.type === 'wheel') && !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(event) {\n return -event.deltaY * (event.deltaMode === 1 ? 0.05 : event.deltaMode ? 1 : 0.002) * (event.ctrlKey ? 10 : 1);\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 touchfirst,\n touchending,\n touchDelay = 500,\n wheelDelay = 150,\n clickDistance2 = 0,\n tapDistance = 10;\n\n function zoom(selection) {\n selection\n .property(\"__zoom\", defaultTransform)\n .on(\"wheel.zoom\", wheeled, {passive: false})\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(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n }\n\n zoom.transform = function(collection, transform, point, event) {\n var selection = collection.selection ? collection.selection() : collection;\n selection.property(\"__zoom\", defaultTransform);\n if (collection !== selection) {\n schedule(collection, transform, point, event);\n } else {\n selection.interrupt().each(function() {\n gesture(this, arguments)\n .event(event)\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, event) {\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, event);\n };\n\n zoom.scaleTo = function(selection, k, p, event) {\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, event);\n };\n\n zoom.translateBy = function(selection, x, y, event) {\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 }, null, event);\n };\n\n zoom.translateTo = function(selection, x, y, p, event) {\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, event);\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, event) {\n transition\n .on(\"start.zoom\", function() { gesture(this, arguments).event(event).start(); })\n .on(\"interrupt.zoom end.zoom\", function() { gesture(this, arguments).event(event).end(); })\n .tween(\"zoom\", function() {\n var that = this,\n args = arguments,\n g = gesture(that, args).event(event),\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.sourceEvent = null;\n this.extent = extent.apply(that, args);\n this.taps = 0;\n }\n\n Gesture.prototype = {\n event: function(event) {\n if (event) this.sourceEvent = event;\n return this;\n },\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 var d = select(this.that).datum();\n listeners.call(\n type,\n this.that,\n new ZoomEvent(type, {\n sourceEvent: this.sourceEvent,\n target: zoom,\n type,\n transform: this.that.__zoom,\n dispatch: listeners\n }),\n d\n );\n }\n };\n\n function wheeled(event, ...args) {\n if (!filter.apply(this, arguments)) return;\n var g = gesture(this, args).event(event),\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 = pointer(event);\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(event);\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(event, ...args) {\n if (touchending || !filter.apply(this, arguments)) return;\n var currentTarget = event.currentTarget,\n g = gesture(this, args, true).event(event),\n v = select(event.view).on(\"mousemove.zoom\", mousemoved, true).on(\"mouseup.zoom\", mouseupped, true),\n p = pointer(event, currentTarget),\n x0 = event.clientX,\n y0 = event.clientY;\n\n dragDisable(event.view);\n nopropagation(event);\n g.mouse = [p, this.__zoom.invert(p)];\n interrupt(this);\n g.start();\n\n function mousemoved(event) {\n noevent(event);\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.event(event)\n .zoom(\"mouse\", constrain(translate(g.that.__zoom, g.mouse[0] = pointer(event, currentTarget), g.mouse[1]), g.extent, translateExtent));\n }\n\n function mouseupped(event) {\n v.on(\"mousemove.zoom mouseup.zoom\", null);\n dragEnable(event.view, g.moved);\n noevent(event);\n g.event(event).end();\n }\n }\n\n function dblclicked(event, ...args) {\n if (!filter.apply(this, arguments)) return;\n var t0 = this.__zoom,\n p0 = pointer(event.changedTouches ? event.changedTouches[0] : event, 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, args), translateExtent);\n\n noevent(event);\n if (duration > 0) select(this).transition().duration(duration).call(schedule, t1, p0, event);\n else select(this).call(zoom.transform, t1, p0, event);\n }\n\n function touchstarted(event, ...args) {\n if (!filter.apply(this, arguments)) return;\n var touches = event.touches,\n n = touches.length,\n g = gesture(this, args, event.changedTouches.length === n).event(event),\n started, i, t, p;\n\n nopropagation(event);\n for (i = 0; i < n; ++i) {\n t = touches[i], p = pointer(t, this);\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) touchfirst = p[0], touchstarting = setTimeout(function() { touchstarting = null; }, touchDelay);\n interrupt(this);\n g.start();\n }\n }\n\n function touchmoved(event, ...args) {\n if (!this.__zooming) return;\n var g = gesture(this, args).event(event),\n touches = event.changedTouches,\n n = touches.length, i, t, p, l;\n\n noevent(event);\n for (i = 0; i < n; ++i) {\n t = touches[i], p = pointer(t, this);\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\n g.zoom(\"touch\", constrain(translate(t, p, l), g.extent, translateExtent));\n }\n\n function touchended(event, ...args) {\n if (!this.__zooming) return;\n var g = gesture(this, args).event(event),\n touches = event.changedTouches,\n n = touches.length, i, t;\n\n nopropagation(event);\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 t = pointer(t, this);\n if (Math.hypot(touchfirst[0] - t[0], touchfirst[1] - t[1]) < tapDistance) {\n var p = select(this).on(\"dblclick.zoom\");\n if (p) p.apply(this, arguments);\n }\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 zoom.tapDistance = function(_) {\n return arguments.length ? (tapDistance = +_, zoom) : tapDistance;\n };\n\n return zoom;\n}\n","import { identity } from '../util/identity';\nimport { operate } from '../util/lift';\nimport { OperatorSubscriber } from './OperatorSubscriber';\nexport function distinctUntilChanged(comparator, keySelector = identity) {\n comparator = comparator !== null && comparator !== void 0 ? comparator : defaultCompare;\n return operate((source, subscriber) => {\n let previousKey;\n let first = true;\n source.subscribe(new OperatorSubscriber(subscriber, (value) => {\n const currentKey = keySelector(value);\n if (first || !comparator(previousKey, currentKey)) {\n first = false;\n previousKey = currentKey;\n subscriber.next(value);\n }\n }));\n });\n}\nfunction defaultCompare(a, b) {\n return a === b;\n}\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nexport default eq;\n","import eq from './eq.js';\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nexport default assocIndexOf;\n","import assocIndexOf from './_assocIndexOf.js';\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nexport default listCacheDelete;\n","import listCacheClear from './_listCacheClear.js';\nimport listCacheDelete from './_listCacheDelete.js';\nimport listCacheGet from './_listCacheGet.js';\nimport listCacheHas from './_listCacheHas.js';\nimport listCacheSet from './_listCacheSet.js';\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nexport default ListCache;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nexport default listCacheClear;\n","import assocIndexOf from './_assocIndexOf.js';\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nexport default listCacheGet;\n","import assocIndexOf from './_assocIndexOf.js';\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nexport default listCacheHas;\n","import assocIndexOf from './_assocIndexOf.js';\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nexport default listCacheSet;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nexport default freeGlobal;\n","import freeGlobal from './_freeGlobal.js';\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nexport default root;\n","import root from './_root.js';\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nexport default Symbol;\n","import Symbol from './_Symbol.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nexport default getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nexport default objectToString;\n","import Symbol from './_Symbol.js';\nimport getRawTag from './_getRawTag.js';\nimport objectToString from './_objectToString.js';\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nexport default baseGetTag;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nexport default isObject;\n","import baseGetTag from './_baseGetTag.js';\nimport isObject from './isObject.js';\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nexport default isFunction;\n","import root from './_root.js';\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nexport default coreJsData;\n","import coreJsData from './_coreJsData.js';\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nexport default isMasked;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nexport default toSource;\n","import isFunction from './isFunction.js';\nimport isMasked from './_isMasked.js';\nimport isObject from './isObject.js';\nimport toSource from './_toSource.js';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nexport default baseIsNative;\n","import baseIsNative from './_baseIsNative.js';\nimport getValue from './_getValue.js';\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nexport default getNative;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nexport default getValue;\n","import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nexport default Map;\n","import getNative from './_getNative.js';\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nexport default nativeCreate;\n","import nativeCreate from './_nativeCreate.js';\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nexport default hashGet;\n","import nativeCreate from './_nativeCreate.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nexport default hashHas;\n","import hashClear from './_hashClear.js';\nimport hashDelete from './_hashDelete.js';\nimport hashGet from './_hashGet.js';\nimport hashHas from './_hashHas.js';\nimport hashSet from './_hashSet.js';\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nexport default Hash;\n","import nativeCreate from './_nativeCreate.js';\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nexport default hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nexport default hashDelete;\n","import nativeCreate from './_nativeCreate.js';\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nexport default hashSet;\n","import isKeyable from './_isKeyable.js';\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nexport default getMapData;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nexport default isKeyable;\n","import mapCacheClear from './_mapCacheClear.js';\nimport mapCacheDelete from './_mapCacheDelete.js';\nimport mapCacheGet from './_mapCacheGet.js';\nimport mapCacheHas from './_mapCacheHas.js';\nimport mapCacheSet from './_mapCacheSet.js';\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nexport default MapCache;\n","import Hash from './_Hash.js';\nimport ListCache from './_ListCache.js';\nimport Map from './_Map.js';\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nexport default mapCacheClear;\n","import getMapData from './_getMapData.js';\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nexport default mapCacheDelete;\n","import getMapData from './_getMapData.js';\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nexport default mapCacheGet;\n","import getMapData from './_getMapData.js';\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nexport default mapCacheHas;\n","import getMapData from './_getMapData.js';\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nexport default mapCacheSet;\n","import ListCache from './_ListCache.js';\nimport stackClear from './_stackClear.js';\nimport stackDelete from './_stackDelete.js';\nimport stackGet from './_stackGet.js';\nimport stackHas from './_stackHas.js';\nimport stackSet from './_stackSet.js';\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nexport default Stack;\n","import ListCache from './_ListCache.js';\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nexport default stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nexport default stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nexport default stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nexport default stackHas;\n","import ListCache from './_ListCache.js';\nimport Map from './_Map.js';\nimport MapCache from './_MapCache.js';\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nexport default stackSet;\n","import getNative from './_getNative.js';\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nexport default defineProperty;\n","import defineProperty from './_defineProperty.js';\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nexport default baseAssignValue;\n","import baseAssignValue from './_baseAssignValue.js';\nimport eq from './eq.js';\n\n/**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignMergeValue(object, key, value) {\n if ((value !== undefined && !eq(object[key], value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nexport default assignMergeValue;\n","import createBaseFor from './_createBaseFor.js';\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\nexport default baseFor;\n","/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\nexport default createBaseFor;\n","import root from './_root.js';\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nexport default cloneBuffer;\n","import root from './_root.js';\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nexport default Uint8Array;\n","import cloneArrayBuffer from './_cloneArrayBuffer.js';\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nexport default cloneTypedArray;\n","import Uint8Array from './_Uint8Array.js';\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nexport default cloneArrayBuffer;\n","import isObject from './isObject.js';\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nexport default baseCreate;\n","import overArg from './_overArg.js';\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nexport default getPrototype;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nexport default overArg;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nexport default isPrototype;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nexport default isObjectLike;\n","import baseGetTag from './_baseGetTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nexport default baseIsArguments;\n","import baseIsArguments from './_baseIsArguments.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nexport default isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nexport default isArray;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nexport default isLength;\n","import isFunction from './isFunction.js';\nimport isLength from './isLength.js';\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nexport default isArrayLike;\n","import root from './_root.js';\nimport stubFalse from './stubFalse.js';\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nexport default isBuffer;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nexport default stubFalse;\n","import baseGetTag from './_baseGetTag.js';\nimport getPrototype from './_getPrototype.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n}\n\nexport default isPlainObject;\n","import baseGetTag from './_baseGetTag.js';\nimport isLength from './isLength.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nexport default baseIsTypedArray;\n","import freeGlobal from './_freeGlobal.js';\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nexport default nodeUtil;\n","import baseIsTypedArray from './_baseIsTypedArray.js';\nimport baseUnary from './_baseUnary.js';\nimport nodeUtil from './_nodeUtil.js';\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nexport default isTypedArray;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nexport default baseUnary;\n","/**\n * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction safeGet(object, key) {\n if (key === 'constructor' && typeof object[key] === 'function') {\n return;\n }\n\n if (key == '__proto__') {\n return;\n }\n\n return object[key];\n}\n\nexport default safeGet;\n","import baseAssignValue from './_baseAssignValue.js';\nimport eq from './eq.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nexport default assignValue;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nexport default isIndex;\n","import baseTimes from './_baseTimes.js';\nimport isArguments from './isArguments.js';\nimport isArray from './isArray.js';\nimport isBuffer from './isBuffer.js';\nimport isIndex from './_isIndex.js';\nimport isTypedArray from './isTypedArray.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nexport default arrayLikeKeys;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nexport default baseTimes;\n","import isObject from './isObject.js';\nimport isPrototype from './_isPrototype.js';\nimport nativeKeysIn from './_nativeKeysIn.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nexport default baseKeysIn;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nexport default nativeKeysIn;\n","import arrayLikeKeys from './_arrayLikeKeys.js';\nimport baseKeysIn from './_baseKeysIn.js';\nimport isArrayLike from './isArrayLike.js';\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nexport default keysIn;\n","import copyObject from './_copyObject.js';\nimport keysIn from './keysIn.js';\n\n/**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\nfunction toPlainObject(value) {\n return copyObject(value, keysIn(value));\n}\n\nexport default toPlainObject;\n","import assignValue from './_assignValue.js';\nimport baseAssignValue from './_baseAssignValue.js';\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nexport default copyObject;\n","import assignMergeValue from './_assignMergeValue.js';\nimport cloneBuffer from './_cloneBuffer.js';\nimport cloneTypedArray from './_cloneTypedArray.js';\nimport copyArray from './_copyArray.js';\nimport initCloneObject from './_initCloneObject.js';\nimport isArguments from './isArguments.js';\nimport isArray from './isArray.js';\nimport isArrayLikeObject from './isArrayLikeObject.js';\nimport isBuffer from './isBuffer.js';\nimport isFunction from './isFunction.js';\nimport isObject from './isObject.js';\nimport isPlainObject from './isPlainObject.js';\nimport isTypedArray from './isTypedArray.js';\nimport safeGet from './_safeGet.js';\nimport toPlainObject from './toPlainObject.js';\n\n/**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n var objValue = safeGet(object, key),\n srcValue = safeGet(source, key),\n stacked = stack.get(srcValue);\n\n if (stacked) {\n assignMergeValue(object, key, stacked);\n return;\n }\n var newValue = customizer\n ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n : undefined;\n\n var isCommon = newValue === undefined;\n\n if (isCommon) {\n var isArr = isArray(srcValue),\n isBuff = !isArr && isBuffer(srcValue),\n isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n newValue = srcValue;\n if (isArr || isBuff || isTyped) {\n if (isArray(objValue)) {\n newValue = objValue;\n }\n else if (isArrayLikeObject(objValue)) {\n newValue = copyArray(objValue);\n }\n else if (isBuff) {\n isCommon = false;\n newValue = cloneBuffer(srcValue, true);\n }\n else if (isTyped) {\n isCommon = false;\n newValue = cloneTypedArray(srcValue, true);\n }\n else {\n newValue = [];\n }\n }\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n newValue = objValue;\n if (isArguments(objValue)) {\n newValue = toPlainObject(objValue);\n }\n else if (!isObject(objValue) || isFunction(objValue)) {\n newValue = initCloneObject(srcValue);\n }\n }\n else {\n isCommon = false;\n }\n }\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, newValue);\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n stack['delete'](srcValue);\n }\n assignMergeValue(object, key, newValue);\n}\n\nexport default baseMergeDeep;\n","import isArrayLike from './isArrayLike.js';\nimport isObjectLike from './isObjectLike.js';\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\nexport default isArrayLikeObject;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nexport default copyArray;\n","import baseCreate from './_baseCreate.js';\nimport getPrototype from './_getPrototype.js';\nimport isPrototype from './_isPrototype.js';\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nexport default initCloneObject;\n","import Stack from './_Stack.js';\nimport assignMergeValue from './_assignMergeValue.js';\nimport baseFor from './_baseFor.js';\nimport baseMergeDeep from './_baseMergeDeep.js';\nimport isObject from './isObject.js';\nimport keysIn from './keysIn.js';\nimport safeGet from './_safeGet.js';\n\n/**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMerge(object, source, srcIndex, customizer, stack) {\n if (object === source) {\n return;\n }\n baseFor(source, function(srcValue, key) {\n stack || (stack = new Stack);\n if (isObject(srcValue)) {\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n }\n else {\n var newValue = customizer\n ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n : undefined;\n\n if (newValue === undefined) {\n newValue = srcValue;\n }\n assignMergeValue(object, key, newValue);\n }\n }, keysIn);\n}\n\nexport default baseMerge;\n","/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nexport default identity;\n","/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\nexport default apply;\n","import apply from './_apply.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\nexport default overRest;\n","/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\nexport default constant;\n","import constant from './constant.js';\nimport defineProperty from './_defineProperty.js';\nimport identity from './identity.js';\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n};\n\nexport default baseSetToString;\n","/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeNow = Date.now;\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n}\n\nexport default shortOut;\n","import baseSetToString from './_baseSetToString.js';\nimport shortOut from './_shortOut.js';\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\nexport default setToString;\n","import identity from './identity.js';\nimport overRest from './_overRest.js';\nimport setToString from './_setToString.js';\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n}\n\nexport default baseRest;\n","import baseMerge from './_baseMerge.js';\nimport createAssigner from './_createAssigner.js';\n\n/**\n * This method is like `_.assign` except that it recursively merges own and\n * inherited enumerable string keyed properties of source objects into the\n * destination object. Source properties that resolve to `undefined` are\n * skipped if a destination value exists. Array and plain object properties\n * are merged recursively. Other objects and value types are overridden by\n * assignment. Source objects are applied from left to right. Subsequent\n * sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {\n * 'a': [{ 'b': 2 }, { 'd': 4 }]\n * };\n *\n * var other = {\n * 'a': [{ 'c': 3 }, { 'e': 5 }]\n * };\n *\n * _.merge(object, other);\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n */\nvar merge = createAssigner(function(object, source, srcIndex) {\n baseMerge(object, source, srcIndex);\n});\n\nexport default merge;\n","import baseRest from './_baseRest.js';\nimport isIterateeCall from './_isIterateeCall.js';\n\n/**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\nfunction createAssigner(assigner) {\n return baseRest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n}\n\nexport default createAssigner;\n","import eq from './eq.js';\nimport isArrayLike from './isArrayLike.js';\nimport isIndex from './_isIndex.js';\nimport isObject from './isObject.js';\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n}\n\nexport default isIterateeCall;\n","import * as i0 from '@angular/core';\nimport { Injectable, EventEmitter, Directive, Input, Output, NgModule, Optional } from '@angular/core';\nimport { Chart, registerables, defaults } from 'chart.js';\nimport { distinctUntilChanged } from 'rxjs/operators';\nimport { merge } from 'lodash-es';\nimport { BehaviorSubject } from 'rxjs';\n\nclass ThemeService {\n constructor() {\n this.colorschemesOptions = new BehaviorSubject(undefined);\n }\n setColorschemesOptions(options) {\n this.pColorschemesOptions = options;\n this.colorschemesOptions.next(options);\n }\n getColorschemesOptions() {\n return this.pColorschemesOptions;\n }\n}\nThemeService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.12\", ngImport: i0, type: ThemeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nThemeService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.2.12\", ngImport: i0, type: ThemeService, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.12\", ngImport: i0, type: ThemeService, decorators: [{\n type: Injectable,\n args: [{\n providedIn: 'root'\n }]\n }], ctorParameters: function () { return []; } });\n\nclass BaseChartDirective {\n constructor(element, zone, themeService) {\n this.zone = zone;\n this.themeService = themeService;\n this.type = 'bar';\n this.plugins = [];\n this.chartClick = new EventEmitter();\n this.chartHover = new EventEmitter();\n this.subs = [];\n this.themeOverrides = {};\n this.ctx = element.nativeElement.getContext('2d');\n this.subs.push(this.themeService.colorschemesOptions\n .pipe(distinctUntilChanged())\n .subscribe(r => this.themeChanged(r)));\n }\n ngOnChanges(changes) {\n const requireRender = ['type'];\n const propertyNames = Object.getOwnPropertyNames(changes);\n if (propertyNames.some(key => requireRender.includes(key)) ||\n propertyNames.every(key => changes[key].isFirstChange())) {\n this.render();\n }\n else {\n const config = this.getChartConfiguration();\n // Using assign to avoid changing the original object reference\n if (this.chart) {\n Object.assign(this.chart.config.data, config.data);\n if (this.chart.config.plugins) {\n Object.assign(this.chart.config.plugins, config.plugins);\n }\n if (this.chart.config.options) {\n Object.assign(this.chart.config.options, config.options);\n }\n }\n this.update();\n }\n }\n ngOnDestroy() {\n if (this.chart) {\n this.chart.destroy();\n this.chart = void 0;\n }\n this.subs.forEach(s => s.unsubscribe());\n }\n render() {\n if (this.chart) {\n this.chart.destroy();\n }\n return this.zone.runOutsideAngular(() => this.chart = new Chart(this.ctx, this.getChartConfiguration()));\n }\n update(duration) {\n if (this.chart) {\n this.zone.runOutsideAngular(() => this.chart?.update(duration));\n }\n }\n hideDataset(index, hidden) {\n if (this.chart) {\n this.chart.getDatasetMeta(index).hidden = hidden;\n this.update();\n }\n }\n isDatasetHidden(index) {\n return this.chart?.getDatasetMeta(index)?.hidden;\n }\n toBase64Image() {\n return this.chart?.toBase64Image();\n }\n themeChanged(options) {\n this.themeOverrides = options;\n if (this.chart) {\n if (this.chart.config.options) {\n Object.assign(this.chart.config.options, this.getChartOptions());\n }\n this.update();\n }\n }\n getChartOptions() {\n return merge({\n onHover: (event, active) => {\n if (!this.chartHover.observed && !this.chartHover.observers?.length) {\n return;\n }\n this.zone.run(() => this.chartHover.emit({ event, active }));\n },\n onClick: (event, active) => {\n if (!this.chartClick.observed && !this.chartClick.observers?.length) {\n return;\n }\n this.zone.run(() => this.chartClick.emit({ event, active }));\n }\n }, this.themeOverrides, this.options, {\n plugins: {\n legend: {\n display: this.legend\n }\n }\n });\n }\n getChartConfiguration() {\n return {\n type: this.type,\n data: this.getChartData(),\n options: this.getChartOptions(),\n plugins: this.plugins\n };\n }\n getChartData() {\n return this.data ? this.data : {\n labels: this.labels || [],\n datasets: this.datasets || []\n };\n }\n}\nBaseChartDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.12\", ngImport: i0, type: BaseChartDirective, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: ThemeService }], target: i0.ɵɵFactoryTarget.Directive });\nBaseChartDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.12\", type: BaseChartDirective, selector: \"canvas[baseChart]\", inputs: { type: \"type\", legend: \"legend\", data: \"data\", options: \"options\", plugins: \"plugins\", labels: \"labels\", datasets: \"datasets\" }, outputs: { chartClick: \"chartClick\", chartHover: \"chartHover\" }, exportAs: [\"base-chart\"], usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.12\", ngImport: i0, type: BaseChartDirective, decorators: [{\n type: Directive,\n args: [{\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'canvas[baseChart]',\n exportAs: 'base-chart',\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: ThemeService }]; }, propDecorators: { type: [{\n type: Input\n }], legend: [{\n type: Input\n }], data: [{\n type: Input\n }], options: [{\n type: Input\n }], plugins: [{\n type: Input\n }], labels: [{\n type: Input\n }], datasets: [{\n type: Input\n }], chartClick: [{\n type: Output\n }], chartHover: [{\n type: Output\n }] } });\n\nconst baseColors = [\n [255, 99, 132],\n [54, 162, 235],\n [255, 206, 86],\n [231, 233, 237],\n [75, 192, 192],\n [151, 187, 205],\n [220, 220, 220],\n [247, 70, 74],\n [70, 191, 189],\n [253, 180, 92],\n [148, 159, 177],\n [77, 83, 96]\n];\n\nconst builtInDefaults = {\n plugins: { colors: { enabled: false } },\n datasets: {\n line: {\n backgroundColor: (context) => rgba(generateColor(context.datasetIndex), 0.4),\n borderColor: (context) => rgba(generateColor(context.datasetIndex), 1),\n pointBackgroundColor: (context) => rgba(generateColor(context.datasetIndex), 1),\n pointBorderColor: '#fff',\n },\n bar: {\n backgroundColor: (context) => rgba(generateColor(context.datasetIndex), 0.6),\n borderColor: (context) => rgba(generateColor(context.datasetIndex), 1)\n },\n get radar() {\n return this.line;\n },\n doughnut: {\n backgroundColor: (context) => rgba(generateColor(context.dataIndex), 0.6),\n borderColor: '#fff'\n },\n get pie() {\n return this.doughnut;\n },\n polarArea: {\n backgroundColor: (context) => rgba(generateColor(context.dataIndex), 0.6),\n borderColor: (context) => rgba(generateColor(context.dataIndex), 1),\n },\n get bubble() {\n return this.doughnut;\n },\n get scatter() {\n return this.doughnut;\n },\n get area() {\n return this.polarArea;\n }\n }\n};\nfunction rgba(colour, alpha) {\n return 'rgba(' + colour.concat(alpha).join(',') + ')';\n}\nfunction getRandomInt(min, max) {\n return Math.floor(Math.random() * (max - min + 1)) + min;\n}\nfunction getRandomColor() {\n return [getRandomInt(0, 255), getRandomInt(0, 255), getRandomInt(0, 255)];\n}\n/**\n * Generate colors\n */\nfunction generateColor(index = 0) {\n return baseColors[index] || getRandomColor();\n}\n\nclass NgChartsConfiguration {\n constructor() {\n this.generateColors = true;\n }\n}\nNgChartsConfiguration.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.12\", ngImport: i0, type: NgChartsConfiguration, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nNgChartsConfiguration.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.2.12\", ngImport: i0, type: NgChartsConfiguration, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.12\", ngImport: i0, type: NgChartsConfiguration, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }] });\nChart.register(...registerables);\nclass NgChartsModule {\n constructor(config) {\n if (config?.plugins)\n Chart.register(...config?.plugins);\n const ngChartsDefaults = merge(config?.generateColors ? builtInDefaults : {}, config?.defaults || {});\n defaults.set(ngChartsDefaults);\n }\n static forRoot(config) {\n return {\n ngModule: NgChartsModule,\n providers: [\n { provide: NgChartsConfiguration, useValue: config }\n ]\n };\n }\n}\nNgChartsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.12\", ngImport: i0, type: NgChartsModule, deps: [{ token: NgChartsConfiguration, optional: true }], target: i0.ɵɵFactoryTarget.NgModule });\nNgChartsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.2.12\", ngImport: i0, type: NgChartsModule, declarations: [BaseChartDirective], exports: [BaseChartDirective] });\nNgChartsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.2.12\", ngImport: i0, type: NgChartsModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.12\", ngImport: i0, type: NgChartsModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [],\n declarations: [BaseChartDirective],\n exports: [BaseChartDirective]\n }]\n }], ctorParameters: function () { return [{ type: NgChartsConfiguration, decorators: [{\n type: Optional\n }] }]; } });\n\n/*\n * Public API Surface of ng2-charts\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { BaseChartDirective, NgChartsConfiguration, NgChartsModule, ThemeService, baseColors };\n","import * as i0 from '@angular/core';\nimport { forwardRef, Directive, Inject, EventEmitter, Input, Output, HostBinding, HostListener, ContentChild, NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nconst DROP_EFFECTS = [\"move\", \"copy\", \"link\"];\nconst CUSTOM_MIME_TYPE = \"application/x-dnd\";\nconst JSON_MIME_TYPE = \"application/json\";\nconst MSIE_MIME_TYPE = \"Text\";\nfunction mimeTypeIsCustom(mimeType) {\n return mimeType.substr(0, CUSTOM_MIME_TYPE.length) === CUSTOM_MIME_TYPE;\n}\nfunction getWellKnownMimeType(event) {\n if (event.dataTransfer) {\n const types = event.dataTransfer.types;\n // IE 9 workaround.\n if (!types) {\n return MSIE_MIME_TYPE;\n }\n for (let i = 0; i < types.length; i++) {\n if (types[i] === MSIE_MIME_TYPE\n || types[i] === JSON_MIME_TYPE\n || mimeTypeIsCustom(types[i])) {\n return types[i];\n }\n }\n }\n return null;\n}\nfunction setDragData(event, data, effectAllowed) {\n // Internet Explorer and Microsoft Edge don't support custom mime types, see design doc:\n // https://github.com/marceljuenemann/angular-drag-and-drop-lists/wiki/Data-Transfer-Design\n const mimeType = CUSTOM_MIME_TYPE + (data.type ? (\"-\" + data.type) : \"\");\n const dataString = JSON.stringify(data);\n try {\n event.dataTransfer?.setData(mimeType, dataString);\n }\n catch (e) {\n // Setting a custom MIME type did not work, we are probably in IE or Edge.\n try {\n event.dataTransfer?.setData(JSON_MIME_TYPE, dataString);\n }\n catch (e) {\n // We are in Internet Explorer and can only use the Text MIME type. Also note that IE\n // does not allow changing the cursor in the dragover event, therefore we have to choose\n // the one we want to display now by setting effectAllowed.\n const effectsAllowed = filterEffects(DROP_EFFECTS, effectAllowed);\n if (event.dataTransfer) {\n event.dataTransfer.effectAllowed = effectsAllowed[0];\n }\n event.dataTransfer?.setData(MSIE_MIME_TYPE, dataString);\n }\n }\n}\nfunction getDropData(event, dragIsExternal) {\n // check if the mime type is well known\n const mimeType = getWellKnownMimeType(event);\n // drag did not originate from [dndDraggable]\n if (dragIsExternal === true) {\n if (mimeType !== null\n && mimeTypeIsCustom(mimeType)) {\n // the type of content is well known and safe to handle\n return JSON.parse(event.dataTransfer?.getData(mimeType) ?? \"{}\");\n }\n // the contained data is unknown, let user handle it\n return {};\n }\n if (mimeType !== null) {\n // the type of content is well known and safe to handle\n return JSON.parse(event.dataTransfer?.getData(mimeType) ?? \"{}\");\n }\n // the contained data is unknown, let user handle it\n return {};\n}\nfunction filterEffects(effects, allowed) {\n if (allowed === \"all\"\n || allowed === \"uninitialized\") {\n return effects;\n }\n return effects.filter(function (effect) {\n return allowed.toLowerCase().indexOf(effect) !== -1;\n });\n}\nfunction getDirectChildElement(parentElement, childElement) {\n let directChild = childElement;\n while (directChild.parentNode !== parentElement) {\n // reached root node without finding given parent\n if (!directChild.parentNode) {\n return null;\n }\n directChild = directChild.parentNode;\n }\n return directChild;\n}\nfunction shouldPositionPlaceholderBeforeElement(event, element, horizontal) {\n const bounds = element.getBoundingClientRect();\n // If the pointer is in the upper half of the list item element,\n // we position the placeholder before the list item, otherwise after it.\n if (horizontal) {\n return (event.clientX < bounds.left + bounds.width / 2);\n }\n return (event.clientY < bounds.top + bounds.height / 2);\n}\nfunction calculateDragImageOffset(event, dragImage) {\n const dragImageComputedStyle = window.getComputedStyle(dragImage);\n const paddingTop = parseFloat(dragImageComputedStyle.paddingTop) || 0;\n const paddingLeft = parseFloat(dragImageComputedStyle.paddingLeft) || 0;\n const borderTop = parseFloat(dragImageComputedStyle.borderTopWidth) || 0;\n const borderLeft = parseFloat(dragImageComputedStyle.borderLeftWidth) || 0;\n return {\n x: event.offsetX + paddingLeft + borderLeft,\n y: event.offsetY + paddingTop + borderTop\n };\n}\nfunction setDragImage(event, dragImage, offsetFunction) {\n const offset = offsetFunction(event, dragImage) || { x: 0, y: 0 };\n event.dataTransfer.setDragImage(dragImage, offset.x, offset.y);\n}\n\nconst _dndState = {\n isDragging: false,\n dropEffect: \"none\",\n effectAllowed: \"all\",\n type: undefined\n};\nfunction startDrag(event, effectAllowed, type) {\n _dndState.isDragging = true;\n _dndState.dropEffect = \"none\";\n _dndState.effectAllowed = effectAllowed;\n _dndState.type = type;\n if (event.dataTransfer) {\n event.dataTransfer.effectAllowed = effectAllowed;\n }\n}\nfunction endDrag() {\n _dndState.isDragging = false;\n _dndState.dropEffect = undefined;\n _dndState.effectAllowed = undefined;\n _dndState.type = undefined;\n}\nfunction setDropEffect(event, dropEffect) {\n if (_dndState.isDragging === true) {\n _dndState.dropEffect = dropEffect;\n }\n if (event.dataTransfer) {\n event.dataTransfer.dropEffect = dropEffect;\n }\n}\nfunction getDropEffect(event, effectAllowed) {\n const dataTransferEffectAllowed = (event.dataTransfer) ? event.dataTransfer.effectAllowed : \"uninitialized\";\n let effects = filterEffects(DROP_EFFECTS, dataTransferEffectAllowed);\n if (_dndState.isDragging === true) {\n effects = filterEffects(effects, _dndState.effectAllowed);\n }\n if (effectAllowed) {\n effects = filterEffects(effects, effectAllowed);\n }\n // MacOS automatically filters dataTransfer.effectAllowed depending on the modifier keys,\n // therefore the following modifier keys will only affect other operating systems.\n if (effects.length === 0) {\n return \"none\";\n }\n if (event.ctrlKey && effects.indexOf(\"copy\") !== -1) {\n return \"copy\";\n }\n if (event.altKey && effects.indexOf(\"link\") !== -1) {\n return \"link\";\n }\n return effects[0];\n}\nfunction getDndType(event) {\n if (_dndState.isDragging === true) {\n return _dndState.type;\n }\n const mimeType = getWellKnownMimeType(event);\n if (mimeType === null) {\n return undefined;\n }\n if (mimeType === MSIE_MIME_TYPE\n || mimeType === JSON_MIME_TYPE) {\n return undefined;\n }\n return mimeType.substr(CUSTOM_MIME_TYPE.length + 1) || undefined;\n}\nfunction isExternalDrag() {\n return _dndState.isDragging === false;\n}\nconst dndState = _dndState;\n\nclass DndDragImageRefDirective {\n constructor(parent, elementRef) {\n parent.registerDragImage(elementRef);\n }\n}\nDndDragImageRefDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.3\", ngImport: i0, type: DndDragImageRefDirective, deps: [{ token: forwardRef(() => DndDraggableDirective) }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });\nDndDragImageRefDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.0.3\", type: DndDragImageRefDirective, selector: \"[dndDragImageRef]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.3\", ngImport: i0, type: DndDragImageRefDirective, decorators: [{\n type: Directive,\n args: [{\n selector: \"[dndDragImageRef]\"\n }]\n }], ctorParameters: function () { return [{ type: DndDraggableDirective, decorators: [{\n type: Inject,\n args: [forwardRef(() => DndDraggableDirective)]\n }] }, { type: i0.ElementRef }]; } });\nclass DndDraggableDirective {\n constructor(elementRef, renderer, ngZone) {\n this.elementRef = elementRef;\n this.renderer = renderer;\n this.ngZone = ngZone;\n this.dndEffectAllowed = \"copy\";\n this.dndDraggingClass = \"dndDragging\";\n this.dndDraggingSourceClass = \"dndDraggingSource\";\n this.dndDraggableDisabledClass = \"dndDraggableDisabled\";\n this.dndDragImageOffsetFunction = calculateDragImageOffset;\n this.dndStart = new EventEmitter();\n this.dndDrag = new EventEmitter();\n this.dndEnd = new EventEmitter();\n this.dndMoved = new EventEmitter();\n this.dndCopied = new EventEmitter();\n this.dndLinked = new EventEmitter();\n this.dndCanceled = new EventEmitter();\n this.draggable = true;\n this.isDragStarted = false;\n this.dragEventHandler = (event) => this.onDrag(event);\n }\n set dndDisableIf(value) {\n this.draggable = !value;\n if (this.draggable) {\n this.renderer.removeClass(this.elementRef.nativeElement, this.dndDraggableDisabledClass);\n }\n else {\n this.renderer.addClass(this.elementRef.nativeElement, this.dndDraggableDisabledClass);\n }\n }\n set dndDisableDragIf(value) {\n this.dndDisableIf = value;\n }\n ngAfterViewInit() {\n this.ngZone.runOutsideAngular(() => {\n this.elementRef.nativeElement.addEventListener(\"drag\", this.dragEventHandler);\n });\n }\n ngOnDestroy() {\n this.elementRef.nativeElement.removeEventListener(\"drag\", this.dragEventHandler);\n if (this.isDragStarted === true) {\n endDrag();\n }\n }\n onDragStart(event) {\n if (this.draggable === false) {\n return false;\n }\n // check if there is dnd handle and if the dnd handle was used to start the drag\n if (typeof this.dndHandle !== \"undefined\"\n && typeof event._dndUsingHandle === \"undefined\") {\n return false;\n }\n // initialize global state\n startDrag(event, this.dndEffectAllowed, this.dndType);\n this.isDragStarted = true;\n setDragData(event, { data: this.dndDraggable, type: this.dndType }, dndState.effectAllowed);\n this.dragImage = this.determineDragImage();\n // set dragging css class prior to setDragImage so styles are applied before\n // TODO breaking change: add class to elementRef rather than drag image which could be another element\n this.renderer.addClass(this.dragImage, this.dndDraggingClass);\n // set custom dragimage if present\n // set dragimage if drag is started from dndHandle\n if (typeof this.dndDragImageElementRef !== \"undefined\"\n || typeof event._dndUsingHandle !== \"undefined\") {\n setDragImage(event, this.dragImage, this.dndDragImageOffsetFunction);\n }\n // add dragging source css class on first drag event\n const unregister = this.renderer.listen(this.elementRef.nativeElement, \"drag\", () => {\n this.renderer.addClass(this.elementRef.nativeElement, this.dndDraggingSourceClass);\n unregister();\n });\n this.dndStart.emit(event);\n event.stopPropagation();\n return true;\n }\n onDrag(event) {\n this.dndDrag.emit(event);\n }\n onDragEnd(event) {\n // get drop effect from custom stored state as its not reliable across browsers\n const dropEffect = dndState.dropEffect;\n let dropEffectEmitter;\n switch (dropEffect) {\n case \"copy\":\n dropEffectEmitter = this.dndCopied;\n break;\n case \"link\":\n dropEffectEmitter = this.dndLinked;\n break;\n case \"move\":\n dropEffectEmitter = this.dndMoved;\n break;\n default:\n dropEffectEmitter = this.dndCanceled;\n break;\n }\n dropEffectEmitter.emit(event);\n this.dndEnd.emit(event);\n // reset global state\n endDrag();\n this.isDragStarted = false;\n this.renderer.removeClass(this.dragImage, this.dndDraggingClass);\n // IE9 special hammering\n window.setTimeout(() => {\n this.renderer.removeClass(this.elementRef.nativeElement, this.dndDraggingSourceClass);\n }, 0);\n event.stopPropagation();\n }\n registerDragHandle(handle) {\n this.dndHandle = handle;\n }\n registerDragImage(elementRef) {\n this.dndDragImageElementRef = elementRef;\n }\n determineDragImage() {\n // evaluate custom drag image existence\n if (typeof this.dndDragImageElementRef !== \"undefined\") {\n return this.dndDragImageElementRef.nativeElement;\n }\n else {\n return this.elementRef.nativeElement;\n }\n }\n}\nDndDraggableDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.3\", ngImport: i0, type: DndDraggableDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });\nDndDraggableDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.0.3\", type: DndDraggableDirective, selector: \"[dndDraggable]\", inputs: { dndDraggable: \"dndDraggable\", dndEffectAllowed: \"dndEffectAllowed\", dndType: \"dndType\", dndDraggingClass: \"dndDraggingClass\", dndDraggingSourceClass: \"dndDraggingSourceClass\", dndDraggableDisabledClass: \"dndDraggableDisabledClass\", dndDragImageOffsetFunction: \"dndDragImageOffsetFunction\", dndDisableIf: \"dndDisableIf\", dndDisableDragIf: \"dndDisableDragIf\" }, outputs: { dndStart: \"dndStart\", dndDrag: \"dndDrag\", dndEnd: \"dndEnd\", dndMoved: \"dndMoved\", dndCopied: \"dndCopied\", dndLinked: \"dndLinked\", dndCanceled: \"dndCanceled\" }, host: { listeners: { \"dragstart\": \"onDragStart($event)\", \"dragend\": \"onDragEnd($event)\" }, properties: { \"attr.draggable\": \"this.draggable\" } }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.3\", ngImport: i0, type: DndDraggableDirective, decorators: [{\n type: Directive,\n args: [{\n selector: \"[dndDraggable]\"\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }]; }, propDecorators: { dndDraggable: [{\n type: Input\n }], dndEffectAllowed: [{\n type: Input\n }], dndType: [{\n type: Input\n }], dndDraggingClass: [{\n type: Input\n }], dndDraggingSourceClass: [{\n type: Input\n }], dndDraggableDisabledClass: [{\n type: Input\n }], dndDragImageOffsetFunction: [{\n type: Input\n }], dndStart: [{\n type: Output\n }], dndDrag: [{\n type: Output\n }], dndEnd: [{\n type: Output\n }], dndMoved: [{\n type: Output\n }], dndCopied: [{\n type: Output\n }], dndLinked: [{\n type: Output\n }], dndCanceled: [{\n type: Output\n }], draggable: [{\n type: HostBinding,\n args: [\"attr.draggable\"]\n }], dndDisableIf: [{\n type: Input\n }], dndDisableDragIf: [{\n type: Input\n }], onDragStart: [{\n type: HostListener,\n args: [\"dragstart\", [\"$event\"]]\n }], onDragEnd: [{\n type: HostListener,\n args: [\"dragend\", [\"$event\"]]\n }] } });\n\nclass DndPlaceholderRefDirective {\n constructor(elementRef) {\n this.elementRef = elementRef;\n }\n}\nDndPlaceholderRefDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.3\", ngImport: i0, type: DndPlaceholderRefDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });\nDndPlaceholderRefDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.0.3\", type: DndPlaceholderRefDirective, selector: \"[dndPlaceholderRef]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.3\", ngImport: i0, type: DndPlaceholderRefDirective, decorators: [{\n type: Directive,\n args: [{\n selector: \"[dndPlaceholderRef]\"\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });\nclass DndDropzoneDirective {\n constructor(ngZone, elementRef, renderer) {\n this.ngZone = ngZone;\n this.elementRef = elementRef;\n this.renderer = renderer;\n this.dndDropzone = \"\";\n this.dndEffectAllowed = \"uninitialized\";\n this.dndAllowExternal = false;\n this.dndHorizontal = false;\n this.dndDragoverClass = \"dndDragover\";\n this.dndDropzoneDisabledClass = \"dndDropzoneDisabled\";\n this.dndDragover = new EventEmitter();\n this.dndDrop = new EventEmitter();\n this.placeholder = null;\n this.disabled = false;\n this.dragEnterEventHandler = (event) => this.onDragEnter(event);\n this.dragOverEventHandler = (event) => this.onDragOver(event);\n this.dragLeaveEventHandler = (event) => this.onDragLeave(event);\n }\n set dndDisableIf(value) {\n this.disabled = !!value;\n if (this.disabled) {\n this.renderer.addClass(this.elementRef.nativeElement, this.dndDropzoneDisabledClass);\n }\n else {\n this.renderer.removeClass(this.elementRef.nativeElement, this.dndDropzoneDisabledClass);\n }\n }\n set dndDisableDropIf(value) {\n this.dndDisableIf = value;\n }\n ngAfterViewInit() {\n this.placeholder = this.tryGetPlaceholder();\n this.removePlaceholderFromDOM();\n this.ngZone.runOutsideAngular(() => {\n this.elementRef.nativeElement.addEventListener(\"dragenter\", this.dragEnterEventHandler);\n this.elementRef.nativeElement.addEventListener(\"dragover\", this.dragOverEventHandler);\n this.elementRef.nativeElement.addEventListener(\"dragleave\", this.dragLeaveEventHandler);\n });\n }\n ngOnDestroy() {\n this.elementRef.nativeElement.removeEventListener(\"dragenter\", this.dragEnterEventHandler);\n this.elementRef.nativeElement.removeEventListener(\"dragover\", this.dragOverEventHandler);\n this.elementRef.nativeElement.removeEventListener(\"dragleave\", this.dragLeaveEventHandler);\n }\n onDragEnter(event) {\n // check if another dropzone is activated\n if (event._dndDropzoneActive === true) {\n this.cleanupDragoverState();\n return;\n }\n // set as active if the target element is inside this dropzone\n if (typeof event._dndDropzoneActive === \"undefined\") {\n const newTarget = document.elementFromPoint(event.clientX, event.clientY);\n if (this.elementRef.nativeElement.contains(newTarget)) {\n event._dndDropzoneActive = true;\n }\n }\n // check if this drag event is allowed to drop on this dropzone\n const type = getDndType(event);\n if (this.isDropAllowed(type) === false) {\n return;\n }\n // allow the dragenter\n event.preventDefault();\n }\n onDragOver(event) {\n // With nested dropzones, we want to ignore this event if a child dropzone\n // has already handled a dragover. Historically, event.stopPropagation() was\n // used to prevent this bubbling, but that prevents any dragovers outside the\n // ngx-drag-drop component, and stops other use cases such as scrolling on drag.\n // Instead, we can check if the event was already prevented by a child and bail early.\n if (event.defaultPrevented) {\n return;\n }\n // check if this drag event is allowed to drop on this dropzone\n const type = getDndType(event);\n if (this.isDropAllowed(type) === false) {\n return;\n }\n this.checkAndUpdatePlaceholderPosition(event);\n const dropEffect = getDropEffect(event, this.dndEffectAllowed);\n if (dropEffect === \"none\") {\n this.cleanupDragoverState();\n return;\n }\n // allow the dragover\n event.preventDefault();\n // set the drop effect\n setDropEffect(event, dropEffect);\n this.dndDragover.emit(event);\n this.renderer.addClass(this.elementRef.nativeElement, this.dndDragoverClass);\n }\n onDrop(event) {\n try {\n // check if this drag event is allowed to drop on this dropzone\n const type = getDndType(event);\n if (this.isDropAllowed(type) === false) {\n return;\n }\n const data = getDropData(event, isExternalDrag());\n if (this.isDropAllowed(data.type) === false) {\n return;\n }\n // signal custom drop handling\n event.preventDefault();\n const dropEffect = getDropEffect(event);\n setDropEffect(event, dropEffect);\n if (dropEffect === \"none\") {\n return;\n }\n const dropIndex = this.getPlaceholderIndex();\n // if for whatever reason the placeholder is not present in the DOM but it should be there\n // we don't allow/emit the drop event since it breaks the contract\n // seems to only happen if drag and drop is executed faster than the DOM updates\n if (dropIndex === -1) {\n return;\n }\n this.dndDrop.emit({\n event: event,\n dropEffect: dropEffect,\n isExternal: isExternalDrag(),\n data: data.data,\n index: dropIndex,\n type: type,\n });\n event.stopPropagation();\n }\n finally {\n this.cleanupDragoverState();\n }\n }\n onDragLeave(event) {\n // check if still inside this dropzone and not yet handled by another dropzone\n if (typeof event._dndDropzoneActive === \"undefined\") {\n const newTarget = document.elementFromPoint(event.clientX, event.clientY);\n if (this.elementRef.nativeElement.contains(newTarget)) {\n event._dndDropzoneActive = true;\n return;\n }\n }\n this.cleanupDragoverState();\n // cleanup drop effect when leaving dropzone\n setDropEffect(event, \"none\");\n }\n isDropAllowed(type) {\n // dropzone is disabled -> deny it\n if (this.disabled === true) {\n return false;\n }\n // if drag did not start from our directive\n // and external drag sources are not allowed -> deny it\n if (isExternalDrag() === true\n && this.dndAllowExternal === false) {\n return false;\n }\n // no filtering by types -> allow it\n if (!this.dndDropzone) {\n return true;\n }\n // no type set -> allow it\n if (!type) {\n return true;\n }\n if (Array.isArray(this.dndDropzone) === false) {\n throw new Error(\"dndDropzone: bound value to [dndDropzone] must be an array!\");\n }\n // if dropzone contains type -> allow it\n return this.dndDropzone.indexOf(type) !== -1;\n }\n tryGetPlaceholder() {\n if (typeof this.dndPlaceholderRef !== \"undefined\") {\n return this.dndPlaceholderRef.elementRef.nativeElement;\n }\n // TODO nasty workaround needed because if ng-container / template is used @ContentChild() or DI will fail because\n // of wrong context see angular bug https://github.com/angular/angular/issues/13517\n return this.elementRef.nativeElement.querySelector(\"[dndPlaceholderRef]\");\n }\n removePlaceholderFromDOM() {\n if (this.placeholder !== null\n && this.placeholder.parentNode !== null) {\n this.placeholder.parentNode.removeChild(this.placeholder);\n }\n }\n checkAndUpdatePlaceholderPosition(event) {\n if (this.placeholder === null) {\n return;\n }\n // make sure the placeholder is in the DOM\n if (this.placeholder.parentNode !== this.elementRef.nativeElement) {\n this.renderer.appendChild(this.elementRef.nativeElement, this.placeholder);\n }\n // update the position if the event originates from a child element of the dropzone\n const directChild = getDirectChildElement(this.elementRef.nativeElement, event.target);\n // early exit if no direct child or direct child is placeholder\n if (directChild === null\n || directChild === this.placeholder) {\n return;\n }\n const positionPlaceholderBeforeDirectChild = shouldPositionPlaceholderBeforeElement(event, directChild, this.dndHorizontal);\n if (positionPlaceholderBeforeDirectChild) {\n // do insert before only if necessary\n if (directChild.previousSibling !== this.placeholder) {\n this.renderer.insertBefore(this.elementRef.nativeElement, this.placeholder, directChild);\n }\n }\n else {\n // do insert after only if necessary\n if (directChild.nextSibling !== this.placeholder) {\n this.renderer.insertBefore(this.elementRef.nativeElement, this.placeholder, directChild.nextSibling);\n }\n }\n }\n getPlaceholderIndex() {\n if (this.placeholder === null) {\n return undefined;\n }\n const element = this.elementRef.nativeElement;\n return Array.prototype.indexOf.call(element.children, this.placeholder);\n }\n cleanupDragoverState() {\n this.renderer.removeClass(this.elementRef.nativeElement, this.dndDragoverClass);\n this.removePlaceholderFromDOM();\n }\n}\nDndDropzoneDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.3\", ngImport: i0, type: DndDropzoneDirective, deps: [{ token: i0.NgZone }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });\nDndDropzoneDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.0.3\", type: DndDropzoneDirective, selector: \"[dndDropzone]\", inputs: { dndDropzone: \"dndDropzone\", dndEffectAllowed: \"dndEffectAllowed\", dndAllowExternal: \"dndAllowExternal\", dndHorizontal: \"dndHorizontal\", dndDragoverClass: \"dndDragoverClass\", dndDropzoneDisabledClass: \"dndDropzoneDisabledClass\", dndDisableIf: \"dndDisableIf\", dndDisableDropIf: \"dndDisableDropIf\" }, outputs: { dndDragover: \"dndDragover\", dndDrop: \"dndDrop\" }, host: { listeners: { \"drop\": \"onDrop($event)\" } }, queries: [{ propertyName: \"dndPlaceholderRef\", first: true, predicate: DndPlaceholderRefDirective, descendants: true }], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.3\", ngImport: i0, type: DndDropzoneDirective, decorators: [{\n type: Directive,\n args: [{\n selector: \"[dndDropzone]\"\n }]\n }], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { dndDropzone: [{\n type: Input\n }], dndEffectAllowed: [{\n type: Input\n }], dndAllowExternal: [{\n type: Input\n }], dndHorizontal: [{\n type: Input\n }], dndDragoverClass: [{\n type: Input\n }], dndDropzoneDisabledClass: [{\n type: Input\n }], dndDragover: [{\n type: Output\n }], dndDrop: [{\n type: Output\n }], dndPlaceholderRef: [{\n type: ContentChild,\n args: [DndPlaceholderRefDirective]\n }], dndDisableIf: [{\n type: Input\n }], dndDisableDropIf: [{\n type: Input\n }], onDrop: [{\n type: HostListener,\n args: [\"drop\", [\"$event\"]]\n }] } });\n\nclass DndHandleDirective {\n constructor(parent) {\n this.draggable = true;\n parent.registerDragHandle(this);\n }\n onDragEvent(event) {\n event._dndUsingHandle = true;\n }\n}\nDndHandleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.3\", ngImport: i0, type: DndHandleDirective, deps: [{ token: DndDraggableDirective }], target: i0.ɵɵFactoryTarget.Directive });\nDndHandleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.0.3\", type: DndHandleDirective, selector: \"[dndHandle]\", host: { listeners: { \"dragstart\": \"onDragEvent($event)\", \"dragend\": \"onDragEvent($event)\" }, properties: { \"attr.draggable\": \"this.draggable\" } }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.3\", ngImport: i0, type: DndHandleDirective, decorators: [{\n type: Directive,\n args: [{\n selector: \"[dndHandle]\"\n }]\n }], ctorParameters: function () { return [{ type: DndDraggableDirective }]; }, propDecorators: { draggable: [{\n type: HostBinding,\n args: [\"attr.draggable\"]\n }], onDragEvent: [{\n type: HostListener,\n args: [\"dragstart\", [\"$event\"]]\n }, {\n type: HostListener,\n args: [\"dragend\", [\"$event\"]]\n }] } });\n\nclass DndModule {\n}\nDndModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.3\", ngImport: i0, type: DndModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nDndModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.0.3\", ngImport: i0, type: DndModule, declarations: [DndDraggableDirective,\n DndDropzoneDirective,\n DndHandleDirective,\n DndPlaceholderRefDirective,\n DndDragImageRefDirective], imports: [CommonModule], exports: [DndDraggableDirective,\n DndDropzoneDirective,\n DndHandleDirective,\n DndPlaceholderRefDirective,\n DndDragImageRefDirective] });\nDndModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.0.3\", ngImport: i0, type: DndModule, imports: [CommonModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.3\", ngImport: i0, type: DndModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [\n CommonModule\n ],\n declarations: [\n DndDraggableDirective,\n DndDropzoneDirective,\n DndHandleDirective,\n DndPlaceholderRefDirective,\n DndDragImageRefDirective\n ],\n exports: [\n DndDraggableDirective,\n DndDropzoneDirective,\n DndHandleDirective,\n DndPlaceholderRefDirective,\n DndDragImageRefDirective\n ]\n }]\n }] });\n\n/*\n * Public API Surface of dnd\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { DndDragImageRefDirective, DndDraggableDirective, DndDropzoneDirective, DndHandleDirective, DndModule, DndPlaceholderRefDirective };\n//# sourceMappingURL=ngx-drag-drop.mjs.map\n","import { Subscription } from '../Subscription';\nexport class Action extends Subscription {\n constructor(scheduler, work) {\n super();\n }\n schedule(state, delay = 0) {\n return this;\n }\n}\n","export const intervalProvider = {\n setInterval(...args) {\n const { delegate } = intervalProvider;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.setInterval) || setInterval)(...args);\n },\n clearInterval(handle) {\n const { delegate } = intervalProvider;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearInterval) || clearInterval)(handle);\n },\n delegate: undefined,\n};\n","import { dateTimestampProvider } from './scheduler/dateTimestampProvider';\nexport class Scheduler {\n constructor(schedulerActionCtor, now = Scheduler.now) {\n this.schedulerActionCtor = schedulerActionCtor;\n this.now = now;\n }\n schedule(work, delay = 0, state) {\n return new this.schedulerActionCtor(this, work).schedule(state, delay);\n }\n}\nScheduler.now = dateTimestampProvider.now;\n","import { AsyncAction } from './AsyncAction';\nimport { AsyncScheduler } from './AsyncScheduler';\nexport const asyncScheduler = new AsyncScheduler(AsyncAction);\nexport const async = asyncScheduler;\n","import { Scheduler } from '../Scheduler';\nexport class AsyncScheduler extends Scheduler {\n constructor(SchedulerAction, now = Scheduler.now) {\n super(SchedulerAction, now);\n this.actions = [];\n this._active = false;\n this._scheduled = undefined;\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 { Action } from './Action';\nimport { intervalProvider } from './intervalProvider';\nimport { arrRemove } from '../util/arrRemove';\nexport class AsyncAction extends Action {\n constructor(scheduler, work) {\n super(scheduler, work);\n this.scheduler = scheduler;\n this.work = work;\n this.pending = false;\n }\n schedule(state, delay = 0) {\n 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 intervalProvider.setInterval(scheduler.flush.bind(scheduler, this), delay);\n }\n recycleAsyncId(_scheduler, id, delay = 0) {\n if (delay != null && this.delay === delay && this.pending === false) {\n return id;\n }\n intervalProvider.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;\n try {\n this.work(state);\n }\n catch (e) {\n errored = true;\n errorValue = e ? e : new Error('Scheduled action threw falsy error');\n }\n if (errored) {\n this.unsubscribe();\n return errorValue;\n }\n }\n unsubscribe() {\n if (!this.closed) {\n const { id, scheduler } = this;\n const { actions } = scheduler;\n this.work = this.state = this.scheduler = null;\n this.pending = false;\n arrRemove(actions, this);\n if (id != null) {\n this.id = this.recycleAsyncId(scheduler, id, null);\n }\n this.delay = null;\n super.unsubscribe();\n }\n }\n}\n","import { innerFrom } from '../observable/innerFrom';\nimport { Observable } from '../Observable';\nimport { mergeMap } from '../operators/mergeMap';\nimport { isArrayLike } from '../util/isArrayLike';\nimport { isFunction } from '../util/isFunction';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nconst nodeEventEmitterMethods = ['addListener', 'removeListener'];\nconst eventTargetMethods = ['addEventListener', 'removeEventListener'];\nconst jqueryMethods = ['on', 'off'];\nexport function fromEvent(target, eventName, options, resultSelector) {\n if (isFunction(options)) {\n resultSelector = options;\n options = undefined;\n }\n if (resultSelector) {\n return fromEvent(target, eventName, options).pipe(mapOneOrManyArgs(resultSelector));\n }\n const [add, remove] = isEventTarget(target)\n ? eventTargetMethods.map((methodName) => (handler) => target[methodName](eventName, handler, options))\n :\n isNodeStyleEventEmitter(target)\n ? nodeEventEmitterMethods.map(toCommonHandlerRegistry(target, eventName))\n : isJQueryStyleEventEmitter(target)\n ? jqueryMethods.map(toCommonHandlerRegistry(target, eventName))\n : [];\n if (!add) {\n if (isArrayLike(target)) {\n return mergeMap((subTarget) => fromEvent(subTarget, eventName, options))(innerFrom(target));\n }\n }\n if (!add) {\n throw new TypeError('Invalid event target');\n }\n return new Observable((subscriber) => {\n const handler = (...args) => subscriber.next(1 < args.length ? args : args[0]);\n add(handler);\n return () => remove(handler);\n });\n}\nfunction toCommonHandlerRegistry(target, eventName) {\n return (methodName) => (handler) => target[methodName](eventName, handler);\n}\nfunction isNodeStyleEventEmitter(target) {\n return isFunction(target.addListener) && isFunction(target.removeListener);\n}\nfunction isJQueryStyleEventEmitter(target) {\n return isFunction(target.on) && isFunction(target.off);\n}\nfunction isEventTarget(target) {\n return isFunction(target.addEventListener) && isFunction(target.removeEventListener);\n}\n","import { debounceTime } from 'rxjs/operators';\nimport * as i0 from '@angular/core';\nimport { PLATFORM_ID, Injectable, Inject, Component, ViewEncapsulation, Input, ViewChild, ErrorHandler, NgModule } from '@angular/core';\nimport { Subject, fromEvent } from 'rxjs';\nimport { cloneDeep } from 'lodash';\nimport * as i3 from '@angular/common';\nimport { isPlatformBrowser, DOCUMENT, CommonModule } from '@angular/common';\n\nclass Orientation {\n}\nOrientation.Bottom = 'bottom';\nOrientation.BottomLeft = 'bottom-left';\nOrientation.BottomRight = 'bottom-right';\nOrientation.Center = 'center';\nOrientation.Left = 'left';\nOrientation.Right = 'right';\nOrientation.Top = 'top';\nOrientation.TopLeft = 'top-left';\nOrientation.TopRight = 'top-right';\nvar ProgressIndicatorLocation;\n(function (ProgressIndicatorLocation) {\n ProgressIndicatorLocation[\"InsideNextButton\"] = \"inside-next-button\";\n ProgressIndicatorLocation[\"TopOfTourBlock\"] = \"top-of-tour-block\";\n ProgressIndicatorLocation[\"None\"] = \"none\";\n})(ProgressIndicatorLocation || (ProgressIndicatorLocation = {}));\n\nfunction getWindow() {\n return window;\n}\nfunction getMockWindow() {\n return {\n innerWidth: 0,\n innerHeight: 0,\n scrollY: 0,\n scrollX: 0,\n pageYOffset: 0,\n pageXOffset: 0,\n scroll: () => { },\n scrollTo: () => { },\n addEventListener: () => { },\n removeEventListener: () => { },\n };\n}\nclass WindowRefService {\n constructor(platformId) {\n this.isBrowser = false;\n this.isBrowser = isPlatformBrowser(platformId);\n }\n get nativeWindow() {\n if (this.isBrowser) {\n return getWindow();\n }\n else {\n return getMockWindow();\n }\n }\n}\nWindowRefService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.3.0\", ngImport: i0, type: WindowRefService, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable });\nWindowRefService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"13.3.0\", ngImport: i0, type: WindowRefService });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.3.0\", ngImport: i0, type: WindowRefService, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [PLATFORM_ID]\n }] }]; } });\n\nclass GuidedTourService {\n constructor(errorHandler, windowRef, dom) {\n this.errorHandler = errorHandler;\n this.windowRef = windowRef;\n this.dom = dom;\n this._guidedTourCurrentStepSubject = new Subject();\n this._guidedTourOrbShowingSubject = new Subject();\n this._currentTourStepIndex = 0;\n this._currentTour = null;\n this._onFirstStep = true;\n this._onLastStep = true;\n this._onResizeMessage = false;\n this.guidedTourCurrentStepStream = this._guidedTourCurrentStepSubject.asObservable();\n this.guidedTourOrbShowingStream = this._guidedTourOrbShowingSubject.asObservable();\n fromEvent(this.windowRef.nativeWindow, 'resize').pipe(debounceTime(200)).subscribe(() => {\n if (this._currentTour && this._currentTourStepIndex > -1) {\n if (this._currentTour.minimumScreenSize && this._currentTour.minimumScreenSize >= this.windowRef.nativeWindow.innerWidth) {\n this._onResizeMessage = true;\n const dialog = this._currentTour.resizeDialog || {\n title: 'Please resize',\n content: 'You have resized the tour to a size that is too small to continue. Please resize the browser to a larger size to continue the tour or close the tour.'\n };\n this._guidedTourCurrentStepSubject.next(dialog);\n }\n else {\n this._onResizeMessage = false;\n this._guidedTourCurrentStepSubject.next(this.getPreparedTourStep(this._currentTourStepIndex));\n }\n }\n });\n }\n nextStep() {\n if (this._currentTour.steps[this._currentTourStepIndex].closeAction) {\n this._currentTour.steps[this._currentTourStepIndex].closeAction();\n }\n if (this._currentTour.steps[this._currentTourStepIndex + 1]) {\n this._currentTourStepIndex++;\n this._setFirstAndLast();\n if (this._currentTour.steps[this._currentTourStepIndex].action) {\n this._currentTour.steps[this._currentTourStepIndex].action();\n // Usually an action is opening something so we need to give it time to render.\n setTimeout(() => {\n if (this._checkSelectorValidity()) {\n this._guidedTourCurrentStepSubject.next(this.getPreparedTourStep(this._currentTourStepIndex));\n }\n else {\n this.nextStep();\n }\n });\n }\n else {\n if (this._checkSelectorValidity()) {\n this._guidedTourCurrentStepSubject.next(this.getPreparedTourStep(this._currentTourStepIndex));\n }\n else {\n this.nextStep();\n }\n }\n }\n else {\n if (this._currentTour.completeCallback) {\n this._currentTour.completeCallback();\n }\n this.resetTour();\n }\n }\n backStep() {\n if (this._currentTour.steps[this._currentTourStepIndex].closeAction) {\n this._currentTour.steps[this._currentTourStepIndex].closeAction();\n }\n if (this._currentTour.steps[this._currentTourStepIndex - 1]) {\n this._currentTourStepIndex--;\n this._setFirstAndLast();\n if (this._currentTour.steps[this._currentTourStepIndex].action) {\n this._currentTour.steps[this._currentTourStepIndex].action();\n setTimeout(() => {\n if (this._checkSelectorValidity()) {\n this._guidedTourCurrentStepSubject.next(this.getPreparedTourStep(this._currentTourStepIndex));\n }\n else {\n this.backStep();\n }\n });\n }\n else {\n if (this._checkSelectorValidity()) {\n this._guidedTourCurrentStepSubject.next(this.getPreparedTourStep(this._currentTourStepIndex));\n }\n else {\n this.backStep();\n }\n }\n }\n else {\n this.resetTour();\n }\n }\n skipTour() {\n if (this._currentTour.skipCallback) {\n this._currentTour.skipCallback(this._currentTourStepIndex);\n }\n this.resetTour();\n }\n resetTour() {\n this.dom.body.classList.remove('tour-open');\n this._currentTour = null;\n this._currentTourStepIndex = 0;\n this._guidedTourCurrentStepSubject.next(null);\n }\n startTour(tour) {\n this._currentTour = cloneDeep(tour);\n this._currentTour.steps = this._currentTour.steps.filter(step => !step.skipStep);\n this._currentTourStepIndex = 0;\n this._setFirstAndLast();\n this._guidedTourOrbShowingSubject.next(this._currentTour.useOrb);\n if (this._currentTour.steps.length > 0\n && (!this._currentTour.minimumScreenSize\n || (this.windowRef.nativeWindow.innerWidth >= this._currentTour.minimumScreenSize))) {\n if (!this._currentTour.useOrb) {\n this.dom.body.classList.add('tour-open');\n }\n if (this._currentTour.steps[this._currentTourStepIndex].action) {\n this._currentTour.steps[this._currentTourStepIndex].action();\n }\n if (this._checkSelectorValidity()) {\n this._guidedTourCurrentStepSubject.next(this.getPreparedTourStep(this._currentTourStepIndex));\n }\n else {\n this.nextStep();\n }\n }\n }\n activateOrb() {\n this._guidedTourOrbShowingSubject.next(false);\n this.dom.body.classList.add('tour-open');\n }\n _setFirstAndLast() {\n this._onLastStep = (this._currentTour.steps.length - 1) === this._currentTourStepIndex;\n this._onFirstStep = this._currentTourStepIndex === 0;\n }\n _checkSelectorValidity() {\n if (this._currentTour.steps[this._currentTourStepIndex].selector) {\n const selectedElement = this.dom.querySelector(this._currentTour.steps[this._currentTourStepIndex].selector);\n if (!selectedElement) {\n this.errorHandler.handleError(\n // If error handler is configured this should not block the browser.\n new Error(`Error finding selector ${this._currentTour.steps[this._currentTourStepIndex].selector} on step ${this._currentTourStepIndex + 1} during guided tour: ${this._currentTour.tourId}`));\n return false;\n }\n }\n return true;\n }\n get onLastStep() {\n return this._onLastStep;\n }\n get onFirstStep() {\n return this._onFirstStep;\n }\n get onResizeMessage() {\n return this._onResizeMessage;\n }\n get currentTourStepDisplay() {\n return this._currentTourStepIndex + 1;\n }\n get currentTourStepCount() {\n return this._currentTour && this._currentTour.steps ? this._currentTour.steps.length : 0;\n }\n get preventBackdropFromAdvancing() {\n return this._currentTour && this._currentTour.preventBackdropFromAdvancing;\n }\n getPreparedTourStep(index) {\n return this.setTourOrientation(this._currentTour.steps[index]);\n }\n setTourOrientation(step) {\n const convertedStep = cloneDeep(step);\n if (convertedStep.orientation\n && !(typeof convertedStep.orientation === 'string')\n && convertedStep.orientation.length) {\n convertedStep.orientation.sort((a, b) => {\n if (!b.maximumSize) {\n return 1;\n }\n if (!a.maximumSize) {\n return -1;\n }\n return b.maximumSize - a.maximumSize;\n });\n let currentOrientation = Orientation.Top;\n convertedStep.orientation.forEach((orientationConfig) => {\n if (!orientationConfig.maximumSize || this.windowRef.nativeWindow.innerWidth <= orientationConfig.maximumSize) {\n currentOrientation = orientationConfig.orientationDirection;\n }\n });\n convertedStep.orientation = currentOrientation;\n }\n return convertedStep;\n }\n}\nGuidedTourService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.3.0\", ngImport: i0, type: GuidedTourService, deps: [{ token: i0.ErrorHandler }, { token: WindowRefService }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\nGuidedTourService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"13.3.0\", ngImport: i0, type: GuidedTourService });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.3.0\", ngImport: i0, type: GuidedTourService, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: i0.ErrorHandler }, { type: WindowRefService }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; } });\n\nclass GuidedTourComponent {\n constructor(guidedTourService, windowRef, dom) {\n this.guidedTourService = guidedTourService;\n this.windowRef = windowRef;\n this.dom = dom;\n this.topOfPageAdjustment = 0;\n this.tourStepWidth = 300;\n this.minimalTourStepWidth = 200;\n this.skipText = 'Skip';\n this.nextText = 'Next';\n this.doneText = 'Done';\n this.closeText = 'Close';\n this.backText = 'Back';\n this.progressIndicatorLocation = ProgressIndicatorLocation.InsideNextButton;\n this.progressIndicator = undefined;\n this.highlightPadding = 4;\n this.currentTourStep = null;\n this.selectedElementRect = null;\n this.isOrbShowing = false;\n this.progressIndicatorLocations = ProgressIndicatorLocation;\n }\n get maxWidthAdjustmentForTourStep() {\n return this.tourStepWidth - this.minimalTourStepWidth;\n }\n get widthAdjustmentForScreenBound() {\n if (!this.tourStep) {\n return 0;\n }\n let adjustment = 0;\n if (this.calculatedLeftPosition < 0) {\n adjustment = -this.calculatedLeftPosition;\n }\n if (this.calculatedLeftPosition > this.windowRef.nativeWindow.innerWidth - this.tourStepWidth) {\n adjustment = this.calculatedLeftPosition - (this.windowRef.nativeWindow.innerWidth - this.tourStepWidth);\n }\n return Math.min(this.maxWidthAdjustmentForTourStep, adjustment);\n }\n get calculatedTourStepWidth() {\n return this.tourStepWidth - this.widthAdjustmentForScreenBound;\n }\n ngAfterViewInit() {\n this.guidedTourService.guidedTourCurrentStepStream.subscribe((step) => {\n this.currentTourStep = step;\n if (step && step.selector) {\n const selectedElement = this.dom.querySelector(step.selector);\n if (selectedElement) {\n this.scrollToAndSetElement();\n }\n else {\n this.selectedElementRect = null;\n }\n }\n else {\n this.selectedElementRect = null;\n }\n });\n this.guidedTourService.guidedTourOrbShowingStream.subscribe((value) => {\n this.isOrbShowing = value;\n });\n this.resizeSubscription = fromEvent(this.windowRef.nativeWindow, 'resize').subscribe(() => {\n this.updateStepLocation();\n });\n this.scrollSubscription = fromEvent(this.windowRef.nativeWindow, 'scroll').subscribe(() => {\n this.updateStepLocation();\n });\n }\n ngOnDestroy() {\n this.resizeSubscription?.unsubscribe();\n this.scrollSubscription?.unsubscribe();\n }\n scrollToAndSetElement() {\n this.updateStepLocation();\n // Allow things to render to scroll to the correct location\n setTimeout(() => {\n if (!this.isOrbShowing && !this.isTourOnScreen()) {\n if (this.selectedElementRect && this.isBottom()) {\n // Scroll so the element is on the top of the screen.\n const topPos = ((this.windowRef.nativeWindow.scrollY + this.selectedElementRect.top) - this.topOfPageAdjustment)\n - (this.currentTourStep.scrollAdjustment ? this.currentTourStep.scrollAdjustment : 0)\n + this.getStepScreenAdjustment();\n try {\n this.windowRef.nativeWindow.scrollTo({\n left: null,\n top: topPos,\n behavior: 'smooth'\n });\n }\n catch (err) {\n if (err instanceof TypeError) {\n this.windowRef.nativeWindow.scroll(0, topPos);\n }\n else {\n throw err;\n }\n }\n }\n else {\n // Scroll so the element is on the bottom of the screen.\n const topPos = (this.windowRef.nativeWindow.scrollY + this.selectedElementRect.top + this.selectedElementRect.height)\n - this.windowRef.nativeWindow.innerHeight\n + (this.currentTourStep.scrollAdjustment ? this.currentTourStep.scrollAdjustment : 0)\n - this.getStepScreenAdjustment();\n try {\n this.windowRef.nativeWindow.scrollTo({\n left: null,\n top: topPos,\n behavior: 'smooth'\n });\n }\n catch (err) {\n if (err instanceof TypeError) {\n this.windowRef.nativeWindow.scroll(0, topPos);\n }\n else {\n throw err;\n }\n }\n }\n }\n });\n }\n handleOrb() {\n this.guidedTourService.activateOrb();\n if (this.currentTourStep && this.currentTourStep.selector) {\n this.scrollToAndSetElement();\n }\n }\n isTourOnScreen() {\n return this.tourStep\n && this.elementInViewport(this.dom.querySelector(this.currentTourStep.selector))\n && this.elementInViewport(this.tourStep.nativeElement);\n }\n // Modified from https://stackoverflow.com/questions/123999/how-to-tell-if-a-dom-element-is-visible-in-the-current-viewport\n elementInViewport(element) {\n let top = element.offsetTop;\n const height = element.offsetHeight;\n while (element.offsetParent) {\n element = element.offsetParent;\n top += element.offsetTop;\n }\n if (this.isBottom()) {\n return (top >= (this.windowRef.nativeWindow.pageYOffset\n + this.topOfPageAdjustment\n + (this.currentTourStep.scrollAdjustment ? this.currentTourStep.scrollAdjustment : 0)\n + this.getStepScreenAdjustment())\n && (top + height) <= (this.windowRef.nativeWindow.pageYOffset + this.windowRef.nativeWindow.innerHeight));\n }\n else {\n return (top >= (this.windowRef.nativeWindow.pageYOffset + this.topOfPageAdjustment - this.getStepScreenAdjustment())\n && (top + height + (this.currentTourStep.scrollAdjustment ? this.currentTourStep.scrollAdjustment : 0)) <= (this.windowRef.nativeWindow.pageYOffset + this.windowRef.nativeWindow.innerHeight));\n }\n }\n backdropClick(event) {\n if (this.guidedTourService.preventBackdropFromAdvancing) {\n event.stopPropagation();\n }\n else {\n this.guidedTourService.nextStep();\n }\n }\n updateStepLocation() {\n if (this.currentTourStep && this.currentTourStep.selector) {\n const selectedElement = this.dom.querySelector(this.currentTourStep.selector);\n if (selectedElement && typeof selectedElement.getBoundingClientRect === 'function') {\n this.selectedElementRect = selectedElement.getBoundingClientRect();\n }\n else {\n this.selectedElementRect = null;\n }\n }\n else {\n this.selectedElementRect = null;\n }\n }\n isBottom() {\n return this.currentTourStep.orientation\n && (this.currentTourStep.orientation === Orientation.Bottom\n || this.currentTourStep.orientation === Orientation.BottomLeft\n || this.currentTourStep.orientation === Orientation.BottomRight);\n }\n get topPosition() {\n const paddingAdjustment = this.getHighlightPadding();\n if (this.isBottom()) {\n return this.selectedElementRect.top + this.selectedElementRect.height + paddingAdjustment;\n }\n return this.selectedElementRect.top - this.getHighlightPadding();\n }\n get orbTopPosition() {\n if (this.isBottom()) {\n return this.selectedElementRect.top + this.selectedElementRect.height;\n }\n if (this.currentTourStep.orientation === Orientation.Right\n || this.currentTourStep.orientation === Orientation.Left) {\n return (this.selectedElementRect.top + (this.selectedElementRect.height / 2));\n }\n return this.selectedElementRect.top;\n }\n get calculatedLeftPosition() {\n const paddingAdjustment = this.getHighlightPadding();\n if (this.currentTourStep.orientation === Orientation.TopRight\n || this.currentTourStep.orientation === Orientation.BottomRight) {\n return (this.selectedElementRect.right - this.tourStepWidth);\n }\n if (this.currentTourStep.orientation === Orientation.TopLeft\n || this.currentTourStep.orientation === Orientation.BottomLeft) {\n return (this.selectedElementRect.left);\n }\n if (this.currentTourStep.orientation === Orientation.Left) {\n return this.selectedElementRect.left - this.tourStepWidth - paddingAdjustment;\n }\n if (this.currentTourStep.orientation === Orientation.Right) {\n return (this.selectedElementRect.left + this.selectedElementRect.width + paddingAdjustment);\n }\n return (this.selectedElementRect.right - (this.selectedElementRect.width / 2) - (this.tourStepWidth / 2));\n }\n get leftPosition() {\n if (this.calculatedLeftPosition >= 0) {\n return this.calculatedLeftPosition;\n }\n const adjustment = Math.max(0, -this.calculatedLeftPosition);\n const maxAdjustment = Math.min(this.maxWidthAdjustmentForTourStep, adjustment);\n return this.calculatedLeftPosition + maxAdjustment;\n }\n get orbLeftPosition() {\n if (this.currentTourStep.orientation === Orientation.TopRight\n || this.currentTourStep.orientation === Orientation.BottomRight) {\n return this.selectedElementRect.right;\n }\n if (this.currentTourStep.orientation === Orientation.TopLeft\n || this.currentTourStep.orientation === Orientation.BottomLeft) {\n return this.selectedElementRect.left;\n }\n if (this.currentTourStep.orientation === Orientation.Left) {\n return this.selectedElementRect.left;\n }\n if (this.currentTourStep.orientation === Orientation.Right) {\n return (this.selectedElementRect.left + this.selectedElementRect.width);\n }\n return (this.selectedElementRect.right - (this.selectedElementRect.width / 2));\n }\n get transform() {\n if (!this.currentTourStep.orientation\n || this.currentTourStep.orientation === Orientation.Top\n || this.currentTourStep.orientation === Orientation.TopRight\n || this.currentTourStep.orientation === Orientation.TopLeft) {\n return 'translateY(-100%)';\n }\n return null;\n }\n get orbTransform() {\n if (!this.currentTourStep.orientation\n || this.currentTourStep.orientation === Orientation.Top\n || this.currentTourStep.orientation === Orientation.Bottom\n || this.currentTourStep.orientation === Orientation.TopLeft\n || this.currentTourStep.orientation === Orientation.BottomLeft) {\n return 'translateY(-50%)';\n }\n if (this.currentTourStep.orientation === Orientation.TopRight\n || this.currentTourStep.orientation === Orientation.BottomRight) {\n return 'translate(-100%, -50%)';\n }\n if (this.currentTourStep.orientation === Orientation.Right\n || this.currentTourStep.orientation === Orientation.Left) {\n return 'translate(-50%, -50%)';\n }\n return null;\n }\n get overlayTop() {\n if (this.selectedElementRect) {\n return this.selectedElementRect.top - this.getHighlightPadding();\n }\n return 0;\n }\n get overlayLeft() {\n if (this.selectedElementRect) {\n return this.selectedElementRect.left - this.getHighlightPadding();\n }\n return 0;\n }\n get overlayHeight() {\n if (this.selectedElementRect) {\n return this.selectedElementRect.height + (this.getHighlightPadding() * 2);\n }\n return 0;\n }\n get overlayWidth() {\n if (this.selectedElementRect) {\n return this.selectedElementRect.width + (this.getHighlightPadding() * 2);\n }\n return 0;\n }\n getHighlightPadding() {\n let paddingAdjustment = this.currentTourStep.useHighlightPadding ? this.highlightPadding : 0;\n if (this.currentTourStep.highlightPadding) {\n paddingAdjustment = this.currentTourStep.highlightPadding;\n }\n return paddingAdjustment;\n }\n // This calculates a value to add or subtract so the step should not be off screen.\n getStepScreenAdjustment() {\n if (this.currentTourStep.orientation === Orientation.Left\n || this.currentTourStep.orientation === Orientation.Right) {\n return 0;\n }\n const scrollAdjustment = this.currentTourStep.scrollAdjustment ? this.currentTourStep.scrollAdjustment : 0;\n const tourStepHeight = typeof this.tourStep.nativeElement.getBoundingClientRect === 'function' ? this.tourStep.nativeElement.getBoundingClientRect().height : 0;\n const elementHeight = this.selectedElementRect.height + scrollAdjustment + tourStepHeight;\n if ((this.windowRef.nativeWindow.innerHeight - this.topOfPageAdjustment) < elementHeight) {\n return elementHeight - (this.windowRef.nativeWindow.innerHeight - this.topOfPageAdjustment);\n }\n return 0;\n }\n}\nGuidedTourComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.3.0\", ngImport: i0, type: GuidedTourComponent, deps: [{ token: GuidedTourService }, { token: WindowRefService }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Component });\nGuidedTourComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.3.0\", type: GuidedTourComponent, selector: \"ngx-guided-tour\", inputs: { topOfPageAdjustment: \"topOfPageAdjustment\", tourStepWidth: \"tourStepWidth\", minimalTourStepWidth: \"minimalTourStepWidth\", skipText: \"skipText\", nextText: \"nextText\", doneText: \"doneText\", closeText: \"closeText\", backText: \"backText\", progressIndicatorLocation: \"progressIndicatorLocation\", progressIndicator: \"progressIndicator\" }, viewQueries: [{ propertyName: \"tourStep\", first: true, predicate: [\"tourStep\"], descendants: true }], ngImport: i0, template: `\n <div *ngIf=\"currentTourStep && selectedElementRect && isOrbShowing\"\n (mouseenter)=\"handleOrb()\"\n class=\"tour-orb tour-{{ currentTourStep.orientation }}\"\n [style.top.px]=\"orbTopPosition\"\n [style.left.px]=\"orbLeftPosition\"\n [style.transform]=\"orbTransform\">\n <div class=\"tour-orb-ring\"></div>\n </div>\n <div *ngIf=\"currentTourStep && !isOrbShowing\">\n <div class=\"guided-tour-user-input-mask\" (click)=\"backdropClick($event)\"></div>\n <div class=\"guided-tour-spotlight-overlay\"\n [style.top.px]=\"overlayTop\"\n [style.left.px]=\"overlayLeft\"\n [style.height.px]=\"overlayHeight\"\n [style.width.px]=\"overlayWidth\">\n </div>\n </div>\n <div *ngIf=\"currentTourStep && !isOrbShowing\">\n <div #tourStep *ngIf=\"currentTourStep\"\n class=\"tour-step tour-{{ currentTourStep.orientation }}\"\n [ngClass]=\"{\n 'page-tour-step': !currentTourStep.selector\n }\"\n [style.top.px]=\"(currentTourStep.selector && selectedElementRect ? topPosition : null)\"\n [style.left.px]=\"(currentTourStep.selector && selectedElementRect ? leftPosition : null)\"\n [style.width.px]=\"(currentTourStep.selector && selectedElementRect ? calculatedTourStepWidth : null)\"\n [style.transform]=\"(currentTourStep.selector && selectedElementRect ? transform : null)\">\n <div *ngIf=\"currentTourStep.selector\" class=\"tour-arrow\"></div>\n <div class=\"tour-block\">\n <div *ngIf=\"\n progressIndicatorLocation === progressIndicatorLocations.TopOfTourBlock\n && !guidedTourService.onResizeMessage\"\n class=\"tour-progress-indicator\">\n <ng-container *ngTemplateOutlet=\"progress\"></ng-container>\n </div>\n <h3 class=\"tour-title\" *ngIf=\"currentTourStep.title && currentTourStep.selector\">\n {{ currentTourStep.title }}\n </h3>\n <h2 class=\"tour-title\" *ngIf=\"currentTourStep.title && !currentTourStep.selector\">\n {{ currentTourStep.title }}\n </h2>\n <div class=\"tour-content\" [innerHTML]=\"currentTourStep.content\"></div>\n <div class=\"tour-buttons\">\n <button *ngIf=\"!guidedTourService.onResizeMessage\"\n (click)=\"guidedTourService.skipTour()\"\n class=\"skip-button link-button\">\n {{ skipText }}\n </button>\n <button *ngIf=\"!guidedTourService.onLastStep && !guidedTourService.onResizeMessage\"\n class=\"next-button\"\n (click)=\"guidedTourService.nextStep()\">\n {{ nextText }}\n <ng-container *ngIf=\"progressIndicatorLocation === progressIndicatorLocations.InsideNextButton\">\n <ng-container *ngTemplateOutlet=\"progress\"></ng-container>\n </ng-container>\n </button>\n <button *ngIf=\"guidedTourService.onLastStep\"\n class=\"next-button\"\n (click)=\"guidedTourService.nextStep()\">\n {{ doneText }}\n </button>\n\n <button *ngIf=\"guidedTourService.onResizeMessage\"\n class=\"next-button\"\n (click)=\"guidedTourService.resetTour()\">\n {{ closeText }}\n </button>\n <button *ngIf=\"!guidedTourService.onFirstStep && !guidedTourService.onResizeMessage\"\n class=\"back-button link-button\"\n (click)=\"guidedTourService.backStep()\">\n {{ backText }}\n </button>\n </div>\n </div>\n </div>\n </div>\n <ng-template #progress>\n <ng-container *ngTemplateOutlet=\"\n progressIndicator || defaultProgressIndicator; \n context: { currentStepNumber: guidedTourService.currentTourStepDisplay, totalSteps: guidedTourService.currentTourStepCount }\n \"></ng-container> \n </ng-template>\n <ng-template #defaultProgressIndicator let-currentStepNumber=\"currentStepNumber\" let-totalSteps=\"totalSteps\">\n <ng-container *ngIf=\"progressIndicatorLocation === progressIndicatorLocations.InsideNextButton\"> </ng-container>{{ currentStepNumber }}/{{ totalSteps }}\n </ng-template>\n `, isInline: true, styles: [\"ngx-guided-tour .guided-tour-user-input-mask{position:fixed;top:0;left:0;display:block;height:100%;width:100%;max-height:100vh;text-align:center;opacity:0}ngx-guided-tour .guided-tour-spotlight-overlay{position:fixed;box-shadow:0 0 0 9999px #000000b3,0 0 1.5rem #00000080}ngx-guided-tour .tour-orb{position:fixed;width:20px;height:20px;border-radius:50%}ngx-guided-tour .tour-orb .tour-orb-ring{width:35px;height:35px;position:relative;top:50%;left:50%;transform:translate(-50%,-50%);animation:pulse 2s linear infinite}ngx-guided-tour .tour-orb .tour-orb-ring:after{content:\\\"\\\";display:inline-block;height:100%;width:100%;border-radius:50%}@keyframes pulse{0%{transform:translate(-50%,-50%) scale(.45);opacity:1}to{transform:translate(-50%,-50%) scale(1);opacity:0}}ngx-guided-tour .tour-step{position:fixed}ngx-guided-tour .tour-step.page-tour-step{max-width:400px;width:50%;left:50%;top:50%;transform:translate(-50%,-50%)}ngx-guided-tour .tour-step.tour-bottom .tour-arrow:before,ngx-guided-tour .tour-step.tour-bottom-right .tour-arrow:before,ngx-guided-tour .tour-step.tour-bottom-left .tour-arrow:before{position:absolute}ngx-guided-tour .tour-step.tour-bottom .tour-block,ngx-guided-tour .tour-step.tour-bottom-right .tour-block,ngx-guided-tour .tour-step.tour-bottom-left .tour-block{margin-top:10px}ngx-guided-tour .tour-step.tour-top,ngx-guided-tour .tour-step.tour-top-right,ngx-guided-tour .tour-step.tour-top-left{margin-bottom:10px}ngx-guided-tour .tour-step.tour-top .tour-arrow:before,ngx-guided-tour .tour-step.tour-top-right .tour-arrow:before,ngx-guided-tour .tour-step.tour-top-left .tour-arrow:before{position:absolute;bottom:0}ngx-guided-tour .tour-step.tour-top .tour-block,ngx-guided-tour .tour-step.tour-top-right .tour-block,ngx-guided-tour .tour-step.tour-top-left .tour-block{margin-bottom:10px}ngx-guided-tour .tour-step.tour-bottom .tour-arrow:before,ngx-guided-tour .tour-step.tour-top .tour-arrow:before{transform:translate(-50%);left:50%}ngx-guided-tour .tour-step.tour-bottom-right .tour-arrow:before,ngx-guided-tour .tour-step.tour-top-right .tour-arrow:before{transform:translate(-100%);left:calc(100% - 5px)}ngx-guided-tour .tour-step.tour-bottom-left .tour-arrow:before,ngx-guided-tour .tour-step.tour-top-left .tour-arrow:before{left:5px}ngx-guided-tour .tour-step.tour-left .tour-arrow:before{position:absolute;left:100%;transform:translate(-100%);top:5px}ngx-guided-tour .tour-step.tour-left .tour-block{margin-right:10px}ngx-guided-tour .tour-step.tour-right .tour-arrow:before{position:absolute;left:0;top:5px}ngx-guided-tour .tour-step.tour-right .tour-block{margin-left:10px}ngx-guided-tour .tour-step .tour-block{padding:15px 25px}ngx-guided-tour .tour-step .tour-progress-indicator{padding-bottom:15px}ngx-guided-tour .tour-step .tour-title{font-weight:700!important;padding-bottom:20px}ngx-guided-tour .tour-step h3.tour-title{font-size:20px}ngx-guided-tour .tour-step h2.tour-title{font-size:30px}ngx-guided-tour .tour-step .tour-content{min-height:80px;padding-bottom:30px;font-size:15px}ngx-guided-tour .tour-step .tour-buttons{overflow:hidden}ngx-guided-tour .tour-step .tour-buttons button.link-button{font-size:15px;font-weight:700;max-width:none!important;cursor:pointer;text-align:center;white-space:nowrap;vertical-align:middle;border:1px solid transparent;line-height:1.5;background-color:transparent;position:relative;outline:none;padding:0 15px;-webkit-appearance:button}ngx-guided-tour .tour-step .tour-buttons button.skip-button.link-button{padding-left:0;border-left:0}ngx-guided-tour .tour-step .tour-buttons .back-button{float:right}ngx-guided-tour .tour-step .tour-buttons .next-button{cursor:pointer;border-radius:1px;float:right;font-size:14px;border:none;outline:none;padding-left:10px;padding-right:10px}\\n\"], directives: [{ type: i3.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { type: i3.NgClass, selector: \"[ngClass]\", inputs: [\"class\", \"ngClass\"] }, { type: i3.NgTemplateOutlet, selector: \"[ngTemplateOutlet]\", inputs: [\"ngTemplateOutletContext\", \"ngTemplateOutlet\"] }], encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.3.0\", ngImport: i0, type: GuidedTourComponent, decorators: [{\n type: Component,\n args: [{ selector: 'ngx-guided-tour', template: `\n <div *ngIf=\"currentTourStep && selectedElementRect && isOrbShowing\"\n (mouseenter)=\"handleOrb()\"\n class=\"tour-orb tour-{{ currentTourStep.orientation }}\"\n [style.top.px]=\"orbTopPosition\"\n [style.left.px]=\"orbLeftPosition\"\n [style.transform]=\"orbTransform\">\n <div class=\"tour-orb-ring\"></div>\n </div>\n <div *ngIf=\"currentTourStep && !isOrbShowing\">\n <div class=\"guided-tour-user-input-mask\" (click)=\"backdropClick($event)\"></div>\n <div class=\"guided-tour-spotlight-overlay\"\n [style.top.px]=\"overlayTop\"\n [style.left.px]=\"overlayLeft\"\n [style.height.px]=\"overlayHeight\"\n [style.width.px]=\"overlayWidth\">\n </div>\n </div>\n <div *ngIf=\"currentTourStep && !isOrbShowing\">\n <div #tourStep *ngIf=\"currentTourStep\"\n class=\"tour-step tour-{{ currentTourStep.orientation }}\"\n [ngClass]=\"{\n 'page-tour-step': !currentTourStep.selector\n }\"\n [style.top.px]=\"(currentTourStep.selector && selectedElementRect ? topPosition : null)\"\n [style.left.px]=\"(currentTourStep.selector && selectedElementRect ? leftPosition : null)\"\n [style.width.px]=\"(currentTourStep.selector && selectedElementRect ? calculatedTourStepWidth : null)\"\n [style.transform]=\"(currentTourStep.selector && selectedElementRect ? transform : null)\">\n <div *ngIf=\"currentTourStep.selector\" class=\"tour-arrow\"></div>\n <div class=\"tour-block\">\n <div *ngIf=\"\n progressIndicatorLocation === progressIndicatorLocations.TopOfTourBlock\n && !guidedTourService.onResizeMessage\"\n class=\"tour-progress-indicator\">\n <ng-container *ngTemplateOutlet=\"progress\"></ng-container>\n </div>\n <h3 class=\"tour-title\" *ngIf=\"currentTourStep.title && currentTourStep.selector\">\n {{ currentTourStep.title }}\n </h3>\n <h2 class=\"tour-title\" *ngIf=\"currentTourStep.title && !currentTourStep.selector\">\n {{ currentTourStep.title }}\n </h2>\n <div class=\"tour-content\" [innerHTML]=\"currentTourStep.content\"></div>\n <div class=\"tour-buttons\">\n <button *ngIf=\"!guidedTourService.onResizeMessage\"\n (click)=\"guidedTourService.skipTour()\"\n class=\"skip-button link-button\">\n {{ skipText }}\n </button>\n <button *ngIf=\"!guidedTourService.onLastStep && !guidedTourService.onResizeMessage\"\n class=\"next-button\"\n (click)=\"guidedTourService.nextStep()\">\n {{ nextText }}\n <ng-container *ngIf=\"progressIndicatorLocation === progressIndicatorLocations.InsideNextButton\">\n <ng-container *ngTemplateOutlet=\"progress\"></ng-container>\n </ng-container>\n </button>\n <button *ngIf=\"guidedTourService.onLastStep\"\n class=\"next-button\"\n (click)=\"guidedTourService.nextStep()\">\n {{ doneText }}\n </button>\n\n <button *ngIf=\"guidedTourService.onResizeMessage\"\n class=\"next-button\"\n (click)=\"guidedTourService.resetTour()\">\n {{ closeText }}\n </button>\n <button *ngIf=\"!guidedTourService.onFirstStep && !guidedTourService.onResizeMessage\"\n class=\"back-button link-button\"\n (click)=\"guidedTourService.backStep()\">\n {{ backText }}\n </button>\n </div>\n </div>\n </div>\n </div>\n <ng-template #progress>\n <ng-container *ngTemplateOutlet=\"\n progressIndicator || defaultProgressIndicator; \n context: { currentStepNumber: guidedTourService.currentTourStepDisplay, totalSteps: guidedTourService.currentTourStepCount }\n \"></ng-container> \n </ng-template>\n <ng-template #defaultProgressIndicator let-currentStepNumber=\"currentStepNumber\" let-totalSteps=\"totalSteps\">\n <ng-container *ngIf=\"progressIndicatorLocation === progressIndicatorLocations.InsideNextButton\"> </ng-container>{{ currentStepNumber }}/{{ totalSteps }}\n </ng-template>\n `, encapsulation: ViewEncapsulation.None, styles: [\"ngx-guided-tour .guided-tour-user-input-mask{position:fixed;top:0;left:0;display:block;height:100%;width:100%;max-height:100vh;text-align:center;opacity:0}ngx-guided-tour .guided-tour-spotlight-overlay{position:fixed;box-shadow:0 0 0 9999px #000000b3,0 0 1.5rem #00000080}ngx-guided-tour .tour-orb{position:fixed;width:20px;height:20px;border-radius:50%}ngx-guided-tour .tour-orb .tour-orb-ring{width:35px;height:35px;position:relative;top:50%;left:50%;transform:translate(-50%,-50%);animation:pulse 2s linear infinite}ngx-guided-tour .tour-orb .tour-orb-ring:after{content:\\\"\\\";display:inline-block;height:100%;width:100%;border-radius:50%}@keyframes pulse{0%{transform:translate(-50%,-50%) scale(.45);opacity:1}to{transform:translate(-50%,-50%) scale(1);opacity:0}}ngx-guided-tour .tour-step{position:fixed}ngx-guided-tour .tour-step.page-tour-step{max-width:400px;width:50%;left:50%;top:50%;transform:translate(-50%,-50%)}ngx-guided-tour .tour-step.tour-bottom .tour-arrow:before,ngx-guided-tour .tour-step.tour-bottom-right .tour-arrow:before,ngx-guided-tour .tour-step.tour-bottom-left .tour-arrow:before{position:absolute}ngx-guided-tour .tour-step.tour-bottom .tour-block,ngx-guided-tour .tour-step.tour-bottom-right .tour-block,ngx-guided-tour .tour-step.tour-bottom-left .tour-block{margin-top:10px}ngx-guided-tour .tour-step.tour-top,ngx-guided-tour .tour-step.tour-top-right,ngx-guided-tour .tour-step.tour-top-left{margin-bottom:10px}ngx-guided-tour .tour-step.tour-top .tour-arrow:before,ngx-guided-tour .tour-step.tour-top-right .tour-arrow:before,ngx-guided-tour .tour-step.tour-top-left .tour-arrow:before{position:absolute;bottom:0}ngx-guided-tour .tour-step.tour-top .tour-block,ngx-guided-tour .tour-step.tour-top-right .tour-block,ngx-guided-tour .tour-step.tour-top-left .tour-block{margin-bottom:10px}ngx-guided-tour .tour-step.tour-bottom .tour-arrow:before,ngx-guided-tour .tour-step.tour-top .tour-arrow:before{transform:translate(-50%);left:50%}ngx-guided-tour .tour-step.tour-bottom-right .tour-arrow:before,ngx-guided-tour .tour-step.tour-top-right .tour-arrow:before{transform:translate(-100%);left:calc(100% - 5px)}ngx-guided-tour .tour-step.tour-bottom-left .tour-arrow:before,ngx-guided-tour .tour-step.tour-top-left .tour-arrow:before{left:5px}ngx-guided-tour .tour-step.tour-left .tour-arrow:before{position:absolute;left:100%;transform:translate(-100%);top:5px}ngx-guided-tour .tour-step.tour-left .tour-block{margin-right:10px}ngx-guided-tour .tour-step.tour-right .tour-arrow:before{position:absolute;left:0;top:5px}ngx-guided-tour .tour-step.tour-right .tour-block{margin-left:10px}ngx-guided-tour .tour-step .tour-block{padding:15px 25px}ngx-guided-tour .tour-step .tour-progress-indicator{padding-bottom:15px}ngx-guided-tour .tour-step .tour-title{font-weight:700!important;padding-bottom:20px}ngx-guided-tour .tour-step h3.tour-title{font-size:20px}ngx-guided-tour .tour-step h2.tour-title{font-size:30px}ngx-guided-tour .tour-step .tour-content{min-height:80px;padding-bottom:30px;font-size:15px}ngx-guided-tour .tour-step .tour-buttons{overflow:hidden}ngx-guided-tour .tour-step .tour-buttons button.link-button{font-size:15px;font-weight:700;max-width:none!important;cursor:pointer;text-align:center;white-space:nowrap;vertical-align:middle;border:1px solid transparent;line-height:1.5;background-color:transparent;position:relative;outline:none;padding:0 15px;-webkit-appearance:button}ngx-guided-tour .tour-step .tour-buttons button.skip-button.link-button{padding-left:0;border-left:0}ngx-guided-tour .tour-step .tour-buttons .back-button{float:right}ngx-guided-tour .tour-step .tour-buttons .next-button{cursor:pointer;border-radius:1px;float:right;font-size:14px;border:none;outline:none;padding-left:10px;padding-right:10px}\\n\"] }]\n }], ctorParameters: function () { return [{ type: GuidedTourService }, { type: WindowRefService }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; }, propDecorators: { topOfPageAdjustment: [{\n type: Input\n }], tourStepWidth: [{\n type: Input\n }], minimalTourStepWidth: [{\n type: Input\n }], skipText: [{\n type: Input\n }], nextText: [{\n type: Input\n }], doneText: [{\n type: Input\n }], closeText: [{\n type: Input\n }], backText: [{\n type: Input\n }], progressIndicatorLocation: [{\n type: Input\n }], progressIndicator: [{\n type: Input\n }], tourStep: [{\n type: ViewChild,\n args: ['tourStep', { static: false }]\n }] } });\n\nclass GuidedTourModule {\n static forRoot() {\n return {\n ngModule: GuidedTourModule,\n providers: [ErrorHandler, GuidedTourService],\n };\n }\n}\nGuidedTourModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.3.0\", ngImport: i0, type: GuidedTourModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nGuidedTourModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"12.0.0\", version: \"13.3.0\", ngImport: i0, type: GuidedTourModule, declarations: [GuidedTourComponent], imports: [CommonModule], exports: [GuidedTourComponent] });\nGuidedTourModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"13.3.0\", ngImport: i0, type: GuidedTourModule, providers: [WindowRefService], imports: [[CommonModule]] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.3.0\", ngImport: i0, type: GuidedTourModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [GuidedTourComponent],\n imports: [CommonModule],\n providers: [WindowRefService],\n exports: [GuidedTourComponent],\n entryComponents: [GuidedTourComponent],\n }]\n }] });\n\n/*\n * Public API Surface of ngx-guided-tour\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { GuidedTourComponent, GuidedTourModule, GuidedTourService, Orientation, ProgressIndicatorLocation, WindowRefService };\n","import { asyncScheduler } from '../scheduler/async';\nimport { operate } from '../util/lift';\nimport { OperatorSubscriber } from './OperatorSubscriber';\nexport function debounceTime(dueTime, scheduler = asyncScheduler) {\n return operate((source, subscriber) => {\n let activeTask = null;\n let lastValue = null;\n let lastTime = null;\n const emit = () => {\n if (activeTask) {\n activeTask.unsubscribe();\n activeTask = null;\n const value = lastValue;\n lastValue = null;\n subscriber.next(value);\n }\n };\n function emitWhenIdle() {\n const targetTime = lastTime + dueTime;\n const now = scheduler.now();\n if (now < targetTime) {\n activeTask = this.schedule(undefined, targetTime - now);\n subscriber.add(activeTask);\n return;\n }\n emit();\n }\n source.subscribe(new OperatorSubscriber(subscriber, (value) => {\n lastValue = value;\n lastTime = scheduler.now();\n if (!activeTask) {\n activeTask = scheduler.schedule(emitWhenIdle, dueTime);\n subscriber.add(activeTask);\n }\n }, () => {\n emit();\n subscriber.complete();\n }, undefined, () => {\n lastValue = activeTask = null;\n }));\n });\n}\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}","export default function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,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,530,531,532,533,534,535,536,537,538,539,540,541,542,543,544,545,546,547,548,549,550,551,552,553,554,555,556,557,558,559,560,561,562,563,564,565,566,567,568,569,570,571,572,573,574,575,576,577,578,579,580,581,582,583,584,585,586,587,588,589,590,591,592,593,594,595,596,597,598,599,600,601,602,603,604,605,606,607,608,609,610,611,612,613,614,615,616,617,618,619,620,621,622,623,624,625,626,627,628,629,630,631,632,633,634,635,636,637,638,639,640,641,642,643,644,645,646,647,648,649,650,651,652,653,654,655,656,657,658,659,660,661,662,663,664,665,666,667,668,669,670,671,672,673,674,675,676,677,678,679,680,681,682,683,684,685,686,687,688,689,690,691,692,693,694,695,696,697,698,699,700,701,702,703,704,705,706,707,708,709,710,711,712,713,714,715,716,717,718,719,720,721,722,723,724,725,726,727,728,729,730,731,732,733]}